Bo's Oracle Station

查看: 2374|回复: 0

第12次活动:2017-08-26(星期六晚上7:00-10:00)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-8-26 21:47:36 | 显示全部楼层 |阅读模式
Screenshot.png

  1. select  * from v$log;

  2. alter database drop logfile group 1;

  3. alter database add logfile group 1 '/u01/app/oracle/oradata/orcl/redo01.log' size 50M;

  4. alter database drop logfile group 2;

  5. alter database add logfile group 2 '/u01/app/oracle/oradata/orcl/redo02.log' size 50M;

  6. alter system switch logfile;

  7. alter system checkpoint;

  8. alter database drop logfile group 3;

  9. alter database add logfile group 3 '/u01/app/oracle/oradata/orcl/redo03.log' size 50M;

  10. select  * from v$logfile;
复制代码
  1. run {
  2. set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/system01.dbf';
  3. set newname for datafile 2 to '/u01/app/oracle/oradata/orcl/sysaux01.dbf';
  4. set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/undotbs1.dbf';
  5. set newname for datafile 4 to '/u01/app/oracle/oradata/orcl/users01.dbf';
  6. set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/example01.dbf';
  7. set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/tbsocp05_test.dbf';
  8. restore database;
  9. recover database;

  10. }
  11. switch database to copy;

复制代码

  1. run{
  2. allocate channel c1 device type disk;
  3. allocate channel c2 device type disk;
  4. allocate channel c3 device type disk;
  5. allocate channel c4 device type disk;
  6. allocate channel c5 device type disk;
  7. allocate channel c6 device type disk;
  8. allocate channel c7 device type disk;
  9. allocate channel c8 device type disk;
  10. backup as copy datafile 1 format '/u01/app/oracle/oradata/orcl/system01.dbf';
  11. backup as copy datafile 2 format '/u01/app/oracle/oradata/orcl/sysaux01.dbf';
  12. backup as copy datafile 3 format '/u01/app/oracle/oradata/orcl/undotbs1.dbf';
  13. backup as copy datafile 4 format '/u01/app/oracle/oradata/orcl/users01.dbf';
  14. backup as copy datafile 5 format '/u01/app/oracle/oradata/orcl/example01.dbf';
  15. backup as copy datafile 6 format '/u01/app/oracle/oradata/orcl/tbsocp05_test.dbf';

  16. release channel c1;
  17. release channel c2;
  18. release channel c3;
  19. release channel c4;
  20. release channel c5;
  21. release channel c6;
  22. release channel c7;
  23. release channel c8;
  24. }

  25. switch database to copy;
复制代码




回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-29 09:34 , Processed in 0.035833 second(s), 27 queries .

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