3
I have a service where I load data from an ERP into a DW. The source of the data is SQL Server 2008 R2 10.50.1600.1 and the target server MS SQL Server 2008 10.0.5512.0 SP3.
The service performs a stored Procedure that generates temporary tables that feeds a physical table that generates the query that feeds the DW tables.
Temporary tables created by the query even after deletion remain loaded in the database TempDB
.
The query is for hours running and not the load on the destination seat.
Even after executing the command below the tables remain in the Tempdb database:
IF EXISTS(SELECT * FROM Tempdb..SysObjects WHERE Name LIKE'%#TEMP%')
DROP TABLE #TEMP
Already changed the permission level on whether to keep the problem.
Error presented:
Cannot drop the table '#temp' because it does not exist or you do not have permission. [SQLSTATE 42S02] (Error 3701).
Thank you so much for the help worked out.
– WASBOARD
@Wagnerantoniodasilva Take a look at the [tour] you can vote on all the questions and answers on the site and choose one of the answers to your question as the one that best helped you solve the problem.
– Maniero