ORACLE ORAPWD

$ orapwd --help

orapwd FILE=filename [FORCE={y|n}] [ASM={y|n}] [DBUNIQUENAME=dbname]

[FORMAT={12.2|12}] [SYS={Y|password|external('sys-external-name')}]

[SYSBACKUP={password|external('sysbackup-external-name')}]

[SYSDG={password|external('sysdg-external-name')}}]

[SYSKM={password|external('syskm-external-name')}}]

[DELETE={y|n}] [INPUT_FILE=input-fname]

orapwd DESCRIBE FILE=filename

FILE:

If the DESCRIBE argument is not included, then specify the name to assign to the new password file. You must supply a complete path. If you supply only a file name, the file is written to the current directory.If the DESCRIBE argument is included, then specify the name of an existing password file.

DESCRIBE

只能显示format值

Describes the properties of the specified password file, including the FORMAT value (12.2 or 12).

FORCE:

(Optional) If y, permits overwriting an existing password file.

ASM:

用于表示是在OS还是ASM上创建password file

(Optional) If y, create an Oracle ASM password file in an Oracle ASM disk group.

If n, the default, create a password file in the operating system file system.

When the DBUNIQUENAME argument is specified, the password file is a database password file.

When the DBUNIQUENAME argument is not specified, the password file can

be a database password file or an Oracle ASM password file

DBUNIQUENAME

用于表示在ASM上创建的是database password还是asm password file

Unique database name used to identify database password files residing in an ASM disk group only. This argument is required when the database password file is stored on an Oracle ASM disk group. This argument is ignored when an Oracle ASM password file is created by setting the ASM argument to y.

FORMAT

(Optional) Specify one of the following values:

12.2, the default, creates the password file in 12.2. format. This format supports

    granting administrative privileges to external users and enables SSL and Kerberos

authentication for administrative users.

12 creates the password file in Oracle Database 12c format. This format supports the 

SYSBACKUP, SYSDG, and SYSKM administrative privileges.

If this argument is set to legacy, then ORAPWD creates a database password file that is in the format before Oracle Database 12c. The password file supports SYSDBA and SYSOPER administrative privileges, but it does not support SYSBACKUP, SYSDG, and SYSKM administrative privileges.

SYS

(Optional) This argument can be set to either Y, password, or external('sys-external-name').

If SYS=Y and INPUT_FILE is specified to migrate password file entries, then you will be prompted to enter the new password for the SYS administrative user.

If password, then you will be prompted to enter the password for the SYS administrative user.

If external('sys-external-name'), then replace sys-external-name with the external name for SSL or Kerberos authentication for the SYS administrative user.

SYSBACKUP

(Optional) This argument can be set to either password, external('sysbackup-external-name'), y, or n.

If password, then you will be prompted to enter the password for the SYSBACKUP administrative user.

If external('sysbackup-external-name'), then replace sysbackup-external-name with the external name for SSL or Kerberos authentication for the SYSBACKUP administrative user.

SYSDG

(Optional) This argument can be set to either password, external('sysdg-external-name'), y, or n.

If password, then you will be prompted to enter the password for the SYSDG administrative user.

If external('sysdg-external-name'), then replace sysdg-external-name with the external name for SSL or Kerberos authentication for the SYSDG administrative user.

SYSKM

(Optional) This argument can be set to either password, external('syskm-external-name'), y, or n.

If password, then you will be prompted to enter the password for the SYSKM administrative user.

If external('syskm-external-name'), then replace syskm-external-name with the external name for SSL or Kerberos authentication for the SYSKM administrative user.

If y, creates a SYSKM entry in the password file. You are prompted for the password. The password is stored in the created password file.

If n, no SYSKM entry is created in the password file.

Note: The y and n values in the SYSKM argument are deprecated in Oracle Database 12c Release 2 (12.2.0.1) and may be desupported in a future release.

INPUT_FILE

(Optional) Name of the input password file. ORAPWD migrates the entries in the input file to a new password file.

This argument can be used to convert a password file from one format to another, for example from 12 format to 12.2 format.

This argument also can be used to reset the password for the SYS administrative user.

ORAPWD cannot migrate an input password that is stored in an Oracle ASM disk group.

When the INPUT_FILE argument is specified, ORAPWD does not create any new entries. Therefore, ORAPWD ignores the following arguments: SYSBACKUP/SYSDG/SYSKM

When an input file is specified and the new password file replaces the input file, FORCE must be set to y.

DELETE

If this argument is set to y, then ORAPWD deletes the specified password file. When y is specified, FILEASM, or DBUNIQUENAME must be specified. When FILE is specified, the file must be located on an ASM disk group.

If this argument is set to n, the default, then ORAPWD creates the password file.

EXAMPLE:

  1. Creating PASSWORD FILE

$ orapwd FILE='/u01/oracle/dbs/orapworcl' FORMAT=12.2

$ orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' FORMAT=12.2

$ orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' SYSBACKUP=password FORMAT=12.2

$ orapwd FILE='+DATA/orcl/orapworcl' DBUNIQUENAME='orcl' FORMAT=12.2

sys=external('KerberosUserSYS@example.com')

syskm=external('KerberosUserSYSKM@example.com')

  1. Migrates PASSWORD FILE

$ orapwd FILE='/u01/oracle/dbs/orapworcl' FORMAT=12.2 INPUT_FILE='/u01/oracle/dbs/orapworcl' FORCE=y

  1. 更改PASSWORD FILE的SYS密码(其它特权用户密码无法更改):

$ orapwd FILE='/u01/oracle/dbs/orapworcl' SYS=Y INPUT_FILE='/u01/oracle/dbs/orapworcl' FORCE=y

  1. 查看PASSWORD FILE FORMAT

$ orapwd DESCRIBE FILE='orapworcl'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值