Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Backup & Restore
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01055425
Message ID:
01055515
Vues:
18
Or from the command line
osql -U"USERNAME" -P"PASSWORD" -n -Q "backup database Data001 To Disk ='c:\bck\data001.bak' WITH INIT"
In the previous example where it reads "USERNAME" should be changed by (you guessed) the user name without the quotation marks, the same for goes for "PASSWORD". So if your username is "SA" it should read -USA.

If you want to schedule a backup with the oSQL tool (available with MSDE) you just need to add it as a scheduled task.

HTH,

Enmanuel

>Try with SQL-DMO
>
>Local oServer As SQLDMO.SqlServer
>oServer = Createobject('SQLDMO.SqlServer')
>
>oServer.LoginSecure = .T.
>oServer.Connect()
>
>oBackup = CreateObject('SQLDMO.Backup')
>With oBackup
> .Database = "Northwind"
> .Files = '[C:\kup]'
> .Initialize = .T.
> .BackupSetName = "MiBackup"
> .BackupSetDescription = "Descripción"
> .SQLBackup(oServer)
>Endwith
>
>oServer.DisConnect()
>Release oServer
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform