Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

CHAPTER 7: Database Backups and Recovery > Producing SQL Script for the Databas... - Pg. 280

CHAPTER 7 DATABASE BACKUPS AND RECOVERY Producing SQL Script for the Database This section demonstrates a different method of backing up the structure of the database and the tables and indexes contained within it by using T-SQL commands to complete this. Note Only the structure will be generated as T-SQL commands; no data will be backed up--only the schema that is needed to re-create the actual database can be scripted here. The usefulness of this procedure is limited and is really helpful only for keeping structure backups or producing an empty database, but it is useful to know rather than going through the process of copying the database with all the data when the data are not required. This method tends to be used to keep the structure within a source repository such as Visual SourceSafe. It is also useful for setting up empty databases when moving from development to testing or into production. TRY IT OUT: PRODUCING THE DATABASE SQL 1. Ensure that SQL Server Management Studio is running and that you have expanded the server so that you can see the ApressFinancial database. Right-