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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! READING A SQL 6.0 .DAT FILE

Status
Not open for further replies.

DirtyB

Programmer
Mar 13, 2001
159
US
I have a .DAT file from a client. I have determined that it is a SQL 6.0 database. We have SQL 6.5, 7.0, and 2000. I can not import it, or restore it to 6.5. All I need is to get the data in a readable format, whether it's in SQL or Notepad or anything else, it just needs to be readable. Can anyone PLEASE help me???
 
Have u tried bulk copy (bcp utility) to copy into any of the higher version SQL. I am not very sure but i think it would works :)

Lakshmi
 
What is a bcp utility and how do I get/use it? All I have tried so far is to try to restore/and import into SQL 6.5.
 
ALSO, the .DAT file that I have is more than just data. Believe it or not, I opened it in Excel, and a lot of it is just symbols and things, but I did see some stored procedures, and other things. I think it is somehow a copy of the entire database...data, and everything else, so if I use a bulk copy, I would have to know field names and such wouldn't I??????????
 
Forget BCP if what you received is truly a SQL 6.0 database device file (.DAT). As you've discovered, that file contains SQL objects - tables (structure and data), view and stored procedure definitions, etc.

Why anyone would send such a file is beyond me unless you had specifically requested it and planned to restore it as a SQL database. Even that is very difficult with SQL 6.0 and 6.5 due to need to define devices precisely as created.

If you are looking for data, can the client send it in another form, such as text file exports or an Access database? I assume the client is running SQL Server 6.0. Terry
 
Terry:

Thanks for your input, it's appreciated. This is for a client of a client, therefore I have no contact with them. My client couldn't figure it out, so it has been outsourced to me.

This is a file from a system that is long gone, but they need to recover the system, and eventually pull it back into SQL 7 or another "usable" format. I was merely given a cd with a .DAT file and told to open it and make it readable no matter how it's done. I didn't even know it was a SQL database until I opened it in Excel, and through the binary stuff I saw "CREATE PROCEDURE dbo.....as declare" and I saw a comment that said SQL 6.0. So I know it is an entire database, but I just don't know how to read it, and there is no more information available to me.

Do you have any ideas at all???
 
I've been searching the Internet for an answer. Nothing has shown up yet. I'd hope that someone has written a utility of some sort but that's a long shot.

We never had 6.0 installed here. We went from 4.2a to 6.5 so I don't know if there is any compatibility between the device files of the two versions. Maybe someone knows that and can give some guidance about how to use the 6.0 file in SQL Server 6.5.

If it is possible to determine the database and log characteristics on that device file, you might be able to create a similar device and database on 6.5. Then you could stop the SQL Server service, replace the 6.5 file with the 6.0 file and restart SQL Server. Then hopefully, 6.5 would recognize the device and read it properly. I'm doubtful but without a utility, that may be your only hope.
Terry
 
I read something online that said that you could use the SQL7.0 DTS Wizard to do the import, but we can't get it to work. We have never had 6.0 either. I can't really get anything from the file. It's about 99% funny symbols, with just enough words to realize that it's SQL 6.0. I desperately need some sort of utility to do this for me. It's very important that it gets done before next week. I tried to do a restore on our 6.5 server and it just wouldn't work. Maybe I can try that again. Do you have any other suggestions?

Thanks for your help, it is very appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top