Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • phil 16 posts 119 karma points
    Apr 12, 2019 @ 14:58
    phil
    0

    bacpak error when trying to load into sql

    HI,

    I need to get a .bacpak Azure file to import into an SQL database. Ive logged into the cloud database and exported the db which exports to a bacpak file. On trying to import-data tier application im getting an error and I cant import the db correctly. Anyone run into this issue and got a solution?

    Warning SQL72012: The object [test12Data] 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 [test12Log] 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 12824, Level 16, State 1, Line 5 The spconfigure value 'contained database authentication' must be set to 1 in order to alter a contained database. You may need to use RECONFIGURE to set the valuein_use. Error SQL72045: Script execution error. The executed script: IF EXISTS (SELECT 1 FROM [master].[dbo].[sysdatabases] WHERE [name] = N'$(DatabaseName)') BEGIN ALTER DATABASE [$(DatabaseName)] SET CONTAINMENT = PARTIAL WITH ROLLBACK IMMEDIATE; END

    Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed. Error SQL72045: Script execution error. The executed script: IF EXISTS (SELECT 1 FROM [master].[dbo].[sysdatabases] WHERE [name] = N'$(DatabaseName)') BEGIN ALTER DATABASE [$(DatabaseName)] SET CONTAINMENT = PARTIAL WITH ROLLBACK IMMEDIATE; END

  • phil 16 posts 119 karma points
    Apr 12, 2019 @ 15:11
    phil
    103

    of course after hours of not having any luck as soon as a write this I find a solution, if anyone else runs into this a solution was...

    In SMSS

    1. Right-Click on the server instance, select Properties
    2. Select Advanced page, set under Containment the property value to True
    3. Proceed to restore the database backup.
  • Janae Cram 63 posts 439 karma points MVP 8x c-trib
    May 07, 2020 @ 16:55
    Janae Cram
    0

    Thank you so much for this! Fixed my problem perfectly :)

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Oct 29, 2020 @ 13:48
    Chriztian Steinmeier
    0

    Amazing - thanks for this - totally solved my problem too!

    I really hate when ONE SINGLE FLAG can steal 2 hours of your day :D

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft