If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 attach & backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-11, 04:13
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
db2 attach & backup

DB2 managed to confuse me again

user_a is logged on to the win3k server running db2v9.
user_a has dbadm auth.
So when user_a wants to create a new tablespace this is not permitted.
That's right and user_a issues the command "db2 connect to abc user db2inst1 using db2inst1" and tries to create the tablespace again. Now it works as designed
Next, after a load, a tablepace backup is required. The connection is still valid but the backup fails with a SQL1092 because user_a is not authorized.

Okay, still sane. What I do (and I remember that from db2 classes):
Code:
db2 terminate
db2 attach to abc_i user db2inst1 using db2inst1
db2 backup ....
But still the same error occurs. DB2 evaluates the credentials of user_a instead of db2inst1, the id who is attached to the instance.

Am I mistaking?
Reply With Quote
  #2 (permalink)  
Old 05-27-11, 07:52
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
If you check the manual, you can see that
Quote:
Required connection
Database. This command automatically establishes a connection to the specified database.
Clearly, it will use the credentials of the user that is logged in (user_a).
Reply With Quote
  #3 (permalink)  
Old 05-27-11, 08:04
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
My mistake then, but what is the use of "attach to instance user another_user" if you cannot do anything with those credentials?
Reply With Quote
  #4 (permalink)  
Old 05-27-11, 09:10
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by dr_te_z View Post
My mistake then, but what is the use of "attach to instance user another_user" if you cannot do anything with those credentials?
You can, when you need an instance attachment.
Reply With Quote
  #5 (permalink)  
Old 05-27-11, 14:26
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Authorization (for Backup)

One of the following:

- SYSADM
- SYSCTRL
- SYSMAINT

DBADM is not included.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On