Forum Discussion

lesommf's avatar
lesommf
Frequent Visitor
2 years ago

Fabric OneLake Shortcut BUG after drop

Hello,

I created a shortcut on my onelake, then transfer my shorcut to another schema via the alter schema transfer command


Then i wanted to delete the table (i am admin)-> 

drop table [onecolasdatadev].[master_data].[structure_test_shortcuts]
 
but i have this error  :
The external policy action 'Microsoft.Sql/Sqlservers/Databases/Schemas/Tables/Drop' was denied on the requested resource.
Msg 368, Level 14, State 1, Code line 16
Cannot drop the table 'structure_test_shortcuts', because it does not exist or you do not have permission.
Msg 3701, Level 14, State 20, Code line 16
Statement ID: {F46B6E25-5B49-4AC0-B253-9C42A2889709}
 
So i deleted the shortcut but the table was not drop and still requestable.
When i call the shorctut api with a get of /shortcuts/Tables/structure_test_shortcuts, i have no infos about this shortuct so it seems to really be deleted.
 
"errorCode": "EntityNotFound",
    "moreDetails": [
        {
            "errorCode": "NotFound",
            "message": "Shortcut structure_test_shortcuts is not found"
        }
    ],
    "message": "The requested resource could not be found"
 
 
My questions are:
  • why i can't drop table from the sql enpoint ?
  • Why my table is working after the deletion of the shorcut.

 

Thank you

 
 

 

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,lesommf

    Regarding the issue you raised, my solution is as follows:

    1.Regarding your first question, the reason why you can't delete the table after the migration, I think it might be related to the fact that you are using ALTER SCHEMA, because in the official documentation, what it mentions is that when you move a security object into the new schema using ALTER SCHEMA, all the permissions associated with that security object are removed. If the owner of the security object has been explicitly set, the owner remains unchanged.

    The following is the relevant documentation:
    ALTER SCHEMA (Transact-SQL) - SQL Server | Microsoft Learn


    Of course this may also have something to do with the DROP ENDPOINT you are using, with DROP ENDPOINT the user must be a member of the sysadmin Fixed Server Role, the owner of the endpoint, or must have been granted CONTROL access to the endpoint, and must not be able to execute the ENDPOINT DDL statement in a user transaction.
    The following is the relevant documentation:
    DROP ENDPOINT (Transact-SQL) - SQL Server | Microsoft Learn

    Delete Tables (Database Engine) - SQL Server | Microsoft Learn


    2.Regarding your second question "Why my table is working after the deletion of the shorcut.", my explanation is as follows:
    The official documentation explains that shortcuts do not perform cascading deletions. When you delete a shortcut, only the shortcut object is deleted. The data in the shortcut target remains unchanged. However, if you perform a delete operation on a file or folder in the shortcut and you have permission to perform the delete operation in the shortcut target, the files and/or folders in the target will be deleted.

    Here is the relevant documentation:
    OneLake shortcuts - Microsoft Fabric | Microsoft Learn

     

    Best Regards,

    Leroy Lu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • lesommf's avatar
      lesommf
      Frequent Visitor

      Hello Anonymous,

      I looked at the documentation and understood that when i moved the table, all the permissions associated with that object are removed.
      So i added the rights in order to delete this table in the new schema (control rights). Of course i added all the rights that i can to test which could work by misunderstanding. But i can't still drop it.

       

      I looked at the DROP ENDPOINT, but i can't understant what it's doing here.

      Is it possible to give me the procedure to drop it ?


      Thank you 

       

      Best regards,

       

      lesommf

  • lesommf's avatar
    lesommf
    Frequent Visitor

    Hi Anonymous ,

     

    Thank you for all your detailed answers, I will try to test that 🙂

     

    Best regards

     

    lesommf