Get "Error (S0002, D0)...[SQL Server][Invalid object name...]" quering temp table
説明
The following error is returned, when executing SQL that queries a temp table. The SQL runs fine outside of BMF.
Error (S0002, D0) – [Microsoft][SQL Server Native Client 11.0 ][SQL Server][Invalid object name ‘TABLE_NAME’.
原因
The issue is due to the scope of the temporary table that is created and how BMF does the transactions. Temporary tables are only visible to the user session or stored procedure/function that creates them. BMF prepares and then executes the SQL and if the prepared statement is not called again, the statement is dropped. This causes the temporary table to go out of scope and become not visible to the next transaction.
対策
WORKAROUND:
None
STATUS:
This issue is fixed in Benchmark Factory 8.2. This version can be downloaded from the downloads section of our website, which you can access by clicking here.