Renaming A Datafile
I'm using Windows XP and Oracle 9i R2. The issue are as follows: 1. I found 2 strange names in
the V$datafiles. They are .ORA and logdata03 . What I wanted is all
datafiles have .DBF extension.
The questions are:
1. What is the meaning of OFFLINE DROP? because at first I thought it will take the datafile offline and Drop the datafile as if you are deleting it. The DROP keyword must be specified if the database is in NOARCHIVELOG mode. The datafile is not dropped, it is flagged as either OFFLINE or RECOVER. 2. What actually happened to the redolog file when I did that command? I think that when we are going to make one of the datafile offline, Oracle will reset all the log in the logfile after applying the changes to that offline datafile. When a datafile is placed offline while the database is open, media recovery must be performed to bring the datafile back online. The online redo logs will be used to perform media recovery before you can bring the datafile online but the redo logs are not reset. 3. I did this in my laptop which is me the only person who did the transactions. what might happened if I did this in the live system with busy transaction 24 hours? Data in the datafile that was taken offline would not be accessible until it is online once again. Consider the following: CODE : Connected to:
SQL> select log_mode from v$database; LOG_MODE
SQL> create tablespace test datafile
'G:\ORACLE\ORADATAIDB\TEST.DBF' size 8M
Tablespace created. SQL> create table test_table tablespace test as select * from all_objects where rownum <= 10000; Table created. SQL> select count(*) from test_table; COUNT(*)
SQL> alter database datafile 'G:\ORACLE\ORADATAIDB\TEST.DBF'
offline;
SQL> alter database datafile 'G:\ORACLE\ORADATAIDB\TEST.DBF' offline drop; Database altered. SQL> select count(*) from test_table;
SQL> alter database datafile 'G:\ORACLE\ORADATAIDB\TEST.DBF'
online;
SQL> alter database recover datafile 'G:\ORACLE\ORADATAIDB\TEST.DBF'; Database altered. SQL> alter database datafile 'G:\ORACLE\ORADATAIDB\TEST.DBF' online; Database altered. SQL> select count(*) from test_table; COUNT(*)
Have a Oracle Question
Oracle Books
Oracle Application
Oracle Home
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|