Hi Folks,
One of our database came to Restoring mode. I suddenly stop my SQL service and Copied only MDF files again Started SQL service ,unexpectedly i dropped the Database. Now i cant able to attach the database only with my MDF file.
I tried below Scripts but its not help me. All scripts shows same error.
EXEC sp_attach_single_file_db @dbname='PhoenixPolice',
@physname=N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf'
GO
CREATE DATABASE PhoenixPolice ON
(NAME = N'PhoenixPolice',
FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf')
FOR ATTACH_REBUILD_LOG
GO
CREATE DATABASE phoenixPolice ON (FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf')
FOR ATTACH
All scripts shows below error
File activation failure. The physical file name "F:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\PhoenixPolice_1.ldf" may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to
a hardware or environment failure.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'PhoenixPolice'. CREATE DATABASE is aborted.
Please Somebody help me to Recover the Database., It very urgent. Hope Some one help me
Thanks
RamKarthik KN