Thread: Issues with restarting the database in EM 10g


Permlink Replies: 2 - Pages: 1 - Last Post: May 13, 2005 4:25 AM Last Post By: Peter Nerg
jmcnaug2

Posts: 69
Registered: 08/09/01
Issues with restarting the database in EM 10g
Posted: May 5, 2005 11:52 PM
Click to report abuse...   Click to reply to this thread Reply
Hi there,

I'm an experienced Oracle database developer who is currently giving himself a crash course on the DBA side of things; a subject on which I'm pretty clueless.

I've been following an online guide in terms of installation of the 10g Database server on Windows XP (Home Edition) and configuration in Enterprise Manager 10g. All was going well until I shut the database down from OEM. It appeared to shut down okay (although the weird thing was that the service was still showing as "Started" in the windows service menu). I just can't restart the damn thing.

When I attempt to start the service from OEM, I get the following error message:

SQLException:
Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor The Connection descriptor used by the client was: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MainDB)))


I also attempted to perform a recovery from OEM and received the following exception:

Unable to connect to the database.

Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: (description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(sid=MainDB)(server=dedicated)))

I've obviously checked out the error codes and suggestions on Technet, but as I'm not a DBA as of yet, I'm really not familiar with a lot of this stuff. I have done some investigation, but seem to be getting mired ever deeper.

For example, one of the suggestions for the ORA-12505 exception was to "Check which instances are currently known by the listener by executing: lsnrctl services <listener name>".

I tried this by entering the name of my listener service, so the command was executed in the following way from the DOS command prompt:

lsnrctl services OracleOraDB10g_home1TNSListener

I received the following TNS exception:

TNS-01101: Could not find service name OracleOraDB10g_home1TNSListener

This service name is clearly visible in the XP services list in the control panel, and I have checked the spelling carefully.

When I researched the TNS-01101 error message on Technet, I found the following information:

Cause: The service name could not be resolved by name-lookup.
Action: Verify that the listener name or service name specified to LSNRCTL has the correct name and address defined in LISTENER.ORA or in TNSNAMES.ORA.


I know where to find these two files, but I'm honestly not certain of what I should enter in them to fix this problem.

Please can anybody spare some time to help me out here? Is my installation totally whacked out, or am I just been a little stupid/clueless?

jmcnaug2

Posts: 69
Registered: 08/09/01
Re: Issues with restarting the database in EM 10g
Posted: May 8, 2005 8:03 PM   in response to: jmcnaug2 in response to: jmcnaug2
Click to report abuse...   Click to reply to this thread Reply
Managed to figure out what the problem was. The database service was not registered with the listener. I manually entered my service criteria in the listener.ora file, and this has fixed the problem.

I find it staggering to say the least, that this registration was not done automatically by the database software installation.
Peter Nerg

Posts: 9
Registered: 09/25/03
Re: Issues with restarting the database in EM 10g
Posted: May 13, 2005 4:25 AM   in response to: jmcnaug2 in response to: jmcnaug2
Click to report abuse...   Click to reply to this thread Reply
Though you seem to have solved the problem on your own I thought that I perhaps could shed some light on the reason for the problem.

There are two modes of listener configuration:
static and dynamic

In the dynamic mode you don't specify the services running on the server. Instead the PMON process of the database instance will register itself to the listener. This is done approx each 3 second. Hence the listener will always know what services are up and running.

In the static mode you specify what services "should" be running on the server. The problem with this mode is that the listener doesn't know it the service is up or not.
The static is the mode is however required by the OEM.
There are other problems with the static mode.
I've experienced problems with hanging server processes (user logon processes) when connecting over OCI towards a crashed database that has static listener configuration.
The problem has been reported to Oracle though the only solution I could implement for the moment was to use dynamic listener config which by the way is the recommended method (by Oracle).

You can always start an instance even if it's not registered in the listener, though it requires for you to log on using sqlplus and perform a startup command.

I hope the answer is of some help.

/Peter
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums