Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing properties of table besides data

Status
Not open for further replies.

MeganP

Programmer
Sep 23, 2004
18
US
When I copy table (export data) from one SQL Server database to another, How I can import all the properties of table including primary key, indexes, dependencies etc.

Any help is greatly appreciated!
 
Just export the table, change the default options and set them to not include data?
 
SOme how I am just getting the table layout, not all the properties (Indexes, dependenies etc..)
 
Rather than create a new topic, I'll reopen this one as the problem is the same.

Environment:
SQL Server 2000 SP3a
Windows Server 2003 Enterprise

When exporting from one SQL Server to another using the Import/Export functionality in Enterprise Manager, the data transfers; however, the data properties, such as the primary keys and int/identity fields do not.

I've attempted to copy the table and copy the SQL objects with all properties selected--to no avail.

Suggestions?

Thanks!

-David

---
David R. Longnecker
Web Developer
CCNA, MCSA, Network+, A+
Management Information Services
Wichita Public Schools, USD 259
 
Follow the steps to copy data with constraints, triggers etc as mentioned below and update us on your findings.

1) Select "Copy objects and data between sql server databases" in the export wizard (DTS).
2) In the next step uncheck "copy all objects" and select only the tables you intend to copy.
3) Also, Uncheck default options and click options.
4) Uncheck "Copy database users and database roles" if the users and roles already exist in the target db. 5) uncheck "copy object level permissions".
3) click ok and then run the batch.

Regards,
AA
 
AA-

Thank you for the tips; however, that results in an ever-so-clear Microsoft error:

"Failed to copy objects from Microsoft SQL Server to Microsoft SQL Server."

I, unfortunately, do not have access to the event viewer at this time (sa doesn't give everything (^_^)), but will look through there and post as soon as I can.

-David

---
David R. Longnecker
Web Developer
CCNA, MCSA, Network+, A+
Management Information Services
Wichita Public Schools, USD 259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top