Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When attempting to set up an Infrastructure as a Service POC for our business, I am encountering problems importing the database exported from our Azure SQL Database implementation. I'm getting messages about trying to DROP objects such as [PRIMARY]. I only get this in our application database, not our error logging database, which imported without error.

Snip of import errors

The database is created, and all objects are there, but there are differences in nearly every table related to constraint checking of the following nature:

Export Source:

ALTER TABLE [USER_MANAGEMENT].[ACTION_PAGE_LK]
ADD CONSTRAINT [FK_ACTIONPAGELK_ICONGUID]
    FOREIGN KEY ([ICON_GUID])
    REFERENCES [USER_MANAGEMENT].[ICON_LK] ([ICON_GUID])

GO

Import Target:

ALTER TABLE [USER_MANAGEMENT].[ACTION_PAGE_LK] WITH NOCHECK
ADD CONSTRAINT [FK_ACTIONPAGELK_ICONGUID]
    FOREIGN KEY ([ICON_GUID]) 
    REFERENCES [USER_MANAGEMENT].[ICON_LK] ([ICON_GUID])

GO

ALTER TABLE [USER_MANAGEMENT].[ACTION_PAGE_LK] NOCHECK CONSTRAINT [FK_ACTIONPAGELK_ICONGUID]

GO
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.