无法打开物理文件 "c:/aa.mdf"。操作系统错误 5:"5(拒绝访问。)"。

本文介绍使用SQL Server 2005时遇到的附加数据库错误,特别是操作系统错误5(拒绝访问)。提供了不使用sa用户进行附加操作的解决方法。

今天用sql2005,附加数据库遇到这个错误...

ITLE: Microsoft SQL Server Management Studio Express
------------------------------

附加数据库时出错。有关详细信息,请单击“消息”列中的超链接。

------------------------------
BUTTONS:

OK
------------------------------
TITLE: Microsoft SQL Server Management Studio Express
------------------------------

附加数据库 对于 服务器“MYHFUT/SQLEXPRESS”失败。  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=附加数据库+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

执行 Transact-SQL 语句或批处理时发生了异常。 (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

无法打开物理文件 "c/aa.mdf"。操作系统错误 5:"5(拒绝访问。)"。 (Microsoft SQL Server, Error: 5120)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------ 

 

 

解决方法:

不用sa用户附加,重新连接数据库,选中windows集成验证模式,ok

jun@jun-VMware-Virtual-Platform:~$ sudo apt update 命中:1 http://mirrors.aliyun.com/ubuntu jammy InRelease 命中:2 http://mirrors.aliyun.com/ubuntu jammy-security InRelease 命中:3 http://mirrors.aliyun.com/ubuntu jammy-updates InRelease 忽略:4 https://download.mono-project.com/repo/ubuntu stable-noble InRelease 忽略:5 https://download.mono-project.com/repo/ubuntu stable-focal/snapshots/6.8.0.123 InRelease 忽略:6 https://download.mono-project.com/repo/ubuntu stable-focal InRelease 命中:7 http://mirrors.aliyun.com/ubuntu jammy-proposed InRelease 命中:8 http://mirrors.aliyun.com/ubuntu jammy-backports InRelease 命中:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease 命中:12 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease 命中:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease 命中:13 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease 命中:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease 命中:14 https://artifacts.elastic.co/packages/7.x/apt stable InRelease 命中:15 http://repo.mysql.com/apt/ubuntu noble InRelease 命中:16 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease 命中:17 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-proposed InRelease 命中:18 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease 命中:19 http://download.onlyoffice.com/repo/debian squeeze InRelease 命中:20 http://security.ubuntu.com/ubuntu noble-security InRelease 命中:21 https://download.docker.com/linux/ubuntu noble InRelease 命中:22 https://deb.nodesource.com/node_16.x nodistro InRelease 命中:23 https://d2nlctn12v279m.cloudfront.net/repo/mono/ubuntu focal InRelease 命中:24 https://packages.redis.io/deb noble InRelease 忽略:4 https://download.mono-project.com/repo/ubuntu stable-noble InRelease 忽略:5 https://download.mono-project.com/repo/ubuntu stable-focal/snapshots/6.8.0.123 InRelease 忽略:6 https://download.mono-project.com/repo/ubuntu stable-focal InRelease 命中:25 https://ppa.launchpadcontent.net/dotnet/backports/ubuntu noble InRelease 忽略:4 https://download.mono-project.com/repo/ubuntu stable-noble InRelease 忽略:5 https://download.mono-project.com/repo/ubuntu stable-focal/snapshots/6.8.0.123 InRelease 忽略:6 https://download.mono-project.com/repo/ubuntu stable-focal InRelease 错误:4 https://download.mono-project.com/repo/ubuntu stable-noble InRelease 无法连接上 download.mono-project.com:443 (13.107.246.73)。 - connect (111: 拒绝连接) 错误:5 https://download.mono-project.com/repo/ubuntu stable-focal/snapshots/6.8.0.123 InRelease 不能连接到 download.mono-project.com:https: 错误:6 https://download.mono-project.com/repo/ubuntu stable-focal InRelease 不能连接到 download.mono-project.com:https: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 有 294 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。 W: 无法下载 https://download.mono-project.com/repo/ubuntu/dists/stable-noble/InRelease 无法连接上 download.mono-project.com:443 (13.107.246.73)。 - connect (111: 拒绝连接) W: 无法下载 https://download.mono-project.com/repo/ubuntu/dists/stable-focal/snapshots/6.8.0.123/InRelease 不能连接到 download.mono-project.com:https: W: 无法下载 https://download.mono-project.com/repo/ubuntu/dists/stable-focal/InRelease 不能连接到 download.mono-project.com:https: W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件
最新发布
07-21
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值