Disclaimer: I'm a SQL-Server develolper, and freely admit that I'm totally out of my depth on this one. But I need to figure this out.
During a server replacement I run an app called DM2Migrate - which performs a backup-copy-"restore" from the old machine to the new one. Most of the time. One on five installs I encounter a DB2 database that was built under different credentials, and the DB2Migrate fails.
The database should always have been created under the special Admin account, but some of the contractors got a little lazy, and created the database under a different account, one that they could apparently remember easier. (I'm not too sure about this, but corporate lore points to this excuse, so...)
Since it takes forty or fifty minutes to determine whether the Migration failed (or not), it makes sense to programatically figure out what credentials built the database first, then run the proper DB2Migrate app. The only problem is that I have no idea how to craft the SQL statement that would shed light on this issue.
First: is what I'm asking for possible? And Second: if so, how would one go about figuring it out? Perhaps logging in as one "creator" account and running a particular SQL statement and looking at the resulting error? I'm not at all sure how to approach this - in Oracle that information is available in the system tables.
Thanks (in advance) for your patience and attention.