Connecting methods of SQLPLUS in Oracle

Connecting methods of SQLPLUS in Oracle

Connect SQLPLUS on the Operating system depends upon the various factors.
you can connect with database by using following methods. In Some case you also need to set the ORACLE_HOME and PATH environment variable to use the SQLPLUS. prompt.
Note: In case of multiple database is configured in one system. you need to use the ORACLE_SID environment variable.

1. Connect to local database user with sysdba priviliges

sqlplus sys as sysdba

2. Connect with Operating System Authentication with SYSDBA Privilege.

sqlplus / as sysdba

3. Connect with easy connect syntax

sqlplus hr@"databasehostname.example.com:1522/orcl"

4. Connect with Easy Connect Syntax with IP address and port is default (1521).
Note: If port is default then not need to specify the port number

sqlplus hr@"172.1.1.5/orcl"

5. Connecting with an IPv6 Address
Note: IPV6 is used in Square bracket

connect hr@"[2001:0DB8:0:0::200C:417A]/orcl"

6. Connecting with a Net Service Name
Note: tnsentry in tnsnames.ora for using as net service name

connect hr@orcl

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.