<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Azure Support &#187; Migrating</title>
	<atom:link href="http://www.azuresupport.com/tag/migrating/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.azuresupport.com</link>
	<description>Windows Azure Tutorial</description>
	<lastBuildDate>Mon, 25 Apr 2011 10:32:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Migrating A SQL Server Database To SQL Azure</title>
		<link>http://www.sqlazureperformance.com/2010/migrating-sql-server-database-to-sql-azure/</link>
		<comments>http://www.sqlazureperformance.com/2010/migrating-sql-server-database-to-sql-azure/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 04:40:24 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[SQL Azure]]></category>
		<category><![CDATA[Migrating]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=628</guid>
		<description><![CDATA[SQL Azure is essentially a cut down version of SQL Server and so we would expect that migrating from SQL Server to SQL Azure should be a straightforward task. However, in the first release of SQL Azure, the scripts generated by SQL Server Management Studio will require some extra cleanup since not all the SQL [...]]]></description>
			<content:encoded><![CDATA[<p>SQL Azure is essentially a cut down version of SQL Server and so we would expect that migrating from SQL Server to SQL Azure should be a straightforward task. However, in the first release of SQL Azure, the  scripts generated by SQL Server Management Studio will require some extra cleanup since not all the SQL Server 2008 features are supported in SQL Azure.</p>
<p>For this demo we will use SQL Server Management Studio (SSMS) to generate the SQL scripts and<br />
migrate an existing database from SQL Server 2008 to  SQL Azure. It should be noted that there are several tools such as the SQL Migration Wizard for assisting in the migration, but in this article we will look at performing a manual migration.</p>
<p>Since SQL Azure is built from SQL Server 2008, the database should first be migrated to SQL Serer 2008 if necessary (note &#8211; it is not necessary to update to 2008 R2).</p>
<ol>
<li>Open SQL Server Management Studio (SSMS), right-click on the database node of the database to be migrated (AdventureWorks for this demo) and select Tasks &gt; Generate Scripts , then select the database to be migrated and click Next:<br />
<img class="alignnone size-full wp-image-630" title="img1" src="http://64.207.144.116/wp-content/uploads/2010/03/ScreenHunter_01-Mar.-05-11.11.gif" alt="" width="510" height="484" /></li>
<li>In the <strong>Choose Script Options </strong>page, we need to configure the script to comply with the restrictions of SQL Azure, so make the following changes:
<ul>
<li><strong>Convert UDDTs to Base Type</strong>: Set this  to true as SQL Azure does not support user-defined types. UDDT&#8217;s need to be converted into SQL Azure portable types.</li>
<li><strong>Script extended properties</strong>: Set to false as SQL Azure does not support extended properties.</li>
<li><strong>Script USE DATABASE</strong>: Set to false as SQL Azure does not support the USE statement.</li>
<li> <strong>Script Data</strong>: Set to false since we are not migrating the data right now.</li>
</ul>
</li>
<li>In the Choose Object Types page &#8211; select all the objects except User Defined Data Types and click Next:<br />
<img class="alignnone size-full wp-image-632" title="img2" src="http://64.207.144.116/wp-content/uploads/2010/03/ScreenHunter_03-Mar.-05-11.271.gif" alt="" width="510" height="459" /></li>
<li>In a succession of screens you will be prompted to select the Stored Procedures, Views, Tables etc to be migrated (depending on which objects are in your database). Click <strong>Select All </strong>then <strong>Next </strong>for each.</li>
<li>Finally at the Output Option page select where the script should be generated (in this example I have elected to have the script generated in a new query window):<br />
<img class="alignnone size-full wp-image-634" title="img" src="http://64.207.144.116/wp-content/uploads/2010/03/ScreenHunter_04-Mar.-05-11.391.gif" alt="" width="503" height="480" /></li>
<li>Click <strong>Next</strong> and SSMS will direct you to the Summary page before generating the scripts in a new SQL script window. The Generate Script Success screen shows the progress and results of the migration on the database objects (see below). Copy the script generated to the clipboard.<br />
<img class="alignnone size-full wp-image-636" title="img4" src="http://64.207.144.116/wp-content/uploads/2010/03/ScreenHunter_05-Mar.-05-11.431.gif" alt="" width="502" height="449" /></li>
<li>Log in to the Azure platform portal at https://sql.azure.com/ and create a target database on the online portal (simply click <strong>Create Database </strong>after navigating to the the SQL Azure tab and then select the database size).</li>
<li>Close and re-open SSMS to connect to SQL Azure and view your database (see <a href="http://www.azuresupport.com/2009/01/connect-to-a-sql-azure-database-using-ssms-or-sqlcmd/">Connect to SQL Azure from SSMS</a> for details if neceesary) . Note &#8211; SSMS in SQL Server 2008 R2 can view the SQL Azure objects and should be used whenever connecting to SQL Azure.</li>
<li>Copy the script into a new script window in SSMS. Before we run the script against the target SQL Azure database we still need to make some modifications to the script:
<ul>
<li>SQL Azure&#8217;s first release does not support partitions. Therefore the KEY constraint statement for the table-creation scripts has to be removed and replaced by a separate script. For example, in the original script SSMS generated for creating a data table there are KEYconstraints such asPRIMARY KEY CLUSTERED<br />
(<br />
[TerritoryID] ASC<br />
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]<br />
) ON [PRIMARY]</p>
<p>This needs to be replaced with a separate ALTER TABLE Script to Assign a Key to a Table, such as:</p>
<p>ALTER TABLE [Table_Name]<br />
ADD CONSTRAINT ID_PK PRIMARY KEY (Primary_Key)</li>
<li>If there are any CREATE NONCLUSTERED INDEX statements in the script, these will need to be modified. For example remove the bold type text from the below script section:CREATE NONCLUSTERED INDEX [IX_UserTable_FirstName] ON [dbo].[UserTable]<br />
(<br />
[FirstName] ASC<br />
)<strong>WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF,ONLINE = OFF) ON [PRIMARY]</strong><br />
GO</li>
</ul>
</li>
</ol>
<p>That&#8217;s it, now run the script against the SQL Azure database (ie click <strong>New Query </strong>in SSMS, select the target SQL Azure database from the dropdown database listing  and click <strong>Execute</strong>).</p>
<p>It should be noted that this is as of SQL Azure Update 1 (February 2010) , SQL Azure is currently developing rapidly and not all the inconsistencies with SQL Server are well documented.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlazureperformance.com/2010/migrating-sql-server-database-to-sql-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating an ASP.NET site to an Azure Web Role</title>
		<link>http://www.azuresupport.com/2010/02/migrating-an-asp-net-site-to-an-azure-web-role/</link>
		<comments>http://www.azuresupport.com/2010/02/migrating-an-asp-net-site-to-an-azure-web-role/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 08:16:34 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Migrating]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=612</guid>
		<description><![CDATA[Migrating existing ASP.NET sites to Azure is a process that right now must be performed manually (no sign yet of a migration tool).  The Azure Web Role is very similar to an ASP.NET web project but has some significant differences which unfortunately mean that a straight copy of the project won&#8217;t do the trick. It [...]]]></description>
			<content:encoded><![CDATA[<p>Migrating existing ASP.NET sites to Azure is a process that right now must be performed manually (no sign yet of a migration tool).  The Azure Web Role is very similar to an <a href="http://www.aspnet101.com">ASP.NET</a> web project but has some significant differences which unfortunately mean that a straight copy of the project won&#8217;t do the trick.</p>
<p>It is possible to add as Cloud Service project to a solution with an ASP.NET web site but the simplest solution is to create a solution with a Cloud Service and a Web Role and copy the files over, and so I will follow this procedure for this walk-through:</p>
<ol>
<li>Create a Cloud Service and a Web Role in Visual Studio. Please refer to this this <a href="http://www.azuresupport.com/2010/01/azure-tutorial-building-a-hello-azure-app-in-visual-studio/">tutorial</a> for details on doing this. So your solution should look like below:<br />
 <img class="alignnone size-full wp-image-615" title="img2" src="http://64.207.144.116/wp-content/uploads/2010/02/ScreenHunter_01-Feb.-23-15.34.gif" alt="" width="226" height="308" /></li>
<li>Open the folder of the ASP.NET website to be migrated in the File Explorer and drag the files across to the Web Role (you can just open the standard  Windows File Explorer and place it next to Visual Studio). Do not copy the bin folder and the web.config file.</li>
<li>Manually add the references of the ASP.NET website to the Web Role (Right-click the Web Role in the Solution Explorer and select Add Reference&#8230;). </li>
<li>All the .aspx pages in an Azure Web Role have an associated designer.cs or designer.vb page in addition to the code behind page. To manually generate to these files, select the .aspx pages, right-click and select Convert to Web Application.<br />
 <img class="alignnone size-full wp-image-616" title="mig3" src="http://64.207.144.116/wp-content/uploads/2010/02/ScreenHunter_02-Feb.-23-15.38.gif" alt="" width="379" height="265" /></li>
<li>In an ASP.NET web application files in the App_Code folder usually have their build action set to Content. In an Azure Web Role these files need to be set to Compile. To do this, select the files in the App_Code folder, right-click and select Properties. In the Properties window set the Build Action to Compile.</li>
<li>Copy the configuration elements from the web.config  in your ASP.NET site to the web.config in the Azure Web Role. This can be quite tedious but the quick fixes to this often create compilation errors or overwrite some key features of Azure (such as Diagnostics).</li>
</ol>
<p>That&#8217;s it, now we can proceed to <a href="http://www.azuresupport.com/2010/03/migrating-a-sql-server-database-to-sql-azure/">migrate a SQL Server database to SQL Azure</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.azuresupport.com/2010/02/migrating-an-asp-net-site-to-an-azure-web-role/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

