Edit C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en\Tracking_Logic.sql
ÿþ- - C o p y r i g h t ( c ) M i c r o s o f t C o r p o r a t i o n . A l l r i g h t s r e s e r v e d . S E T N O C O U N T O N / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * P S S Q F E P a t c h T a b l e A l l Q F E s s h o u l d h a v e a n e n t r y i n t h i s t a b l e * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / - - O n l y c r e a t e t a b l e i f i t d o e s n ' t e x i s t , d o n o t d r o p a n d r e c r e a t e ! I F O B J E C T _ I D ( ' S q l T r a c k i n g S e r v i c e Q f e L o g ' ) I S N U L L B E G I N C R E A T E T A B L E [ d b o ] . [ S q l T r a c k i n g S e r v i c e Q f e L o g ] ( [ I n s t a l l D a t e T i m e ] d a t e t i m e N O T N U L L d e f a u l t ( g e t u t c d a t e ( ) ) , [ K b I d ] i n t N U L L , [ D e s c r i p t i o n ] n v a r c h a r ( 2 5 6 ) N U L L ) E N D G O - - T h i s s c r i p t w i l l b e r u n o n t o p o f i t s e l f a n d d b Q F E s a r e c u m m u l a t i v e s o c h e c k i f e n t r y a l r e a d e x i s t s b e f o r e i n s e r t i n g I F N O T E X I S T S ( S E L E C T 1 F R O M [ d b o ] . [ S q l T r a c k i n g S e r v i c e Q f e L o g ] W H E R E K b I d = 9 2 5 4 9 9 ) I N S E R T [ d b o ] . [ S q l T r a c k i n g S e r v i c e Q f e L o g ] ( [ K b I d ] , [ D e s c r i p t i o n ] ) V A L U E S ( 9 2 5 4 9 9 , ' N o t a l l s t o r e d p r o c e d u r e s u s e S q l T r a c k i n g S e r v i c e v i e w s . ' ) / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * T y p e P r o c s * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / I F O B J E C T _ I D ( ' [ d b o ] . [ G e t T y p e I d ] ' ) I S N O T N U L L D R O P P R O C E D U R E [ d b o ] . [ G e t T y p e I d ] G O C R E A T E P R O C E D U R E [ d b o ] . [ G e t T y p e I d ] @ T y p e F u l l N a m e n v a r c h a r ( 1 2 8 ) , @ A s s e m b l y F u l l N a m e n v a r c h a r ( 2 5 6 ) , @ I s I n s t a n c e T y p e b i t = 0 , @ T y p e I d i n t O U T P U T A S B E G I N S E T N O C O U N T O N S E T T R A N S A C T I O N I S O L A T I O N L E V E L R E A D C O M M I T T E D d e c l a r e @ l o c a l i z e d _ s t r i n g _ G e t T y p e I d _ F a i l e d _ I n s e r t T y p e n v a r c h a r ( 2 5 6 ) s e t @ l o c a l i z e d _ s t r i n g _ G e t T y p e I d _ F a i l e d _ I n s e r t T y p e = N ' F a i l e d i n s e r t i n g T y p e I d ' d e c l a r e @ l o c a l i z e d _ s t r i n g _ G e t T y p e I d _ F a i l e d _ S e l e c t T y p e n v a r c h a r ( 2 5 6 ) s e t @ l o c a l i z e d _ s t r i n g _ G e t T y p e I d _ F a i l e d _ S e l e c t T y p e = N ' F a i l e d s e l e c t i n g T y p e I d ' D E C L A R E @ l o c a l _ t r a n b i t , @ e r r o r i n t , @ e r r o r _ d e s c n v a r c h a r ( 2 5 6 ) , @ r e t i n t , @ i d i n t I F @ @ T R A N C O U N T >