[英]SQL Server 2008 - Attach mdf without log - Operating system error 5: 5(Access is denied.)
I am trying to attach database without log file.我正在尝试在没有日志文件的情况下附加数据库。
Attach a SQL Server database with a missing transaction log file 附加缺少事务日志文件的 SQL Server 数据库
Error on SSMS SSMS 上的错误
Error on TSL TSL 上的错误
Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "....mdf".
消息 5120,级别 16,状态 101,第 1 行无法打开物理文件“....mdf”。 Operating system error 5: "5(Access is denied.)".
操作系统错误 5:“5(访问被拒绝。)”。
I'm not sa, but I'm in sysadmin role.我不是 sa,但我是 sysadmin 角色。 I'm not really sure what access permission I need.
我不确定我需要什么访问权限。 Or is it because the
.mdf
is corrupted?还是因为
.mdf
已损坏?
Thank in advance!预先感谢!
That's a bug in the SSMS interface.这是 SSMS 界面中的一个错误。 It can be done using T-SQL.
它可以使用 T-SQL 来完成。 Just don't include the log file in the list of files.
只是不要在文件列表中包含日志文件。
exec sp_attach_db 'dbname', 'filename'
以管理员身份启动SQL Server管理器(右键程序,选择“以管理员身份启动”):问题解决!
I am trying to attach database without log file.我正在尝试附加没有日志文件的数据库。
Attach a SQL Server database with a missing transaction log file 附加缺少丢失的事务日志文件的SQL Server数据库
Error on SSMS SSMS上的错误
Error on TSL TSL错误
Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "....mdf".
消息5120,级别16,状态101,第1行无法打开物理文件“ .... mdf”。 Operating system error 5: "5(Access is denied.)".
操作系统错误5:“ 5(拒绝访问。)”。
I'm not sa, but I'm in sysadmin role.我不是sa,但我是sysadmin角色。 I'm not really sure what access permission I need.
我不确定我需要什么访问权限。 Or is it because the
.mdf
is corrupted?还是因为
.mdf
已损坏?
Thank in advance!预先感谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.