@@ -58,33 +58,23 @@ if (process.env.NODE_ORACLEDB_DRIVER_MODE === 'thick') {
58
58
oracledb . initOracleClient ( clientOpts ) ; // enable node-oracledb Thick mode
59
59
}
60
60
61
- console . log ( "Run at: " + new Date ( ) ) ;
62
- console . log ( "Node.js version: " + process . version + " (" + process . platform , process . arch + ")" ) ;
63
-
64
- console . log ( "Node-oracledb version:" , oracledb . versionString ) ; // version (including the suffix)
65
- // console.log("Node-oracledb version:", oracledb.version); // numeric version format is useful for comparisons
66
- // console.log("Node-oracledb version suffix:", oracledb.versionSuffix); // e.g. "-beta.1", or empty for production releases
67
-
68
- if ( process . env . NODE_ORACLEDB_DRIVER_MODE === 'thick' ) {
69
- console . log ( "Oracle Client library version:" , oracledb . oracleClientVersionString ) ;
70
- // console.log("Oracle Client library version:", oracledb.oracleClientVersion); // numeric version format
71
- }
72
61
62
+ // Get the database version and check the driver mode
73
63
async function run ( ) {
74
64
75
65
let connection ;
76
66
77
67
try {
78
68
connection = await oracledb . getConnection ( dbConfig ) ;
79
69
80
- console . log ( "Oracle Database version: " , connection . oracleServerVersionString ) ;
81
- // console.log("Oracle Database version: ", connection.oracleServerVersion); // numeric version format
70
+ console . log ( "Oracle Database version : " , connection . oracleServerVersionString ) ;
71
+ // console.log("Oracle Database version : ", connection.oracleServerVersion); // numeric version format
82
72
83
73
const result = await connection . execute (
84
74
`SELECT UNIQUE CLIENT_DRIVER
85
75
FROM V$SESSION_CONNECT_INFO
86
76
WHERE SID = SYS_CONTEXT('USERENV', 'SID')` ) ;
87
- console . log ( result . rows [ 0 ] [ 0 ] ) ;
77
+ console . log ( "CLIENT_DRIVER : " + result . rows [ 0 ] [ 0 ] + "'" ) ;
88
78
89
79
} catch ( err ) {
90
80
console . error ( err ) ;
@@ -99,4 +89,16 @@ async function run() {
99
89
}
100
90
}
101
91
92
+ console . log ( "Run at : " + new Date ( ) ) ;
93
+ console . log ( "Node.js version : " + process . version + " (" + process . platform , process . arch + ")" ) ;
94
+
95
+ console . log ( "Node-oracledb version : " , oracledb . versionString ) ; // version (including the suffix)
96
+ // console.log("Node-oracledb version : ", oracledb.version); // numeric version format is useful for comparisons
97
+ // console.log("Node-oracledb version suffix : ", oracledb.versionSuffix); // e.g. "-beta.1", or empty for production releases
98
+
99
+ if ( process . env . NODE_ORACLEDB_DRIVER_MODE === 'thick' ) {
100
+ console . log ( "Oracle Client library version : " , oracledb . oracleClientVersionString ) ;
101
+ // console.log("Oracle Client library version : ", oracledb.oracleClientVersion); // numeric version format
102
+ }
103
+
102
104
run ( ) ;
0 commit comments