This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parallelselect.py | |
# | |
# [email protected], Feb 2023 | |
# | |
# This may or may not be faster than a single thread statement that | |
# reads the whole table. | |
# | |
import csv | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
import os | |
import traceback | |
import oracledb | |
un = '' | |
cs = '' | |
pw = getpass.getpass(f'Enter password for {un}: ') | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh -x | |
# | |
# This is my old script for auto-starting Oracle DB on Linux. | |
# When I'm not using Cloud Databases, I now install the Oracle Database 21c RPM which includes its own script | |
# | |
# chkconfig: 2345 80 05 | |
# description: start and stop Oracle Databases | |
# | |
# OL7: systemctl enable dbora |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/queryStream.js b/lib/queryStream.js | |
index 08ddc72..09efc99 100644 | |
--- a/lib/queryStream.js | |
+++ b/lib/queryStream.js | |
@@ -89,11 +89,6 @@ class QueryStream extends Readable { | |
this._fetching = true; | |
this._resultSet._allowGetRowCall = true; | |
const row = await this._resultSet.getRow(); | |
- this._fetching = false; | |
- if (!this._resultSet) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const oracledb = require('oracledb'); | |
const dbConfig = require('./dbconfig.js'); | |
if (process.platform === 'darwin') { | |
oracledb.initOracleClient({libDir: process.env.HOME + '/Downloads/instantclient_19_8'}); | |
} | |
let result; | |
async function run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cjones@localhost:~/go/src/github.com/godror/godror$ echo $(git log --pretty=format:'%h ' -n 1) | |
ac04606 | |
cjones@localhost:~/go/src/github.com/godror/godror$ go test ./dsn | |
--- FAIL: TestParse (0.00s) | |
--- FAIL: TestParse/logfmt (0.00s) | |
dsn_test.go:213: user=user password=pass connectString=localhost/sid heterogeneousPool=1 | |
dsn_test.go:220: parse of "user=user password=pass connectString=localhost/sid heterogeneousPool=1" | |
got | |
dsn.ConnectionParams{CommonParams:dsn.CommonParams{Username:"user", ConnectString:"", Password:dsn.Password{secret:"pass"}, ConfigDir:"", LibDir:"", OnInit:(func(driver.Conn) error)(nil), OnInitStmts:[]string(nil), AlterSession:[][2]string(nil), Timezone:(*time.Location)(0x732ce0), EnableEvents:false}, ConnParams:dsn.ConnParams{NewPassword:dsn.Password{secret:""}, ConnClass:"", IsSysDBA:false, IsSysOper:false, IsSysASM:false, IsPrelim:false, ShardingKey:[]interface {}(nil), SuperShardingKey:[]interface {}(nil)}, PoolParams:dsn.PoolParams{MinSession |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const oracledb = require('oracledb'); | |
const dbConfig = require('./dbconfig.js'); | |
const httpPort = 7000; | |
async function init() { | |
try { | |
await oracledb.createPool(dbConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IC=$(HOME)/instantclient_18_5 | |
IC=$(HOME)/instantclient_19_6 | |
OLIB=$(IC) | |
OINC=$(IC)/sdk/include | |
#OH=/u01/app/oracle/product/12.1.0/dbhome_1 | |
#OLIB=$(OH)/lib | |
#OINC=$(OH)/rdbms/public | |
oracle_break: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
process.env.UV_THREADPOOL_SIZE = 5; | |
const myPoolSize = 5; // poolMin & poolMax; | |
const numStmts = 5; // number of statements to run in parallel | |
console.log('UV_THREADPOOL_SIZE :', process.env.UV_THREADPOOL_SIZE ); | |
console.log('poolMin & poolMax :', myPoolSize); | |
console.log('number of selects to run :', numStmts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
process.env.ORA_SDTZ = 'UTC'; | |
const oracledb = require('oracledb'); | |
let config; | |
try { | |
config = require('./dbconfig.js'); | |
} catch (err) { | |
if (err.code === 'MODULE_NOT_FOUND') |
NewerOlder