Entering content frameProcedure documentation Updating the Control File Locate the document in its SAP Library structure

In the following cases, you will have to update the control file before you restore data:

The control file records the name, the path, or the group and the status of each data file in the database. You can update these specifications, which control the recovery process, with Oracle commands.

If a disk error has occurred, for example, it may be necessary to restore the tablespaces in question on another disk. Before you restore the tablespaces, you have to update the path of the affected files in the control file.

Changing the Path Specifications

SAP recommends using the first of the methods listed below for renaming files.

connect internal

startup mount

To update the path of data files in the control file, use the SQLPLUS command

alter database rename file '<file name>' to '<file name>';

The target file must exist; the name of the source file must agree with that in the control file.

You can also specify a list of file names, to rename all the files at once. However, note that any problems that may occur during renaming will be easier to diagnose if you rename the files individually.

alter tablespace <tablespace name> offline;

alter tablespace <tablespace name> rename datafile
'<file name1>' [, '<file name2>',...] to '<file name1>' [, '<file name2>',...];

You have to enter this command separately for each tablespace in which you have to change the file information.

The target file must exist; the name of the respective source files must agree with those in the control file.

Setting Files to ONLINE

If the data files of a tablespace are OFFLINE, when the database crashes or was stopped with shutdown abort and a recovery is necessary, you may have to reset the files that belong to this tablespace to ONLINE again.

To do this, use the following SQLPLUS commands:

connect internal
startup mount
alter database datafile '<complete file name>' online;

Leaving content frame