Establish Connection without tnsnames


Problem

Connecting to Oracle using SQL*Plus without Tnsnames

You know where Oracle runs, you know the user and password as well as the database name. You could try to locate the tnsnames file or create one on your own. If you don't like that, simply use the command shown below.


Solution

Recipe #1 - Connecting to Oracle using SQL*Plus

sqlplus user/[email protected]:port/database

A complete example which connects to the database called XE on the server 192.168.161.240 using the user scott with the password tiger:

sqlplus tom/[email protected]:1521/XE

Comments




Please sign-in to post a comment