OracleDB12c New Feature: RMAN Describe

Similar to SQL*Plus DESCRIBE command, RMAN now supports DESCRIBE.

RMAN> desc hr.jobs
using target database control file instead of recovery catalog
Name                                      Null?    Type
----------------------------------------- -------- ----------------------------
JOB_ID                                    NOT NULL VARCHAR2(10)
JOB_TITLE                                 NOT NULL VARCHAR2(35)
MIN_SALARY                                         NUMBER(6)
MAX_SALARY                                         NUMBER(6)
RMAN>

If you are connected using the SYSDBA privilege, you can view tables in other schemas, but with SYSBACKUP connection you will not be able to view user tables. SYSBACKUP is new privilege in 12c. [Administrative privileges began with SYSDBA and SYSOPER in 8i, then SYSASM in 11g, now SYSBACKUP, SYSDG and SYSKM in 12c]

RMAN also supports most SQL statements, without the SQL prefix (and messing with quotes around the SQL!!).

RMAN> SELECT user from dual;
USER
------------------------------
SYS
RMAN>

 

 

OracleDB12c New Feature: Cascaded Truncate

Oracle Database 12c, now TRUNCATE statement is enhanced with  CASCADE option. This is pretty useful, that you need not worry about truncating all “child” tables before truncating the parent. With the CASCADE option, Oracle will truncate all tables with a foreign key constraint to the table being truncated. The foreign key must be ENABLED and defined with “ON DELETE CASCADE” clause. There is no set limit to the recursive level of cascaded truncate. All child, grand child, great grandchild, etc tables will be truncated.

Oracle12c also extended the same feature to truncating a partition. Now, ALTER TABLE … TRUNCATE PARTITION can include the CASCADE option as well. Specify CASCADE to truncate the corresponding partition(s) or subpartition(s) in all reference-partitioned child tables of table being truncated.