Results 1 to 6 of 6

Thread: Restore problem

  1. #1
    Join Date
    Feb 2004
    Posts
    34

    Unanswered: Restore problem

    I had bad container error so i'm applying this script to restore the database but still its prompting me to continue/terminate/abort .....

    here is the syntax

    something is missing here.

    restore database siebpdb from e:\Backup taken at 20040216230006 to d: into tstsieb redirect WITHOUT PROMPTING;
    set tablespace containers for 3 using (file 'd:\sqllib\sqltestdata\siebel_4k' 128000, file 'd:\sqllib\sqltestdata\siebel_4k1' 128000, file 'd:\sqllib\sqltestdata\siebel_4k2' 128000,file 'd:\sqllib\sqltestdata\siebel_4k3' 128000,file 'd:\sqllib\sqltestdata\siebel_4k4' 128000,file 'd:\sqllib\sqltestdata\siebel_4k5' 128000);
    set tablespace containers for 4 using (file 'd:\sqllib\sqltestdata\siebel_16k' 128000, file 'd:\sqllib\sqltestdata\siebel_16k1' 128000, file 'd:\sqllib\sqltestdata\siebel_16k2' 128000);
    set tablespace containers for 5 using (file 'd:\sqllib\sqltestdata\siebel_4kl' 32000);
    set tablespace containers for 6 using (file 'd:\sqllib\sqltestdata\siebel_idx' 128000, file 'd:\sqllib\sqltestdata\sybel_idx1' 128000, file 'd:\sqllib\sqltestdata\siebel_idx2' 128000, file 'd:\sqllib\sqltestdata\siebel_idx3' 128000);
    set tablespace containers for 7 using (path 'd:\sqllib\sqltestdata\temp16k');
    set tablespace containers for 8 using (path 'd:\sqllib\sqltestdata\temp32k');
    set tablespace containers for 9 using (path 'd:\sqllib\sqltestdata\temp4k');
    restore database siebpdb continue;


    Would u pl. tell me what is missing ?

  2. #2
    Join Date
    Feb 2004
    Posts
    34
    any one there to help me out please ?

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Not sure why it would prompt ..

    Can't you try the restore after dropping the existing database (You may need to save the db cfg in this case)

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Feb 2004
    Posts
    34
    As I mentioned before, it was constantly prompting me, it went to infinite loop so forcefullly i had to close the command center.

    I tried to restore it again with the following syntax and got the output.

    SYNTAX
    --------


    restore database siebpdb from e:\Backup taken at 20040216230006 to d:
    into tstsieb redirect WITHOUT PROMPTING;

    set tablespace containers for 0 using (path "d:\DB2\NODE00");

    set tablespace containers for 1 using (path "d:\DB2\NODE00");

    set tablespace containers for 2 using (path "d:\DB2\NODE00");

    set tablespace containers for 3 using (file
    'd:\sqllib\sqltestdata\siebel_4k' 128000, file 'd:\sqllib\sqltestdata\siebel_4k1' 128000, file
    'd:\sqllib\sqltestdata\siebel_4k2' 128000,file
    'd:\sqllib\sqltestdata\siebel_4k3' 128000,file 'd:\sqllib\sqltestdata\siebel_4k4' 128000,file
    'd:\sqllib\sqltestdata\siebel_4k5' 128000);

    set tablespace containers for 4 using (file
    'd:\sqllib\sqltestdata\siebel_16k' 128000, file 'd:\sqllib\sqltestdata\siebel_16k1' 128000, file
    'd:\sqllib\sqltestdata\siebel_16k2' 128000);

    set tablespace containers for 5 using (file
    'd:\sqllib\sqltestdata\siebel_4kl' 32000);

    set tablespace containers for 6 using (file
    'd:\sqllib\sqltestdata\siebel_idx' 128000, file 'd:\sqllib\sqltestdata\sybel_idx1' 128000, file
    'd:\sqllib\sqltestdata\siebel_idx2' 128000, file
    'd:\sqllib\sqltestdata\siebel_idx3' 128000);

    set tablespace containers for 7 using (path
    'd:\sqllib\sqltestdata\temp16k');

    set tablespace containers for 8 using (path
    'd:\sqllib\sqltestdata\temp32k');

    set tablespace containers for 9 using (path
    'd:\sqllib\sqltestdata\temp4k');

    RESTORE DATABASE SIEBPDB CONTINUE;

    db2 rollforward database tstsieb to end of logs and stop;



    ERROR which i get
    ---------------------

    SQL1277N Restore has detected that one or more table space containers
    are
    inaccessible, or has set their state to 'storage must be defined'.
    DB20000I The RESTORE DATABASE command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    SQL0294N The container is already in use. SQLSTATE=42730

    SQL0294N The container is already in use. SQLSTATE=42730

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    SQL1277N Restore has detected that one or more table space containers
    are
    inaccessible, or has set their state to 'storage must be defined'.
    DB20000I The RESTORE DATABASE command completed successfully.

    SQL0104N An unexpected token "db2" was found following
    "BEGIN-OF-STATEMENT".
    Expected tokens may include: "SELECT". SQLSTATE=42601



    What should I do next ?

  5. #5
    Join Date
    Sep 2002
    Posts
    456
    The path for containers 0,1 and 2 is same; so make sure you specify a different path (directory) there e.g.

    set tablespace containers for 0 using (path "d:\DB2\NODE00.0");

    set tablespace containers for 1 using (path "d:\DB2\NODE00.1");

    set tablespace containers for 2 using (path "d:\DB2\NODE00.2");

    and then make sure that you specify a set tablespace container for each and every tablespace, you might be missing a statement for tablespace...check that out.

    dollar


    Originally posted by dingi
    As I mentioned before, it was constantly prompting me, it went to infinite loop so forcefullly i had to close the command center.

    I tried to restore it again with the following syntax and got the output.

    SYNTAX
    --------


    restore database siebpdb from e:\Backup taken at 20040216230006 to d:
    into tstsieb redirect WITHOUT PROMPTING;

    set tablespace containers for 0 using (path "d:\DB2\NODE00");

    set tablespace containers for 1 using (path "d:\DB2\NODE00");

    set tablespace containers for 2 using (path "d:\DB2\NODE00");

    set tablespace containers for 3 using (file
    'd:\sqllib\sqltestdata\siebel_4k' 128000, file 'd:\sqllib\sqltestdata\siebel_4k1' 128000, file
    'd:\sqllib\sqltestdata\siebel_4k2' 128000,file
    'd:\sqllib\sqltestdata\siebel_4k3' 128000,file 'd:\sqllib\sqltestdata\siebel_4k4' 128000,file
    'd:\sqllib\sqltestdata\siebel_4k5' 128000);

    set tablespace containers for 4 using (file
    'd:\sqllib\sqltestdata\siebel_16k' 128000, file 'd:\sqllib\sqltestdata\siebel_16k1' 128000, file
    'd:\sqllib\sqltestdata\siebel_16k2' 128000);

    set tablespace containers for 5 using (file
    'd:\sqllib\sqltestdata\siebel_4kl' 32000);

    set tablespace containers for 6 using (file
    'd:\sqllib\sqltestdata\siebel_idx' 128000, file 'd:\sqllib\sqltestdata\sybel_idx1' 128000, file
    'd:\sqllib\sqltestdata\siebel_idx2' 128000, file
    'd:\sqllib\sqltestdata\siebel_idx3' 128000);

    set tablespace containers for 7 using (path
    'd:\sqllib\sqltestdata\temp16k');

    set tablespace containers for 8 using (path
    'd:\sqllib\sqltestdata\temp32k');

    set tablespace containers for 9 using (path
    'd:\sqllib\sqltestdata\temp4k');

    RESTORE DATABASE SIEBPDB CONTINUE;

    db2 rollforward database tstsieb to end of logs and stop;



    ERROR which i get
    ---------------------

    SQL1277N Restore has detected that one or more table space containers
    are
    inaccessible, or has set their state to 'storage must be defined'.
    DB20000I The RESTORE DATABASE command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    SQL0294N The container is already in use. SQLSTATE=42730

    SQL0294N The container is already in use. SQLSTATE=42730

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    SQL1277N Restore has detected that one or more table space containers
    are
    inaccessible, or has set their state to 'storage must be defined'.
    DB20000I The RESTORE DATABASE command completed successfully.

    SQL0104N An unexpected token "db2" was found following
    "BEGIN-OF-STATEMENT".
    Expected tokens may include: "SELECT". SQLSTATE=42601



    What should I do next ?

  6. #6
    Join Date
    Feb 2004
    Posts
    34
    Thanks a bunch !!!

    Problem got solved.

Posting Permissions

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