Retrieving application ID from db2 8.1.5 on Z/OS - db2

I want to observe application id of current session from db2 8.1.5 on Z/OS but there is not a function which shows the application id in db2 prior to 8.2 . I was not able to find the exact solution. Please can you tell me any solution if there is.
Thanks in advance

Prior to db2 8.2 you have to write your own function. If you have the DB2 Application Development Client and a C or Java compiler installed you can try the procedure outline here

Related

Getting started using Entity Framework with DB2

This is my first time building a .NET application that connects to a DB2 database, and I really have no idea where to begin as I've never worked with DB2 before.
Here's what I've done so far:
Installed IBM.Data.DB2.EntityFramework
Installed IBM.Data.DB2.iSeries
Installed Entity Framework 6
Now when I try to create a code first model, I don't see DB2 in the list of available data sources, so I'm guessing I need to figure that out first.
What do I need to do to get DB2 added as a data source? I know it's possible because I can see it in the first screenshot in this previously answered question.
you have to install IBM Data Server Client Packages and IBM Database Add-Ins for Visual Studio

DB2 Monitoring Tool LUW

I have a little problem with finding a monitoring tool for our DB2 Databases.
We are currently using 10.5 LUW Version of DB2.
If already checked the internet for several hours, but the only tool, which is coming close to our use-case, was updated for the last time in 2009. So could someone give me pls an idea, how to monitor our DB2 databases?
Thank you for your help.
IBM Db2 Data Management Console https://ibm.biz/Db2Console is the next generation of db2 monitoring, previously known as "Data Server Manager".
You can also try dsmtop https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0070123.html
If neither of the above suit, please explain more about your particular use-case.
I had the same problem and what I did was to develop my own set of tools. The code is in GitHub and it works with Nagios:
https://github.com/angoca/monitor-db2-with-nagios
seen on the virtuell idug summer conference
https://www.idug.org
two vendor tools for LUW Monitoring:
https://www.dbisoftware.com
https://www.itgain-is.de/en

Connecting to DB2 using SQL Developer

I trying to connect to DB2 database through SQL Developer. I followed following steps create connection:
1. Open SQL Developer
2. Go to Tools > Preferences > Database > Third Party JDBC Drivers.
3. I added third-party JDBC driver path entries (db2jcc.jar and db2jcc_license_cu.jar)
As soon as I try to create connection I get below error
Oracle SQL-Developer Version 17.2 works fine for me with Db2 Version 11 for Linux x64 and I am using a recent Type-4 jdbc (db2jcc4.jar) driver from IBM.
You question shows that your Db2 jdbc driver version is very old (Version 9.7 fixpack 5) and out of support, so you should upgrade to the latest available Db2 client for your (unspecified) operating-system. Also you should ensure you are using the latest release of the Oracle-SQL-Developer for your operating system.
As your question gives no facts about your versions of Oracle or Db2 products or operating systems, this is the best advice that is possible.
I got the same problem, it turned out SQL Developer doesn't display tables for DB2, but still allows to perform SQL queries. If you know table names, you will be able to select data from those tables if you have enough permissions to do so.
You can test ability to perform SQL queries by selecting DB2 version (SQL below is valid for DB2 12.0)
SELECT GETVARIABLE('SYSIBM.VERSION') AS VERSION FROM SYSIBM.SYSDUMMY1;
Make sure you don't forget to specify schema while selecting data from your tables!
select * from schema.table_name;

Db2 Installation Issue

Hi I have tried to install DB2 9.5 in Windows 7 OS, Installation was successful but when I try to open Control Centre it's throwing an error DB29501E which is an error for not creating DB2 instance. How to create DB2 instance or is there a way to create while installation only.
IBM knows about this problem and has a guide for you.
http://www-01.ibm.com/support/docview.wss?uid=swg21240310

IBM DB2 Type 4 driver?

Where can I find the redistributable version of the IBM DB2 Type 4 driver?
I suppose this is the driver I would use to connect from a Java app (on windows) to DB2 on the mainframe?
You will not be able to connect to the mainframe with any redistributable JDBC driver. The driver pack consists of the actual type 4 driver (db2jcc.jar) and any number of license files of the form:
db2jcc_license_cisuz.jar
where the cisuz bit is variable, indicating the platforms that you're allowed to run on (iSeries, pSeries, System z, LUW and so on).
You're only likely to get cu with any freely distributable pack. You need the z to access DB2 on the mainframe and that's jealously guarded so you'll need to purchase a specific edition of DB2 Connect to get it. I think both PE and EE, the personal and enterprise editions, have this licence file.
Without that license file, the type 4 driver won't even try to talk to the server, you'll get an exception.
IBM's Fix pack site has the "IBM Data Server Driver for JDBC and SQLJ" which is nothing but the JDBC type 4 driver. Though the page I pointed to above happens to be the windows page, it's the same type 4 driver for all platforms, as should be expected.
I don't think any user/password is required.
There is no need to download the JDBC driver separately it is already shipped with your DB2 product.
You can easily find it at this location : C:\Program Files\IBM\SQLLIB\java\db2jcc.jar
db2jcc.jar is the driver name
You can get the drivers from the IBM site. You will need to have IBM ID and password to login (which you can obtain here). Zip file is about 7 MBs, in contains DB2 9.5 JDBC (type 2/4) and SQLJ drivers. Type 4 drivers are in db2jcc4.jar.
However, you won't be able to connect to mainframes with this driver if mainframe is running DB2 for z/OS. To do so, you need at least to purchase DB2 Connect product, which will cost you about $500 minimum.
If you're running on an AS/400 (or iSeries, or whatever the heck IBM is calling it these days), you'll probably want to get it from JTOpen.
Their toolbox replaces the old Java Toolbox and includes the JDBC drivers.
If I need any IBM JARs for DB2 or MQ, I usually just add it to the instructions that DB2 or MQ needs to be installed as a prerequisite along with a URL to download it.
The same goes for Java and many other not easily redistributable products as well.
This eliminates the need to worry about licensing issues as it would be on the onus of the user rather than the vendor to obtain the proper licenses.