Reputation: 1001
Is there a simple way to code in c# to get the list of Sql Azure databases in a Windows Azure server?
Thanks Martin
Upvotes: 0
Views: 3881
Reputation: 2116
To list databases on a server, you can query the sys.databases table in the master database. You can use any data access framework you like to query this table, such as Entity Framework (http://msdn.microsoft.com/en-us/library/bb399572.aspx).
You can also list all servers under your subscription using the Management API (http://msdn.microsoft.com/en-us/library/windowsazure/gg715269).
Upvotes: 2