博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[20160214]rman执行脚本注解问题.txt
阅读量:7207 次
发布时间:2019-06-29

本文共 5320 字,大约阅读时间需要 17 分钟。

[20160214]rman执行脚本注解问题.txt

--节前的问题,写的脚本有问题,当时并没有解决,就一直放到现在,实际上问题不大,主要想给脚本加一些注解。

--今天研究一下,实际上就是使用#号。

$ cat cc.rman

# list backup summary;

run

{
  allocate channel c1 device type DISK;
  allocate channel c2 device type DISK;
#   list backup summary;
  release channel c1;
  release channel c2;
}

$ rlrman checksyntax @cc.rman

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Feb 14 16:28:11 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: BOOK (DBID=1337401710)

RMAN> # list backup summary;

2>
3> run
4> {
5>   allocate channel c1 device type DISK;
6>   allocate channel c2 device type DISK;
7> #   list backup summary;
8>   release channel c1;
9>   release channel c2;
10> }
11>
The cmdfile has no syntax errors
Recovery Manager complete.

--另外还发现在run块内不能使用list命令。

$ rlrman checksyntax @cc.rman

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Feb 14 16:28:49 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: BOOK (DBID=1337401710)
RMAN> # list backup summary;
2>
3> run
4> {
5>   allocate channel c1 device type DISK;
6>   allocate channel c2 device type DISK;
7>   list
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "list": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, convert, copy, crosscheck, delete, duplicate, execute, flashback, host, mount, open, recover, release, repair, report, restore, resync, send, set, show, shutdown, sql, startup, switch, transport, validate, }"
RMAN-01007: at line 7 column 3 file: cc.rman

--另外就是奇怪的是在rman 的手工模式下输入:

RMAN> # list backup summary

2>
3>

RMAN> # list backup summary

2> list backup summary ;

List of Backups

===============
Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
47      B  F  A DISK        2016-02-14 14:50:33 1       1       NO         TAG20160214T145025
48      B  F  A DISK        2016-02-14 14:50:41 1       1       NO         TAG20160214T145025
49      B  A  A DISK        2016-02-14 14:51:04 1       1       NO         TAG20160214T145103
50      B  A  A DISK        2016-02-14 14:52:29 1       1       NO         TAG20160214T145228

RMAN> # list backup summary

2>
3> list backup ;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
47      Full    1.65G      DISK        00:00:08     2016-02-14 14:50:33
        BP Key: 48   Status: AVAILABLE  Compressed: NO  Tag: TAG20160214T145025
        Piece Name: /home/oracle/backup/full1_2lqttmlh
  List of Datafiles in backup set 47
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/system01.dbf
  2       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/sysaux01.dbf
  3       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/undotbs01.dbf
  4       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/users01.dbf
  5       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/example01.dbf
  6       Full 13223007759 2016-02-14 14:50:25 /mnt/ramdisk/book/sugar01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------
48      Full    9.58M      DISK        00:00:01     2016-02-14 14:50:41
        BP Key: 49   Status: AVAILABLE  Compressed: NO  Tag: TAG20160214T145025
        Piece Name: /home/oracle/backup/full1_2mqttmm0
  SPFILE Included: Modification time: 2016-02-14 09:40:31
  SPFILE db_unique_name: BOOK
  Control File Included: Ckp SCN: 13223007765   Ckp time: 2016-02-14 14:50:40

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ -------------------
49      123.09M    DISK        00:00:01     2016-02-14 14:51:04
        BP Key: 50   Status: AVAILABLE  Compressed: NO  Tag: TAG20160214T145103
        Piece Name: /home/oracle/backup/archive_2nqttmmn

  List of Archived Logs in backup set 49

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    346     13222947957 2016-02-13 10:08:22 13222971396 2016-02-13 22:08:38
  1    347     13222971396 2016-02-13 22:08:38 13222990745 2016-02-14 08:28:54
  1    348     13222990745 2016-02-14 08:28:54 13223006508 2016-02-14 14:09:09
  1    349     13223006508 2016-02-14 14:09:09 13223007788 2016-02-14 14:51:03

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ -------------------
50      123.14M    DISK        00:00:01     2016-02-14 14:52:29
        BP Key: 51   Status: AVAILABLE  Compressed: NO  Tag: TAG20160214T145228
        Piece Name: /home/oracle/backup/archivenew_2oqttmpc

  List of Archived Logs in backup set 50

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    346     13222947957 2016-02-13 10:08:22 13222971396 2016-02-13 22:08:38
  1    347     13222971396 2016-02-13 22:08:38 13222990745 2016-02-14 08:28:54
  1    348     13222990745 2016-02-14 08:28:54 13223006508 2016-02-14 14:09:09
  1    349     13223006508 2016-02-14 14:09:09 13223007788 2016-02-14 14:51:03
  1    350     13223007788 2016-02-14 14:51:03 13223007904 2016-02-14 14:52:11
  1    351     13223007904 2016-02-14 14:52:11 13223007917 2016-02-14 14:52:28

-- 做1个记录!!

转载地址:http://kelum.baihongyu.com/

你可能感兴趣的文章
如何用SQL语句查询Excel数据?
查看>>
用js实现分页功能以及利用xml实现分页功能——数据岛
查看>>
《Programming in Lua 3》读书笔记(十九)
查看>>
html知识点总结
查看>>
博客园
查看>>
Three.js加载3D模型
查看>>
Basic: Fisher's transform
查看>>
mint-ui vue双向绑定
查看>>
Eclipse快捷键一览表(转载)
查看>>
随机访问流 RandomAccessFile
查看>>
图片上传读取代码
查看>>
服务器安装环境基本操作
查看>>
nslookup命令
查看>>
c++函数模板作为类的成员函数,编译报错LNK2019的解决方法
查看>>
Tensorflow安装
查看>>
判断个十百千位之后是否大于20 java——CSDN博客
查看>>
.Net插件编程模型:MEF和MAF[转载]
查看>>
java实现excel的导入导出(poi详解)[转]
查看>>
[转载]浅析jQuery框架与构造对象
查看>>
微信小程序基本入门
查看>>