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?


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
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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