重建口令檔案
SQL> exit
從 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 斷
開
C:\>sqlplus sys/manager@55 as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 5月 8 13:43:09 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
===================================================
SQL> grant sysdba to sys;
grant sysdba to sys
*
第 1 行出現錯誤:
ORA-01994: GRANT 失敗: 口令檔案缺失或已禁用
所以不得不重建口令檔案:
Usage: orapwd file=
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line,
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
ignorecase - passwords are case-insensitive (optional),
nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
There must be no spaces around the equal-to (=) character.
[oracle@localhost ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$orcl3939 entries=10 force=y;
Enter password for SYS:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 5月 8 14:02:48 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
連線到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
orapwd file=orapworcl password=oracle force=y
orapwd file=>
password=< sys使用者的密碼>
entries=<密碼檔案中的使用者數目限制(二進位制檔案按矩陣計算可存多少數)>
force=
官網11gR2:
ORAPWD FILE=filename [ENTRIES=numusers] [FORCE={Y|N}] [IGNORECASE={Y|N}]
Command arguments are summarized in the following table.
Argument | Description |
---|---|
FILE | Name to assign to the password file. You must supply a complete path. If you supply only a file name, the file is written to the current directory. |
ENTRIES | (Optional) Maximum number of entries (user accounts) to permit in the file. |
FORCE | (Optional) If y, permits overwriting an existing password file. |
IGNORECASE | (Optional) If y, passwords are treated as case-insensitive. |
There are no spaces permitted around the equal-to (=) character.
The command prompts for the SYS password and stores the password in the created password file.
Example
The following command creates a password file named orapworcl that allows up to 30 privileged users with different passwords.
orapwd FILE=orapworcl ENTRIES=30
官網(12c):更為詳細
orapwd FILE=filename [ENTRIES=numusers] [FORCE={y|n}] [ASM={y|n}] [DBUNIQUENAME=dbname] [FORMAT={12|legacy}] [SYSBACKUP={y|n}] [SYSDG={y|n}] [SYSKM={y|n}] [DELETE={y|n}] [INPUT_FILE=input-fname]orapwd DESCRIBE FILE=filename
Command arguments are summarized in the following table.
Argument Description 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.
PASSWORD Password for SYS. You are prompted for the password if it is not specified. The password is stored in the created password file. ENTRIES (Optional) Maximum number of entries (user accounts) to permit in the file. FORCE (Optional) If y, permits overwriting an existing password file. ASM (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 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) If 12, the default, the password file is created in Oracle Database 12c format. This format supports the SYSBACKUP, SYSDG, and SYSKM administrative privileges. If legacy, the password file is in legacy format, which is the format before Oracle Database 12c. This argument cannot be set to legacywhen the SYSBACKUP, SYSDG, or SYSKM argument is specified.
SYSBACKUP (Optional) If y, creates a SYSBACKUP entry in the password file. You are prompted for the password. The password is stored in the created password file. SYSDG (Optional) If y, creates a SYSDG entry in the password file. You are prompted for the password. The password is stored in the created password file. SYSKM (Optional) 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. DELETE (Optional) If y, delete the specified password file. If n, the default, create the specified password file.
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 convert a password file from legacy format to Oracle Database 12cformat. ORAPWD cannot migrate an input password that is stored in an Oracle ASM disk group. DESCRIBE Describes the properties of the specified password file, including theFORMAT value (12 or legacy) and the IGNORECASE value (y orn)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29876893/viewspace-1629695/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 口令檔案的作用及其重建小結
- 口令檔案
- Oracle ----口令檔案Oracle
- 引數檔案/口令檔案
- 重建控制檔案
- 重建控制檔案--
- Oracle 建立口令檔案 orapwdOracle
- XML口令檔案描述 (轉)XML
- 重新認識口令檔案
- Oracle重建控制檔案Oracle
- DataGuard重建控制檔案
- 重建/dev/null檔案devNull
- oracle 重建控制檔案Oracle
- ASM認證與口令檔案ASM
- Oracle OS 認證, 口令檔案Oracle
- unix口令檔案介紹(轉)
- os認證和口令檔案!
- Oracle 控制檔案的重建Oracle
- 利用trace重建控制檔案
- 【口令檔案】remote_login_passwordfileREM
- 怎樣使用orapwd新建口令檔案
- 如何重建RAC的控制檔案
- RAC環境重建控制檔案
- ORACLE控制檔案的重建 (轉)Oracle
- 控制檔案重建以及備份
- 為oracle資料庫建立口令檔案Oracle資料庫
- 重建Oracle資料庫控制檔案Oracle資料庫
- 恢復之重建資料檔案
- 【Oracle日誌】- 日誌檔案重建Oracle
- oracle之 利用 controlfile trace檔案重建控制檔案Oracle
- 重建控制檔案後某些檔案被命名為MISSINGnnnnnGNN
- 請教關於利用跟蹤檔案重建控制檔案
- 惡意軟體PE檔案重建指南
- 備份與恢復--重建控制檔案
- 重建控制檔案的恢復(noresetlogs)
- 重建控制檔案 recreate control file
- 控制檔案損壞重建實驗(上)
- 控制檔案損壞重建實驗(下)