http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=6576

解决方案 »

  1.   

    热备份脚本
    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
      

  2.   

    建议你去看看ORACLE备份的原理