代码片断,希望能帮到你.
Dim objSQLServer
Dim objBackup
Set objSQLServer = Server.CreateObject("SQLDMO.SQLServer")
objSQLServer.Connect "servername", "sa", "password"
Set objBackup = Server.CreateObject("SQLDMO.Backup")
objBackup.Database = "dbname"
objBackup.Files= server.MapPath("要备份的路径/db.bak")
objBackup.MediaDescription = "Back of vehicle"