Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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)->
Thank you
Hi @lesommf ,
You can try to drop it by sparksql commands from notebook or you can try %fs rm -r tablepath
Hi @v-linyulu-msft ,
Thank you for all your detailed answers, I will try to test that 🙂
Best regards
lesommf
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.
Hello @v-linyulu-msft,
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