listing databases on Azure 
Hi All,
I'm having trouble getting list of databases from an Azure DB (just this one).
The connection details (server/username/password) are 100% correct.
When I click the dropdown for list of databases, it waits for like 10s and nothing comes up.
I wonder how I can debug this issue?
I tried a console app and was able to get list of database names
The only different I can see is if I do below from Immediate Window in VS, it gives me below.
I'm having trouble getting list of databases from an Azure DB (just this one).
The connection details (server/username/password) are 100% correct.
When I click the dropdown for list of databases, it waits for like 10s and nothing comes up.
I wonder how I can debug this issue?
I tried a console app and was able to get list of database names
- Code: Select all
Dim server1 As New Microsoft.SqlServer.Management.Smo.Server(New ServerConnection("oneThatWorks.database.windows.net", "adminuser", "password"))
Dim server As New Microsoft.SqlServer.Management.Smo.Server(New ServerConnection("oneThatDoesntWork.database.windows.net", "adminuser", "password"))
Dim dblist As New List(Of String)
For Each db As Microsoft.SqlServer.Management.Smo.Database In server.Databases
dblist.Add(db.Name)
Next
The only different I can see is if I do below from Immediate Window in VS, it gives me below.
- Code: Select all
? server.databases.Count
testApp.exe Information: 0 : 2021-05-06T13:00:23.0613533+10:00 - get data for urn: Server[@Name='xxxx']/Database
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.Data.SqlClient.SqlException' in Microsoft.Data.SqlClient.dll
Exception thrown: 'Microsoft.SqlServer.Management.Common.ConnectionFailureException' in Microsoft.SqlServer.ConnectionInfo.dll
3