在给sysdba给用户时ORA-01994,重建密码文件后,任然一样。后来经过多次检查后,原来密码文件orapw<$ORACLE_SID> ,一定要记住$ORACLE_SID区分大小写
[code][oracle@localhost oracle]$ cd /oracle/product/database/dbs/
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwpstc.bak spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwPSTC spfilepstc.ora
[oracle@localhost dbs]$ vim orapwPSTC
[oracle@localhost dbs]$ rm -rf orapwPSTC
[oracle@localhost dbs]$ orapwd file=orapwPSZX_DB password=oracle entries=10
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwPSZX_DB spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwpstc.bak spfilepstc.ora
[oracle@localhost dbs]$ exit
exit
SQL> show user;
USER is "SYS"
SQL> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
SQL> !
[oracle@localhost oracle]$ echo $ORACLE_SID
pszx_db
[oracle@localhost oracle]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwPSZX_DB spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwpstc.bak spfilepstc.ora
[oracle@localhost dbs]$ rm -rf orapwPSZX_DB
[oracle@localhost dbs]$ orapwd file=orapwpszx_db password=oracle entries=10
[oracle@localhost dbs]$ exit
exit
SQL> grant sysdba to sys;
Grant succeeded.
SQL> grant sysdba to dbauserpszx;
Grant succeeded.
SQL>[/code]
[code][oracle@localhost oracle]$ cd /oracle/product/database/dbs/
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwpstc.bak spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwPSTC spfilepstc.ora
[oracle@localhost dbs]$ vim orapwPSTC
[oracle@localhost dbs]$ rm -rf orapwPSTC
[oracle@localhost dbs]$ orapwd file=orapwPSZX_DB password=oracle entries=10
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwPSZX_DB spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwpstc.bak spfilepstc.ora
[oracle@localhost dbs]$ exit
exit
SQL> show user;
USER is "SYS"
SQL> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
SQL> !
[oracle@localhost oracle]$ echo $ORACLE_SID
pszx_db
[oracle@localhost oracle]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ ls
hc_pstc.dat initdw.ora lkPSZX_DB orapwPSZX_DB spfilepszx_db.ora
hc_pszx_db.dat init.ora orapwpstc.bak spfilepstc.ora
[oracle@localhost dbs]$ rm -rf orapwPSZX_DB
[oracle@localhost dbs]$ orapwd file=orapwpszx_db password=oracle entries=10
[oracle@localhost dbs]$ exit
exit
SQL> grant sysdba to sys;
Grant succeeded.
SQL> grant sysdba to dbauserpszx;
Grant succeeded.
SQL>[/code]
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




