how to rename or multiplex controlfiles
show parameter control_files;(display file location & name)
1. Alter system set control_files= 'c:\oracle\oradata\niit\CONTROL01.CTL', 'c:\oracle\oradata\niit\CONTROL02.CTL', 'c:\oracle\oradata\niit\CONTROL03.CTL','d:\oracle\oradata\control04.ctl'
scope=spfile;
2. shutdown immediate
3.copy any existing controlfile and paste new location and also chage their name which you want.
4. startup
============================================================================
how to rename redo log file
select * from v$logfile;
1.shutdown immediate
2. copy existing log file paste new location chage their name
3. startup mount
4. alter database rename file 'C:\ORACLE\ORADATA\NIIT\REDO03.LOG' to
' C:\ORACLE\ORADATA\REDO05.LOG';
5. alter database open;
select * from v$logfile;
==================================================
How to rename datafile
select name from v$datafile;
1. shutdown immediate
2. copy existing datafile paste new location chage their name
3. startup mount
4. alter database rename file 'C:\ORACLE\ORADATA\NIIT\users01.dbf' to
' C:\ORACLE\ORADATA\abc05.dbf';
5. alter database open;
Second method to rename datafile wile you online
select * from v$tablespace;
1.alter tablespace users offline;
2.copy existing datafile paste new location chage their name
3.alter tablespace users rename 'C:\ORACLE\ORADATA\NIIT\USERS01.DBF' to
'C:\ORACLE\ORADATA\USERS001.DBF';
4. alter tablespace users online;
No comments:
Post a Comment