Search
  Home
  Articles
  Backup
  Books
  Certification
  FAQ
  Products
  Replication
  Scripts
  Seminars
  Training
  TSQL

MSDN Fourms
Philippine SSUG

  Resume

MHS Enterprises
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor



How can I recover a SQL Server database when all I have left is the original .DAT devices or files?

For SQL 6.5 and below use the DISK REINIT and REFIT commands. These are documented in the Books-Online.

For SQL 7.0 use the sp_attach_db sp - also documented in the books online.

An alternative for SQL 6.5 is below :-
  1. Stop SQL Server
  2. Backup/copy original .dat files
  3. Start SQL Server
  4. Drop any databases and devices you want to recover
  5. Create new devices/databases the right size and in the right order
  6. Stop SQL Server
  7. Copy the original .dat files over the newly re-created ones
  8. Start SQL Server.     

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.