-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Tibero database #63
Comments
you may check for code changes with name KDB in the attached file. I think hdb_tc.tcl file is the one which needs to be checked to solve this issue. Btw I have HammerDB version 2.23 here.. If someone wants to look at the setup in my PC , then I can share access as well. |
This is a great start - however reviewing code from an attached tarfile is not the approach we need to take - so you need to get your code into GitHub so other people who may be interested can review it and/or work on it as well and it can be tracked. As an example the sort of thing you can do now to achieve this is fork this repository to your own account, clone the fork to your local machine and then create a branch - eg branch #63 for this issue. Then you need to add all of your changes into this branch and commit them so they can be seen. This then gives a structure that can be worked with and the code reviewed and changed. Finally when all the changes are made and tested and it is valid for adding to HammerDB then you would create a pull request to do this (however we are definitely not at this point yet). At the outset a couple of things to be bear in mind. The structure of the code in HammerDB v.3 has been deliberately designed in a modular way to make adding new databases much, much easier. It is recommended that working with the process above you move to v3 and update your changes for this new structure first. This will be much easier in the long run, for example you will know exactly which file to change for the transaction counter also you will not change code for any other database. Also all databases on HammerDB support both Windows and Linux so you will also need a Windows solution as well as unixodbc for your changes to be included in a released version. Finally as some guidance for the transaction counter and TPM values as when doing this correctly you probably will be able to resolve the issues yourself. In the transaction counter code (which will be a lot easier to see and change when you have updated to v3) you will see a SQL statement that is used to retrieve the current transaction value from the database eg the following from Oracle. HammerDB creates a separate thread, logs in with admin privileges and executes this statement plotting the output.
Therefore you need to make sure that it can login and execute this statement. For the TPM value after a timed run if you look in the Script Editor for Oracle you will see a statement it uses to extract the TPM value directly from the AWR repository. As your database will not have an AWR repository then it is likely that this statement will also need to be changed. |
Thanks again for your guidance. I will try to see how to do this. Btw, please take note that our DB is similar to Oracle in syntax. So, following code runs fine on Tibero as well-
SQL> select sum(value) from gv$sysstat where name = 'user commits' or name = 'user rollbacks';
SUM(VALUE)
----------
165
1 row selected.
We also have AWR equivalent TPR report. Not sure how I can use it in Tibero? Also please note that I got this code from some colleague who is no longer working with us so it is running on the older version of HammerDB. Now the latest is 3.X. For which I don’t have code yet ☹
Thanks and regards,
Neeta Bhandari
Senior Product Support Consultant, TMAX Singapore
Phone : +65 62913429
Website:http://technet.tmaxsoft.com
From: Steve Shaw [mailto:notifications@github.com]
Sent: Wednesday, 17 July, 2019 5:31 PM
To: TPC-Council/HammerDB <HammerDB@noreply.github.com>
Cc: Neeta Bhandari <neeta@tmaxsoft.com>; Author <author@noreply.github.com>
Subject: Re: [TPC-Council/HammerDB] Add Support for Tibero database (#63)
This is a great start - however reviewing code from an attached tarfile is not the approach we need to take - so you need to get your code into GitHub so other people who may be interested can review it and/or work on it as well and it can be tracked. As an example the sort of thing you can do now to achieve this is fork this repository to your own account, clone the fork to your local machine and then create a branch - eg branch #63<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FTPC-Council%2FHammerDB%2Fissues%2F63&data=02%7C01%7Cneeta%40tmaxsoft.com%7C83cd00f4c8674352735408d70a9971c3%7Cef43900953c14a0c8012edabcdeb7e05%7C1%7C0%7C636989526472302096&sdata=rg%2FeY78KimPSjtC09%2BhMVEmLNtrtno42Ey68ESsZU9o%3D&reserved=0> for this issue. Then you need to add all of your changes into this branch and commit them so they can be seen. This then gives a structure that can be worked with and the code reviewed and changed. Finally when all the changes are made and tested and it is valid for adding to HammerDB then you would create a pull request to do this (however we are definitely not at this point yet).
At the outset a couple of things to be bear in mind. The structure of the code in HammerDB v.3 has been deliberately designed in a modular way to make adding new databases much, much easier. It is recommended that working with the process above you move to v3 and update your changes for this new structure first. This will be much easier in the long run, for example you will know exactly which file to change for the transaction counter also you will not change code for any other database. Also all databases on HammerDB support both Windows and Linux so you will also need a Windows solution as well as unixodbc for your changes to be included in a released version.
Finally as some guidance for the transaction counter and TPM values as when doing this correctly you probably will be able to resolve the issues yourself. In the transaction counter code (which will be a lot easier to see and change when you have updated to v3) you will see a SQL statement that is used to retrieve the current transaction value from the database eg the following from Oracle. HammerDB creates a separate thread, logs in with admin privileges and executes this statement plotting the output.
set sqc {select sum(value) from gv$sysstat where name = 'user commits' or name = 'user rollbacks'}
Therefore you need to make sure that it can login and execute this statement. For the TPM value after a timed run if you look in the Script Editor for Oracle you will see a statement it uses to extract the TPM value directly from the AWR repository. As your database will not have an AWR repository then it is likely that this statement will also need to be changed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FTPC-Council%2FHammerDB%2Fissues%2F63%3Femail_source%3Dnotifications%26email_token%3DAMUHVBWP7FH5CTZAWRRYHGDP73REJA5CNFSM4IEJNZ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2DTSKQ%23issuecomment-512178474&data=02%7C01%7Cneeta%40tmaxsoft.com%7C83cd00f4c8674352735408d70a9971c3%7Cef43900953c14a0c8012edabcdeb7e05%7C1%7C0%7C636989526472312096&sdata=vgXai3GCjMPZcRPfvzDZDwU9g5Nmry1fOmRs7PMESC4%3D&reserved=0>, or mute the thread<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMUHVBQGNDWGQNZSZKFB4MTP73REJANCNFSM4IEJNZ2A&data=02%7C01%7Cneeta%40tmaxsoft.com%7C83cd00f4c8674352735408d70a9971c3%7Cef43900953c14a0c8012edabcdeb7e05%7C1%7C0%7C636989526472322109&sdata=ywnfx0RRNdo6CevsypT9WSvTXbkMBj3yW95Tqh8Bbx8%3D&reserved=0>.
|
If the statement works then it is probably the login or using the correct library for the transaction counter thread that is the problem with the transaction counter. For 3.X the code is on the GitHub site here so you would need to apply the changes in your tarfile to the new version. |
There is a series of posts starting here https://www.hammerdb.com/blog/uncategorized/how-to-add-your-database-to-hammerdb-pt1-opening-an-issue/ that have been written to explain the process of how to add a new database to HammerDB. (note this issue is step 1 for you that is already complete) In the example given I have used MariaDB as it is close to MySQL. In your case you say "our DB is similar to Oracle in syntax" therefore you would follow a similar process but start with the existing Oracle files. Note that at the moment the existing Oracle variables do not have the prefix that the other databases have. So when you are creating the XML file please add your prefix to the variable names as this will be the standard going forward. So if "tib" was your chosen prefix then the file would look like this. 1 1 tpcc tpccAny questions should be followed in this issue. |
Hi , I have now downloaded the latest HammerDB version 3.2 and trying to integrate it with Tibero using Tibero oci. Please note that the previous version on which I was working had tdbc-odbc integration. Now this one I am trying to start from scratch using oci. So, I have done following -
|
Hi For a guide follow the instructions here https://www.hammerdb.com/blog/uncategorized/how-to-add-your-database-to-hammerdb-pt1-opening-an-issue/ - this shows duplicating mysql to mariadb and the changes needed. The code is here https://github.com/sm-shaw/HammerDB/tree/54. (You need to do the same by duplicating the Oracle files) So now if you have the files - look in tibopt.tcl - you have a procedure as follows:
You need to start changing all of the files in your directory as follows:
|
Thanks . For a quick progress - I changed the prefix back to ora - instead of tib and the error is gone. Now , I have the following error - |
I had already modified /home/tibero/HammerDB-3.2/lib/Oratcl4.6/oratcl_utils.tcl- So, not sure where is this ORACLE_HOME coming from . Thanks, |
This will come from the Oratcl library - so you will need to set ORACLE_HOME as well or modify and recompile the source into your own library https://sourceforge.net/projects/oratcl/ Note that Oratcl has its own ORACLE_LIBRARY to override the $ORACLE_HOME/lib so you can try that as well. |
May be you are right - I need to recompile. Previously I had recompiled all based from individual packages of TCL,TK,Threads etc.. as follows- But now after I download the latest HammerDB with everything preinstalled - not sure how to compile as there is no /unix folder in the downloaded source. 2.install tk 3.install tcl threads 4.install oratcl export KDC_HOME=/home/tibero/tibero6/client After oratcl4.5 install, Go to /usr/local/lib/Oratcl4.5/oratcl_utils.tcl change line 563 as - /db/oracle/hammerdb/lib/Oratcl4.5 is hammerdb install dir please set KDC_HOME=$TB_HOME/client 5.create test table and procedure create table orders (o_id number,o_c_id number,o_entry_d date); 6.create test tcl scripts set v_o_id 1759
[oracle@bmt ~]$ tclsh8.6 a.tcl |
You do not need to recompile TCL and TK and will only need to recompile Oratcl if there is something specifically you need to change in the source for it to work with Tibero - by default on Linux it will be looking for the library libclntsh.so but the ORACLE_LIBRARY environment variable can override this. |
I tried to copy oratcl installer and compile it. But there is error in make - |
The --with-tcl should be a tcl directory such as you had before --with-tcl=../tcl8.6.8/unix/. |
No I haven't modified anything yet. Just want to keep it simple and get it working. Let me copy tcl installer as well and give the path to compile. |
OK - that should definitely work then. I always compile TCL first then TK and then the packages so will always have a TCL directory to use for --with-tcl - as you have have identified everything else has used version 8.6.8. As noted Oratcl does not need the Oracle library at compile time. Once you have it compiled then you can make modifications for Tibero. |
[tibero@testsvr oratcl]$ ./configure --enable-threads --enable-shared --with-tcl=../tcl8.6.8/unix/ When I check the folder /home/tibero/HammerDB-3.2/tcl8.6.8/unix |
ok then I will recompile everything TCL , TK etc... in order |
Try giving a full path to the --with-tcl directory ./tcl8.6.8/unix/ may not be correct for the directory you are in. |
I have tried so many things but still errors. Is it possible for you to use anydesk to see my screen which may be faster.. [tibero@testsvr bin]$ ./tclsh8.6 /home/tibero/a.tcl
"load /home/tibero/HammerDB-3.2/lib/Oratcl4.6/libOratcl4.6.so" [tibero@testsvr lib]$ ln -s libtboci.so libclntsh.so.10.1 [tibero@testsvr bin]$ ./tclsh8.6 /home/tibero/a.tcl
"load /home/tibero/HammerDB-3.2/lib/Oratcl4.6/libOratcl4.6.so" |
I dont have bandwidth for extended support until 2nd week of August at earliest. I would recommend trying a build against Oracle first when thos works do the same with Tibero. Note ldd command can show all libraries needed not just the first. |
Closed as no further progress |
Hi support,
I am looking for Tibero database support in HammerDB. I am able to connect Tibero to HammerDB Gui using unixodbc . I can create TPCC and TPCH schemas, All menus work fine until Transaction Counter which does not display any graph. Can someone help to identify what changes are required. or why it would show no graph or 0 tpm.
Any advise is greatly appreciated.
hammer.tar.gz
The text was updated successfully, but these errors were encountered: