DatabaseProcApplicationCreatedLinks
sybsystemprocssp_unbindexeclass  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/%M% %I% %G%"	*/
3     
4     /*
5     ** Messages for "sp_unbindexeclass"
6     ** 17260, "Can't run %1! from within a transaction."
7     ** 18255, "%1! cannot be NULL."
8     ** 18256, "%1! is not a valid object type for this stored procedure."
9     ** 18259, "No login with the specified name '%1!' exists."
10    ** 18278, "Failed to unbind '%1!' from execution class. Check server errorlog
11    **	   for any additional information."
12    ** 18279, "The specified binding to be dropped does not exist"
13    ** 18552, "%1! is not a valid user of this database.
14    ** 18291, "The parameter value '%1!' is invalid."
15    */
16    
17    create or replace procedure sp_unbindexeclass
18        @object_name varchar(255), /* name of object */
19        @object_type varchar(2), /* Type of object */
20        @scope varchar(255) = null /* user scope of the class */
21    as
22    
23        declare @attrib_id int,
24            @user_id int,
25            @action int,
26            @classname varchar(255),
27            @sp_objid int,
28            @owner_id int,
29            @stored_objid int,
30            @upcase_str varchar(2),
31            @instanceid int
32    
33        declare @nullarg char(1)
34        declare @dummy int
35        declare @status int
36        declare @gp_enabled int
37    
38    
39        select @action = 3 /* drop action */
40        select @user_id = NULL /* Id of user from Syslogins table */
41        select @attrib_id = 0 /* Execution class attribute */
42        select @sp_objid = 0 /* object id of a stored proc */
43        select @instanceid = NULL /* instance id */
44    
45        /*
46        **  If we're in a transaction, disallow this since it might make recovery
47        **  impossible.
48        */
49        IF @@trancount > 0
50        BEGIN
51            /*
52            ** 17260, "Can't run %1! from within a transaction."
53            */
54            raiserror 17260, "sp_dropexeclass"
55            return (1)
56        END
57        ELSE
58        BEGIN
59            /* Use TSQL mode of unchained transactions */
60            set chained off
61        END
62    
63        /* Dont do "Dirty Reads" */
64        set transaction isolation level 1
65    
66        /* convert types to upper case */
67        select @upcase_str = upper(@object_type)
68        IF ((@upcase_str = "LG") OR (@upcase_str = "AP") OR
69                (@upcase_str = "PR") OR (@upcase_str = "DF") OR
70                (@upcase_str = "SV"))
71        BEGIN
72            select @object_type = @upcase_str
73        END
74    
75        /*
76        ** Check to see that the input params are correct
77        */
78        IF ((@object_name is NULL) and (@object_type != 'DF'))
79        BEGIN
80            /*
81            ** 18255, "%1! cannot be NULL."
82            */
83            raiserror 18255, "Object name"
84            return (1)
85        END
86    
87        IF ((@object_type = "PR") AND (@scope is NULL))
88        BEGIN
89            /*
90            ** 18255, "%1! cannot be NULL."
91            */
92            raiserror 18255, "Scope"
93            return (1)
94        END
95    
96        /* For object_type SV, scope should be NULL */
97        IF ((@object_type = 'SV') AND (@scope is not NULL))
98        BEGIN
99            /*
100           ** 18291, "The parameter value '%1!' is invalid."
101           */
102           raiserror 18291, "scope"
103           return (1)
104       END
105   
106       /* object_type SV is only usable in threaded mode */
107       IF ((@object_type = 'SV') AND (@@kernelmode != 'threaded'))
108       BEGIN
109           /*
110           ** 18119, "'%1!' is not available in process mode."
111           */
112           raiserror 18119, "Service task binding"
113           return (1)
114       END
115   
116       /* For object_type DF the object name and scope should be NULL */
117       IF ((@object_type = 'DF') AND ((@object_name is not NULL) OR
118                   (@scope is not NULL)))
119       BEGIN
120           /*
121           ** 18291, "The parameter value '%1!' is invalid."
122           */
123           raiserror 18291, "Object name or scope"
124           return (1)
125       END
126   
127   
128       IF ((@object_type != "LG") AND (@object_type != "AP")
129               AND (@object_type != "PR") AND (@object_type != "DF")
130               AND (@object_type != "SV"))
131       BEGIN
132           /*
133           ** 18256, "%1! is not a valid object type for this stored procedure."
134           */
135           raiserror 18256, @object_type
136           return (1)
137       END
138   
139       /* 
140       ** If granular permissions is not enabled then sa_role is required.
141       ** If granular permissions is enabled then the permission 
142       ** 'manage any execution class' is required.  proc_role and proc_auditperm 
143       ** will also do auditing if required. Both will also print error message 
144       ** if required.
145       */
146   
147       select @nullarg = NULL
148       execute @status = sp_aux_checkroleperm "sa_role", "manage any execution class",
149           @nullarg, @gp_enabled output
150   
151       /* For Auditing */
152       if (@gp_enabled = 0)
153       begin
154           if (proc_role("sa_role") = 0)
155               return (1)
156       end
157       else
158       begin
159           select @dummy = proc_auditperm("manage any execution class", @status)
160       end
161   
162       if (@status != 0)
163           return (1)
164   
165       /* In case of a stored proc, if the object still exits, get obj id */
166       IF (@object_type = "PR")
167       BEGIN
168   
169           /* get owner id from scope param */
170           IF not exists (select uid from sysusers
171                   where (name = @scope))
172           BEGIN
173               /*
174               ** 18552 "%1! is not a valid user of this database."
175               */
176               raiserror 18552, @scope
177               return (1)
178           END
179           ELSE
180               select @owner_id = (select uid from sysusers
181                       where (name = @scope))
182   
183           IF exists (select id from sysobjects
184                   where ((name = @object_name) AND (uid = @owner_id)))
185               select @sp_objid = (select id from sysobjects
186                       where ((name = @object_name) AND (uid = @owner_id)))
187       END
188   
189   
190       /* Now convert user name to user id */
191       IF (@object_type = "LG")
192       BEGIN
193           IF not exists (select suid from master..syslogins
194                   where (name = @object_name)
195                       and ((status & 512) != 512)) /* not LOGIN PROFILE */
196           BEGIN
197               /*
198               ** 18259, "No login with specified name '%1!' exists." 
199               */
200               raiserror 18259, @object_name
201               return (1)
202           END
203   
204           select @user_id =
205                   (select suid from master..syslogins
206                   where (name = @object_name))
207       END
208       ELSE IF ((@object_type = "AP") and (@scope is not NULL))
209       BEGIN
210           IF not exists (select suid from master..syslogins where (name = @scope)
211                       and ((status & 512) != 512)) /* not LOGIN PROFILE */
212           BEGIN
213               /*
214               ** 18259, "No login with specified name '%1!' exists" 
215               */
216               raiserror 18259, @scope
217               return (1)
218           END
219   
220           select @user_id = (select suid from master..syslogins
221                   where (name = @scope))
222       END
223   
224       /* 
225       ** Now delete the matching entry from Sysattributes Table...
226       ** Verify that the attributes passed to sysattributes is correct. Note
227       ** that for stored procedures, the sysattributes table in the current
228       ** database is searched. For other objects, the sysattributes table in
229       ** master is searched.
230       */
231       IF (@object_type = "LG")
232       BEGIN
233   
234           select @classname = char_value
235   
236           from
237               master..sysattributes where
238               class = 6 AND
239               attribute = @attrib_id AND
240               object_type = @object_type AND
241               object = @user_id AND
242               object_cinfo = @scope
243   
244           IF (@classname is not NULL)
245           BEGIN
246   
247               delete master..sysattributes
248               where class = 6 AND
249                   attribute = @attrib_id AND
250                   object_type = @object_type AND
251                   object = @user_id AND
252                   object_cinfo = @scope
253           END
254           ELSE
255           BEGIN
256               /*
257               ** 18279, "The specified binding to be dropped does 
258               **	   not exist"
259               */
260               raiserror 18279
261               return (1)
262           END
263   
264           IF attrib_notify(6, @attrib_id, @object_type, @user_id,
265                   NULL, NULL, NULL, @scope, NULL, NULL,
266                   NULL, NULL, "", @action) = 0
267           BEGIN
268               insert master..sysattributes
269               (class, attribute, object_type, object,
270                   object_info3, object_cinfo, char_value)
271               values (6, @attrib_id, @object_type, @user_id,
272                   @instanceid,
273                   @scope, @classname)
274   
275               /*
276               ** 18278,"Failed to unbind '%1!' from execution class.
277               **	  Check server errorlog for any additional
278               **	  information."
279               */
280               raiserror 18278, @object_name
281               return (1)
282           END
283       END
284       ELSE IF (@object_type = "AP")
285       BEGIN
286           select @classname = char_value,
287               @instanceid = object_info3 from
288               master..sysattributes where
289               class = 6 AND
290               attribute = @attrib_id AND
291               object_type = @object_type AND
292               object_info1 = @user_id AND
293               object_cinfo = @object_name
294   
295           IF (@classname is not NULL)
296           BEGIN
297   
298               delete master..sysattributes
299               where class = 6 AND
300                   attribute = @attrib_id AND
301                   object_type = @object_type AND
302                   object_info1 = @user_id AND
303                   object_cinfo = @object_name
304           END
305           ELSE
306           BEGIN
307               /*
308               ** 18279, "The specified binding to be dropped does 
309               **	   not exist"
310               */
311               raiserror 18279
312               return (1)
313           END
314   
315           IF attrib_notify(6, @attrib_id, @object_type, NULL,
316                   @user_id, NULL, NULL, @object_name, NULL, NULL,
317                   NULL, NULL, "", @action) = 0
318           BEGIN
319               insert master..sysattributes
320               (class, attribute, object_type, object_info1,
321                   object_info3, object_cinfo, char_value)
322               values (6, @attrib_id, @object_type, @user_id,
323                   @instanceid, @object_name, @classname)
324               /*
325               ** 18278,"Failed to unbind '%1!' from execution class.
326               **	  Check server errorlog for any additional
327               **	  information."
328               */
329               raiserror 18278, @object_name
330               return (1)
331           END
332       END
333       ELSE IF (@object_type = "DF")
334       BEGIN
335           select @classname = char_value,
336               @instanceid = object_info3 from
337               master..sysattributes where
338               class = 6 AND
339               attribute = @attrib_id AND
340               object_type = @object_type
341   
342           IF (@classname is not NULL)
343           BEGIN
344   
345               delete master..sysattributes
346               where class = 6 AND
347                   attribute = @attrib_id AND
348                   object_type = @object_type
349           END
350           ELSE
351           BEGIN
352               /*
353               ** 18279, "The specified binding to be dropped does
354               **         not exist"
355               */
356               raiserror 18279
357               return (1)
358           END
359   
360           IF attrib_notify(6, @attrib_id, @object_type, NULL,
361                   NULL, NULL, NULL, NULL, NULL, @classname,
362                   NULL, NULL, "", @action) = 0
363           BEGIN
364               insert master..sysattributes
365               (class, attribute, object_type, object_info3, char_value)
366               values (6, @attrib_id, @object_type, @instanceid, @classname)
367           END
368       END
369       ELSE IF (@object_type = "PR")
370       BEGIN
371           select @classname = (select char_value from sysattributes where
372                       class = 6 AND
373                       attribute = @attrib_id AND
374                       object_type = @object_type AND
375                       object_info1 = @owner_id AND
376                       object_cinfo = @object_name),
377               @stored_objid = (select object from sysattributes where
378                       class = 6 AND
379                       attribute = @attrib_id AND
380                       object_type = @object_type AND
381                       object_info1 = @owner_id AND
382                       object_cinfo = @object_name),
383               @instanceid = (select object_info3 from sysattributes where
384   
385                       class = 6 AND
386                       attribute = @attrib_id AND
387                       object_type = @object_type AND
388                       object_info1 = @owner_id AND
389                       object_cinfo = @object_name)
390   
391           IF (@classname != NULL)
392           BEGIN
393   
394               delete sysattributes
395               where class = 6 AND
396                   attribute = @attrib_id AND
397                   object_type = @object_type AND
398                   object_info1 = @owner_id AND
399                   object_cinfo = @object_name
400           END
401           ELSE
402           BEGIN
403               /*
404               ** 18279, "The specified binding to be dropped does 
405               **	   not exist"
406               */
407               raiserror 18279
408               return (1)
409           END
410   
411           IF attrib_notify(6, @attrib_id, @object_type, @sp_objid,
412                   NULL, NULL, NULL, @object_name, NULL, NULL,
413                   NULL, NULL, "", @action) = 0
414           BEGIN
415               insert sysattributes
416               (class, attribute, object_type, object,
417                   object_info1, object_info3,
418                   object_cinfo, char_value)
419               values (6, @attrib_id, @object_type,
420                   @stored_objid, @owner_id, @instanceid,
421                   @object_name, @classname)
422   
423               /*
424               ** 18278,"Failed to unbind '%1!' from execution class.
425               **	  Check server errorlog for any additional
426               **	  information."
427               */
428               raiserror 18278, @object_name
429               return (1)
430           END
431       END
432       ELSE /* object is of type "SV" */
433       BEGIN
434           delete master..sysattributes
435           where class = 6 AND
436               attribute = @attrib_id AND
437               object_type = @object_type AND
438               object_cinfo = @object_name
439   
440           IF attrib_notify(6, @attrib_id, @object_type, NULL,
441                   NULL, NULL, NULL, @object_name, NULL, @classname,
442                   NULL, NULL, "", @action) = 0
443           BEGIN
444               insert sysattributes
445               (class, attribute, object_type, object_cinfo,
446                   char_value) values
447               (6, @attrib_id, @object_type, @object_name,
448                   @classname)
449               /*
450               ** 18278,"Failed to unbind '%1!' from execution class.
451               **	Check server errorlog for any additional information."
452               */
453               raiserror 18278, @object_name
454               return (1)
455           END
456       END
457   
458       return (0)
459   


