Sunday, March 28, 2010

List of commands I frequently use in Oracle

Listed below commands I fequently use on Oracle in Linux OS environment.
(I will keep updating as I come across more)...
Oracle Commands:
  • .How to find whether listener is running or not? 
    • lsnrctl status
    • to start listener 
      • lsnrctl start
    • to stop listener
      • lsnrctl stop 
    • to list services
      • lsnrctl services
  • To Configure Listener
    • from command prompt type netca
  • to start dbconsole (Enterprise Manager Console)
    • emctl start dbconsole
  • to stop dbconsole
    • emctl stop dbconsole
  • to access Enterprise Manager
    • https://<service_name>:1158/
      • for example if your service name is my.example.com then access url will be https://my.example.com:1158/
  • How to start Oracle dB?
    • sqlplus /nolog
    • sql> connect / as sysdba
    • startup
  • How to shutdown Oracle dB?
    • shutdown immediate
  • How to lock a user account & of course to unlock?  
    • SQL> ALTER USER <username>  ACCOUNT LOCK;
    • SQL> ALTER USER <username> ACCOUNT UNLOCK;
    • If you want to change the password while you unlock, use the following command: 
      • SQL> ALTER  USER <username> IDENTIFIED BY <password> ACCOUNT UNLOCK;

No comments: