We decided to start something new here at Core Content Only. Each month we will review a UCM error and share how to solve it. Error messages are a part of a developer’s life. They can be very helpful when they make sense. Sadly, sometimes the error messages do not always make the most sense. We are going to showcase errors we have found when coding and how we solved them. We hope this will help you in your development work.

Failed to initialize the server. Unable to initialize the system provider ‘SystemDatabase’. Unable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orclUnable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcljava.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcl [ Details ]

We do most of our development work in Windows virtual machines. This particular VM has been in use for quite some time. This error message stops UCM from starting. This error message has to do with the (Oracle) database not being available. You will need Administrative rights to be able to complete this task.

Step 1 – Check the DB listener status

       lsnrctl status

Notice that the listener you want (in our case “orcl”) is not showing.

Step 2 – Login via sqlplus

       sqlplus sys/oracle as sysdba

Sqlplus gave us this error message:

       Writing audit records to Windows Event Log failed

Step 3 – Go into the Windows Event Viewer (eventvwr.exe)

Under “Windows Logs”, right click on Application and select “Clear Log”. Do the same for System.

It may also be wise to right click on Application and select Properties. Then, under “Log Size” select the following option under “When maximum log size is reached”: “Overwrite events as needed”. This should prevent the log from maxing out and causing the DB not to start.

In Windows Vista and higher, you can execute the following command to clear the Application log:

       wevtutil cl Application

Step 4 – Login via sqlplus

       sqlplus sys/oracle as sysdba

You should now be able to login with no error messages.

Step 5 - Check the DB listener status

       lsnrctl status

You should now see your listener running.

Step 6 – Start UCM

UCM should now start up.

Note: If you’ve got a UCM error you want us to review, send it to errors at corecontentonly.com.
 


Comments

Cícero M. F.
03/31/2013 8:55am

EN: I solved this problem like this:
PT: Eu resolvi esse problema assim:

# vim /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora

# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = user-VirtualBox)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

EN: I added this item changing the HOST user-VirtualBox by localhost
PT: Adicionei esse item trocando o HOST user-VirtualBox por localhost

XE2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
...

EN: The string of connetion can be:
PT: A string de conexão poderá ser:
jdbc:oracle:thin:@user-VirtualBox:1521:XE

EN: or
PT: ou

jdbc:oracle:thin:@127.0.0.1:1521:XE

EN: I hope i helped
PT: Espero ter ajudado

Reply



Leave a Reply


Redstone Content Solutions