Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Wednesday, June 20, 2012

How To Connect database in sqlplus without tnsnames.ora

Many times we have requirement of connecting database to execute a sql script but we sometimes don't find the tnsnames.ora file and sometimes we don't have permission to edit (one of my client faced issue on Windows 2008 Server).

So to avoid this issue we can connect to any DB using below string directly without using any tnsnames.ora file.

sqlplus "SCOTT/TIGER@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=OR2)(PORT=1521))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=DEV)))"

 Note in UNIX put the single quote instead of double quote

No comments: