Database Reference
In-Depth Information
In comparison SYSDBA has 233 different session privileges and no granted roles. As SYSBACKUP you cannot
peek into user tables you do not have permissions for:
SQL> alter session set container=pdb1;
Session altered.
SQL> select * from user1.FBTAB1;
select * from user1.FBTAB1
*
ERROR at line 1:
ORA-01031: insufficient privileges
In case you need to know whether you are connected as SYSDBA or SYSBACKUP you can use the sys_context function:
SQL> select sys_context('userenv','authenticated_identity') from dual
2 /
SYS_CONTEXT('USERENV','AUTHENTICATED_IDENTITY')
--------------------------------------------------------------------------------
SYSBACKUP
A connection to the database must now be made with the “AS SYSBACKUP” clause. This is a slight deviation
from the rule that the role did not have to be supplied in the target or auxiliary arguments to RMAN. To connect as
SYSBACKUP the following works:
[oracle@server1 dbs]$ rman target '"sysbackup@cdb1 as sysbackup"'
Recovery Manager: Release 12.1.0.1.0 - Production on Fri Sep 20 20:57:23 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: CDB1 (DBID=800340993)
RMAN>
The placement of single and double quotes is important here. There is no syntax change if you would like to
connect to the database as SYSDBA, which is still the default. Simply do not specify the “as sysdba” as you always did.
Ability to execute SQL directly in RMAN
RMAN has been improved significantly and you now can directly use it to enter SQL commands without having
to switch back and forth to sql*plus. There were so many situations when a screen session was needed and
CTRL-A-space was used simply too often to enter a command here or there. Worse, sometimes a restart of the
database required you to reconnect. Those times are over! One of the operations more familiar to the author is to
check for flashback mode in the database. This is no longer a problem at all:
RMAN> startup mount
connected to target database (not started)
Oracle instance started
database mounted
 
Search WWH ::




Custom Search