Database Reference
In-Depth Information
e xeRCiSe 2.1 (continued)
Fixed Size 1333452 bytes
Variable Size 289408820 bytes
Database Buffers 100663296 bytes
Redo Buffers 6152192 bytes
SQL> alter system set control_files='C:\ORACLE\ORADATA\ORCL\CONTROL01.CTL',
'C:\ORACLE\ORADATA\ORCL\CONTROL02.CTL',
'C:\ORACLE\ORADATA\ORCL\CONTROL03.CTL' scope=spfile;
System altered.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
4. (Optional) If you copied the database online redo logs or the database data files to
a different location, you will need to indicate to Oracle that you have done so. This
is so Oracle will know where the files are now so it can open them. This is known
as a rename operation. (Don't be fooled, though. It renames only the files inside of
Oracle; it does not rename them on the operating system).
To rename the database files (redo log and data files) you must have the database
mounted first Once the database is mounted, you will issue the ALTER DATABASE
RENAME FILE command for each database file that needs to be changed.
Here is an example where we have moved the online redo logs and database data files
from c:\oracle\oradata\orcl to c:\oracle\oradata\orclnew . You need to indicate
to Oracle that you have made this change by using the ALTER DATABASE RENAME FILE
command. This will change the pointers to the database files inside the control file so
Oracle will be looking for the files in the correct location.
Note that for the rest of this exercise we will assume that the files were moved to
their original locations. In this example, you rename the online redo logs and then
you rename the database data files:
SQL> startup mount
ORACLE instance started.
Total System Global Area 397557760 bytes
Fixed Size 1333452 bytes
Variable Size 272631604 bytes
Database Buffers 117440512 bytes
Redo Buffers 6152192 bytes
Database mounted.
SQL>alter database rename file 'c:\oracle\oradata\orcl\REDO01.LOG' to
Search WWH ::




Custom Search