Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
duchino
Starting Member
3 Posts |
Posted - 2010-03-20 : 14:30:21
|
Hi,I need to backup MSSQL database to txt files, and restore the database from those files - using C#.Please let me know if you have any idea. MArcind |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2010-03-20 : 14:33:35
|
That isn't possible. Instead, you can export all of your objects via the GUI Generate Script wizard. To get the data out to text files, you can use bcp.exe or DTS/SSIS.If you don't have the requirement of text files, then you can backup the database using BACKUP command and then restore it using RESTORE command. Both BACKUP and RESTORE commands are accessible in C#. There is no need to use text files.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-20 : 14:33:49
|
why not use native backup/restore?anyway you can BCP the data out to text files |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
duchino
Starting Member
3 Posts |
Posted - 2010-03-20 : 14:38:25
|
It is possible. I have application (I don't have src) which performs backup/restore to/from txt files. I know BCP , but I need txt files. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
duchino
Starting Member
3 Posts |
Posted - 2010-03-21 : 05:49:27
|
Can I convert MSSQL backup file (BCA) to txt and open via text editor to see data? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|