My good friend Joel showed me how you can connect to a (remote) database using an easy connect identifier. Here's how it works:
sqlplus sergiodb/sergiodb@//127.0.0.1:1521/mvl
It looks to be a way of constructing a connect identifier that's new since database 10g Release 1. The syntax is as follows:
[//]host[:port][/service_name]
The documentation sums it up nicely: The easy connection identifier can be used wherever you can use a full connection identifier, or a net service name. The easy syntax is less complex, and no tnsnames.ora entry is required.
Comments (1)
The syntax was enhanced in Oracle 11g:
[//]host_name[:port][/service_name][:server_type][/instance_name]
E.g. to use Oracle 11g DRCP connection pooling in a tool that supports it, the connection string would be: hr/hrpwd@myserver.mydomain:pooled
See http://download.oracle.com/docs/cd/B28359_01/network.111/b28316/naming.htm#BABIHAAA
Posted by Chris Jones | March 19, 2009 3:00 PM
Posted on March 19, 2009 15:00