12C新特性:在RMAN命令窗口中直接执行SQL语句

在19C中测试:

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@cat1 ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Thu Dec 3 11:38:16 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: WHS1 (DBID=2406852607)

RMAN> select * from dual;

using target database control file instead of recovery catalog
D
-
X

RMAN> 

在11G中测试

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Dec 3 11:37:56 2020

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: HAMMER (DBID=419355148)

RMAN> select * from dual;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, backup, @, catalog, change, configure, connect, convert, copy, create, crosscheck, delete, drop, duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit, recover, register, release, repair, replace, report, reset, restore, resync, revoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, unregister, upgrade, validate, {, "
RMAN-01008: the bad identifier was: select
RMAN-01007: at line 1 column 1 file: standard input

RMAN> 

Related Posts