December 31, 2008 at 3:31 am
Hello all
I have a Text file and i want to restore my database with this file
i am using sql 2005 will please any one tell me how can i do that
this file have 1.5 GB size
Thanks all
December 31, 2008 at 4:35 am
When you say you have a text file is it literally named .txt? Can you open it with Notepad.exe? If the answer is yes to both these questions then you can't use it to restore your database. It may be a dump of table data which you could use to import back into the database as a way to recover that tables data.
If it can not be opened with Notepad.exe it may be a backup file that has been renamed for some reason. The best thing to do is run the following statement from SSMS;
restore filelistonly from disk = 'D:\YourBackups\Yourfile'
or
restore headeronly from disk = 'D:\YourBackups\Yourfile'
If it is a SQL Server backup file then either one of these commands will read the file and provide back information and this would be a valid file to restore from.
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
December 31, 2008 at 6:09 am
Assuming it's not a real text file, in which case, it's just a dump of a database and you'll need to get the structure from another source and then use the text file to import...
This link [/url]might help you understand backups & restores a bit better.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 31, 2008 at 11:15 am
I also want to ask two questions just to make sure everyone is understanding correctly.
When you say "restore my database with this file", are you saying you believe this file contains your entire database, or is it simply the contents of a particular table in your database?
Do you know how this particular file was created?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply