暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

12C RMAN支持执行SQL语句

原创 章芋文 2013-09-04
1495
在12C的RMAN中支持大部分的SQL语句,下面是简单的测试:
[code][oracle@ora12c ~]$ rman target sys/oracle

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jul 25 19:04:43 2013

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

connected to target database: ORCL12C (DBID=649692732)

RMAN> alter user c##awen identified by oracle;

using target database control file instead of recovery catalog
Statement processed

RMAN> create table c##awen.session_bak as select * from v$session;

Statement processed

RMAN> select count(*) from c##awen.session_bak;

COUNT(*)
----------
36

RMAN> drop table c##awen.session_bak;

Statement processed

RMAN> show recyclebin;

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: "all, archivelog, auxiliary, auxname, backup, channel, compression, controlfile, datafile, db_unique_name, default, device, encryption, exclude, maxsetsize, retention, snapshot, "
RMAN-01008: the bad identifier was: recyclebin
RMAN-01007: at line 1 column 6 file: standard input

RMAN> purge recyclebin;

Statement processed

RMAN> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

Statement processed

RMAN> select sysdate from dual;

SYSDATE
-------------------
2013-07-25 19:09:56

RMAN> set long 1000

executing command: SET LONG

RMAN> set linesize 100

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: "archivelog, autobackup, auxiliary, auxname, backup, catalog, command, compression, controlfile, database, dbid, decryption, default, echo, encryption, high, incarnation, long, maxcorrupt, maxseq, newname, nocfau, numwidth, restore, snapshot, to restore point, until restore point, until, "
RMAN-01008: the bad identifier was: linesize
RMAN-01007: at line 1 column 5 file: standard input

RMAN>[/code]
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论