Parsing error

Visualizes SQL Server object dependencies.

Moderators: David Atkinson, Anu Deshpande

Parsing error

Postby cbondeson » Thu May 25, 2006 4:22 pm

We have an sp which assesses information_schema.tables. The parser indicates that "tables" is an "Unresolved Internal Reference" ,"object not found". The sp text follows:

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE proc dbo.DatabaseReIndex AS

--Script to automatically reindex all tables in a database


DECLARE @TableName varchar(255)

DECLARE TableCursor CURSOR FOR
SELECT table_name FROM information_schema.tables
WHERE table_type = 'base table'

OPEN TableCursor

FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
--PRINT "Reindexing " + @TableName
DBCC DBREINDEX(@TableName,' ',90)
FETCH NEXT FROM TableCursor INTO @TableName
END

CLOSE TableCursor

DEALLOCATE TableCursor



GO
cbondeson
 
Posts: 7
Joined: Tue Nov 29, 2005 4:39 pm

Postby Bart Read » Fri Jun 02, 2006 9:45 am

Hi there,


Thanks for the feedback. This is a known problem: since we don't pull in system objects, and this includes the INFORMATION_SCHEMA views, these always appear as unresolved objects.

The workaround for now is just to hide them, however I imagine we might well fix this in a future release. I'll add this to our bug tracking system at any rate.


Many thanks,
Bart Read
Principal Consultant
bartread.com Ltd
Bart Read
 
Posts: 977
Joined: Thu Mar 31, 2005 11:17 am
Location: Cambridge, UK


Return to SQL Dependency Tracker 2

Who is online

Users browsing this forum: No registered users and 0 guests