Change privilege on Knex.js with OracleDB?

Viewed 188

I am trying to use knex.js with oracledb but on every query i get the following error:

Error: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
{
  errorNum: 28009,
  offset: 0,
  originalStack: 'Error: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER'
}

Here is my Knex.js config:


const dbconfig = {
    user:               process.env.DB_USERNAME,
    password:           process.env.DB_PASSWORD,
    connectString:      process.env.DB_LINK
}

const knex = require('knex')({
    client: 'oracledb',
    native: false,
    connection: { privilege: oracledb.SYSDBA, ...dbconfig },
    fetchAsString: [ 'number', 'clob' ],
    asyncStackTraces: true,
    acquireConnectionTimeout: 10000
})

Thank you in advance for any help with this matter.

1 Answers

The problem is related to the use of user 'sys', I just created a new user with correct privileges and it is working fine.

Related