orapwd file=$ORACLE_HOME/dbs/orapwSID password=xx
file名的格式必须是orapw+ORACLE_SID,否则不会正常
[oracle@GI_Softwareonly_64 dbs]$ orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=
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.
CREATE DATABASE TDB
USER SYS IDENTIFIED BY sys_password
....
虽然会有sys用户,且用户状态OPNE,但是
$ORACLE_HOME/dbs下面 不会有密码文件
SQL> select * from v$pwfile_users没有结果
sqlplus sys/XX@PROD1 as sysdba报错权限不够
sqlplus sys/XX@PROD1无法登陆,提示需要sysdba或sysopen
SQL> grant sysdba to sys报错ORA-01994: GRANT failed: password file missing or disabled
一旦$ORACLE_HOME/dbs下面有密码文件,则alter user sys identified时,ls -tl时,密码文件的时间会变成alter user sys identified的执行时间
试验证明1: 先使用orapwd建立了密码A,再使用create database user sys建立了密码B,真正的密码是A,使用密码B登录时sqlplus sys/B@prod_s as sysdba是会报错ORA-01017: invalid username/password; logon denied,使用密码A登录时sqlplus sys/A@prod_s as sysdba正常
试验证明2:CREATE DATABASE TDB USER SYSTEM发现,system用户自动有DBA权限了
比如ORACLE_SID=PROD1,对应的tns也是PROD1
1、
sqlplus sys/XX@PROD1 as sysdba
报错ORA-01017: invalid username/password; logon denied,说明正常配置,只是sys后面的密码XX错误了
报错ORA-01031: insufficient privileges,说明没有配置成功
2、
SQL> select * from v$pwfile_users;
有结果,说明正常配置
没有结果,说明没有配置成功
file名的格式必须是orapw+ORACLE_SID,否则不会正常
[oracle@GI_Softwareonly_64 dbs]$ orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=
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.
CREATE DATABASE TDB
USER SYS IDENTIFIED BY sys_password
....
虽然会有sys用户,且用户状态OPNE,但是
$ORACLE_HOME/dbs下面 不会有密码文件
SQL> select * from v$pwfile_users没有结果
sqlplus sys/XX@PROD1 as sysdba报错权限不够
sqlplus sys/XX@PROD1无法登陆,提示需要sysdba或sysopen
SQL> grant sysdba to sys报错ORA-01994: GRANT failed: password file missing or disabled
一旦$ORACLE_HOME/dbs下面有密码文件,则alter user sys identified时,ls -tl时,密码文件的时间会变成alter user sys identified的执行时间
试验证明1: 先使用orapwd建立了密码A,再使用create database user sys建立了密码B,真正的密码是A,使用密码B登录时sqlplus sys/B@prod_s as sysdba是会报错ORA-01017: invalid username/password; logon denied,使用密码A登录时sqlplus sys/A@prod_s as sysdba正常
试验证明2:CREATE DATABASE TDB USER SYSTEM发现,system用户自动有DBA权限了
比如ORACLE_SID=PROD1,对应的tns也是PROD1
1、
sqlplus sys/XX@PROD1 as sysdba
报错ORA-01017: invalid username/password; logon denied,说明正常配置,只是sys后面的密码XX错误了
报错ORA-01031: insufficient privileges,说明没有配置成功
2、
SQL> select * from v$pwfile_users;
有结果,说明正常配置
没有结果,说明没有配置成功
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2146901/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30126024/viewspace-2146901/