Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
how to create a flat file from SQL tables
11 posts, Page 1 of 2
1
2
»»
how to create a flat file from SQL tables
Rate Topic
Display Mode
Topic Options
Author
Message
ssarria
ssarria
Posted Tuesday, November 27, 2012 8:17 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 11:36 AM
Points: 6,
Visits: 6
Hi,
I am trying to create a flat file from a database. I am just learning how to work on sql so any help would be greatly appreciated!
Saul
Post #1389222
dba_pkashyap
dba_pkashyap
Posted Tuesday, November 27, 2012 8:20 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, December 06, 2012 2:49 PM
Points: 140,
Visits: 310
Is it a database or a table?
If table, you can use export / bcp to copy the contents of the table to a flat file.
Pavan
Post #1389223
ssarria
ssarria
Posted Tuesday, November 27, 2012 8:27 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 11:36 AM
Points: 6,
Visits: 6
Hi Pavan,
The idea is to create a back up of the database on a flat file. It could be by tables.though
I did use mysql workbench to update an existing DB but now I was asked to create a back up on a flat file.
Thanks,
Post #1389228
dba_pkashyap
dba_pkashyap
Posted Tuesday, November 27, 2012 8:38 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, December 06, 2012 2:49 PM
Points: 140,
Visits: 310
Why do you want to create the backup on a flat file, use SQL native backup tool and take the backup.
If you have to backup all tables on flat files, then you might have to do it for every table seperately.
You can use Export data / bcp / SSIS package etc.
Pavan.
Post #1389241
ssarria
ssarria
Posted Tuesday, November 27, 2012 12:26 PM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 11:36 AM
Points: 6,
Visits: 6
Thanks Pavan,
I will give it a try.
S.
Post #1389376
ssarria
ssarria
Posted Wednesday, November 28, 2012 4:43 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 11:36 AM
Points: 6,
Visits: 6
Hey Pavan,
some how is not working, it is giving me an error messages. It is a syntax error... sorry I am still learning SQL..
Thanks!
S
Post #1389639
Brandie Tarvin
Brandie Tarvin
Posted Wednesday, November 28, 2012 5:50 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 12:39 PM
Points: 6,668,
Visits: 5,695
ssarria (11/28/2012)
Hey Pavan,
some how is not working, it is giving me an error messages. It is a syntax error... sorry I am still learning SQL..
Thanks!
S
Please post all your code and the exact text of your syntax error. We can't help you if we don't know what you're looking at.
Brandie Tarvin, MCITP Database Administrator, MCDBA, MCSA
Webpage
:
http://www.BrandieTarvin.net
LiveJournal Blog
:
http://brandietarvin.livejournal.com/
On
LinkedIn!
,
Google+
, and
Twitter
.
Freelance Writer:
Shadowrun
Latchkeys: Nevermore
,
Latchkeys: The Bootleg War
, and
Latchkeys: Roscoes in the Night
are now available on Nook and Kindle.
Post #1389681
anthony.green
anthony.green
Posted Wednesday, November 28, 2012 6:31 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
ssarria (11/27/2012)
Hi Pavan,
The idea is to create a back up of the database on a flat file. It could be by tables.though
I did use mysql workbench
to update an existing DB but now I was asked to create a back up on a flat file.
Thanks,
Are you using SQL or MySQL?
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1389708
ssarria
ssarria
Posted Wednesday, November 28, 2012 6:52 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 11:36 AM
Points: 6,
Visits: 6
I ma using MySQL.
I believe, what I need is to create a flat file that could be used as a backup in case of something happen to the database.
I am not sure of what commands to use without putting on risk my DB.
Post #1389737
anthony.green
anthony.green
Posted Wednesday, November 28, 2012 6:55 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
This is a Microsoft SQL server forum, not a MySQL forum, you might be best using a dedicated MySQL forum.
But a quick google search for "export mysql db to file" brought it a number of results which might help you out.
https://www.google.co.uk/search?q=export+mysql+db+to+file
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1389743
« Prev Topic
|
Next Topic »
11 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.