DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Recreating Controlfile

  1. #1
    Join Date
    Feb 2006
    Posts
    162

    Recreating Controlfile

    Hi,

    I tried to clone the database,for that I copied all the datafiles,
    redo log files,control files from database DB1 to database DB2.
    When I try to recreate the controlfile of DB2 using,

    CREATE CONTROLFILE SET DATABASE "DB2" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 254
    MAXINSTANCES 8
    MAXLOGHISTORY 16336
    LOGFILE
    GROUP 1('/oradata/admin/redo01a.log',
    '/oradata/admin/redo01b.log') SIZE 10M,
    GROUP 2('/oradata/admin/redo02a.log',
    '/oradata/admin/redo02b.log') SIZE 10M
    DATAFILE
    '/oradata/data/system01.dbf',
    '/oradata/data/undotbs01.dbf',
    '/oradata/data/data01.dbf',
    '/oradata/data/data02.dbf'
    CHARACTER SET US7ASCII
    ;


    it gave the following error,

    CREATE CONTROLFILE SET DATABASE "DB2" RESETLOGS NOARCHIVELOG
    *
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-00200: controlfile could not be created
    ORA-00202: controlfile: '/oradata/admin/control1.ctl'
    ORA-27038: skgfrcre: file exists


    I tried to recreate the controlfile using REUSE option,

    CREATE CONTROLFILE REUSE DATABASE "DB2" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 254
    MAXINSTANCES 8
    MAXLOGHISTORY 16336
    LOGFILE
    GROUP 1('/oradata/admin/redo01a.log',
    '/oradata/admin/redo01b.log') SIZE 10M,
    GROUP 2('/oradata/admin/redo02a.log',
    '/oradata/admin/redo02b.log') SIZE 10M
    DATAFILE
    '/oradata/data/system01.dbf',
    '/oradata/data/undotbs01.dbf',
    '/oradata/data/data01.dbf',
    '/oradata/data/data02.dbf'
    CHARACTER SET US7ASCII
    ;


    but it results in the following error,

    CREATE CONTROLFILE REUSE DATABASE "DB2" RESETLOGS NOARCHIVELOG
    *
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01161: database name DB1 in file header does not match given name of DB2
    ORA-01110: data file 1: '/oradata/data/system01.dbf'


    How to resolve this error to recreate the controlfile successfully?

    Thanks...
    Last edited by malru; 05-04-2007 at 02:16 AM.

  2. #2
    Join Date
    Jan 2007
    Posts
    231
    Database name you should change
    So you must include SET DATABASE clause,

    CREATE CONTROLFILE REUSE SET DATABASE "DB2" RESETLOGS

  3. #3
    Join Date
    Feb 2006
    Posts
    162
    Thanks ams-jamali,

    It's working fine...

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