直接修改简单点,如果加上判断就有点复杂了。 写个bat,放到计划任务里就可以了test.sqlconn weizzy/123456@NMCXZX as sysdba alter user weizzy identified by 888888; disconnect test.batsqlplus /nolog @test.sql 然后把test.bat 加到计划任务就可以了。
希望下面的程序对你有帮助:/oradata1/aiobstest/zzw>% cat sqlplustest.sh sqlplus obstest/obstest@aiobs7 @select.txt/oradata1/aiobstest/zzw>% cat select.txt set serveroutput on; exec proc_test; exit; /oradata1/aiobstest/zzw>% sh sqlplustest.shSQL*Plus: Release 9.2.0.1.0 - Production on 星期三 11月 11 18:37:08 2009Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 连接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Productionhello worldPL/SQL 过程已成功完成。从Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production中断开 /oradata1/aiobstest/zzw>% 在window下使用at定时,在unix下使用crontab定时一下就可以了
初始完密码后必要要用123456这个密码先登录
sqlplus weizzy/123456@NMCXZX
然后会再然输入新的密码888888
直接修改简单点,如果加上判断就有点复杂了。 写个bat,放到计划任务里就可以了test.sqlconn weizzy/123456@NMCXZX as sysdba
alter user weizzy identified by 888888;
disconnect
test.batsqlplus /nolog @test.sql
然后把test.bat 加到计划任务就可以了。
sqlplus obstest/obstest@aiobs7 @select.txt/oradata1/aiobstest/zzw>% cat select.txt
set serveroutput on;
exec proc_test;
exit;
/oradata1/aiobstest/zzw>% sh sqlplustest.shSQL*Plus: Release 9.2.0.1.0 - Production on 星期三 11月 11 18:37:08 2009Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Productionhello worldPL/SQL 过程已成功完成。从Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production中断开
/oradata1/aiobstest/zzw>% 在window下使用at定时,在unix下使用crontab定时一下就可以了