Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Copy database tables with constraints

Hello,
I am trying to create a copy of a database in sql server 2016 from  database from sql server 2014 with import/export wizard.
The problem is it does not copy the constraints of the table.
i have tried Enable IDENTITY insert.

Regards
DatabasesMicrosoft SQL ServerSQL

Avatar of undefined
Last Comment
RIAS
Avatar of Peter Chan
Peter Chan
Flag of Hong Kong image

Hi,
If you're already exported the whole database/schema, you should be able to get also the constraints.

Did you try to export the schema instead?
Avatar of RIAS
RIAS
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thanks,where is the export the schema
ASKER CERTIFIED SOLUTION
Avatar of Deepak Chauhan
Deepak Chauhan
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Peter Chan
Peter Chan
Flag of Hong Kong image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
I would recommend going for Deepak's option 3.
Option 2 isn't bad for small tables. For large tables it will take longer so go for option 3.
Avatar of RIAS
RIAS
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thanks Experts! Thanks Vitor !
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo