Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Trace Flag Forcing All Dependancies to exist at Proc Creation? Expand / Collapse
Posted Wednesday, August 29, 2012 6:06 AM



Group: General Forum Members
Last Login: Today @ 2:39 PM
Points: 14,540, Visits: 38,379
OK I'm in a discussion with a coworker related to dependancies.

you know you can create a procedure that used defered resolution , so it can be created without the object (like a table, for example) having to exist at Proc Creation time.
this can result, obviously, in dependancies being inaccurate if you look through any of the dmv's:


my coworker insists there is a way via a startup flag to turn off this feature, and force all objects to exist when a procedure is created in order to prevent missing dependancies;
When i produced a list of trace flags from microsoft, he said it's an unsupported flag, but doesn't know the number.

I insist there is no such functionality. to fix depednancies, I've always recompiled all objects, and checked for invalid objects afterwards.

Anyone ever heard of this magic trace flag?


help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1351542
Posted Wednesday, August 29, 2012 8:06 AM



Group: General Forum Members
Last Login: Today @ 2:44 PM
Points: 16,134, Visits: 16,835

he said it's an unsupported flag, but doesn't know the number.

Sounds to me like a lot of smoke blowing is going on there.


Need help? Help us help you.

Read the article at for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1351641
Posted Wednesday, August 29, 2012 10:43 AM


Group: General Forum Members
Last Login: Today @ 9:21 AM
Points: 2,751, Visits: 5,187
It's an active MS Connect issue (from SQL 2005 no less!), so I guess it's not an option...
Post #1351762
Posted Wednesday, August 29, 2012 12:38 PM



Group: General Forum Members
Last Login: Today @ 1:56 PM
Points: 45,616, Visits: 44,144
Never heard of such a trace flag. If one did exist that turned off deferred name resolution, it would spectacularly break procedures that create and use temp tables.

These should be OK even with deferred name resolution. They were created in SQL 2008 because of that problem.

From BoL:
Unlike earlier versions of SQL Server, in which dependencies were tracked by ID, dependencies are now tracked by name. This means that the Database Engine tracks dependency information between two entities even if the referenced entity does not exist at the time the referencing entity is created. This circumstance can occur because of deferred name resolution. For example, a stored procedure that references a table can be successfully created, but not executed, even if the referenced table does not exist in the database. The Database Engine records the dependency between the procedure and table, however, an ID for the table cannot be recorded because the object does not yet exist. If the table is later created, the ID of the table is returned with the other dependency information.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1351836
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse