Monday, May 30, 2011

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/ha/dataguard/physstby/physstdby.htm#t2


https://support.oracle.com/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=()),(page=KBNavigator&id=(bmDocType=REFERENCE&bmDocDsrc=KB&bmDocID=443720.1&bmDocTitle=11g%20Using%20Snapshot%20Standby%20Database.&from=BOOKMARK&viewingMode=1143))

Saturday, May 14, 2011

For reference - one of nawk usages

Nawk is basically nothing but an updated version of awk on solaris systems.
Was supposed get total available space of all filesystems under ORACLE.
We can easily get the available space on any mount point from df -h command.
However with around 50 such file systems, summing the available space of each is something we would obviously not do!

We have many ways to do the same. Loops is obviously one option.
However this one line did the same perfectly.
df -h |grep ORACLE |awk '{print $4}' |sed 's/[A-Z]//g'|nawk -v s=0 '{s=s+$0; print s; }'

Would use nawk more often now.



Tuesday, May 10, 2011

Simple and silent upgrade of Oracle database

The regular manual method of upgradation of the database, includes series of prechecks, followed by catupgrd.sql and post tasks, depending upon the upgraded version.
Oracle provides detailed documentation for the same.
However, if you want to get away from all the hassle and keep upgradation simple enough, you can use the following command for silent upgrade to any oracle version.

Following example upgrades the database 'demo' to 11.2.0.2 version.
Please note that before we execute the command we need to ensure that 11.2.0.2 binaries have been installed and the init.ora file for the database is present with upgraded parameters in $ORACLE_HOME/dbs directory. Also, the DIAGNOSTIC_DEST directories mentioned in the init.ora files should be physically present on the server.
Once the above mentioned basic things are taken into consideration, run the following command..sit back..and enjoy!

dbua -silent -dbname demo -oracleHome /opt/oracle/product/11.2.0.2 -sysDBAUserName sys -sysDBAPassword  mysyspwd -recompile_invalid_objects true


It completes all the necessatry pre-checks, upgradation, and post tasks.. with proper log files and leaves the database back in open state.. all upgraded for you!