I am trying to use the aspnet___regsql utility to install all the membership tables in a database on my local SQL Express 2008 instance. I can connect without problems in Management Studio, but when I try to list the databases in the aspnet_regsql interface i get an error message saying:
Failed to query a list of database names from the SQL Server. Invalid object name 'sysdatabases'
What am I doing wrong? How do I fix this?
(Please tell me there's a smoother way than reinstalling the thing... :P)
I have solved the problem by bypassing the graphic interface and performing the same action directly in the command prompt, with flags specifying all options. They should look like this:
Connect using SQL Authentication
C:\>Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe -S myHostingServer -A all -d myDatabase -U myUserID -P myPassword
Connect using Windows Authentication
C:\>Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe -S myHostingServer -A all -d myDatabase -E
The difference is at the end of the lines, where SQL Auth. has -U myUsername -P myPassword
while Windows Auth. has -E
(which flags for Trusted Connection).
If you want to use the graphical interface, you need to make sure the user you are logged in as has the default db in SQL set to 'master' so it can connect directly to the sysdatabases table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With