Friday, March 23, 2012

Restoring SQL Database

I have the actual .mdf and .ldf files for an SQL database,
not sQL backup files. I need to get this database to a
new SQL server. The server that the previous database was
on was destroyed in a fire, so I can't produce a bakup set
to restore. I have read about attaching a database, and
after running the SP which says it completed successfully,
the database does not appear in the new server. Help
please! Thanks!Matt
Example from the BOL. (NOTE it uses sp_attach_single_files strored
procedure)
For details please refer to BOL.
EXEC sp_detach_db @.dbname = 'pubs'
EXEC sp_attach_single_file_db @.dbname = 'pubs',
@.physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'
"Matt" <matt_and_ann@.hotmail.com> wrote in message
news:020801c34e5e$13b22440$a401280a@.phx.gbl...
> I have the actual .mdf and .ldf files for an SQL database,
> not sQL backup files. I need to get this database to a
> new SQL server. The server that the previous database was
> on was destroyed in a fire, so I can't produce a bakup set
> to restore. I have read about attaching a database, and
> after running the SP which says it completed successfully,
> the database does not appear in the new server. Help
> please! Thanks!

No comments:

Post a Comment