exec sp_procxmode 'sp_unbindexeclass', 'AnyMode'
go

Grant Execute on sp_unbindexeclass to public
go
DEFECTS
 MEST 4 Empty String will be replaced by Single Space 266
 MEST 4 Empty String will be replaced by Single Space 317
 MEST 4 Empty String will be replaced by Single Space 362
 MEST 4 Empty String will be replaced by Single Space 413
 MEST 4 Empty String will be replaced by Single Space 442
 MINU 4 Unique Index with nullable columns master..sysattributes master..sysattributes
 MINU 4 Unique Index with nullable columns sybsystemprocs..sysattributes sybsystemprocs..sysattributes
 MTYP 4 Assignment type mismatch @classname: varchar(255) = varchar(768) 234
 MTYP 4 Assignment type mismatch attribute: smallint = int 271
 MTYP 4 Assignment type mismatch @classname: varchar(255) = varchar(768) 286
 MTYP 4 Assignment type mismatch attribute: smallint = int 322
 MTYP 4 Assignment type mismatch @classname: varchar(255) = varchar(768) 335
 MTYP 4 Assignment type mismatch attribute: smallint = int 366
 MTYP 4 Assignment type mismatch attribute: smallint = int 419
 MTYP 4 Assignment type mismatch attribute: smallint = int 447
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 238
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 239
 QTYP 4 Comparison type mismatch smallint = int 239
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 248
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 249
 QTYP 4 Comparison type mismatch smallint = int 249
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 289
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 290
 QTYP 4 Comparison type mismatch smallint = int 290
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 299
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 300
 QTYP 4 Comparison type mismatch smallint = int 300
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 338
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 339
 QTYP 4 Comparison type mismatch smallint = int 339
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 346
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 347
 QTYP 4 Comparison type mismatch smallint = int 347
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 372
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 373
 QTYP 4 Comparison type mismatch smallint = int 373
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 378
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 379
 QTYP 4 Comparison type mismatch smallint = int 379
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 385
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 386
 QTYP 4 Comparison type mismatch smallint = int 386
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 395
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 396
 QTYP 4 Comparison type mismatch smallint = int 396
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 435
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 436
 QTYP 4 Comparison type mismatch smallint = int 436
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 183
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 185
 MGTP 3 Grant to public master..sysattributes  
 MGTP 3 Grant to public master..syslogins  
 MGTP 3 Grant to public sybsystemprocs..sp_unbindexeclass  
 MGTP 3 Grant to public sybsystemprocs..sysattributes  
 MGTP 3 Grant to public sybsystemprocs..sysobjects  
 MGTP 3 Grant to public sybsystemprocs..sysusers  
 MNAC 3 Not using ANSI 'is null' 391
 MNER 3 No Error Check should check @@error after delete 247
 MNER 3 No Error Check should check @@error after insert 268
 MNER 3 No Error Check should check @@error after delete 298
 MNER 3 No Error Check should check @@error after insert 319
 MNER 3 No Error Check should check @@error after delete 345
 MNER 3 No Error Check should check @@error after insert 364
 MNER 3 No Error Check should check @@error after delete 394
 MNER 3 No Error Check should check @@error after insert 415
 MNER 3 No Error Check should check @@error after delete 434
 MNER 3 No Error Check should check @@error after insert 444
 MUCO 3 Useless Code Useless Brackets 55
 MUCO 3 Useless Code Useless Brackets 68
 MUCO 3 Useless Code Useless Brackets 78
 MUCO 3 Useless Code Useless Brackets 84
 MUCO 3 Useless Code Useless Brackets 87
 MUCO 3 Useless Code Useless Brackets 93
 MUCO 3 Useless Code Useless Brackets 97
 MUCO 3 Useless Code Useless Brackets 103
 MUCO 3 Useless Code Useless Brackets 107
 MUCO 3 Useless Code Useless Brackets 113
 MUCO 3 Useless Code Useless Brackets 117
 MUCO 3 Useless Code Useless Brackets 124
 MUCO 3 Useless Code Useless Brackets 128
 MUCO 3 Useless Code Useless Brackets 136
 MUCO 3 Useless Code Useless Brackets 152
 MUCO 3 Useless Code Useless Brackets 154
 MUCO 3 Useless Code Useless Brackets 155
 MUCO 3 Useless Code Useless Brackets 162
 MUCO 3 Useless Code Useless Brackets 163
 MUCO 3 Useless Code Useless Brackets 166
 MUCO 3 Useless Code Useless Brackets 171
 MUCO 3 Useless Code Useless Brackets 177
 MUCO 3 Useless Code Useless Brackets 181
 MUCO 3 Useless Code Useless Brackets 184
 MUCO 3 Useless Code Useless Brackets 186
 MUCO 3 Useless Code Useless Brackets 191
 MUCO 3 Useless Code Useless Brackets 201
 MUCO 3 Useless Code Useless Brackets 206
 MUCO 3 Useless Code Useless Brackets 208
 MUCO 3 Useless Code Useless Brackets 217
 MUCO 3 Useless Code Useless Brackets 221
 MUCO 3 Useless Code Useless Brackets 231
 MUCO 3 Useless Code Useless Brackets 244
 MUCO 3 Useless Code Useless Brackets 261
 MUCO 3 Useless Code Useless Brackets 281
 MUCO 3 Useless Code Useless Brackets 284
 MUCO 3 Useless Code Useless Brackets 295
 MUCO 3 Useless Code Useless Brackets 312
 MUCO 3 Useless Code Useless Brackets 330
 MUCO 3 Useless Code Useless Brackets 333
 MUCO 3 Useless Code Useless Brackets 342
 MUCO 3 Useless Code Useless Brackets 357
 MUCO 3 Useless Code Useless Brackets 369
 MUCO 3 Useless Code Useless Brackets 391
 MUCO 3 Useless Code Useless Brackets 408
 MUCO 3 Useless Code Useless Brackets 429
 MUCO 3 Useless Code Useless Brackets 454
 MUCO 3 Useless Code Useless Brackets 458
 MUOT 3 Updates outside transaction 444
 QAFM 3 Var Assignment from potentially many rows 234
 QAFM 3 Var Assignment from potentially many rows 286
 QAFM 3 Var Assignment from potentially many rows 335
 QISO 3 Set isolation level 64
 QIWC 3 Insert with not all columns specified missing 8 columns out of 15 269
 QIWC 3 Insert with not all columns specified missing 8 columns out of 15 320
 QIWC 3 Insert with not all columns specified missing 10 columns out of 15 365
 QIWC 3 Insert with not all columns specified missing 7 columns out of 15 416
 QIWC 3 Insert with not all columns specified missing 10 columns out of 15 445
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_type, object, object_cinfo, attribute, class}
238
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_type, object, object_cinfo, attribute, class}
248
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
289
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
299
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {class, object_type, attribute}
338
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {class, object_type, attribute}
346
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
372
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
378
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
385
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_info1, object_type, object_cinfo, attribute, class}
395
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysattributes.csysattributes unique clustered
(class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo)
Intersection: {object_type, object_cinfo, attribute, class}
435
 VNRD 3 Variable is not read @dummy 159
 MSUB 2 Subquery Marker 170
 MSUB 2 Subquery Marker 180
 MSUB 2 Subquery Marker 183
 MSUB 2 Subquery Marker 185
 MSUB 2 Subquery Marker 193
 MSUB 2 Subquery Marker 205
 MSUB 2 Subquery Marker 210
 MSUB 2 Subquery Marker 220
 MSUB 2 Subquery Marker 371
 MSUB 2 Subquery Marker 377
 MSUB 2 Subquery Marker 383
 MTR1 2 Metrics: Comments Ratio Comments: 29% 17
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 55 = 73dec - 20exi + 2 17
 MTR3 2 Metrics: Query Complexity Complexity: 238 17

DATA PROPAGATION detailed
ColumnWritten To
@object_namesysattributes.object_cinfo   sysattributes.object_cinfo   sp_optgoal_rset_002.name sp_passwordpolicy_rset_001.value sp_rjs_retrieve_rset_001.js_server
@object_typesysattributes.object_type   sysattributes.object_type  
@scopesysattributes.object_cinfo   sp_optgoal_rset_002.name sp_passwordpolicy_rset_001.value sp_rjs_retrieve_rset_001.js_server

DEPENDENCIES
PROCS AND TABLES USED
reads table sybsystemprocs..sysobjects  
calls proc sybsystemprocs..sp_aux_checkroleperm  
   reads table master..syscurconfigs (1)  
   reads table master..sysconfigures (1)  
reads table master..syslogins (1)  
read_writes table master..sysattributes (1)  
reads table sybsystemprocs..sysusers  
read_writes table sybsystemprocs..sysattributes