Search more accessed tables in DB2
- Read more about Search more accessed tables in DB2
- Log in to post comments
It’s relatively simple and unfamiliar tool for the novices: db2top.
Using the option “T” (tables) and sorting the list (key “z”) using column 1.
The first position will be for the most accessed table.
If there is much difference between that and the rest during an appreciable period of normal use of the database, these tables would be candidates to improve their access or optimice their access to improve the overall performance,
Use SYSDUMMY1 in DB2 to obtain the actual server name
By using the auxiliar table sysdummy1 you can query information about a server with DB2 installed.
Next query shows how to obtain the DB2 server name where the session is connected:
SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1
DB2 Dates format by region
- Read more about DB2 Dates format by region
- Log in to post comments
To give a specific format to the date obtained throught DB2 “current date”, you can use the following method.
Get date with European format..
DB2 Top 10 SQL for number of executions
- Read more about DB2 Top 10 SQL for number of executions
- Log in to post comments
SQL sentence to obtain the SQL TOP TEN with more executions of my BD2 database:
db2 "SELECT NUM_EXECUTIONS as EXECUTIONS, AVERAGE_EXECUTION_TIME_S as TIME_SECONDS, STMT_TEXT as TEXT FROM SYSIBMADM.TOP_DYNAMIC_SQL WHERE upper(STMT_TEXT) like 'SELECT%' ORDER BY NUM_EXECUTIONS DESC FETCH FIRST 10 ROWS ONLY"
DB2TOP register and replay
- Read more about DB2TOP register and replay
- Log in to post comments
Actually DB2TOP is a real-time tool, however many DBA’s don’t know that it can be run in REPLAY mode with captured session information. So, next time you have a big crisis with your database, you can capture all the data from db2top and do the analysis afterwards.
How to capture the data? Option -C to capture. Press N to create a file. The option “-m” to gather data during n minutes.
Options db2 command line – Disable autocommit
- Read more about Options db2 command line – Disable autocommit
- Log in to post comments
DB2 command line utility has different options. In this post we show how to disable the autocommit of DML statements that by default is active. In case you want to do some test, for example, simulating the use of locks could be helpful to disable this feature.
Options from DB2 command line can be obtained with the following sentences:
DB2 with BLU Acceleration for SAP
- Read more about DB2 with BLU Acceleration for SAP
- Log in to post comments
Every time it’s more common SAP environments running with DB2.
Attached a video regarding the capabilities of DB2 with BLU Acceleration applied to SAP and all SAP notes to consider.
Surprising comparative with SAP HANA, and as with less complexity and investment, you get more performance.
Pay attention to the comparison with SAP HANA:
Attached also the IBM Redbook Architecting and Deploying DB2 with BLU Acceleration.
Angular — Directives: handling scope
- Read more about Angular — Directives: handling scope
- Log in to post comments
When creating your directive you need to decide how are you going to handle scope. There are two options: isolated from the outside world, linked to the parent scope.
Listagg: New Oracle 11.2 function to summarize and aggregate strings
In a LinkedIn debate about how to update from a select with summarized registers in SQL Server, Sergio Romero has shared an interesting tip about new summarize functions on Oracle 11g R2.