DPI-1065: events mode is required to subscribe to events in the database
I try to use CQN in production server but i receive this error -> i gave all grant requested in the link below and follow example in second link.
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adfns/cqn.html#GUID-03A79EF0-253A-4CA0-80F6-593EDC97532B
https://blogs.oracle.com/opal/demo-oracle-database-continuous-query-notification-in-nodejs
Could you please tell me how can i solve this issue? Thanks
Start by answering the Question issue template questions: https://github.com/oracle/node-oracledb/blob/master/.github/ISSUE_TEMPLATE/general-questions-and-runtime-problems.md
Have you actually set events mode in your connection?
I have 2 cases
by using the same client "oracledb": "4.2.0" in nodejs
i gave all grant to the user where are data located.
i can't use notification...
function myCallbackLog() {
console.log("....myCallbackLog....")
}
async function fcmSync() {
conn = await oracledb.getConnection()
const r = await conn
.subscribe("mysub", {
callback: myCallbackLog,
sql: "SELECT * FROM ART_ANA",
})
.then(() => {
console.log("CQN subscription created")
})
.catch((err) => {
console.log(err)
})
}
// ----------------------------- INFO ----------------------------------
Those are my platform info :
win32
v12.11.1
x64
4.2.0
18.3.0.0.0
//------------------------ CONNECTION --------------------------------
where i can find how to set events mode in my connection???
hrPool: {
user: process.env.HR_USER,
password: process.env.HR_PASSWORD,
connectString: process.env.HR_CONNECTIONSTRING,
poolMin: 10,
poolMax: 10,
poolIncrement: 0
}
i notice this right now ->
events : true
it works!
Thanks for your advices 馃憤
I don't understand how it worked with XE without events. But if you have it working, I'll close this issue. I will also tweak the doc example which may help.
I checkup the connection string in develop server and i don't use events:true and when i used "notification" solution everything works until switch to production server... During this period i updated the client and others little fix maybe a combination of this. But not secure.
ThAnKs!