|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 3:33 PM
Points: 11,648,
Visits: 27,768
|
|
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:
sys.sql_dependencies sys.sql_expression_dependencies sys.dm_sql_referenced_entities sys.dm_sql_referencing_entities
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?
Lowell
--There is no spoon, and there's no default ORDER BY in sql server either. Actually, Common Sense is so rare, it should be considered a Superpower. --my son
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 1:17 PM
Points: 8,641,
Visits: 8,273
|
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 1:53 AM
Points: 1,474,
Visits: 2,342
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744,
Visits: 30,025
|
|
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.
sys.dm_sql_referenced_entities sys.dm_sql_referencing_entities 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 2008, MVP 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
|
|
|
|