Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 208 error and SQL Profiler

Author  Topic 

sfalter
Starting Member

15 Posts

Posted - 2005-03-16 : 14:03:03
It is my understanding that error 208 indicates reference to an object that doesn't exist. Following is the output from a trace where I am getting this error.

row event textdata
--- ----- --------------------------------------------------
20 13 exec sel_transactions 'johnk','johnk','270'
21 12 exec sel_transactions 'johnk','johnk','270'
22 13 exec sel_rpt_all_transaction '1/1/2005','3/16/2005'
23 33 Error: 208, Severity: 16, State: 0
24 33 Error: 208, Severity: 16, State: 0
25 33 Error: 208, Severity: 16, State: 0
26 33 Error: 208, Severity: 16, State: 0
27 33 Error: 208, Severity: 16, State: 0
28 33 Error: 208, Severity: 16, State: 0
29 33 Error: 208, Severity: 16, State: 0
30 33 Error: 208, Severity: 16, State: 0
31 33 Error: 208, Severity: 16, State: 0
32 33 Error: 208, Severity: 16, State: 0
33 33 Error: 208, Severity: 16, State: 0
34 33 Error: 208, Severity: 16, State: 0
35 33 Error: 208, Severity: 16, State: 0
36 33 Error: 208, Severity: 16, State: 0
37 33 Error: 208, Severity: 16, State: 0
38 33 Error: 208, Severity: 16, State: 0
39 33 Error: 208, Severity: 16, State: 0
40 33 Error: 208, Severity: 16, State: 0
41 33 Error: 208, Severity: 16, State: 0
42 33 Error: 208, Severity: 16, State: 0
43 33 Error: 208, Severity: 16, State: 0
44 33 Error: 208, Severity: 16, State: 0
45 33 Error: 208, Severity: 16, State: 0
46 12 exec sel_rpt_all_transaction '1/1/2005','3/16/2005'
47 13 exec sel_rpt_tran_not_ver '1/1/2005','3/16/2005'
48 33 Error: 208, Severity: 16, State: 0
49 33 Error: 208, Severity: 16, State: 0
50 33 Error: 208, Severity: 16, State: 0
51 33 Error: 208, Severity: 16, State: 0
52 33 Error: 208, Severity: 16, State: 0
53 33 Error: 208, Severity: 16, State: 0
54 33 Error: 208, Severity: 16, State: 0
55 33 Error: 208, Severity: 16, State: 0
56 33 Error: 208, Severity: 16, State: 0
57 33 Error: 208, Severity: 16, State: 0
58 33 Error: 208, Severity: 16, State: 0
59 33 Error: 208, Severity: 16, State: 0
60 33 Error: 208, Severity: 16, State: 0
61 33 Error: 208, Severity: 16, State: 0
62 33 Error: 208, Severity: 16, State: 0
63 12 exec sel_rpt_tran_not_ver '1/1/2005','3/16/2005'
64 13 exec sel_recon_rpt '1/1/2005','3/16/2005','270'
65 12 exec sel_recon_rpt '1/1/2005','3/16/2005','270'

The SP runs successfully, my users are receiving the data.

I have executed the SP in Query Analyzer providing the same parameters as input and do not receive the error, although I have done this on a simulation server without running a trace.

So, my question....what am I missing in SQL Profiler that would report the object(s) not found?

I've read BOL until I'm blue in the face.

Thanks.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-16 : 16:24:47
Possibly they need to refer to the object name with the two part naming convention. ObjectOwner.ObjectName

Tara
Go to Top of Page

sfalter
Starting Member

15 Posts

Posted - 2005-03-16 : 17:10:28
Thanks for the quick reply.

One more question, since I believe all tables are referred to with dbo. in front, what about temp tables? Could I possibly be seeing this error when a temp table is referenced?

Thanks again.
Go to Top of Page

sfalter
Starting Member

15 Posts

Posted - 2005-03-16 : 17:12:43
Sorry for the back to back posts, I forgot to mention one other thing.

We've run Profiler on this production server several times but I did turn on some new options. I can't tell you what they are right now because it is still running, I'll get them to you tomorrow, but I'm wondering if I've been getting this error all along and just didn't know it. This application has been in production for 4+ years now and I'm trying to solve another problem that may or may not be related to these messages.

Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-16 : 17:54:11
To figure out which query is causing the problem, find the row directly after the exception. That's the one causing the error. That's of course if you capture it though. Let us know how the trace is setup so that we can tell you if you will capture the query.

Tara
Go to Top of Page

sfalter
Starting Member

15 Posts

Posted - 2005-03-17 : 09:01:10
Events chosen, in whole:
Errors and Warnings
Stored Procedures
TSQL

Capturing all data columns

The only filter is on the login name

Thanks.
Go to Top of Page

sfalter
Starting Member

15 Posts

Posted - 2005-03-17 : 12:21:14
This is very interesting. Here is a little snippet of code similar to the SP that is throwing the 208 error:
--------------------------------------
create table #cc
(credit_card_id int,
credit_card_number_code char(6),
credit_card_active_flag bit,
user_id int)
insert into #cc
select cc.credit_card_id, cc.credit_card_number_code,
cc.credit_card_active_flag, cc.user_id
from dbo.adm_credit_card cc
where cc.user_id in (select u.user_id from dbo.adm_user u
where u.agency_code='140')

select * from #cc

drop table #cc
---------------------------
When I execute this I get two 208 errors after profiler reports the SQL:BatchStarting and before SQL:StmtStarting.

Now, I ran just the create statement, no errors. Then I ran the insert, select and drop statements. Again, no errors. But all together???

It isn't causing any real problems, I'd just like to understand this better so I can look at the profile output and know if I'm dealing with a real issue or not.

Thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-17 : 12:23:45
You should capture the query then. So search through your trace results, find the exception, then look at the row immediately after the exception.

Tara
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-17 : 12:26:19
Well ## means global temporary table. So can more than one user execute the stored procedure at a time? If so, then one user may be dropping the table when another one is still accessing it, hence your 208 error.

Tara
Go to Top of Page

sfalter
Starting Member

15 Posts

Posted - 2005-03-17 : 13:34:00
I can't use a global temp table. Two users could call the same SP at the same time, but the agency code would be different resulting in different data being returned.

I've played with temp tables quite a lot, two sessions open at the same time can't access the same temp table (#) so I'm not sure one could drop the other sessions table. Or is this an incorrect assumption?

Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-17 : 13:35:29
Oops, I misread your post. I thought I saw ##.

Tara
Go to Top of Page
   

- Advertisement -