Oracle服务端装的版本为IP地址为
在备份机上安装oracle配IP地址为关闭防火墙
并修改tnsnamesora文件添加如下内容
JMYBJS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jmybjs)
)
)
在D盘新建文件夹
d:\backup\dmp
d:\backup\log
用来存放dmp文件和备份的日志
修改备份脚本如下
Nightly Bulk copy export for the customers table&veiw
Write output to clarentYYMMDDtxt and errors to ERRYYMMDDtxt
strssql=bcp democlrnuserbill_recordview out c:\bibak\+outfile+ U jl_voip P jlvoip c k t
Dim outfileaabbstroptionstroptionABCstrsql
set ws=WScriptCreateObject(WScriptshell)
A=cint(month(dateadd(ddate())))
B=cint(day(dateadd(ddate())))
C=cint(year(dateadd(ddate())))
if A< then aa=cstr()+cstr(A)
if A>= then aa=cstr(A)
if B< then bb=cstr()+cstr(B)
if B>= then bb=cstr(B)
outfile=cstr(C)+aa+bb
stroption=D:\oracle_bf\product\\Db_\BIN\exp system/******@jmybjs full=y buffer= file=d:\backup\dmp\jmybjs+outfile+ log=d:\backup\log\jmybjs+outfile+log
strsql=stroption
ret=wsRun(strsql)
测试后备份正常
修改删除脚本使备份数据在备份机上保留天
Nightly Bulk copy export for the customers table&veiw
Write output to clarentYYMMDDtxt and errors to ERRYYMMDDtxt
strssql=bcp democlrnuserbill_recordview out c:\bibak\+outfile+ U jl_voip P jlvoip c k t
Dim outfileaabbstroptionstroptionABCstrsql
set ws=WScriptCreateObject(WScriptshell)
A=cint(month(dateadd(ddate())))
B=cint(day(dateadd(ddate())))
C=cint(year(dateadd(ddate())))
if A< then aa=cstr()+cstr(A)
if A>= then aa=cstr(A)
if B< then bb=cstr()+cstr(B)
if B>= then bb=cstr(B)
outfile=cstr(C)+aa+bb
stroption=C:\WINDOWS\system\Delete d:\backup\dmp\jmybjs+outfile+dmp
strsql=stroption
ret=wsRun(strsql)
测试提示不正确检查后发现这个备份机中的sytem文件夹下没有deleteexe文件从其他系统中拷贝deleteexe文件到这个备份机的system下测试正常
最后添加到windows的定时任务中