ORA-27101 using universal connection pool

9.7k views Asked by At

I'm currently facing the ORA-27101 in my java server application. When it was started it worked fine for some days, then the failure appeared and the application was lost. I can only see these ORAs on my log. It is possible that the database was down for an hour or two. But also after that period the application never came back to live. After a restart everything was fine again.

So my questions are: What does cause such an behavior of the application? What do I have to do, when this Exception appears in my application? Is an restart the only way or can I handle this within the application?

OS is Windows Server 2008 and the Oracle database is an 11g. I'm using the oracle jdbc driver and universal connection pool for managing the several connections.

And finally the stacktrace:

java.sql.SQLException: Exception while getting connection: oracle.ucp.UniversalConnectionPoolException: cannot get connection from datasource: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
           at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:488)
           at oracle.ucp.util.UCPErrorHandler.throwSQLException(UCPErrorHandler.java:163)
           at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:928)
           at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:863)
           at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:855)
1

There are 1 answers

4
mprabhat On

This error means your database is down.

ORA-01034: ORACLE not available Cause: Oracle was not started up. Possible causes include the following: - The SGA requires more space than was allocated for it.

  • The operating-system variable pointing to the instance is improperly defined.

Action: Refer to accompanying messages for possible causes and correct the problem mentioned in the other messages. If Oracle has been initialized, then on some operating systems, verify that Oracle was linked correctly. See the platform specific Oracle documentation.

There are multiple reason for this error:

  1. Server crash
  2. Some database operation resulted in database in unstable state.
  3. There was not enough space