Clone Database can not be connected after system reboot. [message #480096] |
Thu, 21 October 2010 03:35 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear All,
1. I installed oralce with Service_Name=DB1 it works fine,
2. I created another database with dbca named DB2,
3. I connected both system/password@db1 and system/password@db2 without any problem,
4. After rebooting the computer I can connect only the first database DB1 which I installed with Oracle installation. But, I can not connect to the 2nd database which I created with dbca. Error Message Shows: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
DB1 has no problem I can connect to that, but I can not connect to DB2 after rebooting the system. Now I need to know how to connect to DB2, please.
I would be very grateful if anybody please suggest me how I can connect the 2nd database DB2, as well.
Mohd. Golam Hossain
========================================================
I am adding some more information to clarify the condition:
========================================================
Quote:
connection messages:
oracle@pc ~]$ sqlplus
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Oct 21 12:51:43 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter user-name: SYSTEM@DB1
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CONNECT SYSTEM@DB2
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Warning: You are no longer connected to ORACLE.
Quote:
tnsnames.ora file content:
# tnsnames.ora Network Configuration File: /u01/oracle/db/11g/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pc)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB1)
)
)
db2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pc)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db2)
)
)
Quote:
listener.ora file content:
# listener.ora Network Configuration File: /u01/oracle/db/11g/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = pc)(PORT = 1521))
)
)
Quote:
sqlnet.ora file content:
# sqlnet.ora Network Configuration File: /u01/oracle/db/11g/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Quote:
tnsping and lsnrctl output:
[oracle@pc oracle]$ tnsping db1
TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 21-OCT-2010 14:29:38
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
/u01/oracle/db/11g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db1)))
OK (0 msec)
[oracle@pc oracle]$ tnsping db2
TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 21-OCT-2010 14:29:43
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
/u01/oracle/db/11g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = pc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = db2)))
OK (10 msec)
[oracle@pc oracle]$ lsnrctl start db2
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 21-OCT-2010 14:29:59
Copyright (c) 1991, 2007, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
[oracle@pc oracle]$
[oracle@pc oracle]$ `
[Updated on: Thu, 21 October 2010 03:55] Report message to a moderator
|
|
|
|
|
|
Re: Clone Database can not be connected after system reboot. [message #480125 is a reply to message #480096] |
Thu, 21 October 2010 05:42 |
Yasir Hashmi
Messages: 304 Registered: April 2006
|
Senior Member |
|
|
Add the following lines to your listener.ora file.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = <$ORACLE_HOME>)
(PROGRAM = extproc1521)
)
(SID_DESC =
(GLOBAL_DBNAME = DB1)
(ORACLE_HOME = <$ORACLE_HOME>)
(SID_NAME = DB1)
)
(SID_DESC =
(GLOBAL_DBNAME = DB2)
(ORACLE_HOME = /u/oracle)
(SID_NAME = DB2)
)
)
then stop and restart your listener.
Try to connect to DB2.
|
|
|
|
|
Re: Clone Database can not be connected after system reboot. [message #480129 is a reply to message #480128] |
Thu, 21 October 2010 06:00 |
Yasir Hashmi
Messages: 304 Registered: April 2006
|
Senior Member |
|
|
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = <$ORACLE_HOME>)
(PROGRAM = extproc1521)
)
(SID_DESC =
(GLOBAL_DBNAME = DB1)
(ORACLE_HOME = <$ORACLE_HOME>)
(SID_NAME = DB1)
)
(SID_DESC =
(GLOBAL_DBNAME = DB2)
(ORACLE_HOME = <$ORACLE_HOME>)
(SID_NAME = DB2)
)
)
Replace $ORACLE_HOME with your home directory
|
|
|
Re: Clone Database can not be connected after system reboot. [message #480132 is a reply to message #480128] |
Thu, 21 October 2010 06:30 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Mr. Yasir Hashmi,
It works great! It's the exact thing that I needed.
Thank you very much for your kind and wise reply. You understood my problem without asking anything.
I had slight changes in your linstener.ora file setting as under:
PROGRAM = extproc instead of PROGRAM = extproc1521
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = db1)
(ORACLE_HOME = /u01/oracle)
(SID_NAME = db1)
)
(SID_DESC =
(GLOBAL_DBNAME = db2)
(ORACLE_HOME = /u01/oracle)
(SID_NAME = db2)
)
(SID_DESC =
(GLOBAL_DBNAME = db3)
(ORACLE_HOME = /u01/oracle)
(SID_NAME = db3)
)
(SID_DESC =
(GLOBAL_DBNAME = db4)
(ORACLE_HOME = /u01/oracle)
(SID_NAME = db4)
)
)
So much gratitude for your kind reply!
Best regards,
G. Hossain
[Updated on: Thu, 21 October 2010 06:32] Report message to a moderator
|
|
|
|