Comments
5 comments
-
Yes. You could set up a scheduled task using Windows (Accessories > System Tools > Scheduled Tasks).
If you want to use the extended stored procedure, you would need to write an app, or use Active Scripting, to connect to the server and run the extended stored procedure.
If using the command line interface, enter the path and file name of the command line executable (sqlbackupc.exe) together with the required parameters. You can use the command line interface only for local servers. -
Petey:petey wrote:Yes. You could set up a scheduled task using Windows (Accessories > System Tools > Scheduled Tasks).
If you want to use the extended stored procedure, you would need to write an app, or use Active Scripting, to connect to the server and run the extended stored procedure.
If using the command line interface, enter the path and file name of the command line executable (sqlbackupc.exe) together with the required parameters. You can use the command line interface only for local servers.
Where can I find information about writing my own app to access the extended stored procedure? I am a proficient C# programmer so this shouldn't be too dificult, it's the calling the XSP I'm not sure of.
Also the command line is an option I hadn't thought of. These are stand alone machines so the local server is not a problem.
Thanks,
Martin. -
Hi Martin,
You're probably going to want to look into the System.Data.SqlClient namespace of .NET.
Make a SqlConnection object that connects to the server, and then a SqlCommand object that runs the query, ieEXEC master..sqlbackup '-SQL "backup database [Northwind] TO DISK=''c:\nw.sqb'' WITH COMPRESSION=1, INIT"'
Definitely look into the microsoft documentation about parameterized queries, as this makes the execution of stored procedures in ADO .NET a lot easier and safer. -
-
Thanks to both Brian and petey.
With these replies I can get up and running, so I'm off to the Red-gate store!!
Regards,
Martin.
Add comment
Please sign in to leave a comment.
As SQL Server 2005 Express does not have SQL Agent included, can the SQL Backup Lite still do scheduled backups?
TIA,
Martin.