Bo's Oracle Station

查看: 3761|回复: 2

课程第34/35次(2017-05-23星期二和2017-05-25星期四)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-5-24 11:32:18 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2017-5-25 23:08 编辑

上完1Z0-05320
开始1Z0-053第19章传送数据库(win32->linux64)
做完11b和15两个实验
1Z0-0
52共19章(上完12章),1Z0-053共21章(上完12章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的24章

先备份:
  1. --源头把备份优化关掉,或用force语法

  2. run {
  3. allocate channel  c1 device type disk format '/home/oracle/backup/%U';
  4. allocate channel  c2 device type disk format '/home/oracle/backup/%U';
  5. allocate channel  c3 device type disk format '/home/oracle/backup/%U';
  6. allocate channel  c4 device type disk format '/home/oracle/backup/%U';
  7. allocate channel  c5 device type disk format '/home/oracle/backup/%U';
  8. allocate channel  c6 device type disk format '/home/oracle/backup/%U';
  9. allocate channel  c7 device type disk format '/home/oracle/backup/%U';
  10. allocate channel  c8 device type disk format '/home/oracle/backup/%U';
  11. backup database plus archivelog force;
  12. backup spfile;
  13. backup current controlfile;
  14. }
复制代码
mydb.rcv:
  1. run{
  2. duplicate target database to mydb
  3. backup location '/home/oracle/backup'
  4. nofilenamecheck
  5. spfile
  6. set
  7. control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/db11g/control02.ctl','/u01/app/oracle/oradata/db11g/control03.ctl'
  8. set
  9. db_file_name_convert='+DATA/orcl/datafile/example.258.880451611','/u01/app/oracle/oradata/db11g/example01.dbf','+DATA/orcl/datafile/users.259.880451615','/u01/app/oracle/oradata/db11g/users01.dbf','+DATA/orcl/datafile/undotbs1.256.880451607','/u01/app/oracle/oradata/db11g/undotbs01.dbf','+DATA/orcl/datafile/sysaux.257.880451605','/u01/app/oracle/oradata/db11g/sysaux01.dbf','+DATA/orcl/datafile/system.265.880451605','/u01/app/oracle/oradata/db11g/system01.dbf'
  10. set
  11. log_file_name_convert='+DATA/orcl/onlinelog/group_1.270.880453135','/u01/app/oracle/oradata/db11g/redo01a.log','+FRA/orcl/onlinelog/group_1.276.880453137','/u01/app/oracle/oradata/db11g/redo01b.log','+DATA/orcl/onlinelog/group_3.272.880453141','/u01/app/oracle/oradata/db11g/redo03a.log','+FRA/orcl/onlinelog/group_3.274.880453141','/u01/app/oracle/oradata/db11g/redo03b.log','+DATA/orcl/onlinelog/group_2.271.880453137','/u01/app/oracle/oradata/db11g/redo02a.log','+FRA/orcl/onlinelog/group_2.275.880453139','/u01/app/oracle/oradata/db11g/redo02b.log'
  12. set
  13. audit_file_dest='/u01/app/oracle/admin/mydb/adump'
  14. set
  15. db_create_file_dest=''
  16. set db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
  17. }
复制代码
mydb2.rcv:
  1. run {
  2. allocate  auxiliary channel c1 device type disk;
  3. allocate  auxiliary channel c2 device type disk;
  4. allocate  auxiliary channel c3 device type disk;
  5. allocate  auxiliary channel c4 device type disk;
  6. allocate  auxiliary channel c5 device type disk;
  7. allocate  auxiliary channel c6 device type disk;
  8. allocate  auxiliary channel c7 device type disk;
  9. allocate  auxiliary channel c8 device type disk;
  10. duplicate database to mydb2
  11. backup location '/home/oracle/backup'
  12. nofilenamecheck  
  13. db_file_name_convert '+DATA/orcl/datafile','/u01/app/oracle/oradata/mydb2'
  14. logfile
  15. group 1 ('/u01/app/oracle/oradata/mydb2/redo01.log') size 50M,
  16. group 2 ('/u01/app/oracle/oradata/mydb2/redo02.log') size 50M,
  17. group 3 ('/u01/app/oracle/oradata/mydb2/redo03.log') size 50M;
  18. spfile
  19. parameter_value_convert '+DATA','/u01/app/oracle/oradata/mydb2','+FRA','/u01/app/oracle/flash_recovery_area','/u01/app/oracle/admin/orcl/adump','/u01/app/oracle/admin/mydb2/adump'
  20. set
  21. control_files='/u01/app/oracle/oradata/mydb2/control01.ctl','/u01/app/oracle/oradata/mydb2/control02.ctl','/u01/app/oracle/oradata/mydb2/control03.ctl';
  22. }
复制代码
跨平台迁移后:
  1. SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

  2. select  * from dba_objects where status <> 'VALID'
  3.   and object_type  like 'PACKAGE%';
  4.   
  5.   alter package olapsys.dbms_odm  compile;
复制代码
11b(11b_当前控制文件和日志文件全部损坏_不完全恢复_用控制文件脚本)实验结果:
bclresult-11b.zip (61.09 KB, 下载次数: 615)
回复

使用道具 举报

13

主题

31

帖子

119

积分

注册会员

Rank: 2

积分
119
发表于 2017-6-3 17:05:47 | 显示全部楼层
input datafile file number=00001 name=D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF
converted datafile=D:\ORADATA\01S5SK4F
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00002 name=D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBF
converted datafile=D:\ORADATA\02S5SK58
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00005 name=D:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF
converted datafile=D:\ORADATA\03S5SK5N
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00003 name=D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF
converted datafile=D:\ORADATA\04S5SK5Q
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00004 name=D:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF
converted datafile=D:\ORADATA\05S5SK5U
------------------
Windows rman covert 出来的文件名,无法是区分是哪类文件,请唐老师看下
回复 支持 反对

使用道具 举报

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
 楼主| 发表于 2017-6-4 18:41:23 来自手机 | 显示全部楼层
你这是上课笔记没记清楚大小写,正确的语法是:……%U
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-22 09:20 , Processed in 0.043624 second(s), 27 queries .

快速回复 返回顶部 返回列表