views:

36

answers:

3

Hi folks,

I have two backup files

1) is named 'backup.sql' with a bunch of SQL defining TABLES

2) is named 'backup' with a bunch of encoded data, which I believe are the ROWS


I need to restore these TABLES + ROWS, but all I am able to figure out is how to restore the tables.

Any tips on dealing with these files? It's the first time I ever deal with SQL Server.

+3  A: 

The backup process would not create a file with actual SQL statements, it would create a binary file. So #1 is not a backup file (it's probably a script someone saved to re-create the schema).

I would try to use SQL Server Management Studio to restore the second file and see what happens. I don't think it will allow you to restore an invalid file, but I would take some basic precautions like backing up the system first.

Phil Sandler
+2  A: 

What is the extension for the 'backup' file? Is the filename backup.bak? If you have a backup file created by sql server then it 'should' contain the logic to create both the tables and restore the data, but it could depend on how the backup was created.

---Edit

It is possible for a .SQL file to contain data values as well as the logic to create the tables/columns for a database. I used to run backups of a MySql database in this way a long time ago...it just is not seen very often with SQL server since it has built in backup/restore funcationality.

wllmsaccnt
no extension :|
RadiantHex
Open 'backup' in notepad. Is the first word in the file 'TAPE'?
wllmsaccnt
+1  A: 

Seems unlikely they would export all the rows from all tables into CSV file, and given you said it looks encrypted, it's making me think that's your actual backup file.

try this, save a copy of the "backup" file, rename it to backup.bak and run this from SQL Server Management Studio

restore filelistonly from disk='C:\backup.bak'

(assuming your file is saved on the root of the C: drive)

Any results/errors?

Ryan Cooper