<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Michel's blog - Azure</title>
    <link>http://blog.baladisoftware.net/</link>
    <description>baladisoftware.net</description>
    <language>en-us</language>
    <copyright>Michel Baladi</copyright>
    <lastBuildDate>Wed, 02 Sep 2009 19:16:17 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>michel@baladisoftware.net</managingEditor>
    <webMaster>michel@baladisoftware.net</webMaster>
    <item>
      <trackback:ping>http://blog.baladisoftware.net/Trackback.aspx?guid=9bd3efea-1289-45a7-9c53-aff4f0e85ed5</trackback:ping>
      <pingback:server>http://blog.baladisoftware.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.baladisoftware.net/PermaLink,guid,9bd3efea-1289-45a7-9c53-aff4f0e85ed5.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://blog.baladisoftware.net/CommentView,guid,9bd3efea-1289-45a7-9c53-aff4f0e85ed5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.baladisoftware.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9bd3efea-1289-45a7-9c53-aff4f0e85ed5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When generating a script from an on-premise source database to be executed against
a SQL Azure in the cloud, there are numerous issues that have to be changed either
in the source database or in the generated script. Most of these issues are mentioned
in the <a href="http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/2e72f8a8-7e25-4149-98e6-2fd6c1506159/">discussions
group</a></p>
        <p>
          <a href="http://www.version2.dk/artikel/11841-sql-som-service">René</a> had the kindness
to point me to a tool on CodePlex called the <a href="http://sqlazuremw.codeplex.com/">“SQL
Azure Migration Wizard”</a>. It’s very early alpha, but when commercial tools like <a href="http://www.red-gate.com/messageboard/viewtopic.php?t=9463">RedGate
SQL Compare not supporting SQL Azure</a> (yet?), this migration wizard is a decent
second best. You can find the tool here: http://sqlazuremw.codeplex.com/
</p>
        <p>
[Updated 18-02-2010] RedGate has released a private build of SQL Compare that I'm
currently testing out. Wanna get you hands on the bits? Apply for it <a href="http://www.red-gate.com/Azure">here</a>. 
</p>
        <p>
I tried to move a small database (50 tables, 400 stored procedures and some ASP.NET
membership tables/sprocs/views). My own database migrated very smoothely over to SQL
Azure, with the exception of non-us collations.
</p>
        <p>
In my create table scripts I have command like this “…nvarchar(x) NOT NULL COLLATE
Danish_Norwegian_CI_AS”. When SQL Azure is officially released, it’s expected to support
non-us collations, but not at the column level. For now trying to set non-us collations
will result in the following error when using string functions in stored procedures:
“Cannot resolve collation conflict between 'Latin1_General_CS_AS' and ' Danish_Norwegian_CI_AS
' in equal to operation”. For now, until SQL Azure is released, I solved this by adding
the following to the TableStatement element in the “NotSupportedByAzureFile.Config”
file: NotSupported Text="\sCOLLATE Danish_Norwegian_CI_AS\s" ReplaceWith=" " SeverityLevel="0"
ReplaceString="true" DisplayWarning="true" WarningMessage="Removed COLLATE Danish_Norwegian_CI_AS
to use database default collation"<br />
This text replacement is executed on the generated script before the script is executed
against SQL Azure. 
</p>
Here are some other issues I ran into:<br />
• Tables worked fine to a new empty database, but to an existing database I got several
errors because a column default allready existed.<br />
• Table hints with the WITH keyword is no longer supported. In the ASP.NET membership
stored procedures there a statemets like this: “…FROM dbo.aspnet_Users u(NOLOCK)”
and this must be changed to “…FROM dbo.aspnet_Users u WITH (NOLOCK)”. Sometimes the
source database has the WITH keyword and sometimes its missing, the table alias varies
and there’s 15 or so different table hints to look for. Since I’m not the sharpest
RegEx head, I fixed this in the source database instead of trying to invent a fancy
regex to fix the generated script.<br />
• Data types ‘image’ and ‘ntext’ was replaced for tables, but not for stored procedures
and since there’s no specific config section for stored procedures, I use generic
TSQL section the following to the TSQL section in the “NotSupportedByAzureFile.Config”
file:<br />
NotSupported Text="\sntext" ReplaceWith=" nvarchar(max)" SeverityLevel="0" ReplaceString="true"
DisplayWarning="true" WarningMessage="Replaced column type [ntext] with [nvarchar](max)"<br />
NotSupported Text="\simage" ReplaceWith=" varbinary(max)" SeverityLevel="0" ReplaceString="true"
DisplayWarning="true" WarningMessage="Replaced column type [image] with [varbinary](max)"<br /><img width="0" height="0" src="http://blog.baladisoftware.net/aggbug.ashx?id=9bd3efea-1289-45a7-9c53-aff4f0e85ed5" /></body>
      <title>SQL Azure Migration Wizard  - first impression</title>
      <guid isPermaLink="false">http://blog.baladisoftware.net/PermaLink,guid,9bd3efea-1289-45a7-9c53-aff4f0e85ed5.aspx</guid>
      <link>http://blog.baladisoftware.net/PermaLink,guid,9bd3efea-1289-45a7-9c53-aff4f0e85ed5.aspx</link>
      <pubDate>Wed, 02 Sep 2009 19:16:17 GMT</pubDate>
      <description>&lt;p&gt;
When generating a script from an on-premise source database to be executed against
a SQL Azure in the cloud, there are numerous issues that have to be changed either
in the source database or in the generated script. Most of these issues are mentioned
in the &lt;a href='http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/2e72f8a8-7e25-4149-98e6-2fd6c1506159/'&gt;discussions
group&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href='http://www.version2.dk/artikel/11841-sql-som-service'&gt;René&lt;/a&gt; had the kindness
to point me to a tool on CodePlex called the &lt;a href='http://sqlazuremw.codeplex.com/'&gt;“SQL
Azure Migration Wizard”&lt;/a&gt;. It’s very early alpha, but when commercial tools like &lt;a href='http://www.red-gate.com/messageboard/viewtopic.php?t=9463'&gt;RedGate
SQL Compare not supporting SQL Azure&lt;/a&gt; (yet?), this migration wizard is a decent
second best. You can find the tool here: http://sqlazuremw.codeplex.com/
&lt;/p&gt;
&lt;p&gt;
[Updated 18-02-2010] RedGate has released a private build of SQL Compare that I'm
currently testing out. Wanna get you hands on the bits? Apply for it &lt;a href='http://www.red-gate.com/Azure'&gt;here&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
I tried to move a small database (50 tables, 400 stored procedures and some ASP.NET
membership tables/sprocs/views). My own database migrated very smoothely over to SQL
Azure, with the exception of non-us collations.
&lt;/p&gt;
&lt;p&gt;
In my create table scripts I have command like this “…nvarchar(x) NOT NULL COLLATE
Danish_Norwegian_CI_AS”. When SQL Azure is officially released, it’s expected to support
non-us collations, but not at the column level. For now trying to set non-us collations
will result in the following error when using string functions in stored procedures:
“Cannot resolve collation conflict between 'Latin1_General_CS_AS' and ' Danish_Norwegian_CI_AS
' in equal to operation”. For now, until SQL Azure is released, I solved this by adding
the following to the TableStatement element in the “NotSupportedByAzureFile.Config”
file: NotSupported Text="\sCOLLATE Danish_Norwegian_CI_AS\s" ReplaceWith=" " SeverityLevel="0"
ReplaceString="true" DisplayWarning="true" WarningMessage="Removed COLLATE Danish_Norwegian_CI_AS
to use database default collation"&lt;br /&gt;
This text replacement is executed on the generated script before the script is executed
against SQL Azure. 
&lt;/p&gt;
Here are some other issues I ran into:&lt;br /&gt;
• Tables worked fine to a new empty database, but to an existing database I got several
errors because a column default allready existed.&lt;br /&gt;
• Table hints with the WITH keyword is no longer supported. In the ASP.NET membership
stored procedures there a statemets like this: “…FROM dbo.aspnet_Users u(NOLOCK)”
and this must be changed to “…FROM dbo.aspnet_Users u WITH (NOLOCK)”. Sometimes the
source database has the WITH keyword and sometimes its missing, the table alias varies
and there’s 15 or so different table hints to look for. Since I’m not the sharpest
RegEx head, I fixed this in the source database instead of trying to invent a fancy
regex to fix the generated script.&lt;br /&gt;
• Data types ‘image’ and ‘ntext’ was replaced for tables, but not for stored procedures
and since there’s no specific config section for stored procedures, I use generic
TSQL section the following to the TSQL section in the “NotSupportedByAzureFile.Config”
file:&lt;br /&gt;
NotSupported Text="\sntext" ReplaceWith=" nvarchar(max)" SeverityLevel="0" ReplaceString="true"
DisplayWarning="true" WarningMessage="Replaced column type [ntext] with [nvarchar](max)"&lt;br /&gt;
NotSupported Text="\simage" ReplaceWith=" varbinary(max)" SeverityLevel="0" ReplaceString="true"
DisplayWarning="true" WarningMessage="Replaced column type [image] with [varbinary](max)"&lt;br /&gt;
&lt;img width="0" height="0" src="http://blog.baladisoftware.net/aggbug.ashx?id=9bd3efea-1289-45a7-9c53-aff4f0e85ed5" /&gt;</description>
      <comments>http://blog.baladisoftware.net/CommentView,guid,9bd3efea-1289-45a7-9c53-aff4f0e85ed5.aspx</comments>
      <category>Azure;S+S;SaaS</category>
    </item>
    <item>
      <trackback:ping>http://blog.baladisoftware.net/Trackback.aspx?guid=504f2fb2-5d84-48fd-ba84-8fd8197d7fa4</trackback:ping>
      <pingback:server>http://blog.baladisoftware.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.baladisoftware.net/PermaLink,guid,504f2fb2-5d84-48fd-ba84-8fd8197d7fa4.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://blog.baladisoftware.net/CommentView,guid,504f2fb2-5d84-48fd-ba84-8fd8197d7fa4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.baladisoftware.net/SyndicationService.asmx/GetEntryCommentsRss?guid=504f2fb2-5d84-48fd-ba84-8fd8197d7fa4</wfw:commentRss>
      <title>Moving to  SQL Azure</title>
      <guid isPermaLink="false">http://blog.baladisoftware.net/PermaLink,guid,504f2fb2-5d84-48fd-ba84-8fd8197d7fa4.aspx</guid>
      <link>http://blog.baladisoftware.net/PermaLink,guid,504f2fb2-5d84-48fd-ba84-8fd8197d7fa4.aspx</link>
      <pubDate>Sun, 30 Aug 2009 14:31:16 GMT</pubDate>
      <description>&lt;p&gt;
&lt;b&gt;Moving to SQL Azure&lt;/b&gt; Last week I finally got the long awaited invitation for
the SQL Azure CTP. That is a real SQL server (with tables and stored procedures as
we know them) in the cloud. The featureset is limited, but This is a real SQL sever
and not the SDS ACE model, with SOAP and REST interfaces, that was announced as last
PDC and that is now being phased out. See SQL Data Services RDBMS Model for details.
With pricing starting at $9.99, no initial HW/data center cost and an option to get
“auto high availability” it can be a very attractive offering for some scenarios. 
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Code near vs. code far&lt;/b&gt; There are two models that you can work with – “code
near” og ”code far”. In the former model, you have you application an the database
in the same datacenter in the cloud, i.e. both IIS and SQL as Azure services from
MS. Without a relational SQL Azure and ”code near” i think it would be hard to move
most existing applications to Azure. With ”code far” you can run you application”on
premise” and use SQL Azure in the cloud. That’s very easy (just update the connection
string) and very slow (since its usually quite some latency between the on premise
application and the cloud based database). “Code far” makes a lot of sense for”remote
tools” (SQLCMD, Management studio on your PC working against a SQL instance in the
cloud). However I’m still to be convinced that running an on premise application against
a clod based database is a good idea. 
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Tools and scripts&lt;/b&gt; &lt;a href='http://www.red-gate.com/messageboard/viewtopic.php?t=9463#top'&gt;RedGate’s
otherwise so brilliant tools doesn’t work yet&lt;/a&gt; and only a very limited set of functions
from SQL Management Studio works, so best bet is probably SQLCMD. 
&lt;/p&gt;
&lt;p&gt;
[Updated 28-01-2010] RedGate has released a private build of SQL Compare that I'm
currently testing out. Wanna get you hands on the bits? Apply for it &lt;a href='http://www.red-gate.com/Azure'&gt;here&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Since the feature set in SQL Azure is limited there are many things that can’t be
used (ROWGUID, Spatial data, index padding, ANSI NULL, ntext og image data type etc.).
This means that a SQL script genererated from Management Studio needs to be &lt;a href='http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/2e72f8a8-7e25-4149-98e6-2fd6c1506159/'&gt;&lt;&gt;“cleaned”
from non-supported SQL. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.baladisoftware.net/aggbug.ashx?id=504f2fb2-5d84-48fd-ba84-8fd8197d7fa4" /&gt;</description>
      <comments>http://blog.baladisoftware.net/CommentView,guid,504f2fb2-5d84-48fd-ba84-8fd8197d7fa4.aspx</comments>
      <category>Azure;S+S;SaaS</category>
    </item>
  </channel>
</rss>