Monday, 31 May 2010

SQL*Plus Direct Connection URL

Note for myself, avoiding the use of a tnsnames.ora file to connect with.

sqlplus {username}/{password}@{hostname}:{port}/{service-name}

 
d:\temp>sqlplus scott/tiger@beast.au.oracle.com:1523/linux11gr2

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 31 08:04:56 2010

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SCOTT@beast.au.oracle.com:1523/linux11gr2>

2 comments:

Anonymous said...

This is the "Easy Connect" syntax. It was extended in 11g to allow the DB server process type to be specified.
See http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm#i498306 for the syntax

Anonymous said...

And it's not specific in anyway to SQL*Plus.