Cannot be opened because it does not exist or it is used by another process.

Anonymous
2022-12-05T18:56:23.397+00:00

Hi there,
I've created Synapse Analytics workspace but I can't query the file.
I can freely download those but yet the generic top 100 isn't working. I've got right IAM permissions.

267305-synapse.png

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,381 questions
{count} vote

Accepted answer
  1. PRADEEPCHEEKATLA 90,661 Reputation points Moderator
    2022-12-06T10:51:13.55+00:00

    Hello @Anonymous ,

    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 saying, File cannot be opened because it does not exist or it is used by another process and you're sure both file exist and it's not used by another process it means serverless SQL pool can't access the file. This problem usually happens because your Azure Active Directory identity doesn't have rights to access the file. By default, serverless SQL pool is trying to access the file using your Azure Active Directory identity.

    For more details, see Query fails because file cannot be opened.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is jhow you can be part of Q&A Volunteer Moderators

1 additional answer

Sort by: Most helpful
  1. Manthan Madhukar Patil 25 Reputation points
    2024-02-02T11:04:16.61+00:00

    Hello @Bryan Wang ,

    Welcome to the Microsoft Q&A platform. Answer to your question is very simple, below are the steps

    1. Go to the storage account which is interacting with serverless sql pool of synapse
    2. click on container
    3. right click on container name and then click manage ACL
    4. then allow read, write, execute permissions to all users
    5. repeat this process for all directories and all files in that container including container itself

    I hope this helps. Do let me know if you have any queries. Please don’t forget to Accept Answerand Up-Vote wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.