Wednesday, November 24, 2010

Using Configurationless Connections To Connect to Database

Configurationless connections (Direct Connect)enable you to directly connect to the database server without having a service configured in the TNSNAMES.ORA file.

Syntax:
sqlplus username/password@[//][hostname][:db_port][/db_sid]

for example:
sqlplus scott/tiger@//192.168.1.100:1521/orcl

where:
- scott/tiger : username and password of the schema you will connect to.
- 192.168.1.100 : the IP Address for the database server.
- 1521 : database port.
- orcl : db_sid

In order for this to work, you need to add a parameter to the sqlnet.ora file on the database server in this path $ORACLE_HOME/network/admin

NAMES.DIRECTORY_PATH=(ezconnect,tnsnames)

No comments: