I have created two database on a Win2000 machine. Oracle_sid = DB1 or DB2.
How can I access the different databases from Sqlplus on my machine without having to go into the environment variables on the database machine and change the Oracle_SID to the target database? The TNSnames.ora file on my machine list both databases on the target machine. The target machine has two entries for the listener.ora. One for each database.
I figured it out. The listeners were crossed (for lack of a better explanation). When the second database was created, a second listener was also created (listener2). Somehow the first listener (listener) was also listening for the second database, but not on the correct port. I stopped both listeners and then restarted then individually and now the first listener listens for the first DB and the second listener listens for the second DB. And my connections work.