Cannot open database "db1" requested by the login. The login failed.

今天一直出现这个问题,之前这个数据库都可以正常使用,在网上找了半天,这个应该是比较好的解决方式了。

 

Oh! I could solve it.

 

Let me share it so that other people can get the benefit if they fall in this problem:

 

 

Solution to the Problem:

 

I've just changed the authentication mode to sql authentication and then rewrite my connection string with the user name and password of the sql server. But remember to add Trusted_Connection=no;  in the connection string other wise it wont work.

 

Now it looks like:

"Server=localhost;Database=test;integrated security=sspi;Uid=sa;Pwd=test;Trusted_Connection=no;";

 

For help on how to change the authentication mode plz visit:

http://blogs.solidq.com/EN/rdyess/Lists/Posts/Post.aspx?ID=12

 

Now I think I don't need the ASPNET user anymore for accessing the database.

 

 

C、无法打开数据库 "MSCUPTDB"

  在"设置"对话框的"数据源"选项卡配置新服务器名称,显示以下消息:

  Cannot open database "mscuptdb" requested by the login. The login failed. Login failed for user 'username'

  排除此错误引起的故障时,请验证以下内容:

   必须在运行 SQL Server 的计算机上创建 mscuptdb 数据库。如果未创建数据库和数据库角色,请运行位于 Updates Publisher 安装文件夹的 CreatePubToolDb.sql SQL 脚本,以创建 mscuptdb 数据库和 System_Center_Updates_Publisher_User 数据库角色。

  安装 Updates Publisher 的用户必须具有访问 SQL Server 数据库的权限。用户必须具有 mscuptdb 数据库中的 System_Center_Updates_Publisher_User 数据库角色成员身份的 SQL Server 用户登录。

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值