Friday, July 2, 2010

connect to the database without TNS configure

1. with TNS In replace of Service name

sqlplus> conn scott/tiger@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(service_name=orcl)))'

--need to write in one line

2. Easy connection Method

In sqlnet.ora

NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)

Then

sqlplus> conn scott/tiger@//localhost:1521/halim

---here halim is sid

No comments: