TokenHash
asked on
bring db back online .mdf
newbe sql2000 - how do I bring db .mdf back online????
.mdf was copied over to a new fresh install of sql2000
thanks for your help
.mdf was copied over to a new fresh install of sql2000
thanks for your help
ASKER
where would i run these commands =
Examples
This example attaches two files from pubs to the current server.
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf ',
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log .ldf'
Examples
This example attaches two files from pubs to the current server.
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you just copied the MDF from another system I suspect that it will not be possible to bring it back online.
Did you detach the database on the source system first?
Do you have a database backup?
Did you detach the database on the source system first?
Do you have a database backup?
ASKER
getting not a vaild sql file error ?? I have both the .mdf and ldf files
ASKER
I have a database backup
>I have a database backup
what kind of backup (and how comes you say that now?)
what kind of backup (and how comes you say that now?)
From the error it sounds like you copied the files from a system without allowing SQL Server the time to prepare them - this is done using the detach database function.
If you have the backup then a restore is going to be easier.
If you have the backup then a restore is going to be easier.
http://msdn2.microsoft.com/en-us/library/aa259610(SQL.80).aspx
http://msdn2.microsoft.com/en-us/library/aa259611(SQL.80).aspx