I have a weird problem with SSDT(Visual Studio 2017 server explorer) when I try to view the tables in my Database
In SSMS (SQL Server Management Studio 2017) I created a database with a new user called admin
. This user has public
and sysadmin
permissions and can execute CRUD queries and see the tables in the Object Explorer.
So everything is working fine... However, when I try to connect to the database from VS2017 with SSDT I succeed to connect to the server, but I cant view the tables inside the Server Explorer
and it throws me the "Login Failed for user..."
error. However when I try the same with the SQL Server Object Explorer
it works fine:
Why do i get this error? The credentials are correct otherwise it wouldn't have worked in SSMS and object explorer. My permissions are correct otherwise I wouldn't have been able to create the table and insert data into it. Why do I get the Login failed error in the Server Explorer
?
Okay so I managed to fix the "problem",
I was entering the correct credentials, but it was still giving me this error.
So what i tried this time is to eneabled the Save my password
checkbox.... and it worked...
I deleted the connection and created a new connection (without checking the Save my password
) and again the same error. So i enabled the checkbox again and it worked...
I think when trying to reach for the tables it re-authenticates at the SQL server, and since the checkbox Save my password
was not enabled, it didnt have a password to authenticate with.