用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为我的密码。成功则会有如下显示:
连接到:
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>
第三步:
SQL> conn sys/Oracle11g as sysdba; Connected.
第四步:
SQL> alter user scott account unlock; User altered. SQL> commit; Commit complete. SQL> conn scott/tiger //请输入新密码,并确认后OK Password changed Connected.
这时再到plsql developer里面以scott/tiger登录就可以了。