Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746

    Unanswered: 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?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    If you check the manual, you can see that
    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).

  3. #3
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    My mistake then, but what is the use of "attach to instance user another_user" if you cannot do anything with those credentials?

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •