- 3,724,107 Users
- 2,244,689 Discussions
- 7,850,863 Comments
Forum Stats
Discussions
Categories
- 16 Data
- 362.2K Big Data Appliance
- 7 Data Science
- 2.1K Databases
- 620 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 32 Multilingual Engine
- 497 MySQL Community Space
- 7 NoSQL Database
- 7.7K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 422 SQLcl
- 62 SQL Developer Data Modeler
- 185.1K SQL & PL/SQL
- 21.1K SQL Developer
- 2.5K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.7K Development Tools
- 14 DevOps
- 3K QA/Testing
- 337 Java
- 10 Java Learning Subscription
- 12 Database Connectivity
- 72 Java Community Process
- 2 Java 25
- 12 Java APIs
- 141.2K Java Development Tools
- 8 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 16 Java SE
- 13.8K Java Security
- 4 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 147 LiveLabs
- 34 Workshops
- 10 Software
- 4 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 4 Deutsche Oracle Community
- 16 Español
- 1.9K Japanese
- 3 Portuguese
No notifications using Continuous Query Notification (CQN) after some idle time

Hello,
I am using ODP.NET core to register Continous Query Notification with Oracle Database 12c R2. This works and event handler is called on change , however after some idle time (typically during off business hours when there are no updates), Events/notifications are no longer received and netstat doesnt show port being opened between Database and Application Server. This requires restarting the process (i.e. Windows service) every day. Is their any workaround or resolution for this ?
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
if(ExecutionFlag)
{
ExecutionFlag = false;
_logger.LogInformation("Worker Started at: {0}", DateTimeOffset.Now);
OracleConfiguration.DbNotificationPort = 1201;
OracleDependency dep = null;
OracleConnection con = null;
try
{
con = new OracleConnection(oraConnection);
OracleCommand objCommand = new OracleCommand("select * from fins_authorizationmaster", con);
con.Open();
dep = new OracleDependency(objCommand);
objCommand.AddRowid = true;
objCommand.Notification.IsNotifiedOnce = false;
dep.OnChange += new OnChangeEventHandler(Worker.dep_OnChange);
objCommand.ExecuteNonQuery();
}
catch (System.Exception ex)
{
_logger.LogError("Error on Worker Page - ExecuteAsync {0}", ex.Message + "|" + ex.InnerException + "|" + ex.StackTrace);
}
}
}
Answers
-
Perhaps the CQN registration is timing out. The default value lasts about 14 hours.
You should still get a notification if a time out occurs.