|
|
![]() |
|
一个完整的Oraclerman备份恢复参考示例
完整的Oracle rman备份恢复参考示例:
1、建rman库作为repository $more createrman_db1.sh set echo on spool makedb1.log create database rman datafile '/export/home/oracle/oradata/rman_data/system.dbf' size 50m autoextend on next 640K logfile '/export/home/oracle/oradata/rman_data/redo0101.log' SIZE 10M, '/export/home/oracle/oradata/rman_data/redo0201.log' SIZE 10M maxdatafiles 30 maxinstances 8 maxlogfiles 64 character set US7ASCII national character set US7ASCII ; disconnect spool off exit @/export/home/oracle/8.1.6/rdbms/admin/catalog.sql; REM ********** ALTER SYSTEM TABLESPACE ********* ALTER TABLESPACE SYSTEM DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCR EASE 50); ALTER TABLESPACE SYSTEM MINIMUM EXTENT 64K; REM ********** TABLESPACE FOR ROLLBACK ********** CREATE TABLESPACE RBS DATAFILE '/export/home/oracle/oradata/rman_data/rbs.dbf' s ize 50m AUTOEXTEND ON NEXT 512K MINIMUM EXTENT 512K DEFAULT STORAGE ( INITIAL 512K NEXT 512K MINEXTENTS 10 MAXEXTENTS UNLIMITED PC TINCREASE 0 ); REM ********** TABLESPACE FOR TEMPORARY ********** CREATE TABLESPACE TEMP DATAFILE '/export/home/oracle/oradata/rman_data/temp.dbf' size 50m AUTOEXTEND ON NEXT 64K MINIMUM EXTENT 64K DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCR EASE 0) TEMPORARY; REM **** Creating four rollback segments **************** CREATE PUBLIC ROLLBACK SEGMENT RBS_0 TABLESPACE RBS STORAGE ( OPTIMAL 64000K ); ALTER ROLLBACK SEGMENT "RBS_0" ONLINE; REM **** SYS and SYSTEM users **************** alter user sys temporary tablespace TEMP; alter user system temporary tablespace TEMP; disconnect spool off exit $more createrman_db3.sh spool crdb3.log @/export/home/oracle/8.1.6/rdbms/admin/catproc.sql @/export/home/oracle/8.1.6/rdbms/admin/caths.sql @/export/home/oracle/8.1.6/rdbms/admin/otrcsvr.sql connect system/manager @/export/home/oracle/8.1.6/sqlplus/admin/pupbld.sql disconnect spool off exit 2、建repository存放的表空间和rman用户 $more createrman_db4.sh connect internal create tablespace rman_ts datafile '/export/home/oracle/oradata/rman_data/rman_ts.dbf' size 20M default storage (initial 100K next 100K pctincrease 0); create user rman_hainan identified by rman_hainan temporary tablespace TEMP default tablespace rman_ts quota unlimited on rman_ts; grant recovery_catalog_owner to rman_hainan; grant connect ,resource to rman_hainan; 第 页 责任编辑:qwer19871212
相关文章
|
|