Forum Discussion
Does Anyone Know How Would/Should Deployment Pipelines Work With Mirrored DBs?
I'm curious about how Mirrored DB would work when deployment pipelines are involved. E.g. I have a Mirror SQL Server set up in Dev workspace and that gets deployed to Test workspace and ultimately Prod. Do I then have 3 Mirror SQL Server running at the same time across 3 different workspaces? I get that there can be deployment rules setup for data sources but regardless of whether they're pointing at the same source (what I intend) or different sources, I ultimately only want 1 Mirror SQL Server to be running. Would all 3 be running unless I turn off the ones in Dev and Test workspaces? What's the situation?
Hi scca,
I don't think Fabric will let you have 3 mirrored databases connected to the same source, regardless if 2 of them are disabled.
If you have 3 different source databases for dev/tst/prd then it would work, but if the source database is the same, only one mirror can exist, so I recommend moving the mirror into a data workspace accessible by all three of your environments.
6 Replies
- tayloramy
Super User
Hi scca,
A database can only be mirrored once, so if I have database A mirrored in a dev workspace, I can no longer mirror database A anywhere else.
I would recommend you mirror your databases to a "data" workspace, something that all of your enviornments (dev, tst, prd) connect to to pull data.
- scca
Advocate III
Meaning if I did try to put it through Deployment Pipeline, it'd return errors if they're pointing at the same DB? Having read through this again, it seems that deployment rules would prevent the "mirroring the same DB" scenario but that comes under "optional". I do also see the point about Mirrored DB isn't started by default so meaning I could, potentially, have that mirrored DB across dev/test/prod but only have the prod one running? I could make changes to a mirror DB (in dev) without running it and settings changed (e.g. adding tables) could still get through deployment pipeline and my running mirror db (in prod) could pick that change up. Would this make sense?
I get the recommendation about it having it in a "data" workspace but say we're going with a simply dev>test>prod flow scenario, could that work?
- tayloramy
Super User
Hi scca,
I don't think Fabric will let you have 3 mirrored databases connected to the same source, regardless if 2 of them are disabled.
If you have 3 different source databases for dev/tst/prd then it would work, but if the source database is the same, only one mirror can exist, so I recommend moving the mirror into a data workspace accessible by all three of your environments.
- v-aatheeque
Community Support
Hi scca
Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.
- v-aatheeque
Community Support
Hi scca
Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.