﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Avoid getting messages while executing Stored Procedure / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 11:56:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Avoid getting messages while executing Stored Procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1413527-391-1.aspx</link><description>First, I would just refer to a temp table by its name and not fully qualify it.Second, it you're in a loop, you may not need to create and drop the table over and over again.  It may be better to create it at the start of the procedure, clear it out at the end of each iteration, then drop it at the end of the procedure.  Use "set statistics time on"  to examine performance implications.I know these are generalities, but I would need to see the code to offer any specific suggestions.</description><pubDate>Thu, 31 Jan 2013 07:40:23 GMT</pubDate><dc:creator>Ed Wagner</dc:creator></item><item><title>RE: Avoid getting messages while executing Stored Procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1413527-391-1.aspx</link><description>[code="sql"]SELECT 1 AS a INTO #tmp;GODROP TABLE tempdb..#tmp;[/code][code="sql"]SELECT 1 AS a INTO #tmpGODROP TABLE tempdb.dbo.#tmp[/code][code="sql"]SELECT 1 AS a INTO #tmpGOSELECT * FROM tempdb..#tmp-- look in messages tab[/code]Modify your code so it does not fully-qualify references to temp tables. Post your code if you need help with identifying where or how to do that.</description><pubDate>Thu, 31 Jan 2013 05:56:39 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: Avoid getting messages while executing Stored Procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1413527-391-1.aspx</link><description>Post the code.</description><pubDate>Wed, 30 Jan 2013 03:14:19 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Avoid getting messages while executing Stored Procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1413527-391-1.aspx</link><description>Hi,When i execute an sp am getting the below message. [quote]"Database name 'tempdb' ignored, referencing object in tempdb."[/quote]In this sp am creating and dropping some temp tables. I understood, because of dropping the temp tables am getting this message. But since it has the loop involved, am getting the message for n number of times.Can any one advice me on this how to stop getting this warning kind of message which is no longer useful for me.Regards,Karthik</description><pubDate>Wed, 30 Jan 2013 02:36:09 GMT</pubDate><dc:creator>Karthiart</dc:creator></item></channel></rss>