0

我正在尝试使用 npm 的 oracledb 包从我的 node.js 应用程序启动服务器。但为了做到这一点,我需要使用 SYSOPER 或 SYSDBA 权限以 PRELIM_AUTH 模式连接到数据库。

下面是示例代码:

var oracledb = require('oracledb');
var dbConfig = require('./dbconfig.js');

oracledb.getConnection(
  {
    user          : dbConfig.user,
    password      : dbConfig.password,
    connectString : dbConfig.connectString
  },
  async function(err, connection) {
    if (err) {
      console.error(err.message);
      return;
    }
    console.log('Connection was successful!');
    await connection.startup();
    connection.close(
      function(err) {
        if (err) {
          console.error(err.message);
          return;
        }
      });
  });
4

1 回答 1

0

目前(在 node-oracledb 2 中)不支持 PRELIM_AUTH 模式。请在GitHub 上打开增强请求。

于 2018-07-13T10:14:53.283 回答