SQL Azure bacpac – Import Data-tier Application Operation Failed

When importing a Exported SQL Azure DB to a local SQL server instance you may see this error. In short the reason for this error is that the DB being exported was in active use at the time of the export. The data in the Database was active changing as Azure was exporting it and this can cause data inconsistency. The export functionality does not guarantee transactional consistency.
If there are foreign key relationships between tables and there is inconsistency in the table data, the import will show an error when foreign key constraints are being re-nabled after the import.

How to fix/avoid this problem?
1. Fix the offending data rows
2. Make a copy of the Azure DB and export from the copy. The copy function essentially takes a snapshot of the DB and gurantees transactional consistency. Obviously, the bacpac export file won’t have all the data after the copy was created.

TITLE: Microsoft SQL Server Management Studio

Could not import package.
Warning SQL72012: The object [CRTM_Demo_Data] exists in the target, but it will not be dropped even though you selected the ‘Generate drop statements for objects that are in the target database but that are not in the source’ check box.
Warning SQL72012: The object [CRTM_Demo_Log] exists in the target, but it will not be dropped even though you selected the ‘Generate drop statements for objects that are in the target database but that are not in the source’ check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 547, Level 16, State 0, Line 3 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint “FK_dbo.Address_dbo.CoolRunningsBaseType_Id”. The conflict occurred in database “CRTM_Demo”, table “dbo.CoolRunningsBaseType”, column ‘Id’.
Error SQL72045: Script execution error. The executed script:
PRINT N’Checking constraint: FK_dbo.Address_dbo.CoolRunningsBaseType_Id [dbo].[Address]’;

ALTER TABLE [dbo].[Address] WITH CHECK CHECK CONSTRAINT [FK_dbo.Address_dbo.CoolRunningsBaseType_Id];




Installing Windows 2012 R2 Intel 82574L Ethernet Drivers for Mac Pro Mid 2012

I recently picked up a Mac Pro 2012 from my employer when they were getting rid of some old hardware. This machine is still pretty good with a Quad Core Xeon running at 3.2 Ghz. It had 8 GB of RAM, but I had some extra RAM lying around, so I bumped it up to 14 GB. Next, I added an older 128 GB SSD and the machine was ready to rock. I am planning to using it as a personal web server, so I need to install windows server 2012 R2 on it. After some struggling I was able to install it in the SSD drive.

After installing windows and running the bootcamp driver installer the network adapters were still not being recognized. Both network adapters had a yellow exclamation mark in the Device Manager. I had no network connectivity.

I decided to use a USB-Network converter for the time being. This helped me download stuff directly from the MAC instead of copying files using a USB stick.

I knew that both the adapters were Intel(R) 82574L Gigabit Network Adapter (I had looked up hardware properties when it was booted into OSX mode). So I decided to manually run the \BootCamp5.1.5640\BootCamp\Drivers\Intel\IntelEthernetInstalled64.exe again. Still no luck. I decided to extract the contents of the IntelEthernetInstalled64.exe and manually install the driver.

1. Unzip the IntelEthernetInstalled64.exe to IntelEthernetInstaller64 folder
You should see a bunch of .cat, .din, .inf, .dll and .txt files in this folder.

2. In Device Manager right click on the problem network adapter and click on Update Driver. This should bring you to the Update Driver Software screen shown below where you can select how you want windows to search for the driver.


3. Next you need to click on the “Browse my computer for driver software”. This will take you to the next “Browse for driver software on your computer” step shown below.

4. Next click on “Let me pick from a list of device drivers on my computer” option. This will take you to the “Select your device’s type from the list” step shown below.


5. Select Network adapters in the screen shown in the previous step and click Next. This will bring you to the “Select Network Adapter” step shown below.


6. Click on “Have Disk”. This will open a browse file modal. Locate the IntelEthernetInstaller64 folder from the 1st step and pick e1y62x64.inf file and click on open as shown below.

7. You should be back at the Select Network Adapter screen now with a list of Intel (R) Network Connections. Pick the “Intel(R) 82574L Gigabit Network Connection” from the list and click on Next.


8. Windows will start installing the driver software and if everything goes well you should see the success screen shown below

9. Do the above steps for the second network adapter if you need both adapters to work.