Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating Controlfile Consfusion

user13653962Mar 11 2013 — edited Mar 11 2013
According to Oracle Documents [http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5003.htm|http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5003.htm]

When you issue a CREATE CONTROLFILE statement, Oracle Database creates a new control file based on the information you specify in the statement. The control file resides in the location specified in the CONTROL_FILES initialization parameter. If that parameter does not have a value, then the database creates an Oracle-managed control file in the default control file destination, which is one of the following (in order of precedence):

•One or more control files as specified in the DB_CREATE_ONLINE_LOG_DEST_n initialization parameter. The file in the first directory is the primary control file. When DB_CREATE_ONLINE_LOG_DEST_n is specified, the database does not create a control file in DB_CREATE_FILE_DEST or in DB_RECOVERY_FILE_DEST (the flash recovery area).

•If no value is specified for DB_CREATE_ONLINE_LOG_DEST_n, but values are set for both the DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST, then the database creates one control file in each location. The location specified in DB_CREATE_FILE_DEST is the primary control file.

•If a value is specified only for DB_CREATE_FILE_DEST, then the database creates one control file in that location.

•If a value is specified only for DB_RECOVERY_FILE_DEST, then the database creates one control file in that location.

If no values are set for any of these parameters, then the database creates a control file in the default location for the operating system on which the database is running. This control file is not an Oracle-managed file.
SQL> alter database backup controlfile to trace as 'D:\oracle\stuff\control.txt'
  2  /

Database altered.

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      D:\ORACLE\PRODUCT\10.2.0\ORADA
                                                 TA\ORCL\CONTROL01.CTL, D:\ORAC
                                                 LE\PRODUCT\10.2.0\ORADATA\ORCL
                                                 \CONTROL02.CTL, D:\ORACLE\PROD
                                                 UCT\10.2.0\ORADATA\ORCL\CONTRO
                                                 L03.CTL

SQL> create pfile='D:\oracle\stuff\pfile.txt' from spfile
  2  /

File created.
take out control_files parameter from pfile.txt and define the parameter only

db_recovery_file_dest='D:\oracle\product\10.2.0\db_1
db_recovery_file_dest_size=2147483648
SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='D:\oracle\stuff\pfile.txt' nomount
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1290208 bytes
Variable Size             218103840 bytes
Database Buffers           67108864 bytes
Redo Buffers                7098368 bytes

SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 292
  7  LOGFILE
  8    GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'  SIZE 50M,
  9    GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'  SIZE 50M,
 10    GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG'  SIZE 50M,
 11    GROUP 4 'D:\ORACLE\ORCL\ONLINELOG\O1_MF_4_8MTJ10B8_.LOG'  SIZE 100M
 12  DATAFILE
 13    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF',
 14    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF',
 15    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF',
 16    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF',
 17    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF'
 18  CHARACTER SET WE8MSWIN1252
 19  /

Control file created.


SQL> select name from v$controlfile
  2  /

NAME
----------------------------------------------------------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\DB_1\FLASH_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_8MTSRCWH_.CTL
As you can see the location of OMF controlfile which is defined in parameter db_Recovery_file_dest,db_recovery_file_dest='D:\oracle\product\10.2.0\db_1\flash_recovery_area'

But why its failing when i try to assert the Oracle doc statment

If no values are set for any of these parameters DB_CREATE_ONLINE_LOG_DEST_n,DB_CREATE_FILE_DEST,DB_RECOVERY_FILE_DEST.The database creates a control file in the default location for the operating system on which the database is running. This control file is not an Oracle-managed file.
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 292
  7  LOGFILE
  8    GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'  SIZE 50M,
  9    GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'  SIZE 50M,
 10    GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG'  SIZE 50M,
 11    GROUP 4 'D:\ORACLE\ORCL\ONLINELOG\O1_MF_4_8MTJ10B8_.LOG'  SIZE 100M
 12  DATAFILE
 13    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF',
 14    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF',
 15    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF',
 16    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF',
 17    'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF'
 18  CHARACTER SET WE8MSWIN1252
 19  ;
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00600: internal error code, arguments: [kccbcf_omf_reuse], [], [], [], [],
[], [], []


SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> 
This post has been answered by unknown-7404 on Mar 11 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2013
Added on Mar 11 2013
11 comments
751 views