我試圖將AdventureWorks2012_Data.mdf
數據庫文件附加到我的SQL Server 2012數據庫。無法將數據庫附加到SQL Server 2012原因未找到.log
我收到此錯誤:
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'USER-PC'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2012_log.ldf". Operating system error 2: "2(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
也許信息是明確的,我沒有.log
文件,是的,我沒有它。但是它有必要嗎?或者還有另外一件事?我該如何解決這個問題?
通過'sp_attach_single_file_db'嘗試 – 2014-10-28 14:55:50
@AlexK。你的意思是在我的sql server 2012中執行那個查詢? – 2014-10-28 14:56:15
請參閱http://msdn.microsoft.com/en-gb/library/ms174385。aspx – 2014-10-28 14:56:48