当前位置: 首页 > news >正文

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 用户登录。

 

相关文章:

  • Invalid postback or callback argument
  • 网页视频播放器代码大全
  • String or binary data would be truncated 异常解决办法
  • C# 将本地文件远程拷贝到其他电脑
  • HTTP 错误 404.2 - Not Found 由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面
  • AjaxPro ‘未定义’解决方案
  • FlashFXP v3.5.4注册码+FlashFXP v3.6.0注册码+FlashFXP v3.7.2.build.1266...
  • Google Maps API一例错误处理 SCRIPT5007: 无法获取属性“firstChild”的值: 对象为 null 或未定义 main.js
  • IE9 : DOM Exception: INVALID_CHARACTER_ERR (5)
  • .net获取当前url各种属性(文件名、参数、域名 等)的方法
  • 解决Requset.Write()弹出提示框变形问题
  • Google Maps API openInfoWindowHtml a is undefined
  • C#日期格式化
  • 用jquery判断一个对象是否存在不能用
  • 男人职场不成熟的十大标志
  • 分享的文章《人生如棋》
  • 4月23日世界读书日 网络营销论坛推荐《正在爆发的营销革命》
  • angular2开源库收集
  • Centos6.8 使用rpm安装mysql5.7
  • Docker入门(二) - Dockerfile
  • node和express搭建代理服务器(源码)
  • Vue 重置组件到初始状态
  • 翻译--Thinking in React
  • 分类模型——Logistics Regression
  • 看完九篇字体系列的文章,你还觉得我是在说字体?
  • 跨域
  • 前端每日实战 2018 年 7 月份项目汇总(共 29 个项目)
  • 浅谈Kotlin实战篇之自定义View图片圆角简单应用(一)
  • 区块链将重新定义世界
  • 深度学习入门:10门免费线上课程推荐
  • 使用common-codec进行md5加密
  • 手写双向链表LinkedList的几个常用功能
  • 自定义函数
  • 蚂蚁金服CTO程立:真正的技术革命才刚刚开始
  • $.type 怎么精确判断对象类型的 --(源码学习2)
  • (阿里云万网)-域名注册购买实名流程
  • (附源码)spring boot北京冬奥会志愿者报名系统 毕业设计 150947
  • (牛客腾讯思维编程题)编码编码分组打印下标(java 版本+ C版本)
  • (十一)JAVA springboot ssm b2b2c多用户商城系统源码:服务网关Zuul高级篇
  • (续)使用Django搭建一个完整的项目(Centos7+Nginx)
  • (转)mysql使用Navicat 导出和导入数据库
  • .bat批处理(八):各种形式的变量%0、%i、%%i、var、%var%、!var!的含义和区别
  • .htaccess 强制https 单独排除某个目录
  • .mysql secret在哪_MySQL如何使用索引
  • .Net 4.0并行库实用性演练
  • .net core 6 redis操作类
  • .NET 的程序集加载上下文
  • .Net 访问电子邮箱-LumiSoft.Net,好用
  • .net 设置默认首页
  • .NET4.0并行计算技术基础(1)
  • @Autowired多个相同类型bean装配问题
  • @NoArgsConstructor和@AllArgsConstructor,@Builder
  • @WebServiceClient注解,wsdlLocation 可配置
  • [ 数据结构 - C++] AVL树原理及实现
  • [Android学习笔记]ScrollView的使用