SQL Backup Lite - SQL Server 2005 Express

MartinHMartinH Posts: 82 Bronze 2
edited October 11, 2006 2:45AM in SQL Backup Previous Versions
Hi:

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

TIA,
Martin.

Comments

  • peteypetey Posts: 2,358 New member
    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.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • MartinHMartinH Posts: 82 Bronze 2
    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.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • peteypetey Posts: 2,358 New member
    This might be of interest:

    SQLScheduler - http://www.lazycoding.com/products.aspx
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • MartinHMartinH Posts: 82 Bronze 2
    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.
Sign In or Register to comment.