Category bash

Quick Lockdown Script

Just a little script to lockdown default Oracle accounts and randomly change passwords [sourcecode language=”bash”] function lock_default_oracle_accounts() { export RANDPWD=`date +%s | sha256sum | base64 | head -c 12` sqlplus / as sysdba <<EOF spool select username from DBA_USERS_WITH_DEFPWD;…

SGA Fiddling…

Just a little script to mess with the SGA [sourcecode language=”bash”] #!/bin/bash #=================================================================================== # # FILE: Increase_SGA # # USAGE: Run it.. # # DESCRIPTION: Script to increase SGA # OPTIONS: # REQUIREMENTS: # AUTHOR: Matt D # CREATED: August…

DataPump — Export & Import Scripts

Use these 2 scripts together and you should be good to go… Here’s the DataPump Export Script [sourcecode language=”bash”] #!/bin/bash #=================================================================================== # # FILE: expdp_helper.sh # # USAGE: Run from command line # # DESCRIPTION: DataPump Export of database #…

Setup DBFS and mount DBFS

For those who don’t know what DBFS (DataBase FileSystem) is, here’s a little snippet: The Oracle Database File System (DBFS) enables the database to be used as a POSIX-compatible file system on Linux. This feature includes a PL/SQL package on…

My oracle user bash_profile

Use it…abuse it…don’t lose it… [sourcecode language=”bash”] # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:/sbin:$HOME/bin export PATH #ORACLE_SID=grid;export ORACLE_SID ORACLE_BASE=/u01/app ; export ORACLE_BASE…