Monday, 20 November 2017

Database name databasename ignored, referencing object in tempdb

This type of warning you got while working with stored procedure.

Warning : Database name <databasename> ignored, referencing object in tempdb.


Causes: while working with the temporary table you might be used the temp table reference with schema.

ex: select * from databasename.dbo.#tmpTable

this syntax gives you a warning message

Solution:
Don't use reference in your query.

ex: select * from #tmpTable

Sql server will auto manage the temp table with the different different database temp table in tempdb.



No comments:

Post a Comment