1. 程式人生 > >用scott賬戶在PL/SQL中連線Oracle的時候,提示ORA-28000: the account is locked

用scott賬戶在PL/SQL中連線Oracle的時候,提示ORA-28000: the account is locked

第一步:在%ORACLE_HOME%NETWORK\ADMIN目錄中找到sqlnet.ora檔案,其中%ORACLE_HOME%為oracle的安裝路徑。

我的為:D:\app\haojiec\product\11.2.0\dbhome_1\NETWORK\ADMIN,開啟sqlnet.ora,在檔案中NAMES.DIRECTORY_PATH 和 ADR_BASE兩行中間加一行:SQLNET.AUTHENTICATION_SERVICES= (NTS),儲存。

第二步:開啟DOS視窗,輸入sqlplus sys/Oracle11g as sysdba;

其中 sys為賬戶,Oracle11g為我的密碼。成功則會有如下顯示:

連線到:

?

1

2

3

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

第三步:

?

1

2

SQL> conn sys/Oracle11g as sysdba;

Connected.

第四步:

?

1

2

3

4

5

6

7

SQL> alter user scott account unlock;

User altered.

SQL> commit;

Commit complete.

SQL> conn scott/tiger    //請輸入新密碼,並確認後OK

Password changed

Connected.

這時再到plsql developer裡面以scott/tiger登入就可以了。

 

參見:

https://www.jb51.net/article/118365.htm