Home > Database > Mysql Tutorial > Oracle的exp备份机搭建步骤

Oracle的exp备份机搭建步骤

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:21:51
Original
817 people have browsed it

JMYBJS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 129.1.9.90)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jmybjs) ) ) 在D盘新建文件夹: d:backupdmp d:backuplog 用来存放dmp文件和备份的日志。 修改备份脚本如下

  JMYBJS =

  (DESCRIPTION =

  (ADDRESS = (PROTOCOL = TCP)(HOST = 129.1.9.90)(PORT = 1521))

  (CONNECT_DATA =

  (SERVER = DEDICATED)

  (SERVICE_NAME = jmybjs)

  )

  )

  在D盘新建文件夹:

  d:backupdmp

  d:backuplog

  用来存放dmp文件和备份的日志。

  修改备份脚本如下:

  'Nightly Bulk copy export for the customers table&veiw

  'Write output to clarentYYMMDD.txt and errors to ERRYYMMDD.txt

  ''strssql="bcp demo.clrnuser.bill_recordview out c:bibak"+outfile+" -U jl_voip -P jlvoip -c -k -t,"

  Dim outfile,aa,bb,stroption1,stroption2,A,B,C,strsql

  set ws=WScript.CreateObject("WScript.shell")

  A=cint(month(dateadd("d",0,date())))

  B=cint(day(dateadd("d",0,date())))

  C=cint(year(dateadd("d",0,date())))

  if A

  if A>=10 then aa=cstr(A)

  if B

  if B>=10 then bb=cstr(B)

  outfile=cstr(C)+aa+bb

  stroption1="D:oracle_bfproduct10.1.0Db_1BINexp system/******@jmybjs full=y buffer=900000 file=d:backupdmpjmybjs"+outfile+" log=d:backuplogjmybjs"+outfile+".log"""

  strsql=stroption1

  ret=ws.Run(strsql)

  测试后,备份正常。

  修改删除脚本,,使备份数据在备份机上保留30天

  'Nightly Bulk copy export for the customers table&veiw

  'Write output to clarentYYMMDD.txt and errors to ERRYYMMDD.txt

  ''strssql="bcp demo.clrnuser.bill_recordview out c:bibak"+outfile+" -U jl_voip -P jlvoip -c -k -t,"

  Dim outfile,aa,bb,stroption1,stroption2,A,B,C,strsql

  set ws=WScript.CreateObject("WScript.shell")

  A=cint(month(dateadd("d",-30,date())))

  B=cint(day(dateadd("d",-30,date())))

  C=cint(year(dateadd("d",-30,date())))

  if A

  if A>=10 then aa=cstr(A)

  if B

  if B>=10 then bb=cstr(B)

  outfile=cstr(C)+aa+bb

  stroption1="C:WINDOWSsystem32Delete d:backupdmpjmybjs"+outfile+".dmp"

  strsql=stroption1

  ret=ws.Run(strsql)

  测试,提示不正确,检查后,发现这个备份机中的sytem32文件夹下没有delete.exe文件,从其他系统中拷贝delete.exe文件到这个备份机的system32下,测试正常。

  最后,添加到windows的定时任务中

        :更多精彩文章请关注三联编程教程栏目。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template