Saturday, February 25, 2012

Backup of databases within SQL Server 2005 Express

Hi there!

Is there any replacement for the missing SQL Server Agent which could be configured to backup "all databases" and fix minor errors in databases, rebuild indexes, etc.?

Or let's better ask: is there any solution/tool out there to create and execute maintenance plans without the need of SQL Server Agent? (It might be a simple tool that enumerates the DBs and executes some T-SQL statements on them)

Thanks
JochenManagement Studio Express provides UI to do those things, but there is no Agent in SQL Server Express, so the tasks can only be executed once in the UI.

Instead, you could use the UI to create the T-SQL, script it to a file rather than execute it, and then use the Windows scheduler to launch sqlcmd.exe to execute the script every day.|||This goes into the right direction. With that I could create the backups manually. But it is very time consuming to setup this for many SQL servers and many databases. Especially, when a new database will be created, it's important to not forget to create a new task for the additional database.

Is there another, more elegant way or better a tool to do the job?|||I would recommend using the auto-close feature in your connection string. Basically, when all the users disconnect the database file will automatically detach from the sql server, leaving it free to access by regular backup programs. I really like this feature!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sseoverview.asp|||Automating Database maintenance in SQL 2005 Express Edition Part I

Automating Database maintenance in SQL 2005 Express Edition Part II

Part I deals with creating scheduled tasks and using SQLCMD. Part II use SMO.

No comments:

Post a Comment