重新认识CREATE DATAFILE命令

重新认识CREATE DATAFILE命令
2010-2-25
由于工作的原因,需要找CREATE DATAFILE命令,之前对这个命令是出于一知半解的状态,通过项目重新了解用途。
命令的语法: ALTER DATABASE CREATE DATABASE FILE_NAME。
我们知道一般来说,用到ALTER DATABASE 都是影响比较大的操作如RECOVER ,RENAME FILENAME等等,所以我们在执行这个操作前需要谨慎。
查看帮助手册,发现这个命令是重新建立一个新的空的文件来代替旧的文件,一般是用在文件丢失需要做恢复的时候。
原文:
Use the CREATE DATAFILE clause to create a new empty datafile 
in place of an old one. You can use this clause to re-create a datafile that was lost
with no backup. The filename or filenumber must identify a file
that is or was once part of the database. If you identify the file by number, then filenumber
is an integer representing the number found in the FILE# column of the V$DATAFILE
dynamic performance
view or in the FILE_ID column of the DBA_DATA_FILES data dictionary view.
During recovery, all archived redo logs written to since the original datafile was created must be
applied to the new, empty version of the lost datafile. Oracle Database creates the new file
in the same state as the old file when it was created. You must perform. media recovery on
the new file to return it to the state of the old file at the time it was lost.

还是那句话,对于不了解的命令或者是不熟悉的命令,不要去操作。
-THE END-

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/40239/viewspace-628423/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/40239/viewspace-628423/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值