處理ORA-01031

jichengjie發表於2013-04-24
在用plsql用sys使用者登入時報ora-01031錯誤。但在伺服器本地是可以的。經測試,不在本地伺服器登入都會報這個錯誤。這與三方面有關,以下是處理過程:
-bash-3.2$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Wed Apr 24 15:41:56 2013
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
SQL> connect sys/sys123 as sysdba
Connected.
SQL> select *
  2  from v$pwfile_users;
no rows selected
SQL> select name,value
  2  from v$parameter
  3  where name like '%pass%";
ERROR:
ORA-01756: quoted string not properly terminated

SQL> select name,value
  2  from v$parameter
  3  where name like '%pass%';
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
remote_login_passwordfile
NONE

SQL> alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area  674829224 bytes
Fixed Size                   451496 bytes
Variable Size             402653184 bytes
Database Buffers          268435456 bytes
Redo Buffers                3289088 bytes
Database mounted.
Database opened.
SQL> select *
  2  from v$pwfile_users;
USERNAME                       SYSDB SYSOP
------------------------------ ----- -----
SYS                            TRUE  TRUE
SQL> select name,value
  2  from v$parameter
  3  where name like '%pass%';
NAME
----------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
remote_login_passwordfile
EXCLUSIVE

SQL>

-bash-3.2$ orapwd file=/opt/oracle/product/9ir2/dbs/orapw password=sys123

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-759198/,如需轉載,請註明出處,否則將追究法律責任。

相關文章