|
Seeder question: I have been asked by one of my clients to make my client application SQL Azure compatible. While I have tested and there are only a few tweaks to make, I now need to make sure that my client application can reliably determine when it is connected to SQL Azure. How might I do that?
(comments are locked)
|
|
You could try
Not sure what that returns on SQL Azure but you might be able to differentate using it. James I'm going to accept this one, although what I'd have really like to have seen is something like SELECT CASE WHEN CHARINDEX('Azure', @@VERSION) > 0 THEN 1 ELSE 0 END as IsAzure
Oct 28 '09 at 10:10 AM
Matt Whitfield ♦♦
(comments are locked)
|
|
SQL Azure has a few extra things in it, like a system view called sys.bandwidth_usage. Therefore, you could test for its existence. This will give you 0 if there is no such view, and 1 if there is: Can you think of a way that would work on any SQL Server Version? My theoretical app needs to connect to any SQL Server version including 2000...
Oct 26 '09 at 06:24 AM
Matt Whitfield ♦♦
Well, otherwise you can check the server properties. I just don't know if there's one that indicates it's Azure.
Oct 26 '09 at 07:07 AM
Rob Farley
(comments are locked)
|

