Home » RDBMS Server » Server Administration » Clone Database can not be connected after system reboot. (Oracle 11g, RHEL-5.4)
Clone Database can not be connected after system reboot. [message #480096] Thu, 21 October 2010 03:35 Go to next message
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 #480110 is a reply to message #480096] Thu, 21 October 2010 04:21 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Are DB's installed on the same machine?
Is that the machine you rebooted?
Is that the machine you're trying to connect from?
Re: Clone Database can not be connected after system reboot. [message #480123 is a reply to message #480110] Thu, 21 October 2010 05:36 Go to previous messageGo to next message
m_golam_hossain
Messages: 89
Registered: August 2008
Location: Uttara, Dhaka, Bangladesh
Member

Thank you very much for your kind attention.

YES, it is in only one computer. Single computer only.

Best regards.

[Updated on: Thu, 21 October 2010 05:42]

Report message to a moderator

Re: Clone Database can not be connected after system reboot. [message #480124 is a reply to message #480123] Thu, 21 October 2010 05:41 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
You're running everything on the DB server?

Set your ORACLE_SID to db2 and connect as sysdba.
Re: Clone Database can not be connected after system reboot. [message #480125 is a reply to message #480096] Thu, 21 October 2010 05:42 Go to previous messageGo to next message
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 #480127 is a reply to message #480124] Thu, 21 October 2010 05:50 Go to previous messageGo to next message
m_golam_hossain
Messages: 89
Registered: August 2008
Location: Uttara, Dhaka, Bangladesh
Member

Yes I am running everything on DB server. It is a test pc only.

I need to set ORACLE_SID to db1 also.
I tried to connect as: sys/password@db2 as sysdba, but can not connect after reboot.

At first when I created the clone database with dbca I was able to connect to both the databases db1 and db2 before reboot. At that time ORACLE_SID was db1, but I had no problem to connect to db2.

Regards.
Re: Clone Database can not be connected after system reboot. [message #480128 is a reply to message #480125] Thu, 21 October 2010 05:52 Go to previous messageGo to next message
m_golam_hossain
Messages: 89
Registered: August 2008
Location: Uttara, Dhaka, Bangladesh
Member

Dear Yasir,

Thank you very much for your reply. I am trying this and replying about the result in 10 minutes.

Best regards.
Re: Clone Database can not be connected after system reboot. [message #480129 is a reply to message #480128] Thu, 21 October 2010 06:00 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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

Re: Clone Database can not be connected after system reboot. [message #480133 is a reply to message #480132] Thu, 21 October 2010 06:33 Go to previous message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
Your welcome Smile
Previous Topic: How commit and rollback behave
Next Topic: ORA-27044, ORA-16038, ORA-19504, ORA-00312
Goto Forum:
  


Current Time: Sat Jun 29 05:54:08 CDT 2024