Creating new dB from Cold backup.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Creating new dB from Cold backup.

  1. #1
    Join Date
    Sep 2001
    Posts
    34

    Unhappy

    Hi Gurus,

    I was trying to create a new database with a cold backup of another database, when I say Startup
    force it gives an error saying that the dB name in the header doesnot match for the control file. I
    copied all the files from the cold backup to the appropriate locations for the new database.
    Can somebody suggest what or how should I go about this, appreciate your help.

    Thanks in Advance.

    The database is 8.1.7.2 on windows NT.


  2. #2
    Join Date
    Dec 1999
    Location
    Cincinnati, Ohio USA
    Posts
    99
    Yes, you will need to rerun the "create controlfile ..." statement to create a new database. Don't forget to create a new pfile and change references for controlfiles to new locations and change references in create controlfile statement to new file locations.

    For example, to create a database based off of my backup directory.

    startup nomount;

    CREATE CONTROLFILE SET DATABASE "newDB" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 255
    MAXLOGMEMBERS 2
    MAXDATAFILES 999
    MAXINSTANCES 8
    MAXLOGHISTORY 1588
    LOGFILE
    GROUP 1 (
    '/ora_bkup/u06/oradata/XLAW7/redoXLAW701.log'
    ) SIZE 1500M,
    GROUP 2 (
    '/ora_bkup/u07/oradata/XLAW7/redoXLAW702.log'
    ) SIZE 1500M,
    GROUP 3 (
    '/ora_bkup/u08/oradata/XLAW7/redoXLAW703.log'
    ) SIZE 1500M
    DATAFILE
    '/ora_bkup/u02/oradata/XLAW7/system01.dbf',
    '/ora_bkup/u03/oradata/XLAW7/rbs01.dbf',
    '/ora_bkup/u03/oradata/XLAW7/temp01.dbf',
    '/ora_bkup/u02/oradata/XLAW7/tools01.dbf',
    '/ora_bkup/u02/oradata/XLAW7/users01.dbf',
    '/ora_bkup/u03/oradata/XLAW7/schema.dbf'
    CHARACTER SET US7ASCII;

    alter database open resetlogs;
    Doug

  3. #3
    Join Date
    Sep 2001
    Posts
    34
    Hi Doug,

    Thanks for the reply. I did as you asked me to do. Below is the error message.

    SVRMGR> connect internal;
    Password:
    Connected.
    SVRMGR> startup nomount;
    ORACLE instance started.
    Total System Global Area 54794268 bytes
    Fixed Size 75804 bytes
    Variable Size 16670720 bytes
    Database Buffers 37969920 bytes
    Redo Buffers 77824 bytes
    SVRMGR> CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS NOARCHIVELOG
    2> MAXLOGFILES 32
    3> MAXLOGMEMBERS 2
    4> MAXDATAFILES 254
    5> MAXINSTANCES 1
    6> MAXLOGHISTORY 453
    7> LOGFILE
    8> GROUP 1 'D:\ORACLE817\ORADATA\TEST\REDO01.LOG' SIZE 1M,
    9> GROUP 2 'D:\ORACLE817\ORADATA\TEST\REDO02.LOG' SIZE 1M,
    10> GROUP 3 'D:\ORACLE817\ORADATA\TEST\REDO03.LOG' SIZE 1M
    11> DATAFILE
    12> 'D:\ORACLE817\ORADATA\TEST\SYSTEM01.DBF',
    13> 'D:\ORACLE817\ORADATA\TEST\RBS01.DBF',
    14> 'D:\ORACLE817\ORADATA\TEST\USERS01.DBF',
    15> 'D:\ORACLE817\ORADATA\TEST\TEMP01.DBF',
    16> 'D:\ORACLE817\ORADATA\TEST\TOOLS01.DBF',
    17> 'D:\ORACLE817\ORADATA\TEST\INDX01.DBF',
    18> 'D:\ORACLE817\DATABASE\TEST\DATA01',
    19> 'D:\ORACLE817\DATABASE\TEST\DATAINDX01'
    20> CHARACTER SET WE8ISO8859P1
    21> ;
    CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS NOARCHIVELOG
    *
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01161: database name ORCL in file header does not match given name of TEST

    ORA-01110: data file 1: 'D:\ORACLE817\ORADATA\TEST\SYSTEM01.DBF'

  4. #4
    Join Date
    Mar 2000
    Location
    CA
    Posts
    317
    You should change REUSE to SET and NORESETLOGS to RESETLOGS as was suggested by MOLONEDE in controlfile.

    Then you should be able to restart the database.

    Thanks
    Kishore Kumar

  5. #5
    Join Date
    Sep 2001
    Posts
    34
    Thanks for both Doug and Kishore Kumar, for yoou prompt reply. I was able to create the database.
    But it says system01.dbf needs more recovery. I don't know what this means.

    PDH

  6. #6
    Join Date
    Sep 2001
    Location
    Fort Smith
    Posts
    184
    try this:
    startup mount
    when database is mounted:
    recover database;
    when media recovery complete message is seen
    alter database open;
    database gets opened.

    If you do not think other wise i have some ?s.
    (1) are u doing it on the same machine or not
    (2) what all files u copied.
    (3)what is necessacity of creating control file when database is created using coldbackup.

    a simple thing is being complicated????
    sonofsita
    http://www.ordba.net

  7. #7
    Join Date
    Sep 2001
    Posts
    34
    Hi Sonofsita,

    Thanks for your help, I need to do this because the other database cannot be shut down. I was creating another
    dB for TEST environment.

    PDH

  8. #8
    Join Date
    Oct 2001
    Posts
    45

    Cool

    you should try this command:

    startup mount;
    recover database using backup controlfile until cancel;

    once you are asked for the log file, you key in 'cancel', then recovery completed and

    alter database open;


  9. #9
    Join Date
    Sep 2001
    Posts
    34
    The problem is solved, thanks for everybody for their prompt responses.

    PDH

  10. #10
    Join Date
    Sep 2001
    Location
    Fort Smith
    Posts
    184
    hi xiaomao,
    please never try that when you have recreated the control file.
    sonofsita
    http://www.ordba.net

Posting Permissions

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



Click Here to Expand Forum to Full Width