Oracle Connectivity/Windows Service

  • Thread starter Thread starter Karthikeyan Raghuraman via .NET 247
  • Start date Start date
K

Karthikeyan Raghuraman via .NET 247

We have a windows service written in VB.NET.
This service is used to trigger applications. The functionality of the service can be briefly explained as

1. The Service accesses the Oracle database.
2. Checks the status of certain table entries.
3. Depending on the table entries processes are triggered.
4. The Service is a perpeterating one with a periodicity of 2 minutes.

Issue:

1. The service is installed and is started. It is functioning as expected. Now the Database is brought down (say for backup) and is brought up again.
When the Database is brought down the service is not able to access the database which is expected.
Now when the database is brought up the service still persists with the error.

ERROR from the service:
--------------------------------
ERROR MESSAGE : ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

SVR4 Error: 2: No such file or directory
 
Hmm .. This is a guess, but I think I'm correct on this (90% chance I'm
correct).

OracleConnection probably maintains a connection pool, just like
SqlConnection does. When you restart the database server, the connection
pool is now corrupted, and the server the service was running on has no way
of knowing that.

..NET 2.0 has introduced two new methods "ClearPool" - for one
connectionstringpool and "ClearPools" - for all pools to come over this
problem. But in 1.1 you will have to restart the machine the service is
running on.

Does restarting your Windows Service machine help? Could u do a failover
database model?

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/




Karthikeyan Raghuraman via .NET 247 said:
We have a windows service written in VB.NET.
This service is used to trigger applications. The functionality of the
service can be briefly explained as
1. The Service accesses the Oracle database.
2. Checks the status of certain table entries.
3. Depending on the table entries processes are triggered.
4. The Service is a perpeterating one with a periodicity of 2 minutes.

Issue:

1. The service is installed and is started. It is functioning as expected.
Now the Database is brought down (say for backup) and is brought up again.
 
Back
Top