■ Modify the initialization parameter control_files
SQL> alter system set control_files =
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control01.ctl ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control02.ctl ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control03.ctl ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control04.ctl'
Scope = spfile;
-Maxdatafiles: specifies the maximum number of data files.
-Maxlogfiles: specifies the maximum number of redo log files.
-Maxlogmembers: specifies the number of members of each group in the redo log file.
-Maxloghistory: specifies the maximum number of redo log history records in the control file.
-Maxinstances: specifies the maximum number of routines that can access the database at the same time.
■ Back up the control file as a binary file
SQL> alter Database Backup controlfile to '/tmp/yuhj/controlfile_061124.bak ';
■ Back up control files as text files
SQL> alter Database Backup controlfile to trace;
The trace backup is stored in the directory specified by the initialization parameter user_dump_dest.
SQL> show parameter user_dump_dest;
Name type value
-----------------------------------------------------------------------------
User_dump_dest string/export/home/opt/product/10.1.
0.3.0/admin/ldfsys/udump
■ Create controlfile statement
Create controlfile reuse database ldfsys noresetlogs noarchivelog
Maxlogfiles 16
Maxlogmembers 3
Maxdatafiles 100
Maxinstances 8
# Maxloghistory 454
Logfile
Group 1 '/export/home/opt/product/10.1.0.3.0/oradata/ldfsys/redo01.log' size 10 m,
Group 2 '/export/home/opt/product/10.1.0.3.0/oradata/ldfsys/redo02.log' size 10 m,
Group 3 '/export/home/opt/product/10.1.0.3.0/oradata/ldfsys/redo03.log' size 10 m
Datafile
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/system01.dbf ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/undotbs01.dbf ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/sysaux01.dbf ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/users01.dbf'
Character Set zhs16gbk
/
■ Delete Control Files
SQL> alter system set control_files =
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control01.ctl ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control02.ctl ',
'/Export/home/opt/product/10.1.0.3.0/oradata/ldfsys/control03.ctl'
Scope = spfile;
It is to remove the deleted control file and reset it, And then restart an oracle.
■ Query Control File Information
-V $ controlfile control file name
-V $ controlfile_record_section
-V $ parameter: the initial parameter control_files specifies the name of the control file.