Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Backup & Restore
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01055425
Message ID:
01055515
Views:
12
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
Previous
Reply
Map
View

Click here to load this message in the networking platform