November 28, 2001 at 9:23 am
Have just started doing some performance monitoring using the profiler tool. Each time a sp is called which creates a temporary table, exception 208 is raised, severity = 16, just before the line which creates the temp table. While this is not a critical error, I would obviously like to understand it and trap it down - any ideas?
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
November 28, 2001 at 10:20 am
November 28, 2001 at 12:59 pm
BOL only has the following:
Error 208
Severity Level 16
Message Text
Invalid object name '%.*ls'.
And a brief description... but it only talks about trying to reference a temp table that was created using the EXEC command. Not very helpful.
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
November 28, 2001 at 2:37 pm
Maybe its a scoping issue? It is a local or global temp?
Andy
November 29, 2001 at 1:49 am
It's a local table not created using EXEC.
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
December 18, 2001 at 4:12 pm
I've got the same exception when I try to create a temp table.
December 18, 2001 at 4:49 pm
December 18, 2001 at 6:23 pm
SET NOCOUNT ON
DECLARE @Var varchar(20),
@Countint
SET @Var = ''
CREATE TABLE #Var ( ID INT IDENTITY(1,1),Var varchar(40) )
INSERT INTO #Var SELECT 101
INSERT INTO #Var SELECT 102
INSERT INTO #Var SELECT 103
SET @Count = (SELECT COUNT( ID) FROM #Var )
DROP TABLE #Var
SELECT @Var AS TEST
I run this in SQL SERVER 7.0 SP2 but I've tried at home as well on a SQL 2000 SP1 and I get the same exception.
Thanks!
December 19, 2001 at 5:30 pm
This works without error using SQL2K Developer Ed on my workstation.
Andy
December 19, 2001 at 5:35 pm
Works on local SQL2K Personal, 2 SQL 2K Server SP1, and on SQL 7, SP2 boxes.
Steve Jones
December 19, 2001 at 5:40 pm
Strange!
I tested on SQL SERVER 7.0 SP2 and SQL SERVER 2000 SP1.The difference was that I got the exception every time I run the query in SQL SERVER 7.0 but not in 2K version.
Sica
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply