我想实现对SQL Server,Oracle数据库的备份,能够每1个月备份一次,而且采用差异备份的方式,谢谢!

解决方案 »

  1.   

    提供几个方案:(我只知道MS SQLSERVER)
    1.可以采用sql server自带的作业,然后写存储过程来实现.这个由sql自己来实现,但是不灵活,T-SQL有一定的了解.相关代码在sql版中很多.
    2.自己编程可以采用SQL-DMO,来完成.提供了丰富的接口.(功能强大,但过程有点麻烦)
    SQLBackup Method
    The SQLBackup method performs the database backup operation specified by the properties of the Backup object used.Applies ToBackup Object 
    Syntax
    object.SQLBackup( SQLServer )Parts
    objectExpression that evaluates to an object in the Applies To listSQLServerSQLServer object connected to an instance of Microsoft® SQL Server™ 2000 that is the source of the backup operationPrototype (C/C++)
    HRESULT SQLBackup(LPSQLDMOSERVER ServerObject);Res
    To perform a database backup operation using SQL-DMO, the application specifies the operation process by setting Backup object properties, then calls the SQLBackup method. For more information about Backup object properties and their effects on the backup operation process, see Backup Object. C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\Sqldmo\Vb\DMOExplorer
    (这是microsoft自带的示例,如果你装了sql的话,可以看到的)3.用sql的备份语句来完成,方便,简单.
    下例为 MyNwind 数据库创建一个完整的数据库备份和一个差异数据库备份。-- Create a full database backup first.
    BACKUP DATABASE MyNwind 
       TO MyNwind_1 
       WITH INIT
    GO
    -- Time elapses.
    -- Create a differential database backup, appending the backup
    -- to the backup device containing the database backup.
    BACKUP DATABASE MyNwind
       TO MyNwind_1
       WITH DIFFERENTIAL
    GO================================================================================
    更多我的我不想说了
    http://blog.csdn.net/zjcxc/archive/2003/12/29/20074.aspx
    看看老大的bolg吧.你的问题全部搞定