-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Oracle Database 12c Security Cookbook
By :

It is recommended that you use the sysdg
administrative privilege instead of sysdba
administrative privilege to perform operations related to data guard tasks.
For this recipe, you'll need:
mike
) and a password file in the 12c format if you want to complete it using a password-authenticated userkelly
), who belongs to the dgdba
OS group in order to connect to the database using OS authenticationInstructions are split into sections for database authentication and OS authentication.
The instructions for database authentication are as follows:
sysdba
(or another user who can grant the sysdg
privilege):sqlplus / as sysdba
SYSDG
privilege to user mike
:SQL> grant sysdg to mike;
mike
using the dgmgrl
command-line interface:SQL> exit
$ dgmgrl
DGMRRL> connect mike/test_1
The instructions for OS authentication are as follows:
kelly
) is a member of the dgdba
OS group:$ id kelly
dgmgrl
utility and OS authentication:$ dgmgrl
DGMGRL> connect /
When you connect to the database as sysdg
, you are connected as a predefined user, sysdg
. Using the sysdg
privilege, you can connect to the database even when it is not open.
After completing step 2 successfully in the Database authentication section, user mike
, as expected, can grant/revoke sysdg
privilege to/from another existing user. If you want to try it out, type the statements given here.
After you connect to the database using the sysdg
administrative privilege, you can perform the following operations:
Operations | |
|
|
|
|
|
|
|
|
(including |
|
|
|
It is important for you to remember that:
When using the sysdg
administrative privilege, you can't view application data.
You can't drop user sysdg
.
When you are connected to the database as sysdg
, you are connected as sysdg
user to the SYS
schema:
SQL> connect / as sysdg
Connected.
SQL> show user
USER is "SYSDG"
SQL> select sys_context( 'userenv', 'current_schema' ) from dual;
SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
------------------------------------------------------------------
SYS