Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Location
    Ohio
    Posts
    38

    Question Unanswered: Restore to location using DB Links

    Hi!
    I am having a problem when I restore a database to a location that is a symbolic link. It appears DB2 is translating the symbolic link, and storing the container names using the "real" path. This is a problem because the plan is to mount this area in the location of the symbolic link in case of a disaster at the primary location.

    For example:
    The data location is /law/prod/db2_data/db2inst1. The symbolic link is /db2_data/db2inst1 points to /law/prod/db2_data/db2inst1.
    Code:
    ll /db2_data
    lrwxr-xr-x   1 db2inst1 db2inst1         32 Mar 18 15:24 db2inst1 -> /law/prod/db2_data/db2inst1
    In case of a disaster, the /law/prod/db2_data/db2inst1 will be mounted as /db2_data/db2inst1.

    So my restore command is:
    Code:
    db2 "restore db db2inst1 to /db2_data/db2inst1 into db2inst1"
    But when I query the containers, the whole path is listed:
    Code:
    TBSPC_NAME   CONT_NAME                                                                    CONTAINER_TYPE USABLE_PAGES
    ------------ ---------------------------------------------------------------------------- -------------- ------------
    SYSCATSPACE  /law/prod/db2_data/db2inst1/db2inst1/NODE0000/SQL00001/SQLT0000.0            SMS Directory             0
    TEMPSPACE1   /law/prod/db2_data/db2inst1/db2inst1/NODE0000/SQL00001/SQLT0001.0            SMS Directory             0
    USERSPACE1   /law/prod/db2_data/db2inst1/db2inst1/NODE0000/SQL00001/SQLT0002.0            SMS Directory             0
    SYSTOOLSPACE /law/prod/db2_data/db2inst1/db2inst1/NODE0000/SQL00001/SYSTOOLSPACE          DMS File               8188
    SYSTOOLSTMPS /law/prod/db2_data/db2inst1/db2inst1/NODE0000/SQL00001/SYSTOOLSTMPSPACE      SMS Directory             0
    Is there anyway to force it to not translate the links?

    Thanks!
    Jodie

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    RESTORE ... TO indicates the database path, which is different from tablespace container paths. During the restore DB2 attempts to create containers in their original locations, unless REDIRECT is specified, in which case you will have to set each container path to a desired location. Look for "redirected restore" in the manuals for more information.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2003
    Location
    Ohio
    Posts
    38
    n_i,
    I can't use redirected restore.. this is a restore for an HADR database (will be anyway.. just testing out the restore right now). I don't believe you can use redirected restore with HADR.

    Any other ideas?

    Thanks!
    Jodie

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Well, you are attempting to place tablespace containers into directories that differ from those on the primary - how's that different from redirected restore?

    Like I said, RESTORE tries to re-create tablespace containers in the paths that are saved in the backup image, unless you use REDIRECT. If the paths are not available the restore will fail.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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