用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

猜你喜欢

转载自blog.csdn.net/weixin_39422586/article/details/84713733
今日推荐