datafile creation in standby(not dataguard) [message #410447] |
Sat, 27 June 2009 01:45 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
tjay
Messages: 37 Registered: September 2008
|
Member |
|
|
Hi
T1-)shutdown immediate;
T2-)Take full backup
T3-)startup;
T4-)move the objects in tablespace test1 to some other tablespace
T5-)drop tablespace test1;
T6-)create tablespace test1
datafile 'C:\oraclexe\oradata\XE\test1.dbf' reuse;
T7-)move the objects in tablespace test2 to some other tablespace
T8-)drop tablespace test2;
T9-)create tablespace test2
datafile 'C:\oraclexe\oradata\XE\test2.dbf' reuse;
T10-)
alter system switch logfile;
/
/
/
................................................................................
........
restore the backupset which was taken at T2.
restore controlfile at T10.
startup mount;
alter database create datafile 'C:\oraclexe\oradata\XE\test1.dbf' as 'C:\oraclexe\oradata\XE\test1.dbf';
alter database create datafile 'C:\oraclexe\oradata\XE\test2.dbf' as 'C:\oraclexe\oradata\XE\test2.dbf';
ALTER DATABASE RECOVER automatic database until cancel using backup controlfile;
Recovery performed succefully.
What I wanna ask is;
Since First I issue:
alter database create datafile as ....
The contents of these datafiles should be deleted with this statement.
Why oracle doesnt give error, during appliying the statements at T4 and T7?
I have already deleted the contents of the datafiles, how come oracle move the objects?
I hope I am clear
|
|
|
|
|
Re: datafile creation in standby(not dataguard) [message #410523 is a reply to message #410447] |
Sun, 28 June 2009 00:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | Why oracle doesnt give error, during appliying the statements at T4 and T7?
I have already deleted the contents of the datafiles, how come oracle move the objects?
|
When did you delete the files?
Before startup -> you can't open the database
After startup -> you can't delete them, Windows does not allow to delete opened files.
Regards
Michel
[Updated on: Sun, 28 June 2009 00:32] Report message to a moderator
|
|
|
|
|
Re: datafile creation in standby(not dataguard) [message #410586 is a reply to message #410536] |
Mon, 29 June 2009 02:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
tjay
Messages: 37 Registered: September 2008
|
Member |
|
|
You dont understand me, I know that.
Here you go:
T1-)shutdown immediate;
T2-)Take full backup
T3-)startup;
T4-)move the objects in tablespace test1 to some other tablespace
T5-)drop tablespace test1;
T6-)create tablespace test1
datafile 'C:\oraclexe\oradata\XE\test1.dbf' reuse;
T7-)move the objects in tablespace test2 to some other tablespace
T8-)drop tablespace test2;
T9-)create tablespace test2
datafile 'C:\oraclexe\oradata\XE\test2.dbf' reuse;
T10-)
alter system switch logfile;
/
/
/
................................................................................
........
restore the backupset which was taken at T2.
restore controlfile at T10.
startup mount;
alter database create datafile 'C:\oraclexe\oradata\XE\test1.dbf' as 'C:\oraclexe\oradata\XE\test1.dbf';
alter database create datafile 'C:\oraclexe\oradata\XE\test2.dbf' as 'C:\oraclexe\oradata\XE\test2.dbf';
ALTER DATABASE RECOVER automatic database until cancel using backup controlfile;
Recovery performed succefully.
What I wanna ask is;
Since First I issue:
alter database create datafile as ....
The contents of these datafiles should be deleted with this statement.
Why oracle doesnt give error, during appliying the statements at T4 and T7?
I have already deleted the contents of the datafiles, how come oracle move the objects?
|
|
|
|