Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.