oracle表空间时间点恢复-用户管理方式.docVIP

  • 7
  • 0
  • 约3.3千字
  • 约 6页
  • 2017-03-05 发布于重庆
  • 举报

oracle表空间时间点恢复-用户管理方式.doc

oracle表空间时间点恢复-用户管理方式

表空间时间点恢复 用户管理方式 实验准备 1、准备两个表空间及表 Create tablespace user02 Datafile ‘/../user02.dbf.’ size 10m Create tablespace user04 Datafile ‘/../user04.dbf’ size 10m Create table scott.customers(tablespace user02) Create table scott.sales(tablespace user04) 2、备份主数据库的数据文件和控制文件到备份目录 Alter database begin backup Cp Alter database end backup 3、备份控制文件 Alter databse backup controlfile to ‘/../control01.ctl’ Alter database mount clone database 4、在主数据库上执行DML增加数据,多次切换日志 Inser into scott.customers values() Commit Alter system switch logfile 5、记录当前恢复时间及日志序号 Select to_char(sysdate,’yyyy-mm-dd hh24:mi:ss’)from dual; Select SEQUENCE#,MEMBERS,ARCHIVED,STATUS from v$log; 6、用户误操作 Truncate table scott.cutomers; Inser into scott.sales values() Commit; Create tablescott.emp1() 检查TSPITR之后将会丢失的数据 Select owner,name from ts_pitr_objects_to_be_dropped where tablespace_name=’USER02’ and creation_timeto_date(‘2012-06-05 09:36:47’,’yyyy-mm-dd hh24:mi:ss’) 建立辅助数据库口令文件 Cmd Orapwd file=/../ password=oracle entries=10 建立辅助例程参数文件 Sqlplus Conn / as sysdba Create pfile=’/../initauxi.ora’ from spfile Shutdown immediate 编辑参数文件initaux.ora orcl.__db_cache_size=113246208 orcl.__java_pool_size=4194304 orcl.__large_pool_size=4194304 orcl.__shared_pool_size=138412032 orcl.__streams_pool_size=0 *.audit_file_dest=/u01/oracle/admin/orcl/adump *.background_dump_dest=/u01/oracle/admin/orcl/bdump *.compatible=.0 *.control_files=/u01/oracle/auxi/control01.ctl --更改 *.core_dump_dest=/u01/oracle/admin/orcl/cdump *.db_block_size=8192 *.db_domain= *.db_file_multiblock_read_count=16 *.db_name=orcl *.db_recovery_file_dest=/u01/oracle/flash_recovery_area *.db_recovery_file_dest_size=2147483648 *.dispatchers=(PROTOCOL=TCP) (SERVICE=orclXDB) *.job_queue_processes=10 *.open_cursors=300 *.pga_aggregate_target*.processes=150 *.remote_login_passwordfile=EXCLUSIVE *.sga_target=262144000 *.undo_management=AUTO *.undo_tablespace=UNDOTBS1 *.user_dump_dest=/u01/oracle/admin/orcl/udump db_unique_name=auxi --增加 db_file_name_conver

文档评论(0)

1亿VIP精品文档

相关文档