Database Reference
In-Depth Information
SQL>select * from gv$pwfile_users where username='RS';
INST_ID USERNAME SYSDB SYSOP SYSAS
---------- ------------------------------ ----- ----- -----
2 RS TRUE FALSE FALSE
In version 12c, sysdba grants are considered to operate at the database level, and so sysdba grants are populated
for all instances immediately. This behavior change in version 12c is logical, since the password files are stored in
ASM and shared between instances. The following output shows that grants to a user are propagated to all instances,
as is visible in the password file.
SQL> grant sysdba to rs;
Grant succeeded.
SQL> select * from gv$pwfile_users where username='RS';
INST_ID USER SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------- ---- ----- ----- ----- ----- ----- ----- --
1 RS TRUE FALSE FALSE FALSE FALSE FALSE 0
2 RS TRUE FALSE FALSE FALSE FALSE FALSE 0
The Clusterware resource for the database also has a new attribute referring to the password file; in this example,
the password file is stored in ASM.
$ crsctl stat res ora.orcl12.db -p |more
...
PWFILE=+DATA/orcl12/orapworcl12
...
Version 12c introduces new administrative privileges, namely, sysdg, sysbackup, and syskm, in addition to
sysdba and sysoper privileges available in earlier versions. These new privileges can be secured with passwords too,
but the password file should be created or migrated to version 12c format using the format=12 option in the orapwd
command while creating password files.
It is important to maintain the password files consistently in all instances. Storing password files in a shared file
system is a good practice in earlier versions, and storing the password files in ASM is a good practice in version 12c.
Managing Databases and Instances
To manage a database, it is advisable to use the srvctl command. While it is possible to manage databases as
Clusterware objects using crsctl commands, you should try to use the srvctl command whenever possible. The srvctl
command provides an additional layer of security and avoids unnecessary activity in the Clusterware owner account.
The general syntax of the srvctl command is given in the following. To start or stop a database, you would use the
following command:
$ srvctl stop database -d ORCL
srvctl <operation> <object> [<options>]
By default, the database will be stopped in immediate shutdown mode. You could also specify other shutdown
modes using the -o option as follows. Other options, such as transactional, immediate, etc., can be specified too.
$ srvctl stop database -d ORCL -o abort
 
Search WWH ::




Custom Search