在用户的电脑上安装mvvm程序后 - 无法访问数据库 - 登录错误? [英] After installing the mvvm program on the user's pc - can't access the database - login error?

查看:69
本文介绍了在用户的电脑上安装mvvm程序后 - 无法访问数据库 - 登录错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在我的电脑上安装程序时,它可以正常工作,但是当我安装在其他PC上时,它没有。 

When I install the program on my PC, it works but when I install in some other PC it doesn't. 

我收到以下错误:
here

< img alt =""src ="https://social.msdn.microsoft.com/Forums/getfile/985599">

数据库安全访问是Windows真实性。

The database security access is Windows Authenticity.

将数据库更新为localDB 2016版本后无法正常工作。 

It's not working after updating the database to localDB 2016 version. 

更新:我使用开发者PC的名称为Windows 10创建了另一个登录帐户,并且工作正常!那么我该如何让它与当前用户合作? 

Update: I created another login account for windows 10 with developer PC's name and it worked! So how can i make it work with the current user? 







推荐答案

您好Bhupinder Singh,

Hi Bhupinder Singh,

请参考以下步骤。

先决条件:您必须已安装SQL服务器管理工​​作室(完整版或快速版)

Pre-requisite: You must have installed SQL Server Management Studio (Full or Express)


< span style ="font-size:14px">  1.Open  SQL Server Management Studio

  2.在"连接到服务器"中窗口(文件 - >连接对象资源管理器)输入以下内容:

 2.In the "Connect to Server" window (File->Connect object explorer) enter the following:



    • 服务器类型    :数据库引擎

    • 服务器名称    :&NBSP;
      (localdb)\v11.0

      • Server type    : Database Engine
      • Server name    (localdb)\v11.0

      3。点击"连接"

      4。展开"数据库"对象资源管理器中的文件夹(View-> Object Explorer,F8)

      5。找到你的数据库。它应该被命名为数据库(.mdf)文件的完整
      路径


      • 你应该看到它说"(等待恢复)"在数据库名称的末尾或当您尝试扩展数据库时,它将无法并且可能会或可能不会给您提供错误消息。
      • T 他的问题!您的数据库已基本崩溃..
      • You should see it says "(Pending Recovery)" at the end of the database name or when you try to expand the database it won't be able to and may or may not give you an error message.
      • This the issue! Your database has crashed essentially..

      6。右键单击数据库,然后选择"任务 - >分离......"。

      7。在分离窗口中,在列表中选择您的数据库,然后选中"删除连接"

      7. In the detach window, select your database in the list and check the column that says "Drop Connections"

      8的列。单击"确定"。

      8. Click OK.

      9。您应该看到数据库从数据库列表中消失。你的问题现在应该修复了。转到并运行使用localdb的应用程序。

      9. You should see the database disappear from the list of databases. Your problem should now be fixed. Go and run your application that uses your localdb.

      10。运行应用程序后,您的数据库将重新出现在数据库列表中 - 这是正确的。它不应该说"待恢复"。因为它应该正常工作。

      10. After running your application, your database will re-appear in the list of databases - this is correct. It should not say "Pending recovery" any more since it should be working properly.

      欲了解更多信息,请参阅:

      For more information, please refer to:

      https://www.codeproject.com/Tips/775607/How-to-fix-LocalDB -Requested-Login-failed

      祝你好运,

      Cole Wu


      这篇关于在用户的电脑上安装mvvm程序后 - 无法访问数据库 - 登录错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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