RelationalDBDesign RelationalDBDesign


Backup Recovery   «Prev  Next»
Lesson 7Control file character set
ObjectiveNew feature of specifying a character set for a control file.

Control file Character Set

Describe the new feature of specifying a character set for a control file.
Starting with Oracle version 8.0.5, the database character set ID is stored within a control file. This allows access to the database character set before opening the database. This is necessary for the Recovery Manager to correctly interpret tablespace names prior to the database being open when the character set happens to be something other than the default (US7ASCII). The CREATE CONTROLFILE syntax has been expanded to optionally accept the database character set name, so that the character set information is available at mount time.
The information becomes available from the control file, before the database is open, for any subsequent recovery attempts. If the control file is lost, recovery is still possible. The DBA may specify the character set as an argument on the CREATECONTROL FILE statement.
The following SlideShow explains the steps needed to change the character set of a control file by using RMAN.


Changing Character Sets
The syntax for re-creating a control file is:
CREATE CONTROLFILE REUSE
DATABASE <database name>
LOGFILE <log file details along with its group>
NORESETLOGS / RESETLOGS
DATAFILE <datafile name(s)>
MAXLOGFILES <integer value>
MAXLOGHISTORY < integer value >
MAXDATAFILES < integer value >
MAXINSTANCES < integer value >
ARCHIVELOG / NOARCHIVELOG
CHARACTER SET <character set code>;

Here is an example of creating a control file with database ORDERS_2 that was created with the F7DEC character set.

CREATE CONTROLFILE REUSE
DATABASE orders_2
LOGFILE GROUP 1 ('diskb:log1.log', 
'diskc:log1.log') SIZE 50K, 
GROUP 2 ('diskb:log2.log', 
'diskc:log2.log') SIZE 50K
NORESETLOGS
DATAFILE 'diska:dbone.dat' SIZE 2M
MAXLOGFILES 5
MAXLOGHISTORY 100
MAXDATAFILES 10
MAXINSTANCES 2
ARCHIVELOG
CHARACTER SET F7DEC;

The next lesson explains how to recover a database by using the line mode of RMAN.