I'm trying to add a login/User to a replicated database on Azure Synapse Serverless.
I created a new login/User
CREATE LOGIN <Name> WITH PASSWORD = 'Password';
CREATE USER <Name> FOR LOGIN <Name>;
Now I can access the db and see all tables. But when I tried to query a table I get:
Cannot find the CREDENTIAL 'https://....... , because it does not exist or you do not have permission.
Then I created a scoped credential:
CREATE DATABASE SCOPED CREDENTIAL [SasToken]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'sp=XXXX';
Now I'm stuck with an error when I try:
GRANT REFERENCES ON DATABASE SCOPED CREDENTIAL::[SasToken] TO [Name];
The message is saying
Operation GRANT is not allowed for a replicated database.
How to solve this. I only need a solution that works with Serverless. Thank you on advanced.
1条答案
按热度按时间kr98yfug1#
I tried to replicate your issue in my environment
I got same error which you got
As per this above error is returned if you are trying to modify a Lake database, create external tables, external data sources, database scoped credentials or other objects in your Lake database. These objects can be created only on SQL databases.
The Lake databases are replicated from the Apache Spark pool and managed by Apache Spark. Therefore, you cannot create objects like in SQL Databases by using T-SQL language. So, it is not possible to perform these types of operations on data lake database.