I've tested two tools that can provide info about transactions including when, who, using which computer and application
ApexSQL Audit creates auditing triggers for you, so if you're not up to coding and creating triggers for each of your tables, this is an option
It has 2 built in reports, and the good thing about it is that it saves all captured transactions into 2 tables, so you can run queries against them and extract any info you need
Unfortunately, it can't replay the transactions
Another one is ApexSQL Log. It reads transaction logs and trn backups, so the database has to be in Full recovery model. Besides the data transactions, it also tracks schema changes (create table, alter function, etc) and it can replay transactions
Based on the last above links in my edit to my question I found my answer. I cannot tweak the system account since our logons to our system are from an LDAP and I cannot control the groups and what not.
So I did the following:
- Opened the DB2 GUI (was easiest to do this way).
- Connected to the desired database as db2admin.
- Added my logon to the database as a user.
- GRANT all authorities to that id (my id).
- Disconnect.
- Connect to the desired database as my id.
- GRANT all authorities to db2admin.
- Disconnect.
Voila! The db2admin logon now as all authorities.
EDIT: I'm going to leave the above as it helped me learn how to do some interesting stuff in DB2. However, I have learned that the
DBADM/SECADM with DATAACCESS and ACCESSCTRL authorities granted the
instance owner (in my case the db2admin id) have all the authority
needed to interact with the database. I could have actually just
commented out those grant lines above in the script. Those were left
over from a script which ran against an older version of DB2. I have
also found if I need to have the instance owner DBADM after doing a
restore to database A from database B, it is easiest just to set the
registry variable DB2_RESTORE_GRANT_ADMIN_AUTHORITY to YES (available
in Fix Pack 2 and above). Then I don't have to try to grant instance
owner DBADM. It automatically is granted that to any database restored
into the instance. If you are not at Fix Pack 5, you have to bounce
the instance for this to take affect.
Best Answer
AUTO_DB_BACKUP
means DB2 will take a backup based on when it feels it should do so. The things that influence the taking of a backup are:In order to have
AUTO_DB_BACKUP
working, you also need to haveAUTO_MAINT
turnedON
as well. I would also wager a guess that in order to enable the scheduling part, you may need to have the DBM CFGHEALTH_MON
turned toON
as well.Most DB2 DBAs I talk to turn off
HEALTH_MON
andAUTO_MAINT
because of the performance issues encountered. DB2 may choose to exercise maintenance and backups when it is least convenient for you. So I would recommend against using them, unless you are using BLU under DB2 10.5. Then it sounds likeAUTO_MAINT
may be more important again.Anyway, an online backup is just a backup while users are still engaging the database and/or the database is activated. You can take online or offline backups regardless of whether or not you have
AUTO_MAINT
andAUTO_DB_BACKUP
enabled. You probably want online backups enabled if you wish to useAUTO_DB_BACKUP
in case DB2 decides to take a backup in the middle of the day. Otherwise it could either fail to backup, or kick users off the system. I'm not sure which as I've never tried. Like I said, I steer clear ofHEALTH_MON
andAUTO_MAINT
.This way I can either take scripted backups when I want them scheduled via a job scheduler. Or I can take an on-demand online or offline depending on the situation.