在Oracle 12c之前的版本中,rman命令窗口中是不可以直接执行sql查询语句。而在oracle 12c中 rman中是可以直接运行sql语句,
对于数据库管理员来说,确实方便很多。
以下是具体测试过程 :
[oracle@db12c ~]$ rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Dec 9 21:08:24 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1352607797)
RMAN>
RMAN> select machine from v$session;
MACHINE
----------------------------------------------------------------
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
db12c.oracle.com
29 rows selected
RMAN>
而在oracle 11gR2 版本中,则是不可以的
C:\Users\Administrator>rman target /
恢复管理器: Release 11.2.0.1.0 - Production on 星期一 12月 9 21:10:00 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
连接到目标数据库: ORCL (DBID=1360030053)
RMAN> select machine from v$session;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: 分析输入命令时出错
RMAN-01009: 语法错误: 找到 "identifier": 应为: "advise, allocate, alter, backup,
@, catalog, change, configure, connect, convert, copy, create, crosscheck, dele
te, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, pr
int, quit, recover, register, release, repair, replace, report, reset, restore,
resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, tra
nsport, unregister, upgrade, validate, {, " 中的一个
RMAN-01008: 错误标识符: select
RMAN-01007: 在第 1 行第 1 列, 文件: standard input
RMAN