Hany Hussein
Hany Hussein

Reputation: 11

Need to create sql view accessible by person but this person cant access the database

I have multi tenant azure sql database. I need to create readonly view to one customer to read some data without able to access any other database tables or views. How i can do that

Upvotes: 1

Views: 47

Answers (2)

Leon Yue
Leon Yue

Reputation: 16431

Alberto Morillo provided a good way for you.

But from the Azure Data Share Documentation, Data share only can help share the view data to the customer, can not receive the request from customer, it's unidirectional.

According your comment, customer want to access the view from other application through call or API,

The answer is no, we can not do that for now without the permission for login or access the database.

Hope this helps.

Upvotes: 1

Alberto Morillo
Alberto Morillo

Reputation: 15694

Please try Azure Data Share to share a view with any person you want without giving access to the database.

  1. Create a Data Share account.
  2. Navigate to your Data Share Overview page.

enter image description here

  1. Select Start sharing your data.
  2. Select Create.
  3. Fill out the details for your Data Share. Specify a name, description of share contents, and terms of use (optional).

enter image description here

  1. Select Continue
  2. To add Datasets to your Data Share, select Add Datasets.

enter image description here

  1. Select the dataset type that you would like to add.

enter image description here

  1. Specify the view you want to share with.
  2. In the Recipients tab, enter in the email addresses of your Data Consumer by selecting '+ Add Recipient'.

enter image description here

  1. Select Continue.
  2. Set off "Snapshot schedule".
  3. In the Review + Create tab, review your Package Contents, Settings, Recipients, and Synchronization Settings. Select Create.

Upvotes: 1

Related Questions