DB2 Logs export from iseries - db2

Is there a way to export logs from a DB2 database on Iseries Power 8 to a syslog collector like graylog please?
thanks,
Bryan

Try
QSYS2.DISPLAY_JOURNAL()
QSYS2.HISTORY_LOG_INFO()
these are new functions in IBM i 7.3 that were just released
More info here:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/Db2%20for%20i%20generated%20syslog%20history%20and%20audit%20journal

If you just want to log an activity for particular physical file (DB2 table) you can enable journaling for it (which is a kind of db logging) and retrieve tons of details from it. You can find more info here.

Related

Backup of Dashdb on Bluemix - what options available

I tried taking backup of dashdb from bluemix cloud using Data Studio. I am getting this error 'Remote target is unreachable.'.
Since this is an admin activity, I assume it should be done on the server. As this is cloud server, I am trying to understand how this can be done!
Are there any tools which support ssh to the server and how to take backup of the db? Any documentation in this regard?
Thanks
Which plan are you using ?
Have you read the details of backup on the FAQ ?
This section might help:
Is my data backed up? Encrypted backups on the full Db2 managed service database are done daily. For the Db2 Warehouse on Cloud Flex Performance plan, the
last 7 daily backups are retained. For all other Db2 Warehouse on
Cloud plans, the last 2 daily backups are retained. For Db2 on Cloud,
the last 14 daily backups are retained. In the Db2 Warehouse on Cloud Flex Performance plan, you can restore your database from any of your retained backups at any time
that you choose. In the case of all of the other Db2 Warehouse on
Cloud plans, the retained backups are used exclusively by IBM for only
system recovery purposes in the event of a disaster or system loss. A
request to restore your database from a backup is not supported. You
can export your data using Db2 tools such as IBM Data Studio or by
using the db2 export command.>
For Db2 on Cloud, backups can be stored off site in a different data center or region upon request to IBM Support. These backups are
also used exclusively by IBM to recover from only disaster or system
loss events. A request to restore your database from a backup is not
supported.
Are there any tools which support ssh to the server and how to take backup of the db? Any documentation in this regard?
SSH is not supported as this is a managed service. This is documented in the FAQ:
How do I access the Db2 managed service database?
You can access your Db2 managed service database through the web console from a browser, or you can connect to the database with a client connection such as JDBC, ODBC, CLI, CLP, or CLPPlus. A direct login to the server with Telnet or a Secure Shell (ssh) is not supported.
If you want to take your own backups at the interval of your choice, exporting your data is your best option. That can be done from the web console or from a database client.
Alternatively, if what you're after is access to historical data, you can use time travel query.

JDBC Connection to DB2?

We have AS/400 machines from IBM (P8), which uses DB2 database. I want to read the tables from DB2 with a JDBC connection and process it. It is possible to connect to the DB2 database and make sql statements with java program? If yes, can someone show a little sample. Thanks in advance.
Examples and tutorial for iSeries jdbc are on the Db2 for i documentation available here:

IBM DB2 ON AS400

I want to configure IBM DB2 on iseries AS400. The issue is I'm not getting the proper tool for AS400 and I've already installed Data Studio for configure DB2.
I don't have any knowledge regarding AS400 and I'm fresher for IBM technology.
I have already ODBC drivers of iseries. Please help me to find out iseries AS400 setup tool.
DB2 is integrated into OS/400 and all of it's following OS's. To configure DB2 on these platforms, perform a power-on maneuver. If it is already turned on, then DB2 is configured.
BTW, you probably don't have an AS400 but something newer. The hardware is likely Power System or Pure System, and the OS is likely IBM i.
Once you get a SQL connection to the AS400 aka system i aka iseries. Configure the DB by executing this SQL statement in Studio.
create collection myas400SQL
This will create an as400 library named MYAS400SQL that has the mumbo jumbo journal automatically added meaning this will work like every other SQL database with commit rollback transactions...
Lets try it.
CREATE TABLE myas400sql.mytable (myfield char(1))
Table mytable can handle commits and rollbacks like any other db you may have used.
Happy Friday.

get admin config in db2 iseries

I am working on db2 AS400 v7.1. Could you please tell me database configuration concept in db2 as400 similar to db2 LUW? I achieved using below command:
db2 UPDATE DB CFG USING CONNECT_PROC **schema.stored_Procedure**
usage: helps to run stored_Procedure each time when user logs in.
If you are using JDBC/ODBC for connecting to database (DB2 for i), you can use user exit QIBM_QZDA_INIT which is equivalent of connect_proc in DB2 LUW.
Link to IBM documentation for more details.
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzaii/rzaiimstsmpinitcl.htm
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzaii/rzaiimstexdb.htm

db2 Type 4 driver downlaod

I want to connect to the Db2 data base server with java application, I use type4 driver, can you please tell me exact location to download DB2 Type4 driver
Thanq in advance
The actually recommended way is to get this from the DB2 server you are working with because it quarantees you get the correct version of them. You can find them from /sqllib/java .