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 |
|
Xarzu
Starting Member
25 Posts |
Posted - 2011-09-29 : 16:09:56
|
| How do I back up a sql server database into an ascii file?I want to make a copy of a sql server database into a sql txt asci file so that i can port the data into another database system to be used.Does anyone know how to use Microsoft SQL Server Management Studio to create a database backup file? |
|
|
tduggan
Starting Member
26 Posts |
Posted - 2011-09-29 : 16:21:33
|
| Isn't the other system using SQL Server or is it using some other dbms?You can use bcp.exe, SSIS, export wizard, etc to get all of the tables into delimited files. You can use custom scripts to output them as INSERT INTO statements (google for this). You can use the SSMS generate scripts wizard to get the schema into a file.But if you are looking to just restore it to another SQL Server, then just use regular backup/restore as it'll ensure an exact copy, whereas the other methods won't. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-09-29 : 18:18:33
|
"You can use custom scripts to output them as INSERT INTO statements "SSMS will generate those too |
 |
|
|
Cindyaz
Yak Posting Veteran
73 Posts |
Posted - 2011-09-30 : 06:58:22
|
| Personally, I would prefer to use bcp in this case. Fastest way to pull data in flat text file(and I would also change the recovery mode to bulk-logged). |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-09-30 : 12:17:00
|
| No indication that the target system is also SQL Server, but I agree if it is use BCP with native format to transfer the data without having to worry about embedded commas, quote, TABs, linebreaks or anything else.But scripting them to SQL Insert statements will also take care of those issues- if porting it to a non-MS-SQL target system. |
 |
|
|
|
|
|