Posted on 2007-10-09
I successfully detached a database from the server so that I could dispose of the large log file that had filled up the disk.
I then proceeded to re-attach the database, using the following query in MSSQL Server 7
exec sp_attach_db @dbname = 'Stamps', @filename1 = 'D:\MSSQL7\Data\Stamps_Data.MDF'
this gives the following error, how can I re-attach the database ? ( I have double checked the file name and path)
I have also tried the following but get the same error
exec sp_attach_db @dbname = N'Stamps', @filename1 = N'D:\MSSQL7\Data\Stamps_Data.MDF'
Server: Msg 945, Level 14, State 2, Line 1
Database 'Stamps' cannot be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'Stamps'. CREATE DATABASE is aborted.
I have also posted in SQL 2005 because SQL server 7 is not listed in ee ?