I am trying to attach database without log file.
Attach a SQL Server database with a missing transaction log file
Error on SSMS
Error on TSL
Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "....mdf". Operating system error 5: "5(Access is denied.)".
I'm not sa, but I'm in sysadmin role. I'm not really sure what access permission I need. Or is it because the .mdf
is corrupted?
Thank in advance!
That's a bug in the SSMS interface. It can be done using 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
Error on SSMS
Error on TSL
Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "....mdf". Operating system error 5: "5(Access is denied.)".
I'm not sa, but I'm in sysadmin role. I'm not really sure what access permission I need. Or is it because the .mdf
is corrupted?
Thank in advance!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.