ITPub博客

首页 > Linux操作系统 > Linux操作系统 > win-sty-script

win-sty-script

原创 Linux操作系统 作者:wwd_wang 时间:2009-01-16 14:13:16 0 删除 编辑

=====autoreco.bat

if exist Y: then net use Y: /delete  /y

net use Y: \\IP\d$    密碼   /user:administrator

Y:
cd oracle
cd oradata
cd oracle9i
cd arch
move *.arc D:\oracle\oradata\oracle9i\arch >>d:\oracle\auto\autocopy.log
d:
net use y: /delete /y
set ORACLE_SID=oracle9i

 

sqlplus /nolog @d:\oracle\auto\autoreco.bak >>d:\oracle\auto\autoreco_erp.log
exit
exit
exit

=======autoreco.bak

connect / as sysdba
set autorecovery on
recover standby database;
exit;

========autorun.bat

set ORACLE_SID=oracle9i
sqlplus /nolog @d:\oracle\auto\autostart_sty.bak
exit
exit

========autostart_sty.bak

conn / as sysdba
shutdown immediate;
startup nomount;
alter database mount standby database;
set autorecovery on
recover standby database;
exit;


conn / as sysdba
shutdown immediate;
startup nomount;
alter database mount standby database;

recover managed standby database disconnect;
exit;

注意:

建立sty時要把注冊表中的oracle自動啟動true改為false
把sty開啟腳本放在開始-->程式-->啟動下,重啟時自動啟動。

以下二個AutoDelFile.exe DelFileConfig.ini同時使用

========AutoDelFile.exe(空)  

========DelFileConfig.ini

[Count]
Count = 2

[DelFileConfig1]
type="File"
path="d:\backup"
filetype="*.dmp"
beforedays="7"


[DelFileConfig2]
type="File"
path="d:\backup"
filetype="*.log"
beforedays="7"


[logkeeptime]
logkeeptime=7

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12137615/viewspace-539819/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-05-08

  • 博文量
    236
  • 访问量
    195635