Oracle - multiple databases on one server, connect issue

3.4k views Asked by At

I'm new in Oracle Database and so far I was using only MS SQL Server. I created two databases on my laptop (habit from MS), which is running Windows 8.

I stoped those two databases using SQL Plus and "shutdown normal" command. Before stoping those databases, I connected to them using "user/password@database_SID" syntax. After shutdown I can't choose which database I want to connect because when using "@Database_SID" I've got this error:

"ORA-12514: TNS:listener does not currently know of service requested in connect descriptor".

How can I define which database I want to connect whithout "@Database_SID" syntax?

Thanks a lot for help!

2

There are 2 answers

1
Bjarte Brandt On BEST ANSWER

Locally on your machine, you use IPC - Inter Process Communication to login to your database in order to do administrative work. (startup, shutdown, mount, etc)

C:\>set ORACLE_SID=DB1
C:\>sqlplus / as sysdba -- make sure you are member of group "ORA_DBA"
SQL>startup

C:\>set ORACLE_SID=DB2
C:\>sqlplus / as sysdba 
SQL>startup

ORA-12514 indicates the database has not registered with the listener because database status is shutdown

Note. The Windows Service OracleService<SID> can have status "Running", but the database can be stopped (shutdown)

There is no need to have two physical databases running on your laptop. Waste of resources. In Oracle terms you need two schemas.

0
Brad Bruce On

Make sure the listener is running.

On Windows, Oracle seems to use the networking layer, even when connecting locally.