Thursday 18 May 2017

SQL Plus Important Commands

How to Connect to sqlplus?
Type "sqlplus" in terminal and enter user-name and password.
On successful login below information will be displayed along with version information
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

How to exit sqlplus?
Type "quit " to exit from sqlplus

How to login using command line arguments?
Type sqlplus system/pass (It opens a connection to our local database)
To login to schema use below command
sqlplus schemaname/password@SID(Servicename defined in tnsnames.ora file)

How to check location of sqlplus?
Type which sqlplus

How to check sqlplus environment variable?
Type echo $PATH

How to check Oracle SID?
Type echo $ORACLE_SID

How to Start and stop the listener?

Command: lsnrctl using this command we can start/stop the listener by tying start/stop command

Linux Performance Monitoring