Quantcast
Channel: How do I copy SQL Azure database to my local development server? - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Answer by Hari for How do I copy SQL Azure database to my local development server?

$
0
0

Looks like the functionality is missing from Management Studio in 2022. Here is how I do it using Azure Data Studio:

  1. Install Azure Data Studio
  2. Open Azure Data Studio
  3. Install the extension called Admin Pack for SQL Server
  4. Restart Azure Data Studio
  5. Setup connections for both source database (Azure) and destination (local machine)
  6. Execute statement in your local DB Engine on master database:
sp_configure 'contained database authentication', 1; GO  RECONFIGURE;GO
  1. Right click on source database and select Data-tier Application WizzardSelect Export to .bacpac file [Export bacpac] (4th, last option in my current version)
  2. Finish the wizard
  3. Right click on destination database and select Data-tier ApplicationWizzard
  4. Select Import from .bacpac [Import bacpac] (3rd option in my version)
  5. Select the .bacpac file previously created and finish the wizard

After importing the logins and users are created, but their default schema isn’t set. If default shcema is required that needs to be handled manually. In that case:Open an admin connection to the local copy and run:USE [imported-db]; ALTER USER imported-user WITH DEFAULT_SCHEMA = whatever;


Viewing all articles
Browse latest Browse all 26

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>