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.

db2 backup db Database1 online to z:\db2backups compress without prompting

Open in new window


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"

Open in new window


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
Jim YoumansSr Database AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenDBACommented:
Hi JIm,

This query should show you all users and their permissions:

SELECT * FROM SYSIBMADM.PRIVILEGES
 WHERE AUTHID = SESSION_USER AND AUTHIDTYPE = 'U'


Kent
0
Jim YoumansSr Database AdministratorAuthor Commented:
When I run that I get 9,000 rows back.   They are all SELECT, ALTER, EXECUTE, DELETE, REFERENCE, etc .   What should I look for?
0
Kent OlsenDBACommented:
Oops.  :)

SELECT * FROM syscat.dbauth

The GRANTEE column is the user you want to query,   The DBADMAUTH column is administrator authority.

Kent
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Jim YoumansSr Database AdministratorAuthor Commented:
So when I run this query

SELECT * FROM syscat.dbauth
WHERE DBADMAUTH = 'Y' AND GRANTEE = 'MyUserID'
ORDER BY GRANTEE

Open in new window


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
0
Kent OlsenDBACommented:
Correct.

DB2 defaults to OS authentication, so the username that you used to connect to the server should be the one in play.

You might include the user authentication on the command line, at least for a test

 
db2 backup db Database1 USER MyUserID USING MyUserPW online to z:\db2backups compress without prompting

Open in new window


Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim YoumansSr Database AdministratorAuthor Commented:
Had to add the user and password to make it work.  Thank you so much!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.