我尝试在项目中打开数据库时出错 [英] Error when I try to open the database on my project

查看:67
本文介绍了我尝试在项目中打开数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




当我打开我的项目时我开始遇到这个问题我想打开数据库visual studio正在犯这个错误:



无法打开登录请求的数据库。登录失败。用户登录失败TINAW / Tina



我知道这是关于一些登录问题,但根本不知道该找什么。



这是我的连接字符串:



Hi
I started to have this problem when I open my project and I wants to open the database visual studio is comming with this error :

Cannot open database requested by the login. The login failed. Login failed for user TINAW/Tina

I know it is about some login issue, but dont have any idea what to look for at all.

This is my connection string :

<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=aspnet-ASPNetMarketplace-20151012101900;Integrated Security=True" providerName="System.Data.SqlClient" />





希望有人能帮助我,现在已经搜索了这个错误。



Hope someone could help me, have search for this error for hours now.

推荐答案

试试这个 -

转到SQL Server>>安全>>登录并右键单击TINAW / Tina并选择属性。

在新打开的登录属性屏幕中,转到用户映射选项卡。然后,在用户映射选项卡上,选择所需的数据库 - 尤其是显示此错误消息的数据库。在屏幕下方,检查角色``db_owner``。点击确定。



参考:

HTTP://博客。 sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork- service / [ ^ ]



希望,它有帮助:)
Try this-
Go to SQL Server >> Security >> Logins and right click on ``TINAW/Tina`` and select Properties.
In newly opened screen of Login Properties, go to the ``User Mapping`` tab. Then, on the ``User Mapping`` tab, select the desired database – especially the database for which this error message is displayed. On the lower screen, check the role ``db_owner``. Click OK.

Reference:
http://blog.sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork-service/[^]

Hope, it helps :)


由于访问SQL Server帐户的权限不正确或者没有充分指定机器名,会出现此问题。



阅读这篇文章:

[ ^ ]



祝你好运!
This problem occurs due to the incorrect permission to access the account of SQL Server or the machine name is not being specified adequately.

Read this post:
[^]

Good Luck!


这篇关于我尝试在项目中打开数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