2

We have completely lost our SQL Server 2000 database in an accident. The only thing left is a snapshot folder which contains bunch of .sch, .idx and .bcp files.

The sch and idx files have a clear text format and holding the database schema.

The .bcp files looks to be binaries encoded somehow.

Is there any way to recover the data from the .bcp files?

  • can you see any files with .ss extensions also tell your DBA to start looking for a new job :) – M.Ali Aug 16 '14 at 14:19
  • there's no .ss files. and the DBA is already looking for a new job :) – Sam Aug 16 '14 at 14:40
  • How big was the database? How important was it for the company? – usr Aug 16 '14 at 15:24
  • the database is about 500 MB and holds the accounting records for year 2013; actually it's very important – Sam Aug 16 '14 at 16:56
  • how can i identify the .bcp file format ? I've already checked the bcp.exe command line and wondering if it can be restored using this tool – Sam Aug 16 '14 at 16:58
1

Depends on what these bcp files are. If there is a plenty of them and they are named after tables in your database, then chances are, they are table dumps created with (probably) bcp.exe. Also looking at their creation dates might provide some insight.

If the naming pattern does not correlate with tables, maybe these are database backups. You can check this by running restore headeronly against them - if they are indeed MSSQL backups, you will see some data about when they were created and what kind of backups they are.

| improve this answer | |
  • those files are mirroring the tables' names.But the content is of unknown format or at least am unable to identify it. am not that familiar with bcp. I've attempted to import the data using the command line but it's asking for a format file. – Sam Aug 17 '14 at 13:11
  • 2
    Usually you aren't required to provide a format file, but BCP can create it from the table structure. Or you can play with its switches for a while, maybe one of them will do the trick. Anyway, reading documentation here is highly recommended: msdn.microsoft.com/en-AU/library/ms162802.aspx – Ennor Aug 17 '14 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy