I really should know this, but would someone tell me how to change the default database on Linux?
For example:
I have a database test1
on server1
with ORACLE_SID=test1
. So, to connect to test1
I can use:
sqlplus myuser/password
Connects to the default database, test1
I would now like the default sqlplus connection to go to database test2
on server server2
.
So, I've updated tnsnames so that the old test1
entry now points to test2@server2
. I've also added a separate entry for test2
that points to the same place. However, the default connection still seems to go to test1@server1
.
The following both work fine and go to database test2
on server2
:
sqlplus myuser/password@test1
sqlplus myuser/password@test2
But the default connection, sqlplus myuser/password
, goes to test1@server1
.
Any ideas?
Thanks.