Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

import/export data with constraints and index

0 views
Skip to first unread message

Yuling

unread,
May 28, 2002, 7:30:36 PM5/28/02
to
Hi,

I used DTS import/export wizard to transfer data, but all
constraints in tables were lost. Does it design that
way?

Which tool can I use to transfer tabes with constraints,
index, view and stored procedures? How should I do it?

Thank you for your help.
Yuling

Carlos Eduardo Rojas

unread,
May 29, 2002, 9:46:05 AM5/29/02
to
Create the scripts using enterprise manager, and then run these scripts in
the remote server. Then, you can transfer the data using DTS.
Note that there are more efficient ways to transfer a database to a new
server, like:
1) Backup and restore
2) Detaching and attaching the database (using sp_detach_db and
sp_attach_db)
CE
--
HTH
---------------------------------------------------------------------
Carlos Eduardo Rojas
MCSE+I, MCDBA, MCSS, SQL Server MVP
Author: SQL Server Programming By Example
http://www.sqlserverbyexample.com


"Yuling" <y...@creativelabs.com> wrote in message
news:907f01c2069f$ab64c570$3bef2ecf@TKMSFTNGXA10...

yuling

unread,
May 29, 2002, 1:10:42 PM5/29/02
to
Thank you.

I generated the script -- drop the constraints (FK), drop
table and then create table. For creating table script, I
didn't see any alter table to add the constraints (FK).
If I run this script on remote server, it would not keep
the constraints at all. I use PUBS database to do the
testing. Do I miss any option?

Does bcp and BULK INSERT has this ability? If yes, how to
do?

Thank you so much for your help.
Yuling

>.
>

Carlos Eduardo Rojas

unread,
May 29, 2002, 2:55:07 PM5/29/02
to
Make sure you select the option to generate the constraints when you create
the scripts in enterprise manager.
--
HTH
---------------------------------------------------------------------

Carlos Eduardo Rojas
MCSE+I, MCDBA, MCSS, SQL Server MVP
Author: SQL Server Programming By Example
http://www.sqlserverbyexample.com


"yuling" <y...@creativelabs.com> wrote in message
news:929e01c20733$c3d073e0$19ef2ecf@tkmsftngxa01...

0 new messages