Commands I Always Forget

This post is aimed at one location for maintaining commands I can’t seem to keep straight and end up googling.  PSOUG and Morgan’s library our great resources, but some times I just want a quick place to stop by and retrieve what I need.  As I run into these commands I’ll update this page.
Dropping a database 11.2 Single Instance
 SQLPLUS:
 SQL> shutdown immediate
 SQL> startup restricted mount
 SQL> drop database;
RMAN:
> RMAN
RMAN>  CONNECT TARGET SYS@orcl
target database Password: password
connected to target database:  orcl (DBID=4920931111)
 RMAN > STARTUP FORCE MOUNT
 RMAN > SQL ‘ALTER SYSTEM ENABLE RESTRICTED SESSION’;
 RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;

Stop and Start Physical Standby 
 
SQLPLUS
Start
 SQL> ALTER DATABASE RECOVER MANAGED STANDBY DISCONNECT FROM SESSION;
Stop
SQL> ALTER DATABASE RECOVER MANAGED STANDBY CANCEL;
 

CRSCTL

 
crsctl start crs 
   start cluster 11.2 must be root or have sudo rights
crsctl stop crs
    stop cluster 11.2 must be root or have sudo rights
crsctl stat res -t
   displays the shorten form of the status (10.2 crs_stat)
 
crsctl enable crs
     enable clusterware daemons to auto start
crsctl disable crs
      disables automatic start of clusterware daemons
 
crsctl add css votedisk path
     add a vote disk
crsctl delete css votedisk path
     remove voting disk
crsctl check crs
    status of the crs  
 crsctl check cssd
crsctl check crsd
crsctl check evmd
crsctl check cluster
crsctl query crs softwareversion
crsctl query crs activeversion
Check Inventory
./opatch lsinventory
    ** view inventory using Opatch
cat /etc/oraInst.loc|grep inventory_loc
     ** to find the location of the inventory
cat /opt/app/oraInventory/ContentsXML/inventory.xml
     ** View inventory without using Opatch
Advertisements

Tagged:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: