dbTalk Databases Forums  

Exporting a table and importing it

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Exporting a table and importing it in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
karenmiddleol@yahoo.com
 
Posts: n/a

Default Exporting a table and importing it - 10-12-2005 , 06:54 AM






I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.

The tables are - Cust, MatProd, Plant

the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.

Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.

If I want to use DTS how can I do it.

Thanks
Karen


Reply With Quote
  #2  
Old   
Keith Kratochvil
 
Posts: n/a

Default Re: Exporting a table and importing it - 10-12-2005 , 07:20 AM






Are the database servers on the same network? Can they "talk" to each
other?
You could use DTS to import data from one server. It is a fairly easy
process. Using DTS in this type of basic scenario is pretty
straightforward. You simply import data from a specific source.

--
Keith


<karenmiddleol (AT) yahoo (DOT) com> wrote

Quote:
I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.

The tables are - Cust, MatProd, Plant

the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.

Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.

If I want to use DTS how can I do it.

Thanks
Karen




Reply With Quote
  #3  
Old   
SQL
 
Posts: n/a

Default RE: Exporting a table and importing it - 10-12-2005 , 07:26 AM



Right click on tables--> all tasks-->export data
Then you will get a wizard, set up your source DB and your destination DB,
select the tables hit run and that's it

you can also use BCP to export and import them


http://sqlservercode.blogspot.com/


"karenmiddleol (AT) yahoo (DOT) com" wrote:

Quote:
I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.

The tables are - Cust, MatProd, Plant

the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.

Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.

If I want to use DTS how can I do it.

Thanks
Karen



Reply With Quote
  #4  
Old   
JT
 
Posts: n/a

Default Re: Exporting a table and importing it - 10-12-2005 , 07:59 AM



DTS or the "bulk copy" command can be used to export the data to a file such
as tab delimited text, MS Access, native, etc.

However, none of these file formats will retain all the table structure
including the exact data type, constraints, triggers, etc. For this, you
will need to use the "Generate Scripts" feature of Enterprise Manager. On
the destination database, run the scripts to re-create empty tables, then
use DTS or bulk copy the files into the appropriate tables.

CREATE TABLE
http://msdn.microsoft.com/library/en...eate2_8g9x.asp
How to generate a script (Enterprise Manager)
http://msdn.microsoft.com/library/en...esign_3qt0.asp
Preparing Data for Importing and Exporting
http://msdn.microsoft.com/library/en...t_bcp_1njt.asp
Copying Data From a Data File to SQL Server
http://msdn.microsoft.com/library/en...t_bcp_4t9u.asp


<karenmiddleol (AT) yahoo (DOT) com> wrote

Quote:
I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.

The tables are - Cust, MatProd, Plant

the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.

Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.

If I want to use DTS how can I do it.

Thanks
Karen




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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.