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
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
I solved it by created a group in Micrsoft Entra ID, granted it contributor access and add myself to the group.
The error is because of permission for your managed identity.
I also got same error.
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.
Then executed successfully.
.
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.