Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

ORAPWD utility in Oracle 12c

$
0
0
Create Password files for remote authentication enforces complexity rules
for the provided password.
     SYSDBA is a System Privilege.
     Normally,we connect to SQL*Plus using sqlplus user/password or sqlplus sys/password as sysdba. 
The password characteristics
  •     password must contain at least 8 charcters
  •     do not contain double quotes
  •     contain at least 1 letter
  •     contain at least 1 digit.
  •     contain at least 1 special charactere.
  •     don't use username and reversed username.

[ramkumar ~]$ orapwd help=y
Usage: orapwd describe file=orapwfilename
  where
file     Name of password file (required),
password     Whether to overwrite existing file (optional)
asm     
Indicates that the password to be stored in Automatic Storage Management (ASM) disk group is an ASM password. (optional),
dbuniquename
unique database name used to identify database
password files residing in ASM diskgroup only.
Ignored when asm option is specified (optional),
format     
use format=12 for new 12c features like SYSBACKUP, SYSDG and SYSKM support, longer identifiers, SHA2 Verifiers etc.
use format=12.2 for 12.2 features like enforcing user profile (password limits and password complexity) and account status for administrative users.
If not specified, format=12.2 is default (optional),
delete     
drops a password file. Must specify 'asm', 'dbuniquename' or 'file'. 
If 'file' is specified, the file must be located on an ASM diskgroup (optional)
input_file     name of input password file, from where old user entries will be migrated (optional),
sys     specifies if SYS user is password or externally authenticated.
For external SYS, also specifies external name.
SYS={y/password} specifies if SYS user password needs to be changed when used with input_file,
sysbackup     creates SYSBACKUP entry (optional).
Specifies if SYSBACKUP user is password or externally authenticated.
For external SYSBACKUP, also specifies external name.
Ignored, if input_file is specified,
sysdg     creates SYSDG entry (optional).
Specifies if SYSDG user is password or externally authenticated.
For external SYSDG, also specifies external name.
Ignored, if input_file is specified,
syskm     creates SYSKM entry (optional).
Specifies if SYSKM user is password or externally authenticated.
For external SYSKM, also specifies external name.
Ignored, if input_file is specified,
describe     describes the properties of specified password file (required).
 *   There must be no spaces around the equal-to (=) character.

Description existing Orapwd file
[ramkumar ~]$ orapwd describe file=$ORACLE_HOME/dbs/orapwcdb1
Password file Description : format=12.2

Delete the existin password file.
[ramkumar ~]$ orapwd delete=y dbuniquename=orabase file=orapwcdb1.ora password="oracle"

Create the new password file
[ramkumar ~]$ orapwd file=orapwcdb1.ora password=ramkumar12c! entries=20

Rewrite the password file
[ramkumar ~]$ orapwd file=orapwcdb1.ora password=ramkumar12C! entries=20 ignorecase=y force=y

Container user sys password
[ramkumar ~]$ orapwd file=orapwacs.ora password=ramkumar@12C entries=20 sys=c##ramkumar force=y

Location of the password file
[ramkumar ~]$ pwd
/u02/app/oracle/product/12.2.0.1/db_1/dbs

Existing file check
[ramkumar ~]$ echo *cdb1.ora
initcdb1.ora orapwcdb1.ora spfilecdb1.ora

To check the available user using password
SQL> select username, sysdba, con_id from v$pwfile_users;
USERNAME      SYSDB     CON_ID
-------------------  ----- ----------
SYS                  TRUE           0
C##RAMKUMAR         TRUE           0

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>