Is there a way to troubleshoot change notifications in Oracle? - oracle

I'm trying to use oracle change notifications (API from Dbms_Change_Notification package) to update complex materialized views. I install change notification for my table with my PL/SQL callback and I can see in USER_CHANGE_NOTIFICATION_REGS view that my change notification is installed properly. On development oracle servers with low load change notifications are called as expected just after commit to observed table. But on real servers with high load it looks like change notifications are never called.
Is there any way to troubleshoot why change notifications are not called, when they are going to be called, what kind of error happens when they are called and so on?
P.S. I am using oracle Version 10.2.0.3.0

On your production system, have you set the JOB_QUEUE_PROCESSES initialization parameter? It must be set to a non-zero value.
Has the user registering the queries been granted the right privileges on the production database (CHANGE NOTIFICATION and execute on DBMS_CHANGE_NOTIFICATION)?

Related

How can I determine exactly how much downtime needed during the scheduled maintenance window in Autonomous Database?

How can I determine exactly how much downtime is needed during the scheduled maintenance window in Autonomous Database? Also, how can I find out about what's included in a given patch?
As described in the doc, your database remains available during the maintenance window. Your existing database connections may get disconnected briefly; however, you can immediately reconnect and continue using your database. If your application uses Oracle Transparent Application Continuity (TAC), you avoid these brief disconnects altogether.
In order to see what bug fixes are delivered in these maintenance windows, you can run the following query:
-- To view patch information for all available patches
SELECT * FROM DBA_CLOUD_PATCH_INFO;
-- For patch ADBS-21.7.1.1
SELECT * FROM DBA_CLOUD_PATCH_INFO WHERE PATCH_VERSION = 'ADBS-21.7.1.1';
Disclaimer: I’m a Product Manager at Oracle.

Delete Oracle Change Notifications

I'm trying to deregister change notifications in Oracle 12c by executing:
DBMS_CQ_NOTIFICATION.DEREGISTER(24906);
But this gives an error:
ORA-29970: Specified registration id does not exist
Although when I query the USER_CHANGE_NOTIFICATION_REGS view it does clearly state the correct regid.
Any one encountered this problem?
(Doc ID 971412.1)
How Can Database Change Notifications Not Created With PL/SQL Be Removed?
[ Last updated on JULY 05, 2017 ]
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Oracle Data Provider for .NET - Version 10.2.0.1 to 11.2.0.1 [Release 10.2 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 14th Dec 2016
Symptoms
You have an application that creates database change notifications via the OCI API or a higher level API that exposes this functionality such as ODP.Net. It does not create the notifications via PL/SQL, either through a stored procedure or PL/SQL block.
This application exits without cleaning up those notifications, typically via a fatal error as any controlled shutdown should remove any notifications. Or it may be that the application is still in development and the code to remove the notifications has a bug, or hasn't been added yet.
This leaves orphaned notifications in the database, which cannot be removed because they can only be removed within the same session in which they were created. Neither can they be removed with the PL/SQL function DBMS_CQ_NOTIFICATION.DEREGISTER(); this throws the error:
ORA-29970: Specified registration id does not exist.
Solution according to the MOS-Note:
Use patched Oracle version (bug fix included in 12.1 or later and the 11.2.0.4 Database and Client patchset)
enable following event to consume the fix: event "10865 trace name context forever, level 1".

check if update is from oracle database user or from external application on database

Dears
I have an Oracle Trigger that Updates a Column named ChangeBY.
this trigger is fired when a user updates any record inside the database and places the username in the ChangeBY column.
The Updates are done from both sides, It can be an update directly from a database user or it can be from an external application connected to my database.
how can I check from where is the Update Coming? From database User or Application?
I want to put a condition inside the trigger to only run my code when any update on values is made ONLY FROM A DATABASE USER since connected applications changes the ChangeBY Column Automatically.
Is this Possible?
Thank you,
I am litle bit confused about database user and application user. Since any application that might connect will internally use a database user only for update. You can check the current user who is logged in and trying to update
.
May be u can explain lil bit about ur application user.

ODP.Net and create database notification

i am using ODP.net (or rather Oracle.ManagedDataAccess.dll) to create change notification. It works fine, however I have one problem. It occurs when Windows is starting. Sometimes my application starts before "something oracle proccess" and creating change notification ends with fail. My question what process/service should work to be sure that my application can create change notification on oracle database?

What should be approach?

Try to be more clear, I'm in lack of ideas in this problem, even it sounds like a classic.
My application is running on weblogic 10.3.3 application server, and for database I am using Oracle database 11g. My problem is that there is table in db, let's say "user.", there is column, let's say "columnA", in this table. This table is updating by some module of application.
What I want if when value of column is "abc.", then I have to show alert to console(IP). {IP can be retrieved from DB as it is configured in DB. this ip will be other linux system other than linux machine where oracle database is installed.} Updating is continuously done on my table from module of application. Please tell me from where should I start?, what should I read. I am not able to understand what should be approach. Any help is much appreciated.
A trigger on the table can call UTL_HTTP to communicate with another machine (eg call a RESTful API).
The architectural questions are :
This will happen PRIOR to the commit so you may get false alerts if a change is rolled back
If you wait for a response, it will slow the system down.
What do you do if you get an non-standard response (eg the other server isn't available)

Resources