I exported and downloaded my database from Azure as a .bacpac file.
I want to install Umbraco locally and use this database locally.
How do I do it?
Every time when I open the Microsoft SQL Server Management Studio it tries to connect to the database on Azure:
Then when I put the password it will connect to the database on Azure:
But I want to work on the local .bacpac file.
My questions are:
How do I connect on the Microsoft SQL Server Management Studio to the local .bacpac file ?
How do I connect in the Web.config to the local database ? What should I put in the connectionString?
<connectionStrings>
<remove name="umbracoDbDSN" />
<add name="umbracoDbDSN" connectionString="Server=tcp:xxxxx.database.windows.net,1433;Data Source=xxxxx.database.windows.net;Initial Catalog=xxxx;Persist Security Info=False;User ID=xxxx;Password=xxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=3600;" providerName="System.Data.SqlClient" />
</connectionStrings>
So basically I want to open and work on the local .bacpac and not on the one on the server, and only after I finish the work to deploy it back.
How do I do it?
Thanks
3
Answers
Thanks a lot for your help! I was able to install Umbraco locally.
Just one step I had to do before importing the database locally, is setup a local sql server, which I found a good explanation here:
Create Local SQL Server database Create Local SQL Server database
The .bacpac file is essentially a backup of another database, so you can’t "open" or "connect" to it directly. You need to restore it on your local database server. Which, by the way, you might not have installed as it isn’t part of Management Studio. When you open Management Studio you can just click Cancel on the Connect dialog that has your Azure server in it, and then maybe follow one of the many guides available via Google 😉 Like this one, maybe: https://www.netreo.com/microsoft-azure/how-to-restore-sql-azure-bacpac-to-local-sql-server/
Here are the steps that you should follow;
And here is how you can connect to your local db from your local Umbraco website: