ODBV3 – more comfortable usage


17.09.2018
by Kamil Stawiarski

It has been crazy few months – organizing POUG2018 took a lot of energy but it was satisfying as hell! 😀

This weekend I had some time to prepare a new version of ODBV for Trivadis Performance Days 2018 where I’ll be talking about the internals of database block storage.

The series of articles about ODBV can be found here: https://blog.ora-600.pl/?s=odbv&submit=

I decided to write a new version of ODBV for 3 reasons:

  • I wanted to give you a tool, that you can use as a binary – without a necessity to compile or install anything on your system
  • I thought that it will be a nice option to add recognition of chained and migrated rows.
  • I wanted to learn a new language – GO – and what is better to learn a new language then rewriting your tool and adding some new features 😉

Source code for the tool, binary version for Linux x86_64 and previous versions can be found here: https://github.com/ora600pl/odbv

If you want to compile this tool on your system, you have to install GoLang – instructions can be found in here: https://golang.org/doc/install

Next steps:

1[oracle@skiper ~]$ go get github.com/fatih/color
2[oracle@skiper ~]$ go get github.com/ora600pl/odbv
3package github.com/ora600pl/odbv: C++ source files not allowed when not using cgo or SWIG: odbv.cpp
4[oracle@skiper ~]$ go get gopkg.in/goracle.v2
5[oracle@skiper odbv]$ go build odbv3.go
6[oracle@skiper odbv]$ ./odbv3
7THIS TOOL IS NOT FOR PRODUCTION USE!!! Only for fun and learn ;)
8created by Kamil Stawiarski (@ora600pl kstawiarski@ora-600.pl ora-600.pl)
9 
10./odbv3 -f path_to_a_data_file -b block_size -c user/password@host:port/service

Of course, you can just download binary version and use it after setting oracle ENV.

1[oracle@mysikura ~]$ wget https://github.com/ora600pl/odbv/raw/master/odbv3.x86_64_OEL7
2--2018-09-17 13:38:27--  https://github.com/ora600pl/odbv/raw/master/odbv3.x86_64_OEL7
3Translacja github.com (github.com)... 192.30.253.112, 192.30.253.113
4Łączenie się z github.com (github.com)|192.30.253.112|:443... połączono.
5Żądanie HTTP wysłano, oczekiwanie na odpowiedź... 302 Found
6Lokalizacja: https://raw.githubusercontent.com/ora600pl/odbv/master/odbv3.x86_64_OEL7 [podążanie]
7--2018-09-17 13:38:28--  https://raw.githubusercontent.com/ora600pl/odbv/master/odbv3.x86_64_OEL7
8Translacja raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.12.133
9Łączenie się z raw.githubusercontent.com (raw.githubusercontent.com)|151.101.12.133|:443... połączono.
10Żądanie HTTP wysłano, oczekiwanie na odpowiedź... 200 OK
11Długość: 3500216 (3,3M) [application/octet-stream]
12Zapis do: `odbv3.x86_64_OEL7'
13 
14100%[=============================================================================================>] 3.500.216   3,42MB/s   w  1,0s
15 
162018-09-17 13:38:30 (3,42 MB/s) - zapisano `odbv3.x86_64_OEL7' [3500216/3500216]
17[oracle@mysikura ~]$ . rokoko.env
18[oracle@mysikura ~]$ chmod +x odbv3.x86_64_OEL7
19[oracle@mysikura ~]$ ./odbv3.x86_64_OEL7
20THIS TOOL IS NOT FOR PRODUCTION USE!!! Only for fun and learn ;)
21created by Kamil Stawiarski (@ora600pl kstawiarski@ora-600.pl ora-600.pl)
22 
23./odbv3 -f path_to_a_data_file -b block_size -c user/password@host:port/service

And here you can see the sample usage:

Next step: adding support for ASM.
Have fun! 🙂

P.S.
If you haven’t heard it yet, Frits and I started a new project – you can now search for oracle database c functions (or oracle internal error first arguments) at http://orafun.info , and paste a stack trace at http://orafun.info/stack (experimental).


Contact us

Database Whisperers sp. z o. o. sp. k.
al. Jerozolimskie 200, 3rd floor, room 342
02-486 Warszawa
NIP: 5272744987
REGON:362524978
+48 508 943 051
+48 661 966 009
info@ora-600.pl

Newsletter Sign up to be updated