Data files offline when did Oracle do that?

Source: Internet
Author: User
Tags session id

Sql> Oradebug Setmypid
Statement processed.
Sql> Oradebug Unlimit
Statement processed.
Sql> oradebug Event 10046 Trace name Context forever, level 12;
Statement processed.
sql> ALTER DATABASE datafile '/ORACLE/ORADATA/LIXORA/LIXORA/DATAFILE/O1_MF_ZJHCSOFT_B24623WY_.DBF ' offline;

Database altered.

Sql> oradebug Event 10046 trace name context off;
Statement processed.
Sql> Oradebug Tracefile_name;
/oracle/admin/lixora/udump/lixora_ora_29515.trc

2014-09-30 10:50:56.261
SERVICE NAME: (sys$users) 2014-09-30 10:50:56.261
SESSION ID: (159.3) 2014-09-30 10:50:56.261
WAIT #0: nam= ' sql*net message to client ' ela= 1 driver id=1650815232 #bytes =1 p3=0 obj#=0 tim=1378950640880510
WAIT #0: nam= ' sql*net message from client ' ela= 9226316 driver id=1650815232 #bytes =1 p3=0 obj#=0 tim=1378950650107126
Xctend rlbk=0, Rd_only=1
=====================
Parsing in CURSOR #9 len=101 dep=0 uid=0 oct=35 lid=0 tim=1378950650107611 hv=707773262 ad= ' 7e6cd4e8 '
ALTER DATABASE datafile '/ORACLE/ORADATA/LIXORA/LIXORA/DATAFILE/O1_MF_ZJHCSOFT_B24623WY_.DBF ' offline
END of STMT
PARSE #9: c=0,e=394,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1378950650107606
Binds #9:
WAIT #9: nam= ' control file sequential read ' ela= file#=0 block#=1 blocks=1 obj#=0 tim=1378950650107957
WAIT #9: nam= ' control file sequential read ' ela= file#=1 block#=1 blocks=1 obj#=0 tim=1378950650108006
WAIT #9: nam= ' control file sequential read ' ela= 9 file#=2 block#=1 Blocks=1 obj#=0 tim=1378950650108035
WAIT #9: nam= ' control file sequential read ' ela= 6 file#=0 block#=16 Blocks=1 obj#=0 tim=1378950650108060
WAIT #9: nam= ' control file sequential read ' Ela= 7 file#=0 block#=18 Blocks=1 obj#=0 tim=1378950650108083
WAIT #9: nam= ' control file sequential read ' ela= file#=0 block#=30 blocks=1 obj#=0 tim=1378950650108114
WAIT #9: nam= ' control file sequential read ' ela= 8 file#=0 block#=1 Blocks=1 obj#=0 tim=1378950650108250
WAIT #9: nam= ' control file sequential read ' ela= 5 file#=1 block#=1 Blocks=1 obj#=0 tim=1378950650108278
WAIT #9: nam= ' control file sequential read ' ela= 4 file#=2 block#=1 Blocks=1 obj#=0 tim=1378950650108299
WAIT #9: nam= ' control file sequential read ' ela= 5 file#=0 block#=16 Blocks=1 obj#=0 tim=1378950650108321
WAIT #9: nam= ' control file sequential read ' ela= 6 file#=0 block#=18 Blocks=1 obj#=0 tim=1378950650108342
WAIT #9: nam= ' control file sequential read ' ela= file#=0 block#=23 blocks=1 obj#=0 tim=1378950650108385
WAIT #9: nam= ' RDBMS IPC reply ' ela= 32296 from_process=5 timeout=910 p3=0 obj#=0 tim=1378950650141300
WAIT #9: nam= ' RDBMS IPC reply ' ela= 9556 from_process=5 timeout=910 p3=0 obj#=0 tim=1378950650150904
Xctend rlbk=0, Rd_only=1
EXEC #9: c=1000,e=43469,p=0,cr=0,cu=2,mis=0,r=0,dep=0,og=1,tim=1378950650151144
WAIT #9: nam= ' log file Sync ' ela= 14463 buffer#=1811 p2=0 p3=0 obj#=0 tim=1378950650165680
WAIT #9: nam= ' sql*net message to client ' Ela= 7 driver id=1650815232 #bytes =1 p3=0 obj#=0 tim=1378950650165756
2014-09-30 10:51:13.382
WAIT #9: nam= ' sql*net message from client ' ela= 7434358 driver id=1650815232 #bytes =1 p3=0 obj#=0 tim=1378950657600174

Conclusion:

for a datafile either executing offline or offline drop, only the control file is rewritten, and file$ and ts$ are not updated, This is why it is possible to perform offline/offline drop for a datafile in the Mount State;

Oracle checks the SCN value of the data file header in the datafile on line, and if the SCN value is smaller than the other data file, the data file needs to be restored, meaning that the SCN of the offline data file is used bbed It should be changed to the same as other data files, and the file will be online again without the need for a log file for recovery.

Data files offline when did Oracle do that?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.