skip to Main Content

I have created a stored procedure when I run it manually:
EXEC createSQLServerlessView_gold_SalesOrderDetail; inside develop-> SQL script it works fine.
But When I do integration-> pipeline -> stored procedure and choose the same procedure and then run it, it gives me this error: "Content of directory on path '.../_delta_log/*.*' cannot be listed.
here is Sp script:

USE gold_db_demoGO

CREATE OR ALTER PROC createSQLServerlessView_gold_SalesOrderDetail
AS
BEGIN
    DECLARE @sql NVARCHAR(MAX)

    SET @sql = N'CREATE OR ALTER VIEW SalesOrderDetail AS
        SELECT * FROM OPENROWSET(
            BULK ''https://destoragedemo2.dfs.core.windows.net/gold/SalesLT/SalesOrderDetail/'',
            FORMAT = ''DELTA''
        ) AS [result]'

    print @sql

    EXEC sp_executesql @sql
END
GO

enter image description here

enter image description here

Solution
work around is create a group in Microsoft Entra ID, grant it contributor role and add the the current user as a member.

2

Answers


  1. Chosen as BEST ANSWER

    I solved it by created a group in Micrsoft Entra ID, granted it contributor access and add myself to the group.


  2. The error is because of permission for your managed identity.

    I also got same error.

    enter image description here

    Later i given Storage Blob Data Contributor role for managed identity on the storage account where your files present, check managed identity in you linkedservice to give permission.

    enter image description here

    Then executed successfully.

    enter image description here.

    If you use dedicated pool then you can create credentials in sql server
    check this stack solution for more about it.

    UPDATE.

    Check the access like below in your storage account whether your synapse workspace managed identity present or not.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search