忘了说了:
oracle8.1.6+windows 2000 server

解决方案 »

  1.   

    做7个批处理文件,只有文件名和倒出的文件名不同,然后星期几就运行几号批出理。当然是放到win2000的任务计划里。这样是看起来蠢了一点,但满有效的,呵呵。
      

  2.   

    是有效。
    不过还想知道更好的方法。谢谢 ttjd(ttjd)
      

  3.   

    http://www.csdn.net/expert/topic/1073/1073789.xml?temp=.1541712
      

  4.   

    你的讲述:
    以下是autodmp.bat文件rem 以下指定备份at 23:55 /every:m D:\orant_bak\dmp_backup\星期一.bat
    at 23:55 /every:t D:\orant_bak\dmp_backup\星期二.bat
    at 23:55 /every:w D:\orant_bak\dmp_backup\星期三.bat
    at 23:55 /every:th D:\orant_bak\dmp_backup\星期四.bat
    at 23:55 /every:f D:\orant_bak\dmp_backup\星期五.bat
    at 23:55 /every:s D:\orant_bak\dmp_backup\星期六.bat
    at 23:55 /every:su D:\orant_bak\dmp_backup\星期天.bat
    然后根据备份策略写七个备份批处理文件,参考如下:
    exp80 system/manager file=D:\orant_bak\dmp_backup\mon\mon.dmp full=y log=D:\orant_bak\dmp_backup\mon\log.txt
    以后你只要运行一下autodmp.bat文件即可。
    ---------------------------
    autodmp.bat只是添加计划任务。
    你的方法和ttjd(ttjd)的方法几乎是一样的。
    可能是我不理解,你能讲解一下吗?
      

  5.   

    为什么要用exp来备份呢
    严格的来说,exp,imp不算一种备份的方式,
    只能算是一种数据转储方式。这种逻辑备份最大的缺点就是不能进行数据的完全恢复,试想,你一天只备份一次,假如零点备份,23点数据库崩溃了,你怎么办,丢掉一天的数据吗???
    建议采用热备份方案。也可以加到任务计划中
      

  6.   

    如果采用exp,可以写脚本文件,如以下为rldba.sql。
    USERID=rldba/pass@hrmaster  本机可以省略后面的服务名。
    BUFFER=32768
    OWNER=rldba
    FILE=rldba.DMP
    ROWs=Y
    GRANTS=Y
    COMPRESS=Y
    CONSISTENT=Y
    再建立批处理rldba.bat
    exp parfile=ExpLquser.sql
    它们两个文件在同一目录下。然后在控制面板中,双击任务计划图标,可以用向导来建立任务计划,不用写at命令。
      

  7.   

    to:penitent(只取一瓢) 
      你给的也是逻辑备份啊。
    要使数据能够完全恢复,使数据库运行于归档模式即可。
    你能给个热备的脚本吗?
      

  8.   

    to:: luckysxn(风子) 
     
      你的程序是bat文件的变形吧,用批处理最方便。
      

  9.   

    penitent(只取一瓢) 说得对。exp,imp不算一种备份的方式,只能算是一种数据转储方式。可在一定程度上,exp起到备份得作用。热备能恢复被破坏的表吗?exp可以。
      

  10.   

    编辑一个.bat 文件
    如下:
    exp username/password@servicename file=%date%.dmp full=y;然后再windows平台下设定成定时任务就可以了
      

  11.   

    给你一个热备份的脚本,热备份最大的好处就是可以进行数据的完全或非完全恢复,如0点备份,23点崩溃,数据库可以恢复到23点,也可以选择性的恢复到12点。关于恢复的资料,最好自己看书,很多。
    rem     script:hotbak.sql
    rem     creater:chenjiping
    rem     date:4.4.2002
    rem     desc:backup database datafile in archive--connect database
    connect internal/virpure;--archive
    alter system checkpoint;
    alter system archive log all;
    alter system switch logfile;
    --start
    alter tablespace afis_remote begin backup;
    !xcopy e:\orant\database\remote_data1.ora e:\databak/H/R;
    !xcopy e:\orant\database\remote_data2.ora e:\databak/H/R; 
    alter tablespace afis_remote end backup;alter tablespace afis_rmtafis begin backup;
    !xcopy e:\orant\database\rmtafis_data1.ora e:\databak/H/R;
    !xcopy e:\orant\database\rmtafis_data2.ora e:\databak/H/R; 
    alter tablespace afis_rmtafis end backup;alter tablespace afis_lquser begin backup;
    !xcopy e:\orant\database\lquser_data.ora e:\databak/H/R;
    alter tablespace afis_lquser end backup;alter tablespace afis_transf begin backup;
    !xcopy e:\orant\database\transf1_data.ora e:\databak/H/R;
    !xcopy e:\orant\database\transf2_data.ora e:\databak/H/R; 
    alter tablespace afis_transf end backup;alter tablespace system begin backup;
    !xcopy e:\orant\database\sys1afis.ora e:\databak/H/R;
    alter tablespace system end backup;alter tablespace rbs begin backup;
    !xcopy e:\orant\database\rbs1afis.ora e:\databak/H/R;
    alter tablespace rbs end backup;alter tablespace usr begin backup;
    !xcopy e:\orant\database\usr1afis.ora e:\databak/H/R;
    alter tablespace usr end backup;
    alter tablespace temporary begin backup;
    !xcopy e:\orant\database\tmp1afis.ora e:\databak/H/R;
    alter tablespace temporary end backup;
    --end--bak control file
    --bin
    alter database backup controlfile to 'e:\databak\controlbinbak.000';
    --ascii
    alter database backup controlfile to trace;alter system switch logfile;
    alter system switch logfile;
    以下是调用以上脚本的bat,照样可以加到任务计划中,一般热备份每周备份一次就够了,主要看情况不同而定。
    rem     script:hotbak.bat
    rem     creater:chenjiping
    rem     date:4.4.2002
    rem     desc:backup database datafile in archiveecho del old temp backup file
    del  f:\datatmp\*.*/q
    del  e:\datatmp\*.*/q
    echo bak backup file to temp
    move e:\databak\*.* e:\datatmp\
    move f:\Archive\*.* f:\datatmp\
    echo start new bak to e:\databak
    svrmgrl @e:\sql\hotbak.sql
      

  12.   

    http://expert.csdn.net/Expert/topic/1093/1093034.xml?temp=.9784204