Create new control file oracle 12c
Here is an example of a new control file for Oracle 12c:
# Control File for Oracle 12c
# File header
CONTROLFILE VERSION=12.2.0.1.0
CHECKSUM=0x12345678
# Database name and ID
DATABASE="MYDB"
DBID=12345678901234567890
# Instance name and number
INSTANCE_NAME="myinstance"
INSTANCE_NUMBER=1
# Log file information
LOG_FILE_GROUPS=2
LOG_FILE_GROUP_1="/u01/oradata/mydb/redo01.log"
LOG_FILE_GROUP_2="/u01/oradata/mydb/redo02.log"
LOG_FILE_SIZE=100M
LOG_FILE_MAX_SIZE=1000M
LOG_FILE_KEEP=7
# Control file location
CONTROL_FILE_1="/u01/oradata/mydb/control01.ctl"
CONTROL_FILE_2="/u01/oradata/mydb/control02.ctl"
CONTROL_FILE_3="/u01/oradata/mydb/control03.ctl"
# Archive log information
ARCHIVE_LOG_DESTINATION="/u01/oradata/mydb/arch"
ARCHIVE_LOG_KEEP=7
# Backup control file
BACKUP_CONTROL_FILE="/u01/oradata/mydb/control01.ctl.bak"
Let me explain what each section does:
CONTROLFILE VERSION
: specifies the version of the control file.CHECKSUM
: specifies the checksum of the control file.DATABASE
andDBID
: specify the name and ID of the database.INSTANCE_NAME
andINSTANCE_NUMBER
: specify the name and number of the instance.LOG_FILE_GROUPS
: specifies the number of log file groups.LOG_FILE_GROUP_1
andLOG_FILE_GROUP_2
: specify the locations of the log files.LOG_FILE_SIZE
andLOG_FILE_MAX_SIZE
: specify the size and maximum size of the log files.LOG_FILE_KEEP
: specifies the number of days to keep the log files.CONTROL_FILE_1
,CONTROL_FILE_2
, andCONTROL_FILE_3
: specify the locations of the control files.ARCHIVE_LOG_DESTINATION
: specifies the location of the archive log files.ARCHIVE_LOG_KEEP
: specifies the number of days to keep the archive log files.BACKUP_CONTROL_FILE
: specifies the location of the backup control file.
Note that this is just an example, and you should adjust the values to match your specific Oracle 12c database configuration.