IBM Support

Restore database fails due to user permission SQL5193N

Troubleshooting


Problem

Restoring the Tivoli Storage Manager server database fails. Error messages indicate the user does not have permissions on the database.

Symptom

RESTORE DB command fails with error:


ANR9999D_3831306406 ReportSQLDiagInfo(dbieval.c:1572) Thread<11>: Missing
sqlState=42524, sqlCode=-5193 from table. Returning rc = 9994.
ANR0162W Supplemental database diagnostic information: -1:42524:-5193
([IBM][CLI Driver][DB2/NT64] SQL5193N The current session user does not have
usage privilege on any enabled workloads. SQLSTATE=42524
).
ANR4635I Point-in-time database restore complete, restore date xxxx.
Entering exception handler.

Cause

The user ID performing the restore operation does not have permission on the database.

Resolving The Problem

You must log in using the DB2 instance owner user ID to perform the restore db operation.

If you are restoring to a different system than the original system where the database was created, you must create the same user ID as on the original system. Then log in with this user ID and perform the restore.

If for some reason the original DB2 instance owner user ID is not known (i.e. original system crashed and lost data, new administrator who did not set up the original system and does not have access to it, etc.), the following procedure can be used grant permissions to the new user ID.

1. Drop the current database.

dsmserv removedb tsmdb1

The database can also be dropped from DB2 if there is problem with the dsmserv command:


db2 drop db tsmdb1

2. Set DB2 authority:
db2stop
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
db2start

Once this is set, the user performing the restore db operation will have the following authorities:
SECADM
DBADM
DATAACCESS
ACCESSCTRL

3. Run RESTORE DB and the user permission error will be resolved.

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.3;7.1","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
17 June 2018

UID

swg21966759