How can we help you today? How can we help you today?

SQL Backup Lite - SQL Server 2005 Express

Hi:

As SQL Server 2005 Express does not have SQL Agent included, can the SQL Backup Lite still do scheduled backups?

TIA,
Martin.
MartinH
0

Comments

5 comments

  • petey
    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
    0
  • MartinH
    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.
    MartinH
    0
  • Brian Donahue
    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, ie
    EXEC 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.
    Brian Donahue
    0
  • petey
    This might be of interest:

    SQLScheduler - http://www.lazycoding.com/products.aspx
    petey
    0
  • MartinH
    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.
    MartinH
    0

Add comment

Please sign in to leave a comment.