Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RESTORING SQLDATA FROM DAT FILES

Status
Not open for further replies.

bizworld

MIS
Aug 6, 2001
3
IN
help...
My Winnt 4 server crashed and does not start now. However i have the dat files of sql server 6.5 on that hard disk intact.The data on the old harddisk is still intact , only winnt server fails to start and hence i cannot start sql server.
I have installed winnt server 4 on a new pc and also sql server 6.5 but i cannot retrieve my old data using just those dat files. Is there any way out for me?

plz help me ..urgent replies needed.
Thanxz.
 

sp_attachdb is not available in SQL 6.5. Unless you have all of the information necessary to re-create the database devices exactly as they were originally created, you'll not be able to restore use the DAT files. Do you have backups? Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
 
yes.. i do have the information needed to re-create the database devices exactly as they were.. is there any extra information reqdd.
and yes .. one more thing .. can the bcp utility help me in some way in recovering my data from the .dat files.
i tried working with the bcp utility but still need to know to use it well.
i have some problems with using the field delimiter field while using the bcp utility.

plz help me as to how to retrieve my data using those dat files.
 
BCP will not help. The following recovery info comes form the SQL FAQ available at
Q. How can I recover a SQL Server database when all I have left is the original .DAT devices or files?

A. For SQL 7.0 use the sp_attach_db stored procedure - documented in Books Online.

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

An alternative for SQL 6.5 is :-
. Stop SQL Server
. Backup/copy the original .dat files on the target server, if any.
. Start SQL Server.
. Drop any databases and devices you want to recover, and delete the associated physical files.
. Create new devices/databases the right size, with the right names and in the right order.
. Stop SQL Server.
. Copy the original .dat files over the newly re-created ones.
. Start SQL Server.
Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top