5146 Error message: Invalid object name '#TmpTable'.
-
Hi Everyone! All of a sudden we are seeing the above error message, in one of our automated jobs. This job runs at 3am everyday. This error occurs on random days, not on a regular basis. There is not much out on this particular error. The temp table is defined in a stored procedure. Thanks!!!
-
Hi Everyone! All of a sudden we are seeing the above error message, in one of our automated jobs. This job runs at 3am everyday. This error occurs on random days, not on a regular basis. There is not much out on this particular error. The temp table is defined in a stored procedure. Thanks!!!
Not enough information to diagnose.
-
Hi Everyone! All of a sudden we are seeing the above error message, in one of our automated jobs. This job runs at 3am everyday. This error occurs on random days, not on a regular basis. There is not much out on this particular error. The temp table is defined in a stored procedure. Thanks!!!
vkEE wrote:
All of a sudden we are seeing the above error message, in one of our automated jobs.
I've never encountered a PC that "suddenly" interprets code in a different way.
vkEE wrote:
This error occurs on random days, not on a regular basis.
..nor does it pick random days to crash. Find out what those days have in common; check if there's exceptional heavy traffic on the network during those days. Check your firewall-log. Check the schedule of your backups, automatic updates and virusscans; are they similarly "random"? Are you sure you got the correct type of temporary table? There's subtle differences between #tmpTable, ##tmpTable and @tmpTable.
vkEE wrote:
The temp table is defined in a stored procedure.
Post the code of the stored procedure and you'll get more and better replies.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
vkEE wrote:
All of a sudden we are seeing the above error message, in one of our automated jobs.
I've never encountered a PC that "suddenly" interprets code in a different way.
vkEE wrote:
This error occurs on random days, not on a regular basis.
..nor does it pick random days to crash. Find out what those days have in common; check if there's exceptional heavy traffic on the network during those days. Check your firewall-log. Check the schedule of your backups, automatic updates and virusscans; are they similarly "random"? Are you sure you got the correct type of temporary table? There's subtle differences between #tmpTable, ##tmpTable and @tmpTable.
vkEE wrote:
The temp table is defined in a stored procedure.
Post the code of the stored procedure and you'll get more and better replies.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
Thank you for your response. The job runs at 3am just for that reason, so we don't have resource issues. It has crashed 3 times the past few months, but our seniors want this matter researched since it is a new bug in their test environment. They don't want this bug to migrate to production environment. I got this error message of the log file, and it is defined with single hash, #.
-
Hi Everyone! All of a sudden we are seeing the above error message, in one of our automated jobs. This job runs at 3am everyday. This error occurs on random days, not on a regular basis. There is not much out on this particular error. The temp table is defined in a stored procedure. Thanks!!!
-
Thank you for your response. The job runs at 3am just for that reason, so we don't have resource issues. It has crashed 3 times the past few months, but our seniors want this matter researched since it is a new bug in their test environment. They don't want this bug to migrate to production environment. I got this error message of the log file, and it is defined with single hash, #.
vkEE wrote:
our seniors want this matter researched since it is a new bug in their test environment. They don't want this bug to migrate to production environment.
Unless you are in full control of your environment and able to debug every device-driver, some bugs will remain unsolved.
vkEE wrote:
It has crashed 3 times the past few months
Do you know at what time? Anything in the event-log at that specific time? Does it run under .NET 4? If yes, you could consider making a minidump.
vkEE wrote:
and it is defined with single hash, #.
I was hinting at researching the three. Whether it's the correct one will depend on the context of it's use in the stored procedure. You will have to verify the things mentioned, and again, you'd get a more usefull answer if you provide the code for the stored procedure.
There are two types of temporary tables: local and global. They differ from each other in their names, their visibility, and their availability. Local temporary tables have a single number sign (#) as the first character of their names; they are visible only to the current connection for the user, and they are deleted when the user disconnects from the instance of SQL Server. Global temporary tables have two number signs (##) as the first characters of their names; they are visible to any user after they are created, and they are deleted when all users referencing the table disconnect from the instance of SQL Server.
..and it becomes more confusing[^] if you are
EXECUTE
ing dynamic SQL.Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]