dbTalk Databases Forums  

Exporting Tables and Data to CD

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


Discuss Exporting Tables and Data to CD in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary August
 
Posts: n/a

Default Exporting Tables and Data to CD - 12-19-2003 , 07:53 AM






I am running SQL Server 2000 Developer edition ver 0120.1
July 2003 on a stand alone PC, not connected to a server
or network. I have created a number of tables in a new
database. I need to export the table definitions and the
data in them so that I can install them on another machine
running SQL Server Enterprise edition in another city. I
used the Import/Export Wizard to export the tables and
data to flat files, however the field data types are not
preserved for the tables (all the field types and lengths
are char with a length of 255) when the tables are
recreated. I also tried to use DTS to export database
objects, however DTS will only allow you to do this from
server to server. How can I export the tables and preserve
the field types and lengths so when I import them to a
database on another machine the table definitions will be
the same as on the original machine.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Exporting Tables and Data to CD - 12-19-2003 , 08:10 AM






Script them. You can either

1. Right click on DB | All Tasks | Generate SQL Script
2. Right click on Table | Copy. You can now paste the definition into a
text file
3. Use SQL DMO
4. Use a format File and BCP.

You ccan extract the data using BCP quite easily or use SQLDMO.

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Gary August" <gaugust45 (AT) hotmail (DOT) com> wrote

Quote:
I am running SQL Server 2000 Developer edition ver 0120.1
July 2003 on a stand alone PC, not connected to a server
or network. I have created a number of tables in a new
database. I need to export the table definitions and the
data in them so that I can install them on another machine
running SQL Server Enterprise edition in another city. I
used the Import/Export Wizard to export the tables and
data to flat files, however the field data types are not
preserved for the tables (all the field types and lengths
are char with a length of 255) when the tables are
recreated. I also tried to use DTS to export database
objects, however DTS will only allow you to do this from
server to server. How can I export the tables and preserve
the field types and lengths so when I import them to a
database on another machine the table definitions will be
the same as on the original machine.



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.