@shailaja Azure - Thanks for the question and using MS Q&A platform.
To resolve this issue, you need to have proper rights to access the file. Easiest way is to grant yourself
Storage Blob Data Contributor
role on the storage account you're trying to query.
If your query fails with the error File cannot be opened because it does not exist or it is used by another process
and you're sure that both files exist and aren't used by another process, serverless SQL pool can't access the file. This problem usually happens because your Microsoft Entra identity doesn't have rights to access the file or because a firewall is blocking access to the file.
By default, serverless SQL pool tries to access the file by using your Microsoft Entra identity. To resolve this issue, you must have proper rights to access the file. The easiest way is to grant yourself a Storage Blob Data Contributor role on the storage account you're trying to query.
For more information, see:
- Microsoft Entra ID access control for storage
- Control storage account access for serverless SQL pool in Synapse Analytics
For more details, see Query fails because file cannot be opened.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.