1

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?

1 Answer 1

5

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
1
  • 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! Commented Mar 22, 2013 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.