Connecting Tech Pros Worldwide Help | Site Map

dumping data from database

  #1  
Old July 20th, 2005, 04:35 AM
rozrabiak
Guest
 
Posts: n/a
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 :)
  #2  
Old July 20th, 2005, 04:35 AM
Simon Hayes
Guest
 
Posts: n/a

re: dumping data from database



"rozrabiak" <brak@maila.pl> wrote in message
news:c6r83b$5ra$1@news.onet.pl...[color=blue]
> 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 :)[/color]

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


  #3  
Old July 20th, 2005, 04:35 AM
Erland Sommarskog
Guest
 
Posts: n/a

re: dumping data from database


rozrabiak (brak@maila.pl) writes:[color=blue]
> 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[/color]

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
  #4  
Old July 20th, 2005, 04:36 AM
jdbcguy
Guest
 
Posts: n/a

re: dumping data from database


Erland Sommarskog <sommar@algonet.se> wrote in message news:<Xns94DAF1247AB58Yazorman@127.0.0.1>...[color=blue]
> rozrabiak (brak@maila.pl) writes:[color=green]
> > 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[/color]
>
> In Enterprise Manager, find the database, right-click, select All Tasks,
> and in that submenu you find scripting options.[/color]

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.
  #5  
Old July 20th, 2005, 04:45 AM
Denis
Guest
 
Posts: n/a

re: dumping data from database


rozrabiak <brak@maila.pl> wrote in message news:<c6r83b$5ra$1@news.onet.pl>...[color=blue]
> 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.[/color]

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.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumping Data from Internet Form in to Database Stang02GT answers 2 May 21st, 2008 08:52 PM
Read from database, write to another database, simultaneously Sean Davis answers 12 January 12th, 2007 10:45 AM
My web hosting company lost my data from mysql database mantrid answers 5 August 10th, 2006 06:55 PM
dumping data from database rozrabiak answers 3 July 20th, 2005 04:34 AM