Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SMO backup from another server
Message
De
16/06/2016 00:57:58
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
SMO backup from another server
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01637407
Message ID:
01637407
Vues:
60
I used to have this code to backup, using SMO, a database:
Dim loBackup As Microsoft.SqlServer.Management.Smo.Backup = New Microsoft.SqlServer.Management.Smo.Backup

loBackup.Devices.AddDevice(cPath + "\" + cDatabase + ".bak", Microsoft.SqlServer.Management.Smo.DeviceType.File)
loBackup.Database = cDatabase
loBackup.Action = Microsoft.SqlServer.Management.Smo.BackupActionType.Database
loBackup.Initialize = True
loBackup.PercentCompleteNotification = 1

' If we use the compression
If lCompression Then
   loBackup.CompressionOption = Microsoft.SqlServer.Management.Smo.BackupCompressionOptions.On
End If

' If we create a new archive
If lInit Then
   loBackup.Initialize = True
End If

AddHandler loBackup.PercentComplete, AddressOf ProgressEventHandler

loBackup.SqlBackup(loServer)
So far, this code was running from the server itself.

Now, I am running this code from an application server, which is not the same as the database server.

I have not been able to find how to adjust those properties to add support for the database server identification.

Is this something that would be possible?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform