Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get path to backup directory of SQL Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00859024
Message ID:
00859105
Vues:
16
Thank you, Zoran. You have been very helpful.

Alex

>Alex,
>
>Maybe this will help:
>
>
>local loserver, lnCounter, loBackupDevice
>
>loserver=CREATEOBJECT("SQLDMO.SqlServer")
>
>loServer.Connect("MyServer","MyUserName","MyPassword")
>
>   IF loServer.BackupDevices.Count = 0
>       * Create new backup device
>       loBackupDevice = CREATEOBJECT("SQLDMO.BackupDevice")
>       WITH loBackupDevice
>           .Name = "MyNewBackupDevice"
>           .PhysicalLocation = "C:\MyBackups\BackupFile.bak"
>           .Type = 2 && SQLDMODevice_DiskDump
>       ENDWITH
>       loServer.BackupDevices.Add(loBackupDevice)
>   ELSE
>       * loop through collection of existing backup devices
>       FOR lnCounter = 1 TO loServer.BackupDevices.Count
>   	    ? loServer.BackupDevices(lnCounter).PhysicalLocation
>       NEXT lnCounter
>   ENDIF
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform