Does not compile with 2008 SMO

Dec 18, 2009 at 8:57 PM


Trying to compile the code with SQL Server 2008 SMO installed and I get the following errors:


Error 1 The name 'DatabaseEngineType' does not exist in the current context C:\source\Azure\SQLAzureMW\CreateDatabase.cs 25 SQLAzureMW

Error 1 The name 'DatabaseEngineType' does not exist in the current context C:\source\Azure\SQLAzureMW\CreateDatabase.cs 25 SQLAzureMW

Looking at SMO namespaces on my box I don't see DatabaseEngineType.SqlAzureDatabase.  Is this a special version of the SMO libraries that are required to compile?
BTW, I can't run the binary provided either.  It crashes, but never gives a stack (just disappears); hence why I was trying to compile the code.
I can load and communicate to SQL Server 2008 within my own apps, so I know the SMO libraries are installed and correct.  But maybe this code requires a newer version for Azure?  I also have the Azure tools installed for VS.


Dec 18, 2009 at 11:06 PM


You will need to download SQL Server 2008 R2.  SQL Server 2008 R2 also lets SQL Server Management Studio connect to SQL Azure and browse objects.


Dec 19, 2009 at 2:16 AM

SQL 2008 R2 is not even stable (AFAIK).  I don't want (or need) R2.  I am just trying to get a database to Azure.  I do need to keep my local database matched against what I have in production (SQL Server 2008).  

The SMO objects are changed in R2?  That adds reason 900 from what I can tell why it should have been called SQL Server 2009.  APIs changed, libraries changed, seems like everything except the product version number.  Another fragmentation of their own platform from Microsoft (yes, this is a personal rant of mine).

So everyone who wants to talk to Azure come February is going to need to install SQL Server 2008 R2?  Or is this only a requirement during the beta period?


Dec 19, 2009 at 3:56 AM

SQL Server 2008 R2 seems to work for me.  That said, SQLAzureMW v3.0+ requires SQL Server 2008 R2 because SMO has been modified to work with SQL Azure where SMO does not work with SQL Azure in pre R2.  What I did for you was re-post SQLAzureMW v2.1 which does not require R2 and should work for you.  Download v2.1 from the download page and give it a shot.

As far as talk to SQL Azure come February, if you want to use SQL Server Management Studio to talk to SQL Azure (browse objects in the explorer), then yes, you will need SQL Server 2008 R2.  You can use SQL Server 2008 (pre R2) to manage SQL Azure from the query window if you want.  As far as your program (.NET?) you do not need SQL Server 2008 R2.  All you have to do is change the program's conneciton string to point to your SQL Azure database and you should be good to go.

I hope this helps.