Databases Reference
In-Depth Information
The database that these samples use is a database called AWMini, which is a mini version of the AdventureWorks
database. This database can be downloaded from the Apress download page for this topic. This database is installed
Azure-ready so that you can walk though these examples.
Download the AWMini.zip file from the APress site for this topic and extract the .sql file. Open the .sql file in
SQL Server Management Studio (for SQL Server 2012) and connect to your local SQL instance. Run the .sql file,
which will create the AWMini database. Once the script has completed, refresh your database list and you'll see the
new AWMini database in your list of databases.
Deploying Directly To SQL Azure
SQL Server 2012 has made it extremely easy to migrate an on-premises database to SQL Azure. Prior to SQL Server
2012, the options for migration required many steps, were somewhat painful, and didn't really fit the DAC picture,
simply because DACPACs didn't migrate data. This all changed with SQL Server 2012 and DAC Fx 2.0. Deploying
directly to SQL Azure is as simple as a three-step wizard.
If it's not already open, open SQL Server Management Studio for SQL Server 2012. In Object Explorer, expand the
Databases node for your server and right-click the AWMini database. From the context menu, select Tasks Deploy
Database to SQL Azure, which will start the database deployment wizard (see Figure 4-1 ).
Figure 4-1. The Deploy Database to SQL Azure menu option
In the Deploy Database wizard, click Next on the Introduction page. On the Deployment Settings page of the
wizard, you need to specify the connection information for the target SQL Azure server to which the database will be
migrated. Click the Connect button, which will bring up the familiar Connect to Server dialog. Enter the SQL Azure
server name (in the format server .windows.database.net), along with the username and password for the SQL Azure
server, and then click Connect.
Next, enter a name for the database (see Figure 4-2 ). As the wizard states, this is a NEW database, not the name
of an existing one. Based on the size of your on-premises database, select the Edition needed (Web or Business) and
then the size of the database needed. The wizard will automatically fill in the Temporary file name for you, so there is
no reason to change that. However, notice that the wizard is creating a BACPAC, not a DACPAC. This means that your
data will be migrated as well.
 
Search WWH ::




Custom Search