Tuesday, August 1, 2023

orapwd "Creating Password File In Oracle Database For Remote Login"

 orapwd FILE=path_to_password_file [ENTRIES=num_users] [FORCE={y|n}] [IGNORECASE={y|n}]

example:-

orapwd file=path_to_password_file entries=num_users force=y/n ignorecase=y/n 

SQL> show parameter password ;

NAME                                            TYPE              VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE

exclusive:- password file can only used by single database.

shared:- password file can be used by multiple database. 

  • FILE: Specifies the path and filename for the password file. The password file should be created in the $ORACLE_HOME/dbs directory.

  • ENTRIES: (Optional) Specifies the number of entries (user accounts) that the password file can hold. The default value is 5.

  • FORCE: (Optional) If set to 'y', the existing password file will be overwritten. If set to 'n', and if the password file already exists, the orapwd command will not create a new file.

  • IGNORECASE: (Optional) If set to 'y', passwords are case-insensitive. If set to 'n', passwords are case-sensitive.

original location of password file:- $ORACLE_HOME/dbs/orapw$ORACLE_SID

[oracle@rac1 dbs]$ orapwd --help
Usage 1: orapwd file=<fname> force={y|n} asm={y|n}
          dbuniquename=<dbname> format={12|12.2}
          delete={y|n} input_file=<input-fname>
          'sys={y | password | external(<sys-external-name>)
                | global(<sys-directory-DN>)}'
          'sysbackup={y | password | external(<sysbackup-external-name>)
                      | global(<sysbackup-directory-DN>)}'
          'sysdg={y | password | external(<sysdg-external-name>)
                  | global(<sysdg-directory-DN>)}'
          'syskm={y | password | external(<syskm-external-name>)
                  | global(<syskm-directory-DN>)}'

Usage 2: orapwd describe file=<fname>

  where
    file   - name of password file (required),
    password
           - password for SYS will be prompted
             if not specified at command line.
             Ignored, if input_file is specified,
    force  - 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, externally or
             globally authenticated.
             For external SYS, also specifies external name.
             For global SYS, also specifies directory DN.
             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, externally or
             globally authenticated.
             For external SYSBACKUP, also specifies external name.
             For global SYSBACKUP, also specifies directory DN.
             Ignored, if input_file is specified,
    sysdg  - creates SYSDG entry (optional).
             Specifies if SYSDG user is password, externally or
             globally authenticated.
             For external SYSDG, also specifies external name.
             For global SYSDG, also specifies directory DN.
             Ignored, if input_file is specified,
    syskm  - creates SYSKM entry (optional).
             Specifies if SYSKM user is password, externally or
             globally authenticated.
             For external SYSKM, also specifies external name.
             For global SYSKM, also specifies directory DN.
            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.
[oracle@rac1 dbs]$

No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...