Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
JAnder
Helper II
Helper II

Replication Issue With Azure SQL Mirror - With Service Principal Owner

I have setup an Azure SQL mirror in a workspace using a service principal and the fabric REST API.

 

  • Service Principal in an Entra group, the group has a login on the server and a user on the database being mirrored. It has these permissions: ALTER ANY EXTERNAL MIRROR, CONNECT, SELECT, VIEW PERFORMANCE DEFINITION
  • The Connection is created to use the principal for authentication but also created by the principal, so it is the owner.
  • The mirror is created by the principal also and uses the connection.
  • The principal has admin level access on the workspace

 

When I view the mirror on the workspace and choose "Start replication" it then switches to running. However the tables never replicate.  If I then choose to "Configure Replication" I get a permissions error as the connection is owned by the service principal. 

 

If I run `EXEC sp_help_change_feed;` on the source database, I can see everything is at State 1 (pending) while a manually setup (not using the API) mirror on another workspace generates state 4 results.

 

There is the issue that we cannot see the connection or configure replication as its owned by the principal. I am not sure if we can set that as shared using the API?  But the main issue is the tables are not replicating even though the mirror shows as running.  

 

Has anyone seen these issues?

 

 

 

 

 

 

1 ACCEPTED SOLUTION
JAnder
Helper II
Helper II

For anyone reading this in the future, when the mirror is created by the API, you need to set the SAMI permissions either by going to the mirror in the portal and choosing share or by using an API call. I had not done that.

View solution in original post

1 REPLY 1
JAnder
Helper II
Helper II

For anyone reading this in the future, when the mirror is created by the API, you need to set the SAMI permissions either by going to the mirror in the portal and choosing share or by using an API call. I had not done that.

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Users online (6,265)