Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a backup job (SQL Server Agent job) which will iterate through all of our SQL Server databases in SSMS, invoke the BACKUP DATABASE command to create a .bak file on a different server. This other server has its own job iterating through all of the .baks and restoring them (with the RESTORE DATABASE command).

EDIT: The server running the RESTORE job restores the .baks into its own installation of SSMS

The jobs report success in the SQL Agent job history so I'm wondering whether or not these jobs should also backup and restore the Views in the databases (as they haven't seemed to) or if this is an indication that the scripts aren't quite working?

share|improve this question
up vote 4 down vote accepted

The backup command backs up views, stored procedures, user-defined functions and so on.To test:

  • Create a database
  • Create a table
  • Insert something in it
  • Create a view on this table
  • Restore the database with another name; or
  • Drop the database and restore the previous .bak
share|improve this answer
Many thanks. After a bit of investigation, turns out the sql agent service had been stopped on the server running the Backup command - something I completely overlooked. D'oh! – cprlkleg Mar 22 '13 at 10:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.