Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to login "as sysdba" #596

Closed
dotmaik1 opened this issue Jan 23, 2017 · 17 comments
Closed

I want to login "as sysdba" #596

dotmaik1 opened this issue Jan 23, 2017 · 17 comments

Comments

@dotmaik1
Copy link

dotmaik1 commented Jan 23, 2017

Could you tell me the way to login to the database as sysdba, I need to monitor something

Thanks

Error:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

Node version:
v6.9.4

@cjbj
Copy link
Member

cjbj commented Jan 24, 2017

node-oracledb 1.12 doesn't support SYSDBA connections. One workaround could be to create a micro service using Python cx_Oracle

@cjbj
Copy link
Member

cjbj commented Feb 15, 2018

node-oracledb 2.1 is available and now supports privileged connections including SYSDBA.

@cjbj cjbj closed this as completed Feb 15, 2018
@kalifaboy
Copy link

even for the node-oracledb 1.13.1, privileged connections are not supported ?

@cjbj
Copy link
Member

cjbj commented Feb 21, 2018

@kalifaboy privileged connection support was added in 2.1. It's time to upgrade!

@kalifaboy
Copy link

Hi again. Even after upgrading the node-oracledb to the version 2.1.2, i could not have a privileged to the database. In fact i tried to display the constant oracledb.SYSDBA to check if it exists, but it tells me that it is undefined.

@cjbj
Copy link
Member

cjbj commented Feb 22, 2018

Check your install(s). I get:

> console.log(oracledb.versionString);
2.1.2
> console.log(oracledb.SYSDBA);
2

The code defining it is at https://github.com/oracle/node-oracledb/blob/master/lib/oracledb.js#L422

@kalifaboy
Copy link

The npm list command gives me this :
oradbversion

And in the node shell, the problem persists ::
pboradb

So what could the problem be ?

@dmcghan
Copy link

dmcghan commented Feb 23, 2018

@kalifaboy Please run the following to determine what you're actually pulling in:

const path = require('path');

console.log(path.resolve('oracledb'));

@kalifaboy
Copy link

test

@dmcghan
Copy link

dmcghan commented Feb 26, 2018

Sorry, I wrote that in a hurry... 👀

Could you please run this?

console.log(require.resolve('oracledb'));

@kalifaboy
Copy link

Sure, no problem :)

newone

@dmcghan
Copy link

dmcghan commented Feb 26, 2018

Okay, now run this from a terminal:

cat /home/oracle/node_modules/oracledb/package.json

@kalifaboy
Copy link

{
  "_args": [
    [
      {
        "raw": "oracledb",
        "scope": null,
        "escapedName": "oracledb",
        "name": "oracledb",
        "rawSpec": "",
        "spec": "latest",
        "type": "tag"
      },
      "/home/oracle"
    ]
  ],
  "_from": "oracledb@latest",
  "_id": "oracledb@2.0.15",
  "_inCache": true,
  "_location": "/oracledb",
  "_nodeVersion": "6.12.1",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/oracledb-2.0.15.tgz_1513234285082_0.771544101415202"
  },
  "_npmUser": {
    "name": "cjbj",
    "email": "christopher.jones@oracle.com"
  },
  "_npmVersion": "3.10.10",
  "_phantomChildren": {},
  "_requested": {
    "raw": "oracledb",
    "scope": null,
    "escapedName": "oracledb",
    "name": "oracledb",
    "rawSpec": "",
    "spec": "latest",
    "type": "tag"
  },
  "_requiredBy": [
    "#USER"
  ],
  "_resolved": "https://registry.npmjs.org/oracledb/-/oracledb-2.0.15.tgz",
  "_shasum": "f7e201b69fa7823508155e9f34aba65d57426f1d",
  "_shrinkwrap": null,
  "_spec": "oracledb",
  "_where": "/home/oracle",
  "bugs": {
    "url": "https://github.com/oracle/node-oracledb/issues"
  },
  "dependencies": {},
  "description": "Oracle Database driver by Oracle Corp.",
  "devDependencies": {
    "async": "^1.5.0",
    "mocha": "^2.4.5",
    "should": "^8.3.1"
  },
  "directories": {},
  "dist": {
    "shasum": "f7e201b69fa7823508155e9f34aba65d57426f1d",
    "tarball": "https://registry.npmjs.org/oracledb/-/oracledb-2.0.15.tgz"
  },
  "engines": {
    "node": ">=4"
  },
  "homepage": "http://www.oracle.com/technetwork/database/database-technologies/scripting-languages/node_js/",
  "keywords": [
    "Oracle",
    "Database",
    "official",
    "DB",
    "SQL",
    "JSON",
    "PL/SQL",
    "OCI",
    "API",
    "client",
    "library",
    "driver",
    "add-on",
    "extension",
    "binding",
    "interface",
    "adapter",
    "module"
  ],
  "license": "Apache-2.0",
  "main": "./index.js",
  "maintainers": [
    {
      "name": "cjbj",
      "email": "christopher.jones@oracle.com"
    },
    {
      "name": "krismohan",
      "email": "krishna.mohan@oracle.com"
    }
  ],
  "name": "oracledb",
  "optionalDependencies": {},
  "readme": "ERROR: No README data found!",
  "repository": {
    "type": "git",
    "url": "git://github.com/oracle/node-oracledb.git"
  },
  "scripts": {
    "install": "node package/oracledbinstall.js",
    "posttest": "node test/opts/versions.js",
    "test": "mocha --opts test/opts/mocha.opts",
    "testwindows": "mocha --opts test\\opts\\mocha.opts && npm run posttest"
  },
  "version": "2.0.15"
}

@dmcghan
Copy link

dmcghan commented Feb 26, 2018

Do you see the version property at the bottom? You're using 2.0.15. You need to use 2.1 or higher.

@kalifaboy
Copy link

kalifaboy commented Mar 22, 2018

Thank you for your reply. When i update the oracledb package using npm, it's still in the same version (2.0.15). My node version is 6.11.1 and npm is 3.10.10

@dmcghan
Copy link

dmcghan commented Mar 22, 2018

@kalifaboy Try doing an uninstall, followed by an install:

npm uninstall oracledb -s
npm install oracledb -s

@kalifaboy
Copy link

It worked. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants