Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2017
    Posts
    5

    Answered: Changing instance id on database

    We have an issue where as part of a server migration, we want to change the instance id (from 'db2' to 'db2inst1'). I'll be doing this via a redirected restore where I'll also be converting some DMS tablespaces to automatic storage.

    I'm concerned about security issues I might run into. The instance id is the owner of many objects (which I want to change anyway).

    So the plan at this point, is to:
    1. do the redirected restore on my new server
    2. transfer ownership of objects owned by 'db2' to a new id (either the new instance id, or an app admin id I create).

    I of course plan to test as much as possible, but wondering if anyone has experience as to what other problems I might run into. I think transfering ownership covers most things, but wondering what hidden gems might be out there.

    DB2 10.5 fp7
    SUSE Linux

  2. Best Answer
    Posted by db2mor

    "Consider setting the registry variable before the restore: DB2_RESTORE_GRANT_ADMIN_AUTHORITIES , in addition to using transfer ownership after the restore completes. Verify in all catalog tables the new owner is what you expect. Get all the permissions/authorities of the old account from the existing database , after restore verify that the new db2inst1 has the same permissions/authorities - if that is what is required.
    I've done this in the past, there were no major hassles, a few minor bits easily worked around."


  3. #2
    Join Date
    Jan 2003
    Posts
    4,310
    Provided Answers: 5
    You may run into some permissions issues. Things that were granted to the db2. When transferring ownership, you will not be allowed to change it to the user running the commands. Therefore keep a db2 user with dbadm right to do the transfer. I did this a while ago, and I still run into the permission thing every so often.

    Andy

  4. #3
    Join Date
    Apr 2012
    Posts
    1,135
    Provided Answers: 25
    Consider setting the registry variable before the restore: DB2_RESTORE_GRANT_ADMIN_AUTHORITIES , in addition to using transfer ownership after the restore completes. Verify in all catalog tables the new owner is what you expect. Get all the permissions/authorities of the old account from the existing database , after restore verify that the new db2inst1 has the same permissions/authorities - if that is what is required.
    I've done this in the past, there were no major hassles, a few minor bits easily worked around.

  5. #4
    Join Date
    Jan 2017
    Posts
    5
    Thanks for both your input... it's an odd situation. Our instance name of 'db2' does not sit well with Tivioli SAMP scripts. So as we are doing a server migration and conversion to automatic storage, it seemed the best time to fix this problem. Liking the registry variable, that's a find.

    Cheers,
    P

Posting Permissions

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