Unix Technical Forum

dumping data from database

This is a discussion on dumping data from database within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi I need to dump data from database in to *.sql file. I try it using DUMP DATABASE but ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 03:39 AM
rozrabiak
 
Posts: n/a
Default dumping data from database

Hi
I need to dump data from database in to *.sql file. I try it using DUMP
DATABASE but it not work that I need it.

So, how can I dump data from database in to *.sql file and then run it
using: osql -E -i nameOfDumpedDatabase.sql


Thanks for help, greetings, gregory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 03:39 AM
Simon Hayes
 
Posts: n/a
Default Re: dumping data from database


"rozrabiak" <brak@maila.pl> wrote in message
news:c6r83b$5ra$1@news.onet.pl...
> Hi
> I need to dump data from database in to *.sql file. I try it using DUMP
> DATABASE but it not work that I need it.
>
> So, how can I dump data from database in to *.sql file and then run it
> using: osql -E -i nameOfDumpedDatabase.sql
>
>
> Thanks for help, greetings, gregory


You can use bcp.exe or DTS to export data to a file and load it again, or if
you prefer INSERT statements then see here:

http://vyaskn.tripod.com/code.htm#inserts

If you want everything (objects and data), then BACKUP and RESTORE is often
the easiest way.

Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 03:39 AM
Erland Sommarskog
 
Posts: n/a
Default Re: dumping data from database

rozrabiak (brak@maila.pl) writes:
> I need to dump data from database in to *.sql file. I try it using DUMP
> DATABASE but it not work that I need it.
>
> So, how can I dump data from database in to *.sql file and then run it
> using: osql -E -i nameOfDumpedDatabase.sql


In Enterprise Manager, find the database, right-click, select All Tasks,
and in that submenu you find scripting options.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 03:40 AM
jdbcguy
 
Posts: n/a
Default Re: dumping data from database

Erland Sommarskog <sommar@algonet.se> wrote in message news:<Xns94DAF1247AB58Yazorman@127.0.0.1>...
> rozrabiak (brak@maila.pl) writes:
> > I need to dump data from database in to *.sql file. I try it using DUMP
> > DATABASE but it not work that I need it.
> >
> > So, how can I dump data from database in to *.sql file and then run it
> > using: osql -E -i nameOfDumpedDatabase.sql

>
> In Enterprise Manager, find the database, right-click, select All Tasks,
> and in that submenu you find scripting options.


There is a Java program called Super*SQL which will unload any tables
you have into an ASCII file that you can then run or load into a
different database. For more information visit www.sqlmagic.com.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 03:55 AM
Denis
 
Posts: n/a
Default Re: dumping data from database

rozrabiak <brak@maila.pl> wrote in message news:<c6r83b$5ra$1@news.onet.pl>...
> Hi
> I need to dump data from database in to *.sql file. I try it using DUMP
> DATABASE but it not work that I need it.


Hi, you could also look at this article which describes a Java utility
to dump both data and schema information to an SQL file.

http://isocra.com/articles/article.php?id=java_db_dump

We wrote it because we needed to synchronize two remote SQLServer
databases as well as a MySQL development database.

In fact it's pretty easy to integrate it into a JSP to give the same
sort of dumping functionality as phpMyAdmin but for SQLServer.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com