Cannot connect to (LocalDB)\MSSQLLocalDB -> Login failed for user 'User-PC\User'

半城伤御伤魂 提交于 2019-12-04 07:41:55

问题


I am getting an error, While I am trying to connect (LocalDB)\MSSQLLocalDB through SQL Server management studio. I also tried to login with default database as master the error is same.

Here is the Server details.


回答1:


The following command through sqllocaldb utility works for me.

sqllocaldb stop mssqllocaldb
sqllocaldb delete mssqllocaldb
sqllocaldb start "MSSQLLocalDB"

After that I restarted the sql server management studio, and it is successfully established connection through (LocalDB)\MSSQLLocalDB




回答2:


Right click your server and go to Properties, the select the Security Under Server Authetication section, You will find that “Windows Authetication Mode” radio button selected. So, your work is to select “Sql Server and Windows Authetication Mode” radio button. Right click your server again and select restart. Then follow below steps. Try follwing steps:

(a)Expand the SQL Server

(c) Expand Security node

(d) Select the Particular Login (User)

(e) Press right button and select properties of the login

(f) Go to Status table Enble the User



来源:https://stackoverflow.com/questions/36950078/cannot-connect-to-localdb-mssqllocaldb-login-failed-for-user-user-pc-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!