[20160214]rman執行指令碼註解問題.txt
[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個記錄!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1988542/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 執行 shell 指令碼 \r 問題解決指令碼
- crontab不執行mysql的指令碼問題的解決!MySql指令碼
- [20220414]toad呼叫執行指令碼問題.txt指令碼
- shell指令碼中文註釋亂碼問題(解決)指令碼
- [20221126]tpt pr.sql指令碼執行問題.txtSQL指令碼
- WebMagic多執行緒導致註解失效問題Web執行緒
- 一個“指令碼執行夯死”問題的分析指令碼
- linux下rman增量備份指令碼以及指令碼自動執行Linux指令碼
- 解決SqlServer執行指令碼,檔案過大,記憶體溢位問題SQLServer指令碼記憶體溢位
- Linux 作業系統指令碼格式問題導致指令碼無法執行Linux作業系統指令碼
- [20190510]快速建立執行指令碼.txt指令碼
- shell指令碼放到crontab裡就執行不成功的問題指令碼
- [20171219]指令碼執行的安全性.txt指令碼
- rman指令碼指令碼
- 執行shell指令碼指令碼
- 指令碼執行方式指令碼
- Linux計劃任務crontab執行指令碼不正確的問題Linux指令碼
- 【redis】-使用Lua指令碼解決多執行緒下的超賣問題以及為什麼?Redis指令碼執行緒
- 多執行緒問題解釋執行緒
- 多執行緒-生產者消費者問題程式碼2並解決執行緒安全問題執行緒
- [20120606]sql中的註解問題.txtSQL
- sqlplus 執行大量sql指令碼時遇到問題分析(很常見)SQL指令碼
- 安裝oracle11g遇到的執行root.sh指令碼問題Oracle指令碼
- mybatis執行sql指令碼MyBatisSQL指令碼
- crontab執行shell指令碼指令碼
- PowerShell 指令碼執行策略指令碼
- SQL SERVER執行指令碼SQLServer指令碼
- 指令碼後臺執行指令碼
- Oracle rman 指令碼Oracle指令碼
- 執行python指令碼後臺執行Python指令碼
- [20231021]生成bbed的執行指令碼.txt指令碼
- 多執行緒-執行緒安全問題的產生原因分析以及同步程式碼塊的方式解決執行緒安全問題執行緒
- RouterOS 限速指令碼和限執行緒指令碼ROS指令碼執行緒
- 使用nohup執行迴圈指令碼插入發現資料重複的問題指令碼
- 【問題處理】diagcollection.pl採集指令碼執行出錯——'crshome' is missingGC指令碼
- appium ios java 指令碼如何用指令執行,例如 adb 那種方式執行指令碼APPiOSJava指令碼
- 【RMAN】RMAN指令碼中使用替換變數--windows 下rman全備指令碼指令碼變數Windows
- Unix shell解決實際問題指令碼(1)指令碼