12C SQL commands in RMAN

RMAN> connect target /

connected to target database: TESTDB (DBID=2602403303)
using target database control file instead of recovery catalog

RMAN> create table test (id number);
Statement processed

RMAN> select * from test;
no rows selected

RMAN> insert into test values (1);
Statement processed

RMAN> select * from test;

        ID
———-
         1

RMAN> begin
2>      for c1 in 1..20 loop
3>       insert into test values (c1);
4>      end loop;
5>    end;
6> /

Statement processed

RMAN> select count(1) from test;

  COUNT(1)
———-
        21

RMAN> rollback;
Statement processed

RMAN> select * from test;
no rows selected

RMAN> drop table test purge;

Statement processed

RMAN> select * from test;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command
ORA-00942: table or view does not exist

RMAN>

  • December 22, 2015 | 12 views