You can translate the question and the replies:

Data Movement Temporary Tables not deleting from SQL Server data source

I have configured one of my views to use Data Movement and create temporary tables on one of my SQL Data Sources (using jdbc drivers). The view executes correctly, but the tables created on the data source are not being cleaned up after the view completes. I can confirm that the data_movement_clean_resources flag has not been added to my views CONTEXT as it is my understanding that this setting defaults to true and is only required if I wish to set the value to false an want the tables to persist after execution. In my case I want them to be cleaned up. I am connecting to VDP to execute the view using Kerberos authentication and I can confirm that from traces against my SQL data source I can see the operations which create, populate and query the Denodo temporary tables. All these requests are made using my Kerberos credentials. The credentials used also does have permissions to delete these tables, as I can successfully delete these tables manually. However, the SQL trace does not have an requests (started or completed) to delete these tables leading me to the conclusion that Denodo is not attempting to clean up these tables once the view completes. Could someone please advise if there is some other setting or configuration I need to make in order for these tables to be deleted on completion of the view as their persistance should only be necessary for debugging purposes from what I understand.
user
09-02-2023 05:21:36 -0500
code

3 Answers

Hi, The tables created from a temporary table will stay there until a user deletes the table, the user closes the session on the database, or 48 hours have passed in which the Virtual DataPort will delete the temporary table. You can refer to [Temporary Tables](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/temporary_tables/temporary_tables) in the Virtual DataPort VQL Guide for more information. Hope this helps!
Denodo Team
09-02-2023 18:49:14 -0500
code
Thank you for your answer, however I was referring to the temporary tables which are system generated during data movement and not the custom temporary tables which can be created manually. I have tried closing my connection and the data movement tables still persist in the data source database. It was also my understanding from the [Data movement](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/optimizing_queries/data_movement/data_movement) documentation that these tables should be cleaned up by the system at the end of the view execution.
user
10-02-2023 04:42:41 -0500
Hi, There is a possibility that the account that Denodo uses to connect to the data source may not have delete privileges. I would test this by running a query with data movement in the VQL Shell explicitly setting the 'data_movement_clean_resources' value to 'true'. Next, I would look at the execution trace of the VQL, find the name of the temporary table and check in the data source if the temporary table exists in the data source. If it still exists, then I would check the privileges of the user Denodo connects to in the data source and make sure it has delete privileges. For more information, you can refer to [Options of the CONTEXT Clause that Control a Data Movement](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/optimizing_queries/data_movement/data_movement#options-of-the-context-clause-that-control-a-data-movement). Hope this helps!
Denodo Team
16-03-2023 18:47:39 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here