Jim Youmans
asked on
DB2 Backups permissions
DB2 10.5 on Windows
OK, this is killing me. It should be a simple thing but I have hit a wall and am not sure what is going on. On my development database, I am issuing the following command.
But after a minute or so I get this.
MyUserID should have SYSADM rights on that database. It is a domain user and it is an Admin on the windows server. So I don't understand what the issue is. I also made sure MyUserID has full privileges on the Z: drive.
How can I be sure MyUserID is SYSADM and what might I be missing? This is really killing me because it should not be this hard to backup my db. What am I doing wrong? This works fine on my production server, but it uses a different user.
Thank you.
Jim
OK, this is killing me. It should be a simple thing but I have hit a wall and am not sure what is going on. On my development database, I am issuing the following command.
db2 backup db Database1 online to z:\db2backups compress without prompting
But after a minute or so I get this.
The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation: User ID "MyUserID"
MyUserID should have SYSADM rights on that database. It is a domain user and it is an Admin on the windows server. So I don't understand what the issue is. I also made sure MyUserID has full privileges on the Z: drive.
How can I be sure MyUserID is SYSADM and what might I be missing? This is really killing me because it should not be this hard to backup my db. What am I doing wrong? This works fine on my production server, but it uses a different user.
Thank you.
Jim
ASKER
When I run that I get 9,000 rows back. They are all SELECT, ALTER, EXECUTE, DELETE, REFERENCE, etc . What should I look for?
Oops. :)
SELECT * FROM syscat.dbauth
The GRANTEE column is the user you want to query, The DBADMAUTH column is administrator authority.
Kent
SELECT * FROM syscat.dbauth
The GRANTEE column is the user you want to query, The DBADMAUTH column is administrator authority.
Kent
ASKER
So when I run this query
There is one row returned where DBADMAUTH column has the value "Y".
So that user should have SysAdm rights and should be able to run the backup command, correct?
Jim
SELECT * FROM syscat.dbauth
WHERE DBADMAUTH = 'Y' AND GRANTEE = 'MyUserID'
ORDER BY GRANTEE
There is one row returned where DBADMAUTH column has the value "Y".
So that user should have SysAdm rights and should be able to run the backup command, correct?
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Had to add the user and password to make it work. Thank you so much!
This query should show you all users and their permissions:
SELECT * FROM SYSIBMADM.PRIVILEGES
WHERE AUTHID = SESSION_USER AND AUTHIDTYPE = 'U'
Kent