Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

812


Part V: Enterprise Data Management


This example really doesn’t need the extended properties, so those can be excluded. Same
thing with the logins; those aren’t needed. The use statement is not supported in SQL
Database, thus the Script USE DATABASE property needs to be set to False. For this exam-
ple, the data is also needed so you will want to script both the schema and the data. Lastly,
the table indexes are also needed. Script those as well because, as you will learn later,
tables without Primary Keys are not supported in SQL Database.

You can also set the Script DROP and CREATE option to Script DROP and CREATE (refer
to Figure 31-5), but that option isn’t required for SQL Database. Click OK in the Advanced
Scripting Options dialog, and then click Next in the Generate Scripts Wizard.

Saving and Publishing
Complete the wizard with these steps:


  1. On the wizard’s Summary page, review your selections that you made in the previ-
    ous wizard steps, and then click Next. The T-SQL script is generated, and you’re
    taken to the Save or Publish Scripts page (see Figure 31-6).


FIGURE 31-6
Save or Publish Scripts.

c31.indd 812c31.indd 812 7/31/2012 10:00:26 AM7/31/2012 10:00:26 AM


http://www.it-ebooks.info
Free download pdf