sijms / go-ora Goto Github PK
View Code? Open in Web Editor NEWPure go oracle client
License: MIT License
Pure go oracle client
License: MIT License
Hi @sijms ,
After the resolution of the issue #23 , there is 3 lines that is always printing logs.
Lines that is generating the prints:
// all data returned from the server
fmt.Println("data returned: ", data)
// redirect address
fmt.Println("redirect address: ", pck.redirectAddr)
// reconnect data
fmt.Println("reconnect data: ", pck.reconnectData)
Is it possible to change the code to print these 3 lines only when running in Debug mode?
Using github.com/sijms/go-ora v0.0.0-20210313181832-b64036f0a8e4, the result is limited to only 50 rows, even if there is more.
with the release github.com/sijms/go-ora v0.0.0-20210301201657-604392efe05f it works fine (returns the correct rows of 72).
I have found that decimal numbers are retrieved as integer.
The following query
Select 2*1/3 from DUAL
returns 0
when expecting something like 0,6666666666666666666666666666666666666667
Here is the test code:
func main() {
conn, err := sql.Open("oracle", "oracle://system:[email protected]/xe")
OKorDie(err)
defer conn.Close()
stmt, err := conn.Prepare("Select 2*1/3 from DUAL")
OKorDie(err)
defer stmt.Close()
rows, err := stmt.Query()
OKorDie(err)
defer rows.Close()
for rows.Next() {
var N sql.NullFloat64
err = rows.Scan(&N)
OKorDie(err)
fmt.Println("N: ", N)
}
}
Hi Sijms.
With oracle 12c, the lib worked perfectly. but when I used with oracle 11g. The error ORA-01882: timezone region not found. How to disable this parameter oracle.jdbc.timezoneAsRegion=false ?
I wanted to try this module out, and realized I hadn't passed any address parameters to the connection string. It still hadn't caused any errors. So when I tried the code below it still resulted with success(!).
package oracledb_test
import (
"database/sql"
"testing"
_ "github.com/sijms/go-ora"
)
func TestGora(t *testing.T) {
conn, err := sql.Open("oracle", "oracle://aa:AA@aa")
if err != nil {
t.Fatal(err.Error())
}
defer conn.Close()
t.Log("success")
}
During the course of migrating from godror to go-ora we encountered a minor regression. Our application reads SQL queries from a text file. The queries are rather complex and often contain documentation related comments. If the first line of the query is a comment, we are getting an error, if a comment is anywhere else in the file it parses and executes. We did not experience this behavior with godror. I tried looking at the code for godror to see if they handle query parsing differently but haven't had much luck.
Ex: This query works
SELECT *
FROM USERS
/* comment here */
WHERE id = 1
This does not work
/* This query begins with a comment */
SELECT *
FROM USERS
WHERE id = 1
Hi,
I was able to see a lot of progress after fixing the previous issue. Most of the data is properly retrieved, but in certain cases NULL is retrieved instead. No error is reported by the Scan function.
I am still trying to narrow down the cases and find possible patterns.
One case that appears consistent is when on a VARCHAR2(128 byte) field there is a dash (-) or underscore (_)
The second case is more mysterious, it is a NUMBER column, with all the rows containing a number 1.
The firs half (aprox) is properly retrieved, but the other is presented as null. I couldn't find yet any difference between the two groups.
Anyway, in general the module compiles and behaves quite fast. Not needing to carry around a bunch of libraries is another big plus. Hope this one can be solved as well :)
Thanks!
hi! thanks for this great project.
I encounter an error when I use chinese word as a column alias. eg.:
select sysdate δΈζ from dual
it gets ORA-00911: invalid character
.
I cloned the repo and made some changes to converters/string_conversion.go. and it runs fine. wish that helps.
if you are willing to accept a pr I will be happy to start one.
if not, since that commit imports an external module, I'll be still happy to work out another solution, like exposing an interface:
type IStringConverter interface{
Encode(string) []byte
Decode([]byte) string
}
to let the client code to register their own encoder/decoder.
Hi,
I'm very happy to see your package. Get ride of oci DLL will simplify compilation. Thank you!
I'm testing you package against a basic dockerized oracle server (https://hub.docker.com/r/oracleinanutshell/oracle-xe-11g). I'm able to run the query below using sql developer.
The program works fine under linux, but panics at Prepare under windows.
Unfortunately, enterprise system is not linux :-<
package main
import (
"database/sql"
"fmt"
"os"
_ "github.com/sijms/go-ora"
)
func OKorDie(err error) {
if err != nil {
fmt.Println(err)
os.Exit(-1)
}
}
func main() {
conn, err := sql.Open("oracle", "oracle://system:[email protected]/xe")
OKorDie(err)
defer conn.Close()
stmt, err := conn.Prepare("SELECT distinct(TOPIC) FROM help")
OKorDie(err)
defer stmt.Close()
rows, err := stmt.Query()
OKorDie(err)
defer rows.Close()
for rows.Next() {
var topic string
err = rows.Scan(&topic)
OKorDie(err)
fmt.Println("Topics: ", topic)
}
}
go version go1.15.3 windows/amd64
github.com/sijms/go-ora/network.newRefusePacketFromData(0xc000092110, 0xc, 0x10, 0x0)
C:/Users/me/go/src/github.com/sijms/go-ora/network/refuse_packet.go:43 +0x285
github.com/sijms/go-ora/network.(*Session).readPacket(0xc0000a4000, 0x0, 0x0, 0x0, 0x0)
C:/Users/me/go/src/github.com/sijms/go-ora/network/session.go:270 +0x2a5
github.com/sijms/go-ora/network.(*Session).Connect(0xc0000a4000, 0x0, 0x0)
C:/Users/me/go/src/github.com/sijms/go-ora/network/session.go:76 +0x411
github.com/sijms/go-ora.(*Connection).Open(0xc0000a0000, 0x0, 0x0)
C:/Users/me/go/src/github.com/sijms/go-ora/connection.go:234 +0x14a
github.com/sijms/go-ora.(*oracleDriver).Open(0xd94588, 0xb48cf6, 0x27, 0x0, 0x0, 0x0, 0x0)
C:/Users/me/go/src/github.com/sijms/go-ora/connection.go:79 +0xf4
database/sql.dsnConnector.Connect(0xb48cf6, 0x27, 0xb6ab40, 0xd94588, 0xb6c380, 0xc000012028, 0x0, 0x0, 0x0, 0x0)
c:/go/src/database/sql/sql.go:707 +0x84
database/sql.(*DB).conn(0xc000048ea0, 0xb6c380, 0xc000012028, 0xc00007db01, 0x0, 0x0, 0x0)
c:/go/src/database/sql/sql.go:1294 +0xdc4
database/sql.(*DB).prepare(0xc000048ea0, 0xb6c380, 0xc000012028, 0xb4761d, 0x21, 0x1000000000001, 0x0, 0x0, 0x0)
c:/go/src/database/sql/sql.go:1482 +0x9b
database/sql.(*DB).PrepareContext(0xc000048ea0, 0xb6c380, 0xc000012028, 0xb4761d, 0x21, 0x0, 0x0, 0x0)
c:/go/src/database/sql/sql.go:1455 +0xd4
database/sql.(*DB).Prepare(0xc000048ea0, 0xb4761d, 0x21, 0x0, 0x0, 0x0)
c:/go/src/database/sql/sql.go:1472 +0xb5
main.main()
C:/Users/me/go/src/github.com/simulot/go-ora/main.go:26 +0x17f
Process exiting with code: 0
Sorry to keep you busy.
I have used 60bc60e for this test.
So I have a table having following structure:
Name Null? Type
------------ -------- --------------
BUF_ID NOT NULL NVARCHAR2(20)
BUF_NAME NOT NULL NVARCHAR2(100)
BUF_SETTINGS NOT NULL LONG
BUF_USE_UID NVARCHAR2(20)
This table has 28 rows.
The application uses this field to store some XML structure.
I'm querying the table with ./examples/query/main.go program. I get just one row.
When looking in trace file, the 1st frame has more than one record, and there is one more frame with the rest of the table.
I think the issue is here:
Lines 113 to 131 in 60bc60e
The call to Next fetches the 1st record at line 121, but for next calls, nothing is fetched, and Next returns io.EOF
I have used 40e04fc for testing this issue. We have a table with one of the fields being a CLOB type. When I query the table with a select statement, 0 rows are returned.
test1ζ±ε
shown as
test1οΏ½οΏ½οΏ½οΏ½
I'm using the exemple/query tool for dumping all records of a view. But some records are missing!
For testing, I have used the HR example database:
SELECT * from HR.EMP_DETAILS_VIEW
EMPLOYEE_ID JOB_ID MANAGER_ID DEPARTMENT_ID LOCATION_ID CO FIRST_NAME LAST_NAME SALARY COMMISSION_PCT DEPARTMENT_NAME JOB_TITLE CITY STATE_PROVINCE COUNTRY_NAME REGION_NAME
----------- ---------- ---------- ------------- ----------- -- -------------------- ------------------------- ---------- -------------- ------------------------------ ----------------------------------- ------------------------------ ------------------------- ---------------------------------------- -------------------------
100 AD_PRES 90 1700 US Steven King 24000 Executive President Seattle Washington United States of America Americas
101 AD_VP 100 90 1700 US Neena Kochhar 17000 Executive Administration Vice President Seattle Washington United States of America Americas
102 AD_VP 100 90 1700 US Lex De Haan 17000 Executive Administration Vice President Seattle Washington United States of America Americas
...
206 AC_ACCOUNT 205 110 1700 US William Gietz 8300 Accounting Public Accountant Seattle Washington United States of America Americas
returns 106 record.
you can use go-ora\exemple\query to reproduce the problem:
go run . -server oracle://system:[email protected]/xe "SELECT * from HR.EMP_DETAILS_VIEW"
You'll get 81 records... Firsts are missing:
Note the 1st EMPLOYEE_ID
-- Record # 1 ----------------------------------------
EMPLOYEE_ID : 125
JOB_ID : ST_CLERK
MANAGER_ID : 120
DEPARTMENT_ID : 50
LOCATION_ID : 1500
COUNTRY_ID : US
...
-- Record # 81 ----------------------------------------
EMPLOYEE_ID : 206
JOB_ID : AC_ACCOUNT
MANAGER_ID : 205
DEPARTMENT_ID : 110
LOCATION_ID : 1700
...
I have checked the trace file, and missing records are present in the log:
00000780 00 04 01 01 01 06 01 19 00 00 00 01 01 01 12 03 |................|
00000790 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 |................|
000007a0 00 00 00 00 |....|
2020-11-26T16:28:46.7919: Summary: RetCode:0, Error Message:""
2020-11-26T16:28:46.7919: Row 0
2020-11-26T16:28:46.7919: EMPLOYEE_ID : 100
2020-11-26T16:28:46.7919: JOB_ID : AD_PRES
2020-11-26T16:28:46.7919: MANAGER_ID : <nil>
2020-11-26T16:28:46.7919: DEPARTMENT_ID : 90
2020-11-26T16:28:46.7919: LOCATION_ID : 1700
2020-11-26T16:28:46.7919: COUNTRY_ID : US
2020-11-26T16:28:46.7919: FIRST_NAME : Steven
2020-11-26T16:28:46.7919: LAST_NAME : King
2020-11-26T16:28:46.7919: SALARY : 24000
command.go 6
if dataSize != int64(len(lobData)) {
return errors.New("error reading lob data")
}
Did a security scan with https://github.com/securego/gosec
And got the following results.
Results:
Golang errors in file: [/home/testuser/code/golang/go-ora/auth_object.go]:
[line 13 : column 2] - could not import github.com/sijms/go-ora/network (invalid package name: "")
Golang errors in file: [/home/testuser/code/golang/go-ora/command.go]:
[line 10 : column 2] - could not import github.com/sijms/go-ora/converters (invalid package name: "")
[/home/testuser/code/golang/go-ora/auth_object.go:363] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
362: func CalculateKeysHash(verifierType int, key1 []byte, key2 []byte) ([]byte, error) {
363: hash := md5.New()
364: switch verifierType {
[/home/testuser/code/golang/go-ora/auth_object.go:260] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
259: ret := make([]byte, 8)
260: enc, err := des.NewCipher(key)
261: if err != nil {
[/home/testuser/code/golang/go-ora/auth_object.go:91] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
90: result = append([]byte(password), result...)
91: hash := sha1.New()
92: hash.Write(result)
[/home/testuser/code/golang/go-ora/auth_object.go:10] - G505 (CWE-327): Blocklisted import crypto/sha1: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
9: "crypto/rand"
10: "crypto/sha1"
11: "errors"
[/home/testuser/code/golang/go-ora/auth_object.go:8] - G501 (CWE-327): Blocklisted import crypto/md5: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
7: "crypto/des"
8: "crypto/md5"
9: "crypto/rand"
[/home/testuser/code/golang/go-ora/auth_object.go:7] - G502 (CWE-327): Blocklisted import crypto/des: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
6: "crypto/cipher"
7: "crypto/des"
8: "crypto/md5"
[/home/testuser/code/golang/go-ora/auth_object.go:381] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
380: hash.Reset()
381: hash.Write(buffer[16:])
382: ret = append(ret, hash.Sum(nil)...)
[/home/testuser/code/golang/go-ora/auth_object.go:378] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
377: }
378: hash.Write(buffer[:16])
379: ret := hash.Sum(nil)
[/home/testuser/code/golang/go-ora/auth_object.go:371] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
370:
371: hash.Write(buffer)
372: return hash.Sum(nil), nil
[/home/testuser/code/golang/go-ora/auth_object.go:92] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
91: hash := sha1.New()
92: hash.Write(result)
93: key = hash.Sum(nil) // 20 byte key
Summary:
Files: 11
Lines: 3407
Nosec: 0
Issues: 10
I use dblink syntax to query oracle dbοΌthe command.go will report error. because dataSet.currentRow == nil. dataSet.currentRow[x] will report panic: runtime error: index out of range [0] with length 0. Break point can find the column name but can not get currentRow.
The error stack is as followsοΌ
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/sijms/go-ora.(*Stmt).read(0xc000294380, 0xc0002de000, 0x0, 0x0)
F:/workSpace/goWorkSpace/pkg/mod/github.com/sijms/[email protected]/command.go:567 +0x39b9
github.com/sijms/go-ora.(*Stmt).Query(0xc000294380, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
F:/workSpace/goWorkSpace/pkg/mod/github.com/sijms/[email protected]/command.go:1060 +0x541
I have found this problem using a copy of production database.
When querying a very simple table using a select * from MY_TABLE
, i have a random problem that could be either:
The problem isn't related to the number of records. I'm able to query several million of records. It's more related to the use of
NVARCHAR2 with a large enough data.
For debugging purpose, I made a self contained sample to illustrate the problem.
This program create a table similar to production:
Name Null? Type
--------- -------- ---------------
RECNUMBER NOT NULL NUMBER
LABEL NOT NULL NVARCHAR2(20)
TEXT NVARCHAR2(2000)
Then it fills the with records having TEXT field as bigger as possible.
My database is using AL32UTF8 char set. I think this is what we call UNICODE 32 bits, where each chars is encoded using 32 bits. So 2000 chars makes 4000 bytes.
Like the production application, it generates a long string to be stored into the table, using several records, and uses the maximum of the NVARCHAR2(2000) room.
package main
import (
"database/sql/driver"
"fmt"
"io"
"os"
"strconv"
"strings"
go_ora "github.com/sijms/go-ora"
)
func exitOnError(err error) {
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}
const (
RecordSize = 2000
TotalSize = 140000
)
func main() {
server := os.Getenv("DB_DEV1") + "?TRACE FILE=Trace.log"
db, err := go_ora.NewConnection(server)
err = db.Open()
exitOnError(err)
defer db.Close()
err = CreateTable(db, RecordSize)
exitOnError(err)
rec := GenerateData(TotalSize, RecordSize)
err = CreateRecords(db, rec)
exitOnError(err)
read, err := GetRecords(db)
exitOnError(err)
fmt.Println("Want ", len(rec), "records")
fmt.Println("Got ", len(read), "records")
i := 0
for i < len(rec) && i < len(read) {
if rec[i] != read[i] {
fmt.Println("Records", i, "are different")
fmt.Println("Want\n", rec[i])
fmt.Println("Got\n", read[i])
}
i++
}
}
func CreateTable(DB *go_ora.Connection, recordSize int) error {
stmt := go_ora.NewStmt("drop table TEST_TABLE", DB)
_, err := stmt.Exec(nil)
defer stmt.Close()
stmt = go_ora.NewStmt(`CREATE TABLE TEST_TABLE
(
RECNUMBER NUMBER NOT NULL
, LABEL NVARCHAR2(20) NOT NULL
, TEXT NVARCHAR2(`+strconv.Itoa(recordSize)+`)
)`, DB)
_, err = stmt.Exec(nil)
return err
}
func CreateRecords(DB *go_ora.Connection, r []string) error {
for i, s := range r {
stmt := go_ora.NewStmt("insert into TEST_TABLE(RECNUMBER,LABEL,TEXT) values (:1,:2,:3)", DB)
recLabel := fmt.Sprintf("Rec %d", i)
stmt.AddParam("1", i, 0, go_ora.Input /* or go_ora.Output*/)
stmt.AddParam("2", recLabel, len(recLabel), go_ora.Input /* or go_ora.Output*/)
stmt.AddParam("3", s, len(s), go_ora.Input /* or go_ora.Output*/)
_, err := stmt.Exec(nil)
if err != nil {
return err
}
stmt.Close()
}
fmt.Println("Record ", len(r), "inserted")
return nil
}
func GetRecords(DB *go_ora.Connection) ([]string, error) {
ret := []string{}
stmt := go_ora.NewStmt("select RECNUMBER,LABEL,TEXT from TEST_TABLE order by RECNUMBER", DB)
rows, err := stmt.Query(nil)
if err != nil {
return nil, err
}
values := []driver.Value{0, 0, 0}
for {
err = rows.Next(values)
if err != nil {
break
}
ret = append(ret, values[2].(string))
}
if err != io.EOF {
return nil, err
}
return ret, nil
}
func GenerateData(length int, sliceOf int) []string {
s := strings.Builder{}
i := 0
for s.Len() < length {
s.WriteString(fmt.Sprintf("%010d,", i))
i++
}
buf := []byte(s.String())
ret := []string{}
for len(buf) > 0 {
l := len(buf)
if l > sliceOf {
l = sliceOf
}
ret = append(ret, string(buf[:l]))
buf = buf[l:]
}
return ret
}
The call to GenerateData(140000, 2000)
creates a dataset of 140 000 chars, sliced into 2000 chars records.
For those values, the programs fails most of the time, never at the same record.
Record 71 inserted
Want 71 records
Got 65 records
Records 64 are different
Want
011636,0000011637,0000011638,0000011639,0000011640,0000011641,0000011642,0000011643,0000011644,0000011645,0000011646,0000011647,0000011648,0000011649,0000011650,0000011651,0000011652,0000011653,0000011654,0000011655,0000011656,0000011657,0000011658,0000011659,0000011660,0000011661,0000011662,0000011663,0000011664,0000011665,0000011666,0000011667,0000011668,0000011669,0000011670,0000011671,0000011672,0000011673,0000011674,0000011675,0000011676,0000011677,0000011678,0000011679,0000011680,0000011681,0000011682,0000011683,0000011684,0000011685,0000011686,0000011687,0000011688,0000011689,0000011690,0000011691,0000011692,0000011693,0000011694,0000011695,0000011696,0000011697,0000011698,0000011699,0000011700,0000011701,0000011702,0000011703,0000011704,0000011705,0000011706,0000011707,0000011708,0000011709,0000011710,0000011711,0000011712,0000011713,0000011714,0000011715,0000011716,0000011717,0000011718,0000011719,0000011720,0000011721,0000011722,0000011723,0000011724,0000011725,0000011726,0000011727,0000011728,0000011729,0000011730,0000011731,0000011732,0000011733,0000011734,0000011735,0000011736,0000011737,0000011738,0000011739,0000011740,0000011741,0000011742,0000011743,0000011744,0000011745,0000011746,0000011747,0000011748,0000011749,0000011750,0000011751,0000011752,0000011753,0000011754,0000011755,0000011756,0000011757,0000011758,0000011759,0000011760,0000011761,0000011762,0000011763,0000011764,0000011765,0000011766,0000011767,0000011768,0000011769,0000011770,0000011771,0000011772,0000011773,0000011774,0000011775,0000011776,0000011777,0000011778,0000011779,0000011780,0000011781,0000011782,0000011783,0000011784,0000011785,0000011786,0000011787,0000011788,0000011789,0000011790,0000011791,0000011792,0000011793,0000011794,0000011795,0000011796,0000011797,0000011798,0000011799,0000011800,0000011801,0000011802,0000011803,0000011804,0000011805,0000011806,0000011807,0000011808,0000011809,0000011810,0000011811,0000011812,0000011813,0000011814,0000011815,0000011816,0000011817,00
Got
011636,0000011637,0000011638,0000011639,0000011640,0000011641,0000011642,0000011643,0000011644,0000011645,0000011646,0000011647,0000011648,0000011649,0000011650,0000011651,0000011652,0000011653,0000011654,0000011655,0000011656,0000011657,000001165 γ β°γγγγ1οΌγγγγ€β°γγγγγγγγγγβ°γγγγγγ661,0000011662,000001166 β°γγγγγγγγγγβ°γγγγγγγγγγβ°γγ0011666,0000011667,00000
The table is correct.
The connection string is"oracle://admin:ADMIN#[email protected]:1521/test"
When I connect to DB, the error is " parse oracle://admin:ADMIN/: invalid port ":ADMIN" after host"
I'm not sure if you're intentionally avoiding 32-bit systems, but if I compile an application using go-ora
with the flags GOOS=linux GOARCH=386
, I get the following error:
# github.com/sijms/go-ora/advanced_nego
../../../../go/pkg/mod/github.com/sijms/[email protected]/advanced_nego/advanced_nego.go:40:9: constant 3735928559 overflows int
../../../../go/pkg/mod/github.com/sijms/[email protected]/advanced_nego/advanced_nego.go:120:17: constant 3735928559 overflows int
../../../../go/pkg/mod/github.com/sijms/[email protected]/advanced_nego/supervisor_service.go:60:10: constant 3735928559 overflows int
../../../../go/pkg/mod/github.com/sijms/[email protected]/advanced_nego/supervisor_service.go:91:17: constant 3735928559 overflows int
These errors can probably be fixed by having the functions explicitly return int64
, I think.
I add support for the following charset (decoding only):
1- 0x33D. JA16VMS
2-0x33E. JA16EUC
3- 0x33F. JA16EUCYEN
4- 0x340. JA16SJIS
5- 0x352. ZHS16CGB231280
6- 0x353. ZHS16MACCGB231280
7- 0x354. ZHS16GBK
Hi,
Oracle logs an error in the alert_SID.log upon 1st request or ping, subsequent requests or pings do not trigger another alert.
2021-01-25T17:27:35.456074+01:00
Session (65,29529): Bad TTC Packet Detected: Inbound connection from client
Session (65,29529): Bad TTC Packet Detected: DB Logon User: XXXXXX, Remote Machine: XXXXXXXX, Program: testme, OS User: XXXXXX
Session (65,29529): Bad TTC Packet Detected: Client IP Address: XX.XX.XX.XX
Here is the code :
package main
import (
"database/sql"
"log"
_ "github.com/sijms/go-ora" // Oracle driver
)
func main() {
connString := "oracle://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
conn, err := sql.Open("oracle", connString)
if err != nil {
log.Print(err)
return
}
defer conn.Close()
log.Print(conn.Ping())
}
The database version is Oracle 12.2, and I have no idea of what's hapening. The queries get executed correctly, there is no error other than this message.
The DBA here are ranting about it, hence this issue.
i do some test with godror && go-ora current go-ora is too slow ,has any idea for performance
links https://github.com/rongfengliang/oracledb_exporter/tree/v1.0.1
Excuse me.
As the title says, when the type is VARCHAR2, I only get NCHAR.
I have read your source code, in parameter.go
, I also not found VARCHAR2.
So how can I finish this?
The following is part of my code
colums, err := rows.Columns()
types, err := rows.ColumnTypes()
for k := range colums {
log.Println(colums[k],types[k].DatabaseTypeName())
}
// output
INFO[0000] COLUMN_1 NCHAR
INFO[0000] COLUMN_2 CHAR
INFO[0000] COLUMN_3 NCHAR
INFO[0000] COLUMN_4 NUMBER
INFO[0000] COLUMN_5 NUMBER
LONG Type queries have no results
When I run same query second time, I got the ORA-03120 error.
ORA-03120: two-task conversion routine: integer overflow
I can get the query result first time in loop, but it went wrong in second time.
`
db, err := sql.Open("oracle", connectStr)
if err != nil {
log.Println("ERR! Oracle open error")
log.Fatal(err)
}
defer db.Close()
... ...
stmt, err := db.Prepare(β... some query with parameter ... β)
// check error
for v := range patternList {
result, err := stmt.Query(v)
// check error
}
`
Here is the code i used to get result:
```
result := make(go_ora.Row,25)
rows.Next(result)
log.Infoln(result)
But the result is not corect
`time="2020-09-17T10:24:53+07:00" level=info msg="[lock_name_space <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil>]" source="oracle_exporter_test.go:89"`
after debug, i problem is in this code"
if dataSet.index%dataSet.parent.noOfRowsToFetch < len(dataSet.Rows) {
for x := 0; x < len(dataSet.Rows[dataSet.index%dataSet.parent.noOfRowsToFetch]); x++ {
dest[x] = driver.Value(dataSet.Rows[dataSet.index%dataSet.parent.noOfRowsToFetch][x])
}
dataSet.index++
return nil
}
i changed to
if (dataSet.parent.hasMoreRows) {
if (dataSet.index > 0) {
dataSet.Rows = make([]Row, 0, dataSet.parent.noOfRowsToFetch)
err := dataSet.parent.fetch(dataSet)
if err != nil {
return err
}
}
for x:=0; x <len(dataSet.Rows); x++ {
//log.Infoln(dataSet.index, dataSet.Rows[x])
dataSet.index++
}
return nil
} else {
return io.EOF
}
It has result, but it will panic:
goroutine 37 [running]:
testing.tRunner.func1(0xc000186200)
C:/Go/src/testing/testing.go:874 +0x3aa
panic(0xc00b20, 0xc000062ea0)
C:/Go/src/runtime/panic.go:679 +0x1c0
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/network.(*Session).GetInt64(0xc0001681e0, 0x33, 0x101, 0x2bd, 0x0, 0x0)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/network/session.go:581 +0x376
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/network.(*Session).GetInt(0xc0001681e0, 0x2, 0x101, 0x0, 0x0, 0x0)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/network/session.go:595 +0x52
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora.(*DataSet).read(0xc0000a6660, 0xc0001681e0, 0x0, 0x0)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/data_set.go:28 +0x67
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora.(*Stmt).read(0xc0000ae790, 0xc0000a6660, 0x0, 0x10102)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/command.go:495 +0xd4a
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora.(*Stmt).fetch(0xc0000ae790, 0xc0000a6660, 0x19, 0xc0001f4000)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/command.go:257 +0x211
ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora.(*DataSet).Next(0xc0000a6660, 0xc00009d040, 0x19, 0x19, 0x0, 0x0)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/vendor/github.com/sijms/go-ora/data_set.go:83 +0xc7
ncms-agent/core/plugins/ncms-plugin-oracle.TestMetrics(0xc000186200)
D:/Work/Programming Project/Go projects/src/ncms-agent/core/plugins/ncms-plugin-oracle/oracle_exporter_test.go:99 +0x242
If I change stmt.noOfRowsToFetch = 25 to bigger like 30, no more panic but the result is lack off
when i reduce it to 10. it worked.
Can you resolve this problem?
Hi,
Aftter create a connection and open, I'm getting error at prepare statement.
My Connection function:
func Connect() (*sql.DB, error) {
db, err := sql.Open("oracle", "oracle://USER:PASS@URL/SERVICE")
if err != nil {
return nil, err
}
return db, nil
}
My Work function:
func (t *TestData) GetDBValue() (err error) {
//Connecting to Oracle DB here...
db, err := oracle.Connect()
if err != nil {
return helpers.Error("It was not possible to connect to the database ", err)
}
defer db.Close()
stmt, err := db.Prepare("SELECT * FROM DUAL WHERE 1 = :1")
if err != nil {
return helpers.Error("Error preparing query ", err)
}
defer stmt.Close()
rows, err := stmt.Query(1)
if err != nil {
return helpers.Error("Error running query ", err)
}
defer rows.Close()
}
Error:
Error At this line: stmt, err := db.Prepare("SELECT * FROM DUAL WHERE 1 = :1")
runtime error: slice bounds out of range [:310] with capacity 16
runtime.gopanic
/usr/local/go/src/runtime/panic.go:969
runtime.goPanicSliceAcap
/usr/local/go/src/runtime/panic.go:106
github.com/sijms/go-ora/network.newRedirectPacketFromData
/home/rodrigo/myProject/vendor/github.com/sijms/go-ora/network/redirect_packet.go:41
github.com/sijms/go-ora/network.(*Session).readPacket
/home/rodrigo/myProject/vendor/github.com/sijms/go-ora/network/session.go:272
github.com/sijms/go-ora/network.(*Session).Connect
/home/rodrigo/myProject/vendor/github.com/sijms/go-ora/network/session.go:76
github.com/sijms/go-ora.(*Connection).Open
/home/rodrigo/myProject/vendor/github.com/sijms/go-ora/connection.go:232
github.com/sijms/go-ora.(*oracleDriver).Open
/home/rodrigo/myProject/vendor/github.com/sijms/go-ora/connection.go:79
database/sql.dsnConnector.Connect
/usr/local/go/src/database/sql/sql.go:707
database/sql.(*DB).conn
/usr/local/go/src/database/sql/sql.go:1294
database/sql.(*DB).prepare
/usr/local/go/src/database/sql/sql.go:1482
database/sql.(*DB).PrepareContext
/usr/local/go/src/database/sql/sql.go:1455
database/sql.(*DB).Prepare
/usr/local/go/src/database/sql/sql.go:1472
myProject/steps.(*TestData).CreateDOs
/home/rodrigo/myProject/steps/steps.go:178
reflect.Value.call
/usr/local/go/src/reflect/value.go:475
reflect.Value.Call
/usr/local/go/src/reflect/value.go:336
github.com/cucumber/godog/internal/models.(*StepDefinition).Run
/home/rodrigo/myProject/vendor/github.com/cucumber/godog/internal/models/stepdef.go:159
github.com/cucumber/godog.(*suite).runStep
/home/rodrigo/myProject/vendor/github.com/cucumber/godog/suite.go:138
github.com/cucumber/godog.(*suite).runSteps
/home/rodrigo/myProject/vendor/github.com/cucumber/godog/suite.go:225
github.com/cucumber/godog.(*suite).runPickle
/home/rodrigo/myProject/vendor/github.com/cucumber/godog/suite.go:284
github.com/cucumber/godog.(*runner).concurrent.func1
/home/rodrigo/myProject/vendor/github.com/cucumber/godog/run.go:111
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1374
Thanks!
Is there a equivalent of https://godoc.org/github.com/lib/pq#hdr-Bulk_imports in this driver?
CLOB is unsupported
BLOB οΌ
package main
import (
"database/sql"
"fmt"
_ "github.com/sijms/go-ora"
)
func main() {
fmt.Println("main")
db, err := sql.Open("oracle", "oracle://scott:[email protected]:1521/orcl")
defer db.Close()
if err != nil {
fmt.Println("[sql.Open ERR]:", err)
return
}
err = db.Ping()
if err != nil {
fmt.Println("[db.Ping ERR]:", err)
return
}
}
[db.Ping ERR]: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 16
I can not comment in closed isue.
continue issue #2
I replaced 25 by 2 (column name and value) but it still error. Here is the code (it worked with modified library)
url := fmt.Sprintf("oracle://%s:%s@%s:%d/%s", "admin", "admin", "localhost", 1521, "test")
conn, err := go_ora.NewConnection(url)
if err != nil {
log.Errorln("Oracle plugin can not connect to instance: ", err)
}
err = conn.Open()
stmt := go_ora.NewStmt("select name,value from v$parameter", conn)
defer func() {
err := stmt.Close()
if err != nil {
if err != nil {
log.Errorln("Oracle plugin: can not close stmt", err)
}
}
}()
rows, err := stmt.Query(nil)
if (err != nil) {
log.Errorln("Oracle plugin: can not execute query", err)
}
defer func() {
err := rows.Close()
if err != nil {
log.Errorln("Oracle plugin: can not close rows", err)
}
}()
results := make(go_ora.Row, 2)
for {
if err == io.EOF {
break
}
err = rows.Next(results)
for _, result := range results {
str := fmt.Sprintf("%v", result)
resultArray := strings.Split(str, " ")
log.Infoln(resultArray)
}
}
Error
panic: runtime error: index out of range [2] with length 2 [recovered]
panic: runtime error: index out of range [2] with length 2
goroutine 20 [running]:
testing.tRunner.func1(0xc000168200)
C:/Go/src/testing/testing.go:874 +0x3aa
panic(0xade300, 0xc00017c6e0)
C:/Go/src/runtime/panic.go:679 +0x1c0
test_project/vendor/github.com/sijms/go-ora.(*DataSet).Next(0xc00016a180, 0xc00016f5e0, 0x2, 0x2, 0xc2ac20, 0xc00016a180)
D:/src/test_project/vendor/github.com/sijms/go-ora/data_set.go:88 +0x1c1
test_project.TestMetrics1(0xc000168200)
D:/src/test_project/oracle_exporter_test.go:135 +0x4cb
testing.tRunner(0xc000168200, 0xb6ae00)
C:/Go/src/testing/testing.go:909 +0xd0
created by testing.(*T).Run
C:/Go/src/testing/testing.go:960 +0x357
Process finished with exit code 1
if i change "results := make(go_ora.Row, 10)", the result have some duplicate rows.
Thanks for this work.
I'm using another package today to connect to Oracle. Here is how I connect:
oraProd := "user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbs001.cores.com)(PORT=53701))(CONNECT_DATA=(SID=DBSPROD)))"
db, err := sql.Open("oci8", oraProd)
Can you give me the syntax I would use to construct the connection string for your package?
thanks,
Hi,
I am getting the error "ORA-01882: timezone region not found" when I try to stablish a connection to Oracle server (12c)
Using latest go (1.15) on linux.
Any idea?
Thanks!!!
Hi,
I think you already mentioned this one and probably already working on it.
Can you please take a look? Thanks!
panic: runtime error: slice bounds out of range [:292] with capacity 16
goroutine 1 [running]:
github.com/sijms/go-ora/network.newRedirectPacketFromData
.../go/src/github.com/sijms/go-ora/network/redirect_packet.go:41
github.com/sijms/go-ora/network.(*Session).readPacket
.../go/src/github.com/sijms/go-ora/network/session.go:272
github.com/sijms/go-ora/network.(*Session).Connect
.../go/src/github.com/sijms/go-ora/network/session.go:76
github.com/sijms/go-ora.(*Connection).Open
.../go/src/github.com/sijms/go-ora/connection.go:234
Al usar sqlx que es una extension del paque database/sql https://github.com/jmoiron/sqlx este tiene problemas al usar map como argumentos y no captura correctamente los string largos o clob de oracle
Hi,
After having tested go-ora with an ad hoc server, I would like to connect entreprises servers.
At the moment the server and the port are correct, whatever I try as user / pwd / SID, I get a panic:
github.com/sijms/go-ora/network.newRefusePacketFromData(0xc000012230, 0xc, 0x10, 0xc)
C:/Users/me/go/src/github.com/sijms/go-ora/network/refuse_packet.go:43 +0x165
github.com/sijms/go-ora/network.(*Session).readPacket(0xc0000021e0, 0x0, 0x0, 0x0, 0x105)
C:/Users/me/go/src/github.com/sijms/go-ora/network/session.go:270 +0x10c
github.com/sijms/go-ora/network.(*Session).Connect(0xc0000021e0, 0xc0000021e0, 0x10600)
C:/Users/me/go/src/github.com/sijms/go-ora/network/session.go:76 +0x2a9
github.com/sijms/go-ora.(*Connection).Open(0xc00004a280, 0x31, 0xc00004a280)
C:/Users/me/go/src/github.com/sijms/go-ora/connection.go:232 +0x1a5
github.com/sijms/go-ora.(*oracleDriver).Open(0x17215a8, 0x14c5d95, 0x31, 0x0, 0x0, 0x30000, 0x1320000)
C:/Users/me/go/src/github.com/sijms/go-ora/connection.go:79 +0x85
database/sql.dsnConnector.Connect(...)
c:/go/src/database/sql/sql.go:707
database/sql.(*DB).conn(0xc00004edd0, 0x14f1580, 0xc000012028, 0xc000040001, 0x14f1540, 0xc00004edd0, 0xc000040040)
c:/go/src/database/sql/sql.go:1294 +0x214
database/sql.(*DB).prepare(0xc00004edd0, 0x14f1580, 0xc000012028, 0x14c6f53, 0x7f, 0x14efb01, 0x17215a8, 0x16d2750, 0xb82aeb9cf40c44fc)
c:/go/src/database/sql/sql.go:1482 +0x5f
database/sql.(*DB).PrepareContext(0xc00004edd0, 0x14f1580, 0xc000012028, 0x14c6f53, 0x7f, 0x0, 0x0, 0x13ff794)
c:/go/src/database/sql/sql.go:1455 +0xa5
database/sql.(*DB).Prepare(...)
c:/go/src/database/sql/sql.go:1472
main.main()
C:/Users/me/go/src/github.com/simulot/go-ora/main.go:23 +0xff
I can't do the test using linux, because of company's VPN not allowed on linux.
How can I help you with this problem without disclosing company's credentials?
++
Hi,
I'm doing another test with the package:
SELECT count(*) FROM help
This show a rounding error:
go run .
Topics: 918.9999999999999
I was expecting 919.
Thanks for your work
SQL stmt that doesn't return record.
This does not work
var sqlStmt = `
SELECT
ID_RECORD,
DESCRIPTION,
DEBUG_
from DEVELOPERS.MVTEST
`
This work
var sqlStmt = `SELECT ID_RECORD, DESCRIPTION, DEBUG_ from DEVELOPERS.MVTEST`
There is a parser problem ?
By
Application's runtime-environment had βNLS_LANGUAGEβ flag, but It did't work.
[db.Ping ERR]: parse "oracle://lzusjzl:Lzu!7N1I%[email protected]:1521/lzudatatest": invalid URL escape "%rj"
I have found that datetime are returned in UTC regardless local time, session settings, database settings.
Assuming my sever is UTC, my session EST, and the local time EST
At 2020-11-16 19:58:10 local time , using go-ora to select CURRENT_DATE from dual returns 2020-11-16 19:58:10 +0000 UTC
The current code sets the the location to UTC in all circumstances:
go-ora/converters/type_conversion.go
Lines 45 to 46 in ae061e9
I propose to investigate on this, and propose a PR.
++
I have done a small CLI query tool to ease some tests.
The db I'm testing uses UNICODE as char set, and I get UNICODE encoded string. See the screen capture:
In the "golang" way, foreign strings would be converted into utf-8 and back. Doing like this would ease the work in the client application.
I suppose this easily done for UNICODE or Windows Western char set, but how to manage all others ?
What is your position on this?
i deployed my program on both 12c and 11g, the program crash or has error when connecting to oracle db.
check on log oracle:
2020-12-10T23:44:12.599539+07:00
Session (3594,30260): Bad TTC Packet Detected: Inbound connection from client
Session (3594,30260): Bad TTC Packet Detected: DB Logon User: admin, Remote Machine: dboracle , Program: plugin-oracle, OS User: root
Session (3594,30260): Bad TTC Packet Detected: Could not find Client IP Address
AOM_10/12/2020 23:46:57_7495252196
2020-12-10T23:47:12.500474+07:00
Errors in file /u01/app/oracle/diag/rdbms/cdb/cdb1/trace/cdb1_s000_67521.trc (incident=462390) (PDBNAME=CDB$ROOT):
ORA-03137: malformed TTC packet from client rejected: [12209] [0] [] [] [] [] [] []
I made a trace on my program:
error start from: rows, err := stmt.Query(nil)
panic at: session.inBuffer = append(session.inBuffer, dataPck.buffer...)
if dataPck, ok := pck.(*DataPacket); ok {
session.inBuffer = append(session.inBuffer, dataPck.buffer...)
} else {
return nil, errors.New("the packet received is not data packet")
}
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] time="2020-12-11T15:36:42+07:00" level=error msg="========dataPck========= &{{10 241 6 0} 0 ["(Much data i remove)" source="session.go:233" source="client.go:1022"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] time="2020-12-11T15:36:42+07:00" level=error msg="========dataPck========= &{{10 2548 6 0} 0 ["(Much data i remove)"" source="session.go:233" source="client.go:1022"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] time="2020-12-11T15:36:42+07:00" level=error msg="========dataPck========= &{{10 266 6 0} 0 ["(Much data i remove)"" source="session.go:233" source="client.go:1022"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] time="2020-12-11T15:36:43+07:00" level=error msg="========dataPck========= <nil>" source="session.go:233" source="client.go:1022"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] time="2020-12-11T15:36:43+07:00" level=error msg="Oracle plugin: cannot close stmt EOF" source="oracle_exporter.go:199" source="client.go:1022"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] panic: runtime error: invalid memory address or nil pointer dereference source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x9779aa] source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] goroutine 53 [running]: source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] oracle-plugin/vendor/github.com/sijms/go-ora/network.(*Session).read(0xc0003dc000, 0x1, 0xc00035c480, 0x100000020, 0x20, 0xc0004689a0, 0x2) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/vendor/github.com/sijms/go-ora/network/session.go:234 +0x1ea source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] oracle-plugin/vendor/github.com/sijms/go-ora/network.(*Session).GetByte(0xc0003dc000, 0x0, 0xc0004689a0, 0xc0004517a0) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/vendor/github.com/sijms/go-ora/network/session.go:641 +0x34 source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] oracle-plugin/vendor/github.com/sijms/go-ora.(*Stmt).read(0xc000430380, 0xc000258280, 0x0, 0x0) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/vendor/github.com/sijms/go-ora/command.go:409 +0xb5 source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] oracle-plugin/vendor/github.com/sijms/go-ora.(*Stmt).Query(0xc000430380, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/vendor/github.com/sijms/go-ora/command.go:1060 +0x3e9 source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] main.sendCommandGetParams(0xc0003be8c0, 0x0, 0x0, 0x0) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/oracle_exporter.go:202 +0xed source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] main.(*oracleCollector).getConfig(0xc000146a40, 0xc00013fa10, 0xc, 0x5f1, 0xc00013fa20, 0x6, 0xc00013a960, 0x13, 0xc00013fa26, 0x3, ...) source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/oracle_exporter.go:157 +0x776 source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] created by main.(*oracleCollector).Update source="client.go:1024"
ERRO[11 Dec 20 15:36 ICT] [oracle-plugin] D://Go projects/src/oracle-plugin/oracle_exporter.go:121 +0x24b source="client.go:1024"
After i add "dataPck != nil"
if dataPck, ok := pck.(*DataPacket); ok && dataPck != nil {
session.inBuffer = append(session.inBuffer, dataPck.buffer...)
} else {
return nil, errors.New("the packet received is not data packet")
}
the program still panic at err := rows.Close()
ERRO[11 Dec 20 16:13 ICT] [oracle-plugin] time="2020-12-11T16:13:23+07:00" level=error msg="rows is <nil>" source="oracle_exporter.go:207" source="client.go:1022"
after handler rows==nil, there are only 2 errors
ERRO[11 Dec 20 16:20 ICT] [oracle-plugin] time="2020-12-11T16:20:53+07:00" level=error msg="Oracle plugin: cannot execute query the packet received is not data packet" source="oracle_exporter.go:204" source="client.go:1022"
ERRO[11 Dec 20 16:20 ICT] [oracle-plugin] time="2020-12-11T16:20:53+07:00" level=error msg="Oracle plugin: cannot close stmt EOF" source="oracle_exporter.go:199" source="client.go:1022"
Thank you for developing this!
Two questions:
This project seems to be missing a license - which license is this made available under?
Was this client developed using the source of an existing Oracle library? (I'm mostly curious since its rare to find a client that doesn't rely on Oracle's SDK)
Please see stack trace below in *Session.GetInt64 during rows.Next(). Not yet sure if I can reproduce the issue. But perhaps looking at this error might give some ideas to the circumstance in which this happened.
panic: runtime error: slice bounds out of range [-117:]
goroutine 59 [running]:
github.com/sijms/go-ora/network.(*Session).GetInt64(0xc0004ee480, 0x7d, 0x9c0101, 0x4526af, 0xc002d9bdb0, 0x7f7d0cd03d78)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/network/session.go:717 +0x229
github.com/sijms/go-ora/network.(*Session).GetInt(0xc0004ee480, 0x1, 0xc002dc0101, 0x1, 0xb97, 0x0)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/network/session.go:730 +0x4b
github.com/sijms/go-ora/network.(*Session).GetClr(0xc0004ee480, 0xb, 0xc002d4cca0, 0xba2, 0xc002d9bdb0, 0xb)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/network/session.go:779 +0x210
github.com/sijms/go-ora.(*defaultStmt).read(0xc002a0b040, 0xc00cef6380, 0x0, 0x10102)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/command.go:584 +0x433
github.com/sijms/go-ora.(*defaultStmt).fetch(0xc002a0b040, 0xc00cef6380, 0x19, 0xc000e52780)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/command.go:472 +0x1ce
github.com/sijms/go-ora.(*DataSet).Next(0xc00cef6380, 0xc001f0bc00, 0xa9, 0xa9, 0xc000151ce8, 0x40d8db)
/Users/xxx/go/src/git.dev.e2open.com/chnshp/watermill-users/vendor/github.com/sijms/go-ora/data_set.go:122 +0x2fa
database/sql.(*Rows).nextLocked(0xc003952200, 0x0)
/usr/local/go/src/database/sql/sql.go:2865 +0xbf
database/sql.(*Rows).Next.func1()
/usr/local/go/src/database/sql/sql.go:2843 +0x3c
Hi, I try to SELECT from the materialized view but I don't get any records.
It's a missing feature?
Thanks
Franco
Hi All,
After last update, I cannot login to database.
2021-03-08T11:19:16.7189: Open :(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racazbprd.mch.moc.sgps:1521)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=WMPLA2PP)(CID=(PROGRAM=/tmp/go-build262618597/b001/exe/main)(HOST=rodrigo-bold)(USER=rodrigo))))
2021-03-08T11:19:16.7189: Connect
2021-03-08T11:19:16.7761:
Write packet:
00000000 01 14 00 00 01 00 00 00 01 3d 01 2c 0c 01 ff ff |.........=.,....|
00000010 ff ff 4f 98 00 00 00 01 00 ce 00 46 00 00 00 00 |..O........F....|
00000020 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 |................|
00000040 ff ff 00 00 00 00 28 44 45 53 43 52 49 50 54 49 |......(DESCRIPTI|
00000050 4f 4e 3d 28 41 44 44 52 45 53 53 3d 28 50 52 4f |ON=(ADDRESS=(PRO|
00000060 54 4f 43 4f 4c 3d 74 63 70 29 28 48 4f 53 54 3d |TOCOL=tcp)(HOST=|
00000070 72 61 63 61 7a 62 70 72 64 2e 6d 63 68 2e 6d 6f |racazbprd.mch.mo|
00000080 63 2e 73 67 70 73 3a 31 35 32 31 29 28 50 4f 52 |c.sgps:1521)(POR|
00000090 54 3d 31 35 32 31 29 29 28 43 4f 4e 4e 45 43 54 |T=1521))(CONNECT|
000000a0 5f 44 41 54 41 3d 28 53 45 52 56 49 43 45 5f 4e |_DATA=(SERVICE_N|
000000b0 41 4d 45 3d 57 4d 50 4c 41 32 50 50 29 28 43 49 |AME=WMPLA2PP)(CI|
000000c0 44 3d 28 50 52 4f 47 52 41 4d 3d 2f 74 6d 70 2f |D=(PROGRAM=/tmp/|
000000d0 67 6f 2d 62 75 69 6c 64 32 36 32 36 31 38 35 39 |go-build26261859|
000000e0 37 2f 62 30 30 31 2f 65 78 65 2f 6d 61 69 6e 29 |7/b001/exe/main)|
000000f0 28 48 4f 53 54 3d 72 6f 64 72 69 67 6f 2d 62 6f |(HOST=rodrigo-bo|
00000100 6c 64 29 28 55 53 45 52 3d 72 6f 64 72 69 67 6f |ld)(USER=rodrigo|
00000110 29 29 29 29 |))))|
2021-03-08T11:19:16.7909:
Read packet:
00000000 00 0a 00 00 05 02 00 00 01 31 |.........1|
2021-03-08T11:19:16.7909:
Read packet:
00000000 01 3b 00 00 06 00 00 00 00 40 28 41 44 44 52 45 |.;.......@(ADDRE|
00000010 53 53 3d 28 50 52 4f 54 4f 43 4f 4c 3d 54 43 50 |SS=(PROTOCOL=TCP|
00000020 29 28 48 4f 53 54 3d 31 30 2e 31 32 37 2e 32 34 |)(HOST=10.127.24|
00000030 35 2e 33 33 29 28 50 4f 52 54 3d 31 35 32 31 29 |5.33)(PORT=1521)|
00000040 29 00 28 44 45 53 43 52 49 50 54 49 4f 4e 3d 28 |).(DESCRIPTION=(|
00000050 41 44 44 52 45 53 53 3d 28 50 52 4f 54 4f 43 4f |ADDRESS=(PROTOCO|
00000060 4c 3d 74 63 70 29 28 48 4f 53 54 3d 72 61 63 61 |L=tcp)(HOST=raca|
00000070 7a 62 70 72 64 2e 6d 63 68 2e 6d 6f 63 2e 73 67 |zbprd.mch.moc.sg|
00000080 70 73 3a 31 35 32 31 29 28 50 4f 52 54 3d 31 35 |ps:1521)(PORT=15|
00000090 32 31 29 29 28 43 4f 4e 4e 45 43 54 5f 44 41 54 |21))(CONNECT_DAT|
000000a0 41 3d 28 53 45 52 56 49 43 45 5f 4e 41 4d 45 3d |A=(SERVICE_NAME=|
000000b0 57 4d 50 4c 41 32 50 50 29 28 43 49 44 3d 28 50 |WMPLA2PP)(CID=(P|
000000c0 52 4f 47 52 41 4d 3d 2f 74 6d 70 2f 67 6f 2d 62 |ROGRAM=/tmp/go-b|
000000d0 75 69 6c 64 32 36 32 36 31 38 35 39 37 2f 62 30 |uild262618597/b0|
000000e0 30 31 2f 65 78 65 2f 6d 61 69 6e 29 28 48 4f 53 |01/exe/main)(HOS|
000000f0 54 3d 72 6f 64 72 69 67 6f 2d 62 6f 6c 64 29 28 |T=rodrigo-bold)(|
00000100 55 53 45 52 3d 72 6f 64 72 69 67 6f 29 29 28 53 |USER=rodrigo))(S|
00000110 45 52 56 45 52 3d 64 65 64 69 63 61 74 65 64 29 |ERVER=dedicated)|
00000120 28 49 4e 53 54 41 4e 43 45 5f 4e 41 4d 45 3d 57 |(INSTANCE_NAME=W|
00000130 4d 50 4c 41 32 50 50 32 29 29 29 |MPLA2PP2)))|
2021-03-08T11:19:16.7910: Redirect
2021-03-08T11:19:16.7911: Connect
2021-03-08T11:19:16.8092:
Write packet:
00000000 01 14 00 00 01 00 00 00 01 3d 01 2c 0c 01 ff ff |.........=.,....|
00000010 ff ff 4f 98 00 00 00 01 00 ce 00 46 00 00 00 00 |..O........F....|
00000020 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 |................|
00000040 ff ff 00 00 00 00 28 44 45 53 43 52 49 50 54 49 |......(DESCRIPTI|
00000050 4f 4e 3d 28 41 44 44 52 45 53 53 3d 28 50 52 4f |ON=(ADDRESS=(PRO|
00000060 54 4f 43 4f 4c 3d 74 63 70 29 28 48 4f 53 54 3d |TOCOL=tcp)(HOST=|
00000070 72 61 63 61 7a 62 70 72 64 2e 6d 63 68 2e 6d 6f |racazbprd.mch.mo|
00000080 63 2e 73 67 70 73 3a 31 35 32 31 29 28 50 4f 52 |c.sgps:1521)(POR|
00000090 54 3d 31 35 32 31 29 29 28 43 4f 4e 4e 45 43 54 |T=1521))(CONNECT|
000000a0 5f 44 41 54 41 3d 28 53 45 52 56 49 43 45 5f 4e |_DATA=(SERVICE_N|
000000b0 41 4d 45 3d 57 4d 50 4c 41 32 50 50 29 28 43 49 |AME=WMPLA2PP)(CI|
000000c0 44 3d 28 50 52 4f 47 52 41 4d 3d 2f 74 6d 70 2f |D=(PROGRAM=/tmp/|
000000d0 67 6f 2d 62 75 69 6c 64 32 36 32 36 31 38 35 39 |go-build26261859|
000000e0 37 2f 62 30 30 31 2f 65 78 65 2f 6d 61 69 6e 29 |7/b001/exe/main)|
000000f0 28 48 4f 53 54 3d 72 6f 64 72 69 67 6f 2d 62 6f |(HOST=rodrigo-bo|
00000100 6c 64 29 28 55 53 45 52 3d 72 6f 64 72 69 67 6f |ld)(USER=rodrigo|
00000110 29 29 29 29 |))))|
2021-03-08T11:19:16.8573:
Read packet:
00000000 00 29 00 00 02 00 00 00 01 3b 0c 01 00 00 00 00 |.).......;......|
00000010 01 00 00 00 00 29 41 01 00 00 00 00 00 00 00 00 |.....)A.........|
00000020 00 00 20 00 00 00 ff ff 00 |.. ......|
2021-03-08T11:19:16.8574: Handshake Complete
2021-03-08T11:19:16.8574: Advance Negotiation
2021-03-08T11:19:16.8574:
Write packet:
00000000 00 00 00 a4 06 00 00 00 00 00 de ad be ef 00 9a |................|
00000010 0b 20 02 00 00 04 00 00 04 00 03 00 00 00 00 00 |. ..............|
00000020 04 00 05 0b 20 02 00 00 08 00 01 00 00 10 1c 66 |.... ..........f|
00000030 ec 28 ea 00 12 00 01 de ad be ef 00 03 00 00 00 |.(..............|
00000040 04 00 04 00 01 00 02 00 03 00 01 00 03 00 00 00 |................|
00000050 00 00 04 00 05 0b 20 02 00 00 02 00 03 e0 e1 00 |...... .........|
00000060 02 00 06 fc ff 00 02 00 03 00 00 00 00 00 04 00 |................|
00000070 05 0b 20 02 00 00 0c 00 01 00 01 08 0a 06 03 02 |.. .............|
00000080 0b 0c 0f 10 11 00 01 00 02 01 00 03 00 02 00 00 |................|
00000090 00 00 00 04 00 05 0b 20 02 00 00 06 00 01 00 01 |....... ........|
000000a0 03 04 05 06 |....|
2021-03-08T11:19:16.8747:
Read packet:
00000000 00 00 00 7f 06 20 00 00 00 00 de ad be ef 00 75 |..... .........u|
00000010 00 00 00 00 00 04 00 00 04 00 03 00 00 00 00 00 |................|
00000020 04 00 05 0c 10 02 00 00 02 00 06 00 1f 00 0e 00 |................|
00000030 01 de ad be ef 00 03 00 00 00 02 00 04 00 01 00 |................|
00000040 01 00 02 00 00 00 00 00 04 00 05 0c 10 02 00 00 |................|
00000050 02 00 06 fb ff 00 02 00 02 00 00 00 00 00 04 00 |................|
00000060 05 0c 10 02 00 00 01 00 02 00 00 03 00 02 00 00 |................|
00000070 00 00 00 04 00 05 0c 10 02 00 00 01 00 02 00 |...............|
2021-03-08T11:19:16.8748: TCP Negotiation
2021-03-08T11:19:16.8748:
Write packet:
00000000 00 00 00 1c 06 00 00 00 00 00 01 06 00 4f 72 61 |.............Ora|
00000010 63 6c 65 43 6c 69 65 6e 74 47 6f 00 |cleClientGo.|
2021-03-08T11:19:16.8886:
Read packet:
00000000 00 00 00 ef 06 00 00 00 00 00 01 06 00 78 38 36 |.............x86|
00000010 5f 36 34 2f 4c 69 6e 75 78 20 32 2e 34 2e 78 78 |_64/Linux 2.4.xx|
00000020 00 69 03 01 0a 00 66 03 40 03 01 40 03 66 03 01 |.i....f.@[email protected]..|
00000030 66 03 48 03 01 48 03 66 03 01 66 03 52 03 01 52 |f.H..H.f..f.R..R|
00000040 03 66 03 01 66 03 61 03 01 61 03 66 03 01 66 03 |.f..f.a..a.f..f.|
00000050 1f 03 08 1f 03 66 03 01 00 64 00 00 00 60 01 24 |.....f...d...`.$|
00000060 0f 05 0b 0c 03 0c 0c 05 04 05 0d 06 09 07 08 05 |................|
00000070 05 05 05 05 0f 05 05 05 05 05 0a 05 05 05 05 05 |................|
00000080 04 05 06 07 08 08 23 47 23 47 08 11 23 08 11 41 |......#G#G..#..A|
00000090 b0 47 00 83 03 69 07 d0 03 00 00 00 00 00 00 00 |.G...i..........|
000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 06 |..............(.|
000000c0 01 01 01 2f 01 01 07 01 01 01 01 01 01 01 7f ff |.../............|
000000d0 03 0b 03 03 01 01 ff 01 ff ff 01 0a 01 01 ff 01 |................|
000000e0 06 09 60 01 7f 04 00 07 02 01 00 01 18 00 03 |..`............|
2021-03-08T11:19:16.8887: Server Charset: 873
2021-03-08T11:19:16.8887: Server National Charset: 2000
2021-03-08T11:19:16.8888: Data Type Negotiation
2021-03-08T11:19:16.8889:
Write packet:
00000000 00 00 0a 65 06 00 00 00 00 00 02 69 03 69 03 03 |...e.......i.i..|
00000010 29 06 01 00 00 6a 01 01 0b 01 01 01 01 01 01 00 |)....j..........|
00000020 29 90 03 07 03 00 01 00 eb 01 00 05 01 00 00 00 |)...............|
00000030 18 00 00 07 20 02 3a 00 00 05 07 02 01 00 00 00 |.... .:.........|
00000040 00 02 80 00 00 00 3c 3c 3c 80 00 00 00 00 00 00 |......<<<.......|
00000050 15 d0 07 00 01 00 01 00 01 00 00 00 02 00 02 00 |................|
00000060 0a 00 00 00 08 00 08 00 01 00 00 00 0c 00 0c 00 |................|
00000070 0a 00 00 00 17 00 17 00 01 00 00 00 18 00 18 00 |................|
00000080 01 00 00 00 19 00 19 00 01 00 00 00 1a 00 1a 00 |................|
00000090 01 00 00 00 1b 00 1b 00 01 00 00 00 1c 00 1c 00 |................|
000000a0 01 00 00 00 1d 00 1d 00 01 00 00 00 1e 00 1e 00 |................|
000000b0 01 00 00 00 1f 00 1f 00 01 00 00 00 20 00 20 00 |............ . .|
000000c0 01 00 00 00 21 00 21 00 01 00 00 00 0a 00 0a 00 |....!.!.........|
000000d0 01 00 00 00 0b 00 0b 00 01 00 00 00 28 00 28 00 |............(.(.|
000000e0 01 00 00 00 29 00 29 00 01 00 00 00 75 00 75 00 |....).).....u.u.|
000000f0 01 00 00 00 78 00 78 00 01 00 00 01 22 01 22 00 |....x.x.....".".|
00000100 01 00 00 01 23 01 23 00 01 00 00 01 24 01 24 00 |....#.#.....$.$.|
00000110 01 00 00 01 25 01 25 00 01 00 00 01 26 01 26 00 |....%.%.....&.&.|
00000120 01 00 00 01 2a 01 2a 00 01 00 00 01 2b 01 2b 00 |....*.*.....+.+.|
00000130 01 00 00 01 2c 01 2c 00 01 00 00 01 2d 01 2d 00 |....,.,.....-.-.|
00000140 01 00 00 01 2e 01 2e 00 01 00 00 01 2f 01 2f 00 |...........././.|
00000150 01 00 00 01 30 01 30 00 01 00 00 01 31 01 31 00 |....0.0.....1.1.|
00000160 01 00 00 01 32 01 32 00 01 00 00 01 33 01 33 00 |....2.2.....3.3.|
00000170 01 00 00 01 34 01 34 00 01 00 00 01 35 01 35 00 |....4.4.....5.5.|
00000180 01 00 00 01 36 01 36 00 01 00 00 01 37 01 37 00 |....6.6.....7.7.|
00000190 01 00 00 01 38 01 38 00 01 00 00 01 39 01 39 00 |....8.8.....9.9.|
000001a0 01 00 00 01 3b 01 3b 00 01 00 00 01 3c 01 3c 00 |....;.;.....<.<.|
000001b0 01 00 00 01 3d 01 3d 00 01 00 00 01 3e 01 3e 00 |....=.=.....>.>.|
000001c0 01 00 00 01 3f 01 3f 00 01 00 00 01 40 01 40 00 |....?.?.....@.@.|
000001d0 01 00 00 01 41 01 41 00 01 00 00 01 42 01 42 00 |....A.A.....B.B.|
000001e0 01 00 00 01 43 01 43 00 01 00 00 01 47 01 47 00 |....C.C.....G.G.|
000001f0 01 00 00 01 48 01 48 00 01 00 00 01 49 01 49 00 |....H.H.....I.I.|
00000200 01 00 00 01 4b 01 4b 00 01 00 00 01 4d 01 4d 00 |....K.K.....M.M.|
00000210 01 00 00 01 4e 01 4e 00 01 00 00 01 4f 01 4f 00 |....N.N.....O.O.|
00000220 01 00 00 01 50 01 50 00 01 00 00 01 51 01 51 00 |....P.P.....Q.Q.|
00000230 01 00 00 01 52 01 52 00 01 00 00 01 53 01 53 00 |....R.R.....S.S.|
00000240 01 00 00 01 54 01 54 00 01 00 00 01 55 01 55 00 |....T.T.....U.U.|
00000250 01 00 00 01 56 01 56 00 01 00 00 01 57 01 57 00 |....V.V.....W.W.|
00000260 01 00 00 01 58 01 58 00 01 00 00 01 59 01 59 00 |....X.X.....Y.Y.|
00000270 01 00 00 01 5a 01 5a 00 01 00 00 01 5c 01 5c 00 |....Z.Z.....\.\.|
00000280 01 00 00 01 5d 01 5d 00 01 00 00 01 62 01 62 00 |....].].....b.b.|
00000290 01 00 00 01 63 01 63 00 01 00 00 01 67 01 67 00 |....c.c.....g.g.|
000002a0 01 00 00 01 6b 01 6b 00 01 00 00 01 7c 01 7c 00 |....k.k.....|.|.|
000002b0 01 00 00 01 7d 01 7d 00 01 00 00 01 7e 01 7e 00 |....}.}.....~.~.|
000002c0 01 00 00 01 7f 01 7f 00 01 00 00 01 80 01 80 00 |................|
000002d0 01 00 00 01 81 01 81 00 01 00 00 01 82 01 82 00 |................|
000002e0 01 00 00 01 83 01 83 00 01 00 00 01 84 01 84 00 |................|
000002f0 01 00 00 01 85 01 85 00 01 00 00 01 86 01 86 00 |................|
00000300 01 00 00 01 87 01 87 00 01 00 00 01 89 01 89 00 |................|
00000310 01 00 00 01 8a 01 8a 00 01 00 00 01 8b 01 8b 00 |................|
00000320 01 00 00 01 8c 01 8c 00 01 00 00 01 8d 01 8d 00 |................|
00000330 01 00 00 01 8e 01 8e 00 01 00 00 01 8f 01 8f 00 |................|
00000340 01 00 00 01 90 01 90 00 01 00 00 01 91 01 91 00 |................|
00000350 01 00 00 01 94 01 94 00 01 00 00 01 95 01 95 00 |................|
00000360 01 00 00 01 96 01 96 00 01 00 00 01 97 01 97 00 |................|
00000370 01 00 00 01 9d 01 9d 00 01 00 00 01 9e 01 9e 00 |................|
00000380 01 00 00 01 9f 01 9f 00 01 00 00 01 a0 01 a0 00 |................|
00000390 01 00 00 01 a1 01 a1 00 01 00 00 01 a2 01 a2 00 |................|
000003a0 01 00 00 01 a3 01 a3 00 01 00 00 01 a4 01 a4 00 |................|
000003b0 01 00 00 01 a5 01 a5 00 01 00 00 01 a6 01 a6 00 |................|
000003c0 01 00 00 01 a7 01 a7 00 01 00 00 01 a8 01 a8 00 |................|
000003d0 01 00 00 01 a9 01 a9 00 01 00 00 01 aa 01 aa 00 |................|
000003e0 01 00 00 01 ab 01 ab 00 01 00 00 01 ad 01 ad 00 |................|
000003f0 01 00 00 01 ae 01 ae 00 01 00 00 01 af 01 af 00 |................|
00000400 01 00 00 01 b0 01 b0 00 01 00 00 01 b1 01 b1 00 |................|
00000410 01 00 00 01 c1 01 c1 00 01 00 00 01 c2 01 c2 00 |................|
00000420 01 00 00 01 c6 01 c6 00 01 00 00 01 c7 01 c7 00 |................|
00000430 01 00 00 01 c8 01 c8 00 01 00 00 01 c9 01 c9 00 |................|
00000440 01 00 00 01 ca 01 ca 00 01 00 00 01 cb 01 cb 00 |................|
00000450 01 00 00 01 cc 01 cc 00 01 00 00 01 cd 01 cd 00 |................|
00000460 01 00 00 01 ce 01 ce 00 01 00 00 01 cf 01 cf 00 |................|
00000470 01 00 00 01 d2 01 d2 00 01 00 00 01 d3 01 d3 00 |................|
00000480 01 00 00 01 d4 01 d4 00 01 00 00 01 d5 01 d5 00 |................|
00000490 01 00 00 01 d6 01 d6 00 01 00 00 01 d7 01 d7 00 |................|
000004a0 01 00 00 01 d8 01 d8 00 01 00 00 01 d9 01 d9 00 |................|
000004b0 01 00 00 01 da 01 da 00 01 00 00 01 db 01 db 00 |................|
000004c0 01 00 00 01 dc 01 dc 00 01 00 00 01 dd 01 dd 00 |................|
000004d0 01 00 00 01 de 01 de 00 01 00 00 01 df 01 df 00 |................|
000004e0 01 00 00 01 e0 01 e0 00 01 00 00 01 e1 01 e1 00 |................|
000004f0 01 00 00 01 e2 01 e2 00 01 00 00 01 e3 01 e3 00 |................|
00000500 01 00 00 01 e4 01 e4 00 01 00 00 01 e5 01 e5 00 |................|
00000510 01 00 00 01 e6 01 e6 00 01 00 00 01 ea 01 ea 00 |................|
00000520 01 00 00 01 eb 01 eb 00 01 00 00 01 ec 01 ec 00 |................|
00000530 01 00 00 01 ed 01 ed 00 01 00 00 01 ee 01 ee 00 |................|
00000540 01 00 00 01 ef 01 ef 00 01 00 00 01 f0 01 f0 00 |................|
00000550 01 00 00 01 f2 01 f2 00 01 00 00 01 f3 01 f3 00 |................|
00000560 01 00 00 01 f4 01 f4 00 01 00 00 01 f5 01 f5 00 |................|
00000570 01 00 00 01 f6 01 f6 00 01 00 00 01 fd 01 fd 00 |................|
00000580 01 00 00 01 fe 01 fe 00 01 00 00 02 01 02 01 00 |................|
00000590 01 00 00 02 02 02 02 00 01 00 00 02 04 02 04 00 |................|
000005a0 01 00 00 02 05 02 05 00 01 00 00 02 06 02 06 00 |................|
000005b0 01 00 00 02 07 02 07 00 01 00 00 02 08 02 08 00 |................|
000005c0 01 00 00 02 09 02 09 00 01 00 00 02 0a 02 0a 00 |................|
000005d0 01 00 00 02 0b 02 0b 00 01 00 00 02 0c 02 0c 00 |................|
000005e0 01 00 00 02 0d 02 0d 00 01 00 00 02 0e 02 0e 00 |................|
000005f0 01 00 00 02 0f 02 0f 00 01 00 00 02 10 02 10 00 |................|
00000600 01 00 00 02 11 02 11 00 01 00 00 02 12 02 12 00 |................|
00000610 01 00 00 02 13 02 13 00 01 00 00 02 14 02 14 00 |................|
00000620 01 00 00 02 15 02 15 00 01 00 00 02 16 02 16 00 |................|
00000630 01 00 00 02 17 02 17 00 01 00 00 02 18 02 18 00 |................|
00000640 01 00 00 02 19 02 19 00 01 00 00 02 1a 02 1a 00 |................|
00000650 01 00 00 02 1b 02 1b 00 01 00 00 02 1c 02 1c 00 |................|
00000660 01 00 00 02 1d 02 1d 00 01 00 00 02 1e 02 1e 00 |................|
00000670 01 00 00 02 1f 02 1f 00 01 00 00 02 30 02 30 00 |............0.0.|
00000680 01 00 00 02 35 02 35 00 01 00 00 02 3c 02 3c 00 |....5.5.....<.<.|
00000690 01 00 00 02 3d 02 3d 00 01 00 00 02 3e 02 3e 00 |....=.=.....>.>.|
000006a0 01 00 00 02 3f 02 3f 00 01 00 00 02 40 02 40 00 |....?.?.....@.@.|
000006b0 01 00 00 02 42 02 42 00 01 00 00 02 33 02 33 00 |....B.B.....3.3.|
000006c0 01 00 00 02 34 02 34 00 01 00 00 02 43 02 43 00 |....4.4.....C.C.|
000006d0 01 00 00 02 44 02 44 00 01 00 00 02 45 02 45 00 |....D.D.....E.E.|
000006e0 01 00 00 02 46 02 46 00 01 00 00 02 47 02 47 00 |....F.F.....G.G.|
000006f0 01 00 00 02 48 02 48 00 01 00 00 02 49 02 49 00 |....H.H.....I.I.|
00000700 01 00 00 00 03 00 02 00 0a 00 00 00 04 00 02 00 |................|
00000710 0a 00 00 00 05 00 01 00 01 00 00 00 06 00 02 00 |................|
00000720 0a 00 00 00 07 00 02 00 0a 00 00 00 09 00 01 00 |................|
00000730 01 00 00 00 0d 00 00 00 0e 00 00 00 0f 00 17 00 |................|
00000740 01 00 00 00 10 00 00 00 11 00 00 00 12 00 00 00 |................|
00000750 13 00 00 00 14 00 00 00 15 00 00 00 16 00 00 00 |................|
00000760 27 00 78 00 01 00 00 00 3a 00 00 00 44 00 02 00 |'.x.....:...D...|
00000770 0a 00 00 00 45 00 00 00 46 00 00 00 4a 00 00 00 |....E...F...J...|
00000780 4c 00 00 00 5b 00 02 00 0a 00 00 00 5e 00 01 00 |L...[.......^...|
00000790 01 00 00 00 5f 00 17 00 01 00 00 00 60 00 60 00 |...._.......`.`.|
000007a0 01 00 00 00 61 00 60 00 01 00 00 00 64 00 64 00 |....a.`.....d.d.|
000007b0 01 00 00 00 65 00 65 00 01 00 00 00 66 00 66 00 |....e.e.....f.f.|
000007c0 01 00 00 00 68 00 0b 00 01 00 00 00 69 00 00 00 |....h.......i...|
000007d0 6a 00 6a 00 01 00 00 00 6c 00 6d 00 01 00 00 00 |j.j.....l.m.....|
000007e0 6d 00 6d 00 01 00 00 00 6e 00 6f 00 01 00 00 00 |m.m.....n.o.....|
000007f0 6f 00 6f 00 01 00 00 00 70 00 70 00 01 00 00 00 |o.o.....p.p.....|
00000800 71 00 71 00 01 00 00 00 72 00 72 00 01 00 00 00 |q.q.....r.r.....|
00000810 73 00 73 00 01 00 00 00 74 00 66 00 01 00 00 00 |s.s.....t.f.....|
00000820 76 00 00 00 77 00 00 00 79 00 00 00 7a 00 00 00 |v...w...y...z...|
00000830 7b 00 00 00 88 00 00 00 92 00 92 00 01 00 00 00 |{...............|
00000840 93 00 00 00 98 00 02 00 0a 00 00 00 99 00 02 00 |................|
00000850 0a 00 00 00 9a 00 02 00 0a 00 00 00 9b 00 01 00 |................|
00000860 01 00 00 00 9c 00 0c 00 0a 00 00 00 ac 00 02 00 |................|
00000870 0a 00 00 00 b2 00 b2 00 01 00 00 00 b3 00 b3 00 |................|
00000880 01 00 00 00 b4 00 b4 00 01 00 00 00 b5 00 b5 00 |................|
00000890 01 00 00 00 b6 00 b6 00 01 00 00 00 b7 00 b7 00 |................|
000008a0 01 00 00 00 b8 00 0c 00 0a 00 00 00 b9 00 b9 00 |................|
000008b0 01 00 00 00 ba 00 ba 00 01 00 00 00 bb 00 bb 00 |................|
000008c0 01 00 00 00 bc 00 bc 00 01 00 00 00 bd 00 bd 00 |................|
000008d0 01 00 00 00 be 00 be 00 01 00 00 00 bf 00 00 00 |................|
000008e0 c0 00 00 00 c3 00 70 00 01 00 00 00 c4 00 71 00 |......p.......q.|
000008f0 01 00 00 00 c5 00 72 00 01 00 00 00 d0 00 d0 00 |......r.........|
00000900 01 00 00 00 d1 00 00 00 e7 00 e7 00 01 00 00 00 |................|
00000910 e8 00 e7 00 01 00 00 00 e9 00 e9 00 01 00 00 00 |................|
00000920 fc 00 fc 00 01 00 00 00 f1 00 6d 00 01 00 00 02 |..........m.....|
00000930 03 00 00 02 4e 02 4e 00 01 00 00 02 4f 02 4f 00 |....N.N.....O.O.|
00000940 01 00 00 02 50 02 50 00 01 00 00 02 65 02 65 00 |....P.P.....e.e.|
00000950 01 00 00 02 66 02 66 00 01 00 00 02 67 02 67 00 |....f.f.....g.g.|
00000960 01 00 00 02 68 02 68 00 01 00 00 02 63 02 63 00 |....h.h.....c.c.|
00000970 01 00 00 02 64 02 64 00 01 00 00 02 51 02 51 00 |....d.d.....Q.Q.|
00000980 01 00 00 02 52 02 52 00 01 00 00 02 53 02 53 00 |....R.R.....S.S.|
00000990 01 00 00 02 54 02 54 00 01 00 00 02 55 02 55 00 |....T.T.....U.U.|
000009a0 01 00 00 02 56 02 56 00 01 00 00 02 57 02 57 00 |....V.V.....W.W.|
000009b0 01 00 00 02 58 02 58 00 01 00 00 02 59 02 59 00 |....X.X.....Y.Y.|
000009c0 01 00 00 02 5a 02 5a 00 01 00 00 02 5b 02 5b 00 |....Z.Z.....[.[.|
000009d0 01 00 00 02 5c 02 5c 00 01 00 00 02 5d 02 5d 00 |....\.\.....].].|
000009e0 01 00 00 02 6e 02 6e 00 01 00 00 02 6f 02 6f 00 |....n.n.....o.o.|
000009f0 01 00 00 02 70 02 70 00 01 00 00 02 71 02 71 00 |....p.p.....q.q.|
00000a00 01 00 00 02 72 02 72 00 01 00 00 02 73 02 73 00 |....r.r.....s.s.|
00000a10 01 00 00 02 74 02 74 00 01 00 00 02 75 02 75 00 |....t.t.....u.u.|
00000a20 01 00 00 02 76 02 76 00 01 00 00 02 77 02 77 00 |....v.v.....w.w.|
00000a30 01 00 00 02 78 02 78 00 01 00 00 02 7d 02 7d 00 |....x.x.....}.}.|
00000a40 01 00 00 02 7e 02 7e 00 01 00 00 02 7c 02 7c 00 |....~.~.....|.|.|
00000a50 01 00 00 02 7f 02 7f 00 01 00 00 02 80 02 80 00 |................|
00000a60 01 00 00 00 00 |.....|
2021-03-08T11:19:16.9191:
Read packet:
00000000 00 00 0a 48 06 00 00 00 00 00 02 80 00 00 00 3d |...H...........=|
00000010 3c 3c 80 00 00 00 00 00 00 12 00 01 00 01 00 01 |<<..............|
00000020 00 00 00 02 00 02 00 0a 00 00 00 08 00 08 00 01 |................|
00000030 00 00 00 0c 00 0c 00 0a 00 00 00 17 00 17 00 01 |................|
00000040 00 00 00 18 00 18 00 01 00 00 00 19 00 19 00 01 |................|
00000050 00 00 00 1a 00 1a 00 01 00 00 00 1b 00 1b 00 01 |................|
00000060 00 00 00 1c 00 1c 00 01 00 00 00 1d 00 1d 00 01 |................|
00000070 00 00 00 1e 00 1e 00 01 00 00 00 1f 00 1f 00 01 |................|
00000080 00 00 00 20 00 20 00 01 00 00 00 21 00 21 00 01 |... . .....!.!..|
00000090 00 00 00 0a 00 0a 00 01 00 00 00 0b 00 0b 00 01 |................|
000000a0 00 00 00 28 00 28 00 01 00 00 00 29 00 29 00 01 |...(.(.....).)..|
000000b0 00 00 00 75 00 75 00 01 00 00 00 78 00 78 00 01 |...u.u.....x.x..|
000000c0 00 00 01 22 01 22 00 01 00 00 01 23 01 23 00 01 |...".".....#.#..|
000000d0 00 00 01 24 01 24 00 01 00 00 01 25 01 25 00 01 |...$.$.....%.%..|
000000e0 00 00 01 26 01 26 00 01 00 00 01 2a 01 2a 00 01 |...&.&.....*.*..|
000000f0 00 00 01 2b 01 2b 00 01 00 00 01 2c 01 2c 00 01 |...+.+.....,.,..|
00000100 00 00 01 2d 01 2d 00 01 00 00 01 2e 01 2e 00 01 |...-.-..........|
00000110 00 00 01 2f 01 2f 00 01 00 00 01 30 01 30 00 01 |..././.....0.0..|
00000120 00 00 01 31 01 31 00 01 00 00 01 32 01 32 00 01 |...1.1.....2.2..|
00000130 00 00 01 33 01 33 00 01 00 00 01 34 01 34 00 01 |...3.3.....4.4..|
00000140 00 00 01 35 01 35 00 01 00 00 01 36 01 36 00 01 |...5.5.....6.6..|
00000150 00 00 01 37 01 37 00 01 00 00 01 38 01 38 00 01 |...7.7.....8.8..|
00000160 00 00 01 39 01 39 00 01 00 00 01 3b 01 3b 00 01 |...9.9.....;.;..|
00000170 00 00 01 3c 01 3c 00 01 00 00 01 3d 01 3d 00 01 |...<.<.....=.=..|
00000180 00 00 01 3e 01 3e 00 01 00 00 01 3f 01 3f 00 01 |...>.>.....?.?..|
00000190 00 00 01 40 01 40 00 01 00 00 01 41 01 41 00 01 |...@[email protected]..|
000001a0 00 00 01 42 01 42 00 01 00 00 01 43 01 43 00 01 |...B.B.....C.C..|
000001b0 00 00 01 47 01 47 00 01 00 00 01 48 01 48 00 01 |...G.G.....H.H..|
000001c0 00 00 01 49 01 49 00 01 00 00 01 4b 01 4b 00 01 |...I.I.....K.K..|
000001d0 00 00 01 4d 01 4d 00 01 00 00 01 4e 01 4e 00 01 |...M.M.....N.N..|
000001e0 00 00 01 4f 01 4f 00 01 00 00 01 50 01 50 00 01 |...O.O.....P.P..|
000001f0 00 00 01 51 01 51 00 01 00 00 01 52 01 52 00 01 |...Q.Q.....R.R..|
00000200 00 00 01 53 01 53 00 01 00 00 01 54 01 54 00 01 |...S.S.....T.T..|
00000210 00 00 01 55 01 55 00 01 00 00 01 56 01 56 00 01 |...U.U.....V.V..|
00000220 00 00 01 57 01 57 00 01 00 00 01 58 01 58 00 01 |...W.W.....X.X..|
00000230 00 00 01 59 01 59 00 01 00 00 01 5a 01 5a 00 01 |...Y.Y.....Z.Z..|
00000240 00 00 01 5c 01 5c 00 01 00 00 01 5d 01 5d 00 01 |...\.\.....].]..|
00000250 00 00 01 62 01 62 00 01 00 00 01 63 01 63 00 01 |...b.b.....c.c..|
00000260 00 00 01 67 01 67 00 01 00 00 01 6b 01 6b 00 01 |...g.g.....k.k..|
00000270 00 00 01 7c 01 7c 00 01 00 00 01 7d 01 7d 00 01 |...|.|.....}.}..|
00000280 00 00 01 7e 01 7e 00 01 00 00 01 7f 01 7f 00 01 |...~.~..........|
00000290 00 00 01 80 01 80 00 01 00 00 01 81 01 81 00 01 |................|
000002a0 00 00 01 82 01 82 00 01 00 00 01 83 01 83 00 01 |................|
000002b0 00 00 01 84 01 84 00 01 00 00 01 85 01 85 00 01 |................|
000002c0 00 00 01 86 01 86 00 01 00 00 01 87 01 87 00 01 |................|
000002d0 00 00 01 89 01 89 00 01 00 00 01 8a 01 8a 00 01 |................|
000002e0 00 00 01 8b 01 8b 00 01 00 00 01 8c 01 8c 00 01 |................|
000002f0 00 00 01 8d 01 8d 00 01 00 00 01 8e 01 8e 00 01 |................|
00000300 00 00 01 8f 01 8f 00 01 00 00 01 90 01 90 00 01 |................|
00000310 00 00 01 91 01 91 00 01 00 00 01 94 01 94 00 01 |................|
00000320 00 00 01 95 01 95 00 01 00 00 01 96 01 96 00 01 |................|
00000330 00 00 01 97 01 97 00 01 00 00 01 9d 01 9d 00 01 |................|
00000340 00 00 01 9e 01 9e 00 01 00 00 01 9f 01 9f 00 01 |................|
00000350 00 00 01 a0 01 a0 00 01 00 00 01 a1 01 a1 00 01 |................|
00000360 00 00 01 a2 01 a2 00 01 00 00 01 a3 01 a3 00 01 |................|
00000370 00 00 01 a4 01 a4 00 01 00 00 01 a5 01 a5 00 01 |................|
00000380 00 00 01 a6 01 a6 00 01 00 00 01 a7 01 a7 00 01 |................|
00000390 00 00 01 a8 01 a8 00 01 00 00 01 a9 01 a9 00 01 |................|
000003a0 00 00 01 aa 01 aa 00 01 00 00 01 ab 01 ab 00 01 |................|
000003b0 00 00 01 ad 01 ad 00 01 00 00 01 ae 01 ae 00 01 |................|
000003c0 00 00 01 af 01 af 00 01 00 00 01 b0 01 b0 00 01 |................|
000003d0 00 00 01 b1 01 b1 00 01 00 00 01 c1 01 c1 00 01 |................|
000003e0 00 00 01 c2 01 c2 00 01 00 00 01 c6 01 c6 00 01 |................|
000003f0 00 00 01 c7 01 c7 00 01 00 00 01 c8 01 c8 00 01 |................|
00000400 00 00 01 c9 01 c9 00 01 00 00 01 ca 01 ca 00 01 |................|
00000410 00 00 01 cb 01 cb 00 01 00 00 01 cc 01 cc 00 01 |................|
00000420 00 00 01 cd 01 cd 00 01 00 00 01 ce 01 ce 00 01 |................|
00000430 00 00 01 cf 01 cf 00 01 00 00 01 d2 01 d2 00 01 |................|
00000440 00 00 01 d3 01 d3 00 01 00 00 01 d4 01 d4 00 01 |................|
00000450 00 00 01 d5 01 d5 00 01 00 00 01 d6 01 d6 00 01 |................|
00000460 00 00 01 d7 01 d7 00 01 00 00 01 d8 01 d8 00 01 |................|
00000470 00 00 01 d9 01 d9 00 01 00 00 01 da 01 da 00 01 |................|
00000480 00 00 01 db 01 db 00 01 00 00 01 dc 01 dc 00 01 |................|
00000490 00 00 01 dd 01 dd 00 01 00 00 01 de 01 de 00 01 |................|
000004a0 00 00 01 df 01 df 00 01 00 00 01 e0 01 e0 00 01 |................|
000004b0 00 00 01 e1 01 e1 00 01 00 00 01 e2 01 e2 00 01 |................|
000004c0 00 00 01 e3 01 e3 00 01 00 00 01 e4 01 e4 00 01 |................|
000004d0 00 00 01 e5 01 e5 00 01 00 00 01 e6 01 e6 00 01 |................|
000004e0 00 00 01 ea 01 ea 00 01 00 00 01 eb 01 eb 00 01 |................|
000004f0 00 00 01 ec 01 ec 00 01 00 00 01 ed 01 ed 00 01 |................|
00000500 00 00 01 ee 01 ee 00 01 00 00 01 ef 01 ef 00 01 |................|
00000510 00 00 01 f0 01 f0 00 01 00 00 01 f2 01 f2 00 01 |................|
00000520 00 00 01 f3 01 f3 00 01 00 00 01 f4 01 f4 00 01 |................|
00000530 00 00 01 f5 01 f5 00 01 00 00 01 f6 01 f6 00 01 |................|
00000540 00 00 01 fd 01 fd 00 01 00 00 01 fe 01 fe 00 01 |................|
00000550 00 00 02 01 02 01 00 01 00 00 02 02 02 02 00 01 |................|
00000560 00 00 02 04 02 04 00 01 00 00 02 05 02 05 00 01 |................|
00000570 00 00 02 06 02 06 00 01 00 00 02 07 02 07 00 01 |................|
00000580 00 00 02 08 02 08 00 01 00 00 02 09 02 09 00 01 |................|
00000590 00 00 02 0a 02 0a 00 01 00 00 02 0b 02 0b 00 01 |................|
000005a0 00 00 02 0c 02 0c 00 01 00 00 02 0d 02 0d 00 01 |................|
000005b0 00 00 02 0e 02 0e 00 01 00 00 02 0f 02 0f 00 01 |................|
000005c0 00 00 02 10 02 10 00 01 00 00 02 11 02 11 00 01 |................|
000005d0 00 00 02 12 02 12 00 01 00 00 02 13 02 13 00 01 |................|
000005e0 00 00 02 14 02 14 00 01 00 00 02 15 02 15 00 01 |................|
000005f0 00 00 02 16 02 16 00 01 00 00 02 17 02 17 00 01 |................|
00000600 00 00 02 18 02 18 00 01 00 00 02 19 02 19 00 01 |................|
00000610 00 00 02 1a 02 1a 00 01 00 00 02 1b 02 1b 00 01 |................|
00000620 00 00 02 1f 02 1f 00 01 00 00 02 20 00 00 02 21 |........... ...!|
00000630 00 00 02 22 00 00 02 23 00 00 02 24 00 00 02 25 |..."...#...$...%|
00000640 00 00 02 26 00 00 02 27 00 00 02 28 00 00 02 29 |...&...'...(...)|
00000650 00 00 02 2a 00 00 02 2b 00 00 02 2c 00 00 02 2d |...*...+...,...-|
00000660 00 00 02 2e 00 00 02 2f 00 00 02 30 02 30 00 01 |......./...0.0..|
00000670 00 00 02 31 00 00 02 32 00 00 02 33 02 33 00 01 |...1...2...3.3..|
00000680 00 00 02 34 02 34 00 01 00 00 02 36 00 00 02 37 |...4.4.....6...7|
00000690 00 00 02 38 00 00 02 39 00 00 02 3a 00 00 02 3b |...8...9...:...;|
000006a0 00 00 02 3c 02 3c 00 01 00 00 02 3d 02 3d 00 01 |...<.<.....=.=..|
000006b0 00 00 02 3e 02 3e 00 01 00 00 02 3f 02 3f 00 01 |...>.>.....?.?..|
000006c0 00 00 02 40 02 40 00 01 00 00 02 41 00 00 02 42 |...@[email protected]|
000006d0 02 42 00 01 00 00 02 43 02 43 00 01 00 00 02 44 |.B.....C.C.....D|
000006e0 02 44 00 01 00 00 02 45 02 45 00 01 00 00 02 46 |.D.....E.E.....F|
000006f0 02 46 00 01 00 00 02 47 02 47 00 01 00 00 02 48 |.F.....G.G.....H|
00000700 02 48 00 01 00 00 02 49 02 49 00 01 00 00 02 4a |.H.....I.I.....J|
00000710 00 00 02 4b 00 00 02 4c 00 00 02 4d 00 00 02 4e |...K...L...M...N|
00000720 02 4e 00 01 00 00 02 4f 02 4f 00 01 00 00 02 51 |.N.....O.O.....Q|
00000730 02 51 00 01 00 00 02 52 02 52 00 01 00 00 02 53 |.Q.....R.R.....S|
00000740 02 53 00 01 00 00 02 54 02 54 00 01 00 00 02 55 |.S.....T.T.....U|
00000750 02 55 00 01 00 00 02 56 02 56 00 01 00 00 02 57 |.U.....V.V.....W|
00000760 02 57 00 01 00 00 02 58 02 58 00 01 00 00 02 59 |.W.....X.X.....Y|
00000770 02 59 00 01 00 00 02 5a 02 5a 00 01 00 00 02 5b |.Y.....Z.Z.....[|
00000780 02 5b 00 01 00 00 02 5c 02 5c 00 01 00 00 02 5d |.[.....\.\.....]|
00000790 02 5d 00 01 00 00 02 63 02 63 00 01 00 00 02 64 |.].....c.c.....d|
000007a0 02 64 00 01 00 00 02 65 02 65 00 01 00 00 02 66 |.d.....e.e.....f|
000007b0 02 66 00 01 00 00 02 67 02 67 00 01 00 00 02 68 |.f.....g.g.....h|
000007c0 02 68 00 01 00 00 02 6e 02 6e 00 01 00 00 02 6f |.h.....n.n.....o|
000007d0 02 6f 00 01 00 00 02 70 02 70 00 01 00 00 02 71 |.o.....p.p.....q|
000007e0 02 71 00 01 00 00 02 72 02 72 00 01 00 00 02 73 |.q.....r.r.....s|
000007f0 02 73 00 01 00 00 02 74 02 74 00 01 00 00 02 75 |.s.....t.t.....u|
00000800 02 75 00 01 00 00 02 76 02 76 00 01 00 00 02 77 |.u.....v.v.....w|
00000810 02 77 00 01 00 00 02 78 02 78 00 01 00 00 02 79 |.w.....x.x.....y|
00000820 00 00 02 7a 00 00 00 03 00 02 00 0a 00 00 00 04 |...z............|
00000830 00 02 00 0a 00 00 00 05 00 01 00 01 00 00 00 06 |................|
00000840 00 02 00 0a 00 00 00 07 00 02 00 0a 00 00 00 09 |................|
00000850 00 01 00 01 00 00 00 0d 00 00 00 0e 00 00 00 0f |................|
00000860 00 17 00 01 00 00 00 10 00 00 00 11 00 00 00 12 |................|
00000870 00 00 00 13 00 00 00 14 00 00 00 15 00 00 00 16 |................|
00000880 00 00 00 27 00 78 00 01 00 00 00 3a 00 00 00 44 |...'.x.....:...D|
00000890 00 02 00 0a 00 00 00 45 00 00 00 46 00 00 00 4a |.......E...F...J|
000008a0 00 00 00 4c 00 00 00 5b 00 02 00 0a 00 00 00 5e |...L...[.......^|
000008b0 00 01 00 01 00 00 00 5f 00 17 00 01 00 00 00 60 |......._.......`|
000008c0 00 60 00 01 00 00 00 61 00 60 00 01 00 00 00 64 |.`.....a.`.....d|
000008d0 00 64 00 01 00 00 00 65 00 65 00 01 00 00 00 66 |.d.....e.e.....f|
000008e0 00 66 00 01 00 00 00 68 00 00 00 69 00 00 00 6a |.f.....h...i...j|
000008f0 00 6a 00 01 00 00 00 6c 00 6d 00 01 00 00 00 6d |.j.....l.m.....m|
00000900 00 6d 00 01 00 00 00 6e 00 6f 00 01 00 00 00 6f |.m.....n.o.....o|
00000910 00 6f 00 01 00 00 00 70 00 70 00 01 00 00 00 71 |.o.....p.p.....q|
00000920 00 71 00 01 00 00 00 72 00 72 00 01 00 00 00 73 |.q.....r.r.....s|
00000930 00 73 00 01 00 00 00 74 00 66 00 01 00 00 00 76 |.s.....t.f.....v|
00000940 00 00 00 79 00 00 00 7a 00 00 00 7b 00 00 00 88 |...y...z...{....|
00000950 00 00 00 92 00 92 00 01 00 00 00 93 00 00 00 98 |................|
00000960 00 02 00 0a 00 00 00 99 00 02 00 0a 00 00 00 9a |................|
00000970 00 02 00 0a 00 00 00 9b 00 01 00 01 00 00 00 9c |................|
00000980 00 0c 00 0a 00 00 00 ac 00 02 00 0a 00 00 00 b2 |................|
00000990 00 b2 00 01 00 00 00 b3 00 b3 00 01 00 00 00 b4 |................|
000009a0 00 b4 00 01 00 00 00 b5 00 b5 00 01 00 00 00 b6 |................|
000009b0 00 b6 00 01 00 00 00 b7 00 b7 00 01 00 00 00 b8 |................|
000009c0 00 0c 00 0a 00 00 00 b9 00 00 00 ba 00 00 00 bb |................|
000009d0 00 00 00 bc 00 00 00 bd 00 00 00 be 00 00 00 bf |................|
000009e0 00 00 00 c0 00 00 00 c3 00 70 00 01 00 00 00 c4 |.........p......|
000009f0 00 71 00 01 00 00 00 c5 00 72 00 01 00 00 00 d0 |.q.......r......|
00000a00 00 d0 00 01 00 00 00 d1 00 00 00 e7 00 e7 00 01 |................|
00000a10 00 00 00 e8 00 e7 00 01 00 00 00 e9 00 e9 00 01 |................|
00000a20 00 00 00 f1 00 6d 00 01 00 00 00 f5 00 00 00 f6 |.....m..........|
00000a30 00 00 00 fa 00 00 00 fb 00 00 00 fc 00 fc 00 01 |................|
00000a40 00 00 02 03 00 00 00 00 |........|
2021-03-08T11:19:16.9194: TTC Version: 7
2021-03-08T11:19:16.9195: doAuth
2021-03-08T11:19:16.9195:
Write packet:
00000000 00 00 00 a1 06 00 00 00 00 00 03 76 00 01 01 06 |...........v....|
00000010 01 01 01 01 05 01 01 06 61 75 74 6f 71 61 01 0d |........autoqa..|
00000020 0d 41 55 54 48 5f 54 45 52 4d 49 4e 41 4c 01 0c |.AUTH_TERMINAL..|
00000030 0c 72 6f 64 72 69 67 6f 2d 62 6f 6c 64 00 01 0f |.rodrigo-bold...|
00000040 0f 41 55 54 48 5f 50 52 4f 47 52 41 4d 5f 4e 4d |.AUTH_PROGRAM_NM|
00000050 01 04 04 6d 61 69 6e 00 01 0c 0c 41 55 54 48 5f |...main....AUTH_|
00000060 4d 41 43 48 49 4e 45 01 0c 0c 72 6f 64 72 69 67 |MACHINE...rodrig|
00000070 6f 2d 62 6f 6c 64 00 01 08 08 41 55 54 48 5f 50 |o-bold....AUTH_P|
00000080 49 44 01 05 05 39 37 32 31 34 00 01 08 08 41 55 |ID...97214....AU|
00000090 54 48 5f 53 49 44 01 07 07 72 6f 64 72 69 67 6f |TH_SID...rodrigo|
000000a0 00 |.|
2021-03-08T11:19:16.9499:
Read packet:
00000000 00 00 01 50 06 00 00 00 00 00 08 01 06 01 0c 0c |...P............|
00000010 41 55 54 48 5f 53 45 53 53 4b 45 59 01 40 40 36 |AUTH_SESSKEY.@@6|
00000020 43 33 41 36 46 32 43 31 45 33 35 32 42 31 43 46 |C3A6F2C1E352B1CF|
00000030 43 42 44 35 38 41 43 37 46 44 46 33 37 46 34 42 |CBD58AC7FDF37F4B|
00000040 32 35 43 37 45 32 34 41 43 42 46 31 41 33 37 39 |25C7E24ACBF1A379|
00000050 44 30 44 41 35 36 44 31 46 30 32 44 30 36 42 00 |D0DA56D1F02D06B.|
00000060 01 0d 0d 41 55 54 48 5f 56 46 52 5f 44 41 54 41 |...AUTH_VFR_DATA|
00000070 00 02 09 39 01 14 14 41 55 54 48 5f 50 42 4b 44 |...9...AUTH_PBKD|
00000080 46 32 5f 43 53 4b 5f 53 41 4c 54 01 20 20 44 37 |F2_CSK_SALT. D7|
00000090 42 33 41 37 42 46 38 37 38 39 30 43 35 37 46 35 |B3A7BF87890C57F5|
000000a0 45 46 41 34 32 37 33 42 33 35 30 39 39 38 00 01 |EFA4273B350998..|
000000b0 16 16 41 55 54 48 5f 50 42 4b 44 46 32 5f 56 47 |..AUTH_PBKDF2_VG|
000000c0 45 4e 5f 43 4f 55 4e 54 01 04 04 34 30 39 36 00 |EN_COUNT...4096.|
000000d0 01 16 16 41 55 54 48 5f 50 42 4b 44 46 32 5f 53 |...AUTH_PBKDF2_S|
000000e0 44 45 52 5f 43 4f 55 4e 54 01 01 01 33 00 01 1a |DER_COUNT...3...|
000000f0 1a 41 55 54 48 5f 47 4c 4f 42 41 4c 4c 59 5f 55 |.AUTH_GLOBALLY_U|
00000100 4e 49 51 55 45 5f 44 42 49 44 00 01 20 20 31 34 |NIQUE_DBID.. 14|
00000110 31 45 32 33 35 45 39 32 37 46 44 38 39 39 37 36 |1E235E927FD89976|
00000120 31 42 42 44 35 42 32 39 32 36 43 42 30 39 00 04 |1BBD5B2926CB09..|
00000130 01 01 01 02 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
2021-03-08T11:19:16.9503:
Write packet:
00000000 00 00 03 ae 06 00 00 00 00 00 03 73 00 01 01 06 |...........s....|
00000010 02 01 01 01 01 0f 01 01 06 61 75 74 6f 71 61 01 |.........autoqa.|
00000020 0c 0c 41 55 54 48 5f 53 45 53 53 4b 45 59 01 40 |..AUTH_SESSKEY.@|
00000030 40 41 37 44 42 33 35 42 32 42 42 38 34 35 36 41 |@A7DB35B2BB8456A|
00000040 43 42 39 32 33 36 35 35 41 32 34 45 36 32 42 36 |CB923655A24E62B6|
00000050 44 44 37 37 42 33 39 39 41 37 35 42 44 31 44 30 |DD77B399A75BD1D0|
00000060 38 36 36 36 42 36 32 36 46 34 30 41 33 35 45 31 |8666B626F40A35E1|
00000070 42 01 01 01 0d 0d 41 55 54 48 5f 50 41 53 53 57 |B.....AUTH_PASSW|
00000080 4f 52 44 01 40 40 43 34 35 39 37 45 41 41 38 34 |ORD.@@C4597EAA84|
00000090 32 41 34 42 35 38 31 41 33 34 38 41 33 43 44 46 |2A4B581A348A3CDF|
000000a0 38 36 37 34 30 36 36 44 39 41 43 45 37 45 36 33 |8674066D9ACE7E63|
000000b0 44 31 43 38 37 41 42 30 44 44 37 37 36 43 38 38 |D1C87AB0DD776C88|
000000c0 39 45 46 43 38 45 00 01 16 16 41 55 54 48 5f 50 |9EFC8E....AUTH_P|
000000d0 42 4b 44 46 32 5f 53 50 45 45 44 59 5f 4b 45 59 |BKDF2_SPEEDY_KEY|
000000e0 01 40 40 33 30 41 38 41 32 43 31 37 32 34 45 33 |.@@30A8A2C1724E3|
000000f0 32 32 45 33 30 37 43 32 34 35 34 44 31 42 42 46 |22E307C2454D1BBF|
00000100 44 32 33 33 43 45 30 35 37 30 39 34 43 30 43 31 |D233CE057094C0C1|
00000110 39 44 35 36 35 34 45 31 30 46 36 41 41 32 37 30 |9D5654E10F6AA270|
00000120 44 33 46 00 01 0d 0d 41 55 54 48 5f 54 45 52 4d |D3F....AUTH_TERM|
00000130 49 4e 41 4c 01 0c 0c 72 6f 64 72 69 67 6f 2d 62 |INAL...rodrigo-b|
00000140 6f 6c 64 00 01 0f 0f 41 55 54 48 5f 50 52 4f 47 |old....AUTH_PROG|
00000150 52 41 4d 5f 4e 4d 01 04 04 6d 61 69 6e 00 01 0c |RAM_NM...main...|
00000160 0c 41 55 54 48 5f 4d 41 43 48 49 4e 45 01 0c 0c |.AUTH_MACHINE...|
00000170 72 6f 64 72 69 67 6f 2d 62 6f 6c 64 00 01 08 08 |rodrigo-bold....|
00000180 41 55 54 48 5f 50 49 44 01 05 05 39 37 32 31 34 |AUTH_PID...97214|
00000190 00 01 08 08 41 55 54 48 5f 53 49 44 01 07 07 72 |....AUTH_SID...r|
000001a0 6f 64 72 69 67 6f 00 01 13 13 41 55 54 48 5f 43 |odrigo....AUTH_C|
000001b0 4f 4e 4e 45 43 54 5f 53 54 52 49 4e 47 01 ce ce |ONNECT_STRING...|
000001c0 28 44 45 53 43 52 49 50 54 49 4f 4e 3d 28 41 44 |(DESCRIPTION=(AD|
000001d0 44 52 45 53 53 3d 28 50 52 4f 54 4f 43 4f 4c 3d |DRESS=(PROTOCOL=|
000001e0 74 63 70 29 28 48 4f 53 54 3d 72 61 63 61 7a 62 |tcp)(HOST=racazb|
000001f0 70 72 64 2e 6d 63 68 2e 6d 6f 63 2e 73 67 70 73 |prd.mch.moc.sgps|
00000200 3a 31 35 32 31 29 28 50 4f 52 54 3d 31 35 32 31 |:1521)(PORT=1521|
00000210 29 29 28 43 4f 4e 4e 45 43 54 5f 44 41 54 41 3d |))(CONNECT_DATA=|
00000220 28 53 45 52 56 49 43 45 5f 4e 41 4d 45 3d 57 4d |(SERVICE_NAME=WM|
00000230 50 4c 41 32 50 50 29 28 43 49 44 3d 28 50 52 4f |PLA2PP)(CID=(PRO|
00000240 47 52 41 4d 3d 2f 74 6d 70 2f 67 6f 2d 62 75 69 |GRAM=/tmp/go-bui|
00000250 6c 64 32 36 32 36 31 38 35 39 37 2f 62 30 30 31 |ld262618597/b001|
00000260 2f 65 78 65 2f 6d 61 69 6e 29 28 48 4f 53 54 3d |/exe/main)(HOST=|
00000270 72 6f 64 72 69 67 6f 2d 62 6f 6c 64 29 28 55 53 |rodrigo-bold)(US|
00000280 45 52 3d 72 6f 64 72 69 67 6f 29 29 29 29 00 01 |ER=rodrigo))))..|
00000290 16 16 53 45 53 53 49 4f 4e 5f 43 4c 49 45 4e 54 |..SESSION_CLIENT|
000002a0 5f 43 48 41 52 53 45 54 01 03 03 38 37 33 00 01 |_CHARSET...873..|
000002b0 17 17 53 45 53 53 49 4f 4e 5f 43 4c 49 45 4e 54 |..SESSION_CLIENT|
000002c0 5f 4c 49 42 5f 54 59 50 45 01 01 01 30 00 01 1a |_LIB_TYPE...0...|
000002d0 1a 53 45 53 53 49 4f 4e 5f 43 4c 49 45 4e 54 5f |.SESSION_CLIENT_|
000002e0 44 52 49 56 45 52 5f 4e 41 4d 45 01 0e 0e 4f 72 |DRIVER_NAME...Or|
000002f0 61 63 6c 65 43 6c 69 65 6e 74 47 6f 00 01 16 16 |acleClientGo....|
00000300 53 45 53 53 49 4f 4e 5f 43 4c 49 45 4e 54 5f 56 |SESSION_CLIENT_V|
00000310 45 52 53 49 4f 4e 01 07 07 32 2e 30 2e 30 2e 30 |ERSION...2.0.0.0|
00000320 00 01 16 16 53 45 53 53 49 4f 4e 5f 43 4c 49 45 |....SESSION_CLIE|
00000330 4e 54 5f 4c 4f 42 41 54 54 52 01 01 01 31 00 01 |NT_LOBATTR...1..|
00000340 12 12 41 55 54 48 5f 41 4c 54 45 52 5f 53 45 53 |..AUTH_ALTER_SES|
00000350 53 49 4f 4e 01 55 55 41 4c 54 45 52 20 53 45 53 |SION.UUALTER SES|
00000360 53 49 4f 4e 20 53 45 54 20 4e 4c 53 5f 4c 41 4e |SION SET NLS_LAN|
00000370 47 55 41 47 45 3d 27 41 4d 45 52 49 43 41 4e 27 |GUAGE='AMERICAN'|
00000380 20 4e 4c 53 5f 54 45 52 52 49 54 4f 52 59 3d 27 | NLS_TERRITORY='|
00000390 41 4d 45 52 49 43 41 27 20 20 54 49 4d 45 5f 5a |AMERICA' TIME_Z|
000003a0 4f 4e 45 3d 27 30 30 3a 30 30 27 00 01 01 |ONE='00:00'...|
2021-03-08T11:19:17.9758:
Read packet:
00000000 00 00 00 0b 0c 20 00 00 01 00 01 |..... .....|
2021-03-08T11:19:17.9759:
Read packet:
00000000 00 00 00 0b 0c 20 00 00 01 00 02 |..... .....|
2021-03-08T11:19:17.9759:
Write packet:
00000000 00 00 00 0b 0c 00 00 00 01 00 02 |...........|
2021-03-08T11:19:17.9956:
Read packet:
00000000 00 00 00 62 06 00 00 00 00 00 04 01 01 00 00 02 |...b............|
00000010 03 f9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 02 03 f9 00 33 4f |..............3O|
00000030 52 41 2d 30 31 30 31 37 3a 20 69 6e 76 61 6c 69 |RA-01017: invali|
00000040 64 20 75 73 65 72 6e 61 6d 65 2f 70 61 73 73 77 |d username/passw|
00000050 6f 72 64 3b 20 6c 6f 67 6f 6e 20 64 65 6e 69 65 |ord; logon denie|
00000060 64 0a |d.|
I have an oracle Procedure like, which returns a sys_refcursor:
PROCEDURE getTTVT
(
o_data OUT sys_refcursor
)
IS
v_Query varchar2(4000);
BEGIN
v_Query :='
select unit_id, unit_name
from admin_hcm.unit where unit_id in (41, 42, 43, 44, 45, 56, 57, 59, 60)
';
OPEN o_data FOR v_Query;
END getTTVT;
My go function is:
// Unit of list
type Unit struct {
unit_id int64
unit_name string
}
func ListAllUnits {
stmt, err := db.oracleDB.Prepare("begin dashboard.getTTVT(); end;")
if err != nil {
fmt.Println("Error create statment")
fmt.Println(err)
return nil, err
}
defer stmt.Close()
units := []models.Unit{}
result, err := stmt.Exec(sql.Out{Dest: &units})
fmt.Println(result)
}
func main() {
ListAllUnits()
}
When I run command:
go run main.go
I only get nil
@sijms Can you explain how to call Oracle Store Procedure?
is it possible to add SID option to CONNECT_DATA string instead of SERVICE_NAME here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.