Forum Stats

  • 3,873,344 Users
  • 2,266,537 Discussions
  • 7,911,514 Comments

Discussions

12c Create Control File for Entire CDB (CDB-root + PDBs)

Victor Jin-Oracle
Victor Jin-Oracle Member Posts: 10
edited Aug 11, 2014 6:43PM in Multitenant

Hi,

In 12c, I understand that there is a single redo log and a single control file for an entire CDB. My question is what datafiles should I use to create control file for the entire CDB. According to Managing Control Files, I suppose I should use all the datafiles (the result of query from CDB-Root: select name from v$datafile), but in practice, the control file creation process can only be successful when I use CDB-Root databfiles. Thanks in advance for any advice.


Tagged:

Answers

  • In 12c, I understand that there is a single redo log and a single control file for an entire CDB. My question is what datafiles should I use to create control file for the entire CDB. According to Managing Control Files, I suppose I should use all the datafiles (the result of query from CDB-Root: select name from v$datafile), but in practice, the control file creation process can only be successful when I use CDB-Root databfiles. Thanks in advance for any advice.
    
    

    Why are you creating a new control file?

    The simplest way to see what you need to do is to just look at your existing control file:

    ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

    Run that command from the root and then examine it and you will see what it contains. Post the results here.

  • Thanks for the response, I need to create the control file when I've lost all the existing control file by some kind of accident. The existing control file does contain the entire CDB datafiles. Then I 'm confused why the "CREATE CONTROL FILE" with entire datafile would fail.

  • The actual error message is duplicate tablespace (system, sysaux), but the root-CDB and PDBs should have separate system and sysaux. The following is the script I used.

    CREATE CONTROLFILE REUSE DATABASE "CDB" RESETLOGS  ARCHIVELOG

        MAXLOGFILES 16

        MAXLOGMEMBERS 3

        MAXDATAFILES 1024

        MAXINSTANCES 8

        MAXLOGHISTORY 292

    LOGFILE

      GROUP 1 '/cdbdata/cdb/redo01.log'  SIZE 50M BLOCKSIZE 512,

      GROUP 2 '/cdbdata/cdb/redo02.log'  SIZE 50M BLOCKSIZE 512,

      GROUP 3 '/cdbdata/cdb/redo03.log'  SIZE 50M BLOCKSIZE 512

    DATAFILE

      '/cdbdata/cdb/system01.dbf',

      '/cdbdata/cdb/sysaux01.dbf',

      '/cdbdata/cdb/undotbs01.dbf',

      '/cdbdata/cdb/pdbseed/system01.dbf',

      '/cdbdata/cdb/users01.dbf',

      '/cdbdata/cdb/pdbseed/sysaux01.dbf',

      '/cdbdata/cdb/pdb1/system01.dbf',

      '/cdbdata/cdb/pdb1/sysaux01.dbf',

      '/cdbdata/cdb/pdb1/pdb1_users01.dbf'

    CHARACTER SET WE8MSWIN1252

This discussion has been closed.