Script which will help in converting an ASM database into a NON ASM database
whenever you want to convert an ASM databse into a NON ASM database then you require the path and location address of the database files,to perform the conversion you simply have to run this script and save the output and rerun the output in the RMAN prompt,the script is as follows
NOTE-Run the script from the DATABASE INSTANCE PROMPT
set serveroutput on;
declare
cursor df is select file#, name from v$datafile;
begin
dbms_output.put_line('run');
dbms_output.put_line('{');
for dfrec in df loop
dbms_output.put_line('set newname for datafile ' ||
dfrec.file# || ' to ''' || dfrec.name ||''' ;');
end loop;
dbms_output.put_line('restore database;');
dbms_output.put_line('switch all;');
dbms_output.put_line('}');
end;
The output of the can be seen in the screenshot attached,you can then save and rerun the output in RMAN prompt to convert an ASM database into a NON ASM database
whenever you want to convert an ASM databse into a NON ASM database then you require the path and location address of the database files,to perform the conversion you simply have to run this script and save the output and rerun the output in the RMAN prompt,the script is as follows
NOTE-Run the script from the DATABASE INSTANCE PROMPT
set serveroutput on;
declare
cursor df is select file#, name from v$datafile;
begin
dbms_output.put_line('run');
dbms_output.put_line('{');
for dfrec in df loop
dbms_output.put_line('set newname for datafile ' ||
dfrec.file# || ' to ''' || dfrec.name ||''' ;');
end loop;
dbms_output.put_line('restore database;');
dbms_output.put_line('switch all;');
dbms_output.put_line('}');
end;
The output of the can be seen in the screenshot attached,you can then save and rerun the output in RMAN prompt to convert an ASM database into a NON ASM database
No comments:
Post a Comment