DatabaseProcApplicationCreatedLinks
sybsystemprocssp_bindexeclass  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/%M% %I% %G% */
3     
4     /*
5     ** Messages for "sp_bindexeclass"
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     ** 18257, "No definition for classname '%1!' exists."
10    ** 18259, "No login with the specified name '%1!' exists."
11    ** 18260, "Validation of execution class binding failed. Check server
12    **	   errorlog for any additional information."
13    ** 18261, "Failed to bind '%1!' to execution class '%2!'. Check server
14    **	   errorlog for any additional information."
15    ** 18535, "Permission denied: 'sybase_ts_role' is required for binding 
16    **	   with execution class 'EC0'.
17    ** 18551, "Stored procedure %1!, owned by %2!, does not exist in this database.
18    ** 18552, "%1! is not a valid user of this database.
19    ** 18291, "The parameter value '%1!' is invalid."
20    */
21    
22    create or replace procedure sp_bindexeclass
23        @object_name varchar(255), /* name of object */
24        @object_type varchar(2), /* Type of object */
25        @scope varchar(30), /* user scope of binding */
26        @classname varchar(255) /* class name assigned */
27    as
28    
29        declare @attrib_id int,
30            @user_id int,
31            @action int,
32            @role int,
33            @sp_objid int,
34            @owner_id int,
35            @upcase_str varchar(255),
36            @status int,
37            @nullarg char(1),
38            @dummy int,
39            @gp_enabled int,
40            @instanceid int
41    
42        select @action = 1
43        select @user_id = NULL /* Id of user from Syslogins table */
44    
45    
46        /*
47        **  IF we're in a transaction, disallow this since it might make recovery
48        **  impossible.
49        */
50        IF @@trancount > 0
51        BEGIN
52            /*
53            ** 17260, "Can't run %1! from within a transaction."
54            */
55            raiserror 17260, "sp_bindexeclass"
56            return (1)
57        END
58        ELSE
59        BEGIN
60            /* Use TSQL mode of unchained transactions */
61            set chained off
62        END
63    
64        /* Dont do "Dirty Reads" */
65        set transaction isolation level 1
66    
67        /* convert to upper case, system supported types and names */
68        select @upcase_str = upper(@classname)
69        IF ((@upcase_str = "EC0") OR (@upcase_str = "EC1") OR
70                (@upcase_str = "EC2") OR (@upcase_str = "EC3"))
71            select @classname = @upcase_str
72    
73        select @upcase_str = upper(@object_type)
74        IF ((@upcase_str = "LG") OR (@upcase_str = "AP") OR
75                (@upcase_str = "PR") OR (@upcase_str = "DF") OR
76                (@upcase_str = "SV"))
77            select @object_type = @upcase_str
78    
79        /*
80        ** Check to see that the input params are correct
81        */
82        IF ((@object_name is NULL) AND (@object_type != 'DF'))
83        BEGIN
84            /*
85            ** 18255, "%1! cannot be NULL."
86            */
87            raiserror 18255, "Object name"
88            return (1)
89        END
90    
91        IF ((@object_type = 'PR') AND (@scope is NULL))
92        BEGIN
93            /*
94            ** 18255, "%1! cannot be NULL."
95            */
96            raiserror 18255, "Scope"
97            return (1)
98        END
99    
100       /* For object_type SV, scope should be NULL */
101       IF ((@object_type = 'SV') AND (@scope is not NULL))
102       BEGIN
103           /*
104           ** 18291, "The parameter value '%1!' is invalid."
105           */
106           raiserror 18291, "scope"
107           return (1)
108       END
109   
110       /* object_type SV is only usable in threaded mode */
111       IF ((@object_type = 'SV') AND (@@kernelmode != 'threaded'))
112       BEGIN
113           /*
114           ** 18119, "'%1!' is not available in process mode."
115           */
116           raiserror 18119, "Service task binding"
117           return (1)
118       END
119   
120       /* For object_type DF the object name and scope should be NULL */
121       IF ((@object_type = 'DF') AND ((@object_name is not NULL)
122                   OR (@scope is not NULL)))
123       BEGIN
124           /*
125           ** 18291, "The parameter value '%1!' is invalid."
126           */
127           raiserror 18291, "Object name or scope"
128           return (1)
129       END
130   
131   
132       /* check that @object_type value specified is valid */
133       IF ((@object_type != 'LG') and (@object_type != 'AP')
134               and (@object_type != 'PR') and (@object_type != 'DF')
135               and (@object_type != 'SV'))
136       BEGIN
137           /*
138           ** 18256, "%1! is not a valid object type for this stored procedure."
139           */
140           raiserror 18256, @object_type
141           return (1)
142       END
143   
144       /* in case of stored procs, check that the object exists */
145       IF (@object_type = "PR")
146       BEGIN
147           /* get owner id from scope param */
148           IF not exists (select uid from sysusers
149                   where (name = @scope))
150           BEGIN
151               /*
152               ** 18552 "%1! is not a valid user of this database."
153               */
154               raiserror 18552, @scope
155               return (1)
156           END
157           ELSE
158               select @owner_id = (select uid from sysusers
159                       where (name = @scope))
160   
161           IF not exists (select id from sysobjects
162                   where ((name = @object_name) AND (uid = @owner_id)))
163           BEGIN
164               /*
165               ** 18551 "Stored procedure %1!, owned by %2!, does not exist 
166               **        in this database.
167               */
168               raiserror 18551, @object_name, @scope
169               return (1)
170           END
171           ELSE
172               select @sp_objid = (select id from sysobjects
173                       where ((name = @object_name) AND (uid = @owner_id)))
174       END
175   
176       select @attrib_id = 2 /* attribute is class definition */
177   
178   
179       /*
180       ** If granular permissions is not enabled then sa_role is required.
181       ** If granular permissions is enabled then the permission 
182       ** 'manage any execution class' is required.  proc_role and proc_auditperm 
183       ** will also do auditing if required. Both will also print error message 
184       ** if required.
185       */
186   
187       select @nullarg = NULL
188       execute @status = sp_aux_checkroleperm "sa_role",
189           "manage any execution class",
190           @nullarg, @gp_enabled output
191   
192       /* For Auditing */
193       if (@gp_enabled = 0)
194       begin
195           if (proc_role("sa_role") = 0)
196               return (1)
197       end
198       else
199       begin
200           select @dummy = proc_auditperm("manage any execution class", @status)
201       end
202   
203       if (@status != 0)
204           return (1)
205       /* check the class name passed in */
206       IF ((@classname != "EC0")
207               AND (@classname != "EC1")
208               AND (@classname != "EC2")
209               AND (@classname != "EC3"))
210       BEGIN
211           IF not exists (select object_cinfo from master..sysattributes
212                   where class = 6 AND
213                       attribute = @attrib_id AND
214                       object_type = 'UC' AND
215                       object_cinfo = @classname)
216           BEGIN
217               /*
218               ** 18257, "No definition for classname '%1!' exists."
219               */
220               raiserror 18257, @classname
221               return (1)
222           END
223   
224   
225           /*
226           ** For SDC, binding only to local execution class
227           */
228           IF (@@clustermode = "shared disk cluster")
229           BEGIN
230               select @instanceid = object_info3 from master..sysattributes
231               where class = 6 AND
232                   attribute = @attrib_id AND
233                   object_type = 'UC' AND
234                   object_cinfo = @classname
235   
236               if ((@instanceid != NULL) AND
237                       (@instanceid != @@instanceid))
238               BEGIN
239                   /*
240                   ** RESOLVE: change error to new message:
241                   ** "Class '%1!' is bound to instance '%2!'."
242                   */
243                   /* raiserror 17260, "sp_bindexeclass" */
244                   raiserror 19659, @classname, @instanceid
245                   return (1)
246               END
247           END
248       END
249   
250       IF (@classname = "EC0")
251       BEGIN
252           /* 
253           ** Check for sybase_ts_role whether granular permissions is enabled 
254           ** or not.
255           */
256           select @role = proc_role("sybase_ts_role")
257           IF (@role = 0)
258           BEGIN
259               /*
260               ** 18535, "Permission denied: 'sybase_ts_role' 
261               ** is required for binding with execution 
262               ** class EC0".
263               */
264               raiserror 18535
265               return (1)
266           END
267       END
268   
269       /* Now convert user name to user id after checking its existence */
270       IF (@object_type = "LG")
271       BEGIN
272           IF not exists (select suid from master..syslogins
273                   where (name = @object_name) and
274                       ((status & 512) != 512)) /* not LOGIN PROFILE */
275           BEGIN
276               /*
277               ** 17231, "No login with the specified name '%1!' exists"
278               */
279               raiserror 17231, @object_name
280               return (1)
281           END
282   
283           select @user_id = (select suid from master..syslogins
284                   where (name = @object_name) and
285                       ((status & 512) != 512)) /* not LOGIN PROFILE */
286       END
287       ELSE IF ((@object_type = "AP") and (@scope is not NULL))
288       BEGIN
289           IF not exists (select suid from master..syslogins where (name = @scope) and
290                       ((status & 512) != 512)) /* not LOGIN PROFILE */
291           BEGIN
292               /*
293               ** 18259, "No login with specified name '%1!' exists"
294               */
295               raiserror 18259, @scope
296               return (1)
297           END
298   
299           select @user_id = (select suid from master..syslogins
300                   where (name = @scope) and
301                       ((status & 512) != 512)) /* not LOGIN PROFILE */
302       END
303   
304       /*
305       ** Now hook up with Sysattributes Table..
306       ** Verify that the attributes passed to sysattributes is correct.
307       ** Note that for stored procedures, the sysattributes table in the current 
308       ** database is used. For other objects, the sysattributes table in master 
309       ** is used.
310       */
311   
312       select @attrib_id = 0
313   
314       IF (@object_type = "LG")
315       BEGIN
316           IF attrib_valid(6, @attrib_id, @object_type, @user_id, NULL, NULL,
317                   NULL, @scope, NULL, @classname, NULL, NULL, "", @action) = 0
318           BEGIN
319               /*
320               ** 18260, "Validation of execution class binding failed.
321               **	   Check server errorlog for any additional 
322               **	   information."
323               */
324               raiserror 18260
325               return (1)
326           END
327           ELSE
328           BEGIN
329               IF exists (select * from master..sysattributes where
330                           class = 6 AND
331                           attribute = @attrib_id AND
332                           object_type = @object_type AND
333                           object = @user_id AND
334                           object_cinfo = @scope)
335               BEGIN
336                   update master..sysattributes
337                   set char_value = @classname
338                   where class = 6 AND
339                       attribute = @attrib_id AND
340                       object_type = @object_type AND
341                       object = @user_id AND
342                       object_cinfo = @scope
343               END
344               ELSE
345               BEGIN
346                   insert master..sysattributes
347                   (class, attribute, object_type, object,
348                       object_cinfo, char_value)
349                   values (6, @attrib_id, @object_type, @user_id,
350                       @scope, @classname)
351               END
352   
353               IF attrib_notify(6, @attrib_id, @object_type, @user_id,
354                       NULL, NULL, NULL, @scope, NULL, @classname,
355                       NULL, NULL, "", @action) = 0
356               BEGIN
357                   /*
358                   ** 18261, "Failed to bind '%1!' to execution class 
359                   **	   '%2!'. Check server errorlog for any
360                   **	   additional information."
361                   */
362                   delete master..sysattributes where (class = 6 AND
363                           attribute = @attrib_id AND
364                           object_type = @object_type AND
365                           object = @user_id AND
366                           object_cinfo = @scope)
367                   raiserror 18261, @object_name, @classname
368                   return (1)
369               END
370           END
371       END
372       ELSE IF (@object_type = "AP")
373       BEGIN
374           IF attrib_valid(6, @attrib_id, @object_type, NULL, @user_id, NULL,
375                   NULL, @object_name, NULL, @classname, NULL, NULL, "",
376                   @action) = 0
377           BEGIN
378               /*
379               ** 18260, "Validation of execution class binding failed.
380               **	   Check server errorlog for any additional
381               **	   information."
382               */
383               raiserror 18260
384               return (1)
385           END
386           ELSE
387           BEGIN
388               IF exists (select * from master..sysattributes where
389                           class = 6 AND
390                           attribute = @attrib_id AND
391                           object_type = @object_type AND
392                           object_info1 = @user_id AND
393                           object_cinfo = @object_name)
394               BEGIN
395                   update master..sysattributes
396                   set char_value = @classname
397                   where class = 6 AND
398                       attribute = @attrib_id AND
399                       object_type = @object_type AND
400                       object_info1 = @user_id AND
401                       object_cinfo = @object_name
402               END
403               ELSE
404               BEGIN
405                   insert master..sysattributes
406                   (class, attribute, object_type, object_info1,
407                       object_cinfo, char_value)
408                   values (6, @attrib_id, @object_type, @user_id,
409                       @object_name, @classname)
410               END
411   
412               IF attrib_notify(6, @attrib_id, @object_type, NULL,
413                       @user_id, NULL, NULL, @object_name, NULL, @classname,
414                       NULL, NULL, "", @action) = 0
415               BEGIN
416                   /*
417                   ** 18261, "Error on binding '%1!' to execution class 
418                   **	   '%2!'. Check server errorlog for any 
419                   **	   additional information."
420                   */
421                   delete master..sysattributes where (class = 6 AND
422                           attribute = @attrib_id AND
423                           object_type = @object_type AND
424                           object_info1 = @user_id AND
425                           object_cinfo = @object_name)
426                   raiserror 18261, @object_name, @classname
427                   return (1)
428               END
429           END
430       END
431       ELSE IF (@object_type = "DF")
432       BEGIN
433           IF attrib_valid(6, @attrib_id, @object_type, NULL, NULL, NULL,
434                   NULL, NULL, NULL, @classname, NULL, NULL, "",
435                   @action) = 0
436   
437           BEGIN
438               /*
439               ** 18260, "Validation of execution class binding failed.
440               **         Check server errorlog for any additional
441               **         information."
442               */
443               raiserror 18260
444               return (1)
445           END
446           ELSE
447           BEGIN
448               IF exists (select * from master..sysattributes where
449                           class = 6 AND
450                           attribute = @attrib_id AND
451                           object_type = @object_type)
452               BEGIN
453                   update master..sysattributes
454                   set char_value = @classname
455                   where class = 6 AND
456                       attribute = @attrib_id AND
457                       object_type = @object_type
458               END
459               ELSE
460               BEGIN
461                   insert master..sysattributes
462                   (class, attribute, object_type, char_value)
463                   values (6, @attrib_id, @object_type, @classname)
464               END
465   
466               IF attrib_notify(6, @attrib_id, @object_type, NULL, NULL, NULL,
467                       NULL, NULL, NULL, @classname, NULL, NULL, "",
468                       @action) = 0
469               BEGIN
470                   /*
471                   ** 18261, "Error on binding '%1!' to execution class
472                   **         '%2!'. Check server errorlog for any
473                   **         additional information."
474                   */
475                   delete master..sysattributes where (class = 6 AND
476                           attribute = @attrib_id AND
477                           object_type = @object_type AND
478                           char_value = @classname)
479                   raiserror 18261, @object_name, @classname
480                   return (1)
481               END
482           END
483       END
484       ELSE IF (@object_type = "PR")
485       BEGIN
486           /* For stored procs, we store the owner id and object id of the sp in 
487           ** sysattributes. 
488           */
489           IF attrib_valid(6, @attrib_id, @object_type, @sp_objid, @owner_id,
490                   NULL, NULL, @object_name, NULL, @classname, NULL, NULL, "",
491                   @action) = 0
492           BEGIN
493               /*
494               ** 18260, "Validation of execution class binding failed.
495               **	   Check server errorlog for any additional
496               **	   information."
497               */
498               raiserror 18260
499               return (1)
500           END
501           ELSE
502           BEGIN
503               IF exists (select * from sysattributes where
504                           class = 6 AND
505                           attribute = @attrib_id AND
506                           object_type = @object_type AND
507                           object_info1 = @owner_id AND
508                           object_cinfo = @object_name)
509               BEGIN
510                   update sysattributes
511                   set char_value = @classname,
512                       object = @sp_objid
513                   where class = 6 AND
514                       attribute = @attrib_id AND
515                       object_type = @object_type AND
516                       object_info1 = @owner_id AND
517                       object_cinfo = @object_name
518               END
519               ELSE
520               BEGIN
521                   insert sysattributes
522                   (class, attribute, object_type, object,
523                       object_info1, object_cinfo, char_value)
524                   values (6, @attrib_id, @object_type, @sp_objid,
525                       @owner_id, @object_name, @classname)
526               END
527               IF attrib_notify(6, @attrib_id, @object_type, @sp_objid,
528                       NULL, NULL, NULL, @object_name, NULL, @classname,
529                       NULL, NULL, "", @action) = 0
530               BEGIN
531                   /*
532                   ** 18261, "Failed to bind '%1!' to execution class 
533                   **	   '%2!'. Check server errorlog for any
534                   **	   additional information."
535                   */
536                   delete sysattributes where (class = 6 AND
537                           attribute = @attrib_id AND
538                           object_type = @object_type AND
539                           object = @sp_objid AND
540                           object_info1 = @owner_id AND
541                           object_cinfo = @object_name)
542                   raiserror 18261, @object_name, @classname
543                   return (1)
544               END
545           END
546       END
547       ELSE /* object is of type "SV" */
548       BEGIN
549           /*
550           ** Verify if object_name and other parameters passed are valid
551           */
552           IF attrib_valid(6, @attrib_id, @object_type, NULL, NULL,
553                   NULL, NULL, @object_name, NULL, @classname, NULL, NULL, "",
554                   @action) = 0
555           BEGIN
556               /*
557               ** 18260, "Validation of execution class binding failed.
558               **	Check server errorlog for any additional information.
559               */
560               raiserror 18260
561               return (1)
562           END
563           ELSE
564           BEGIN
565               IF exists (select * from master..sysattributes where
566                           class = 6 AND
567                           attribute = @attrib_id AND
568                           object_type = @object_type AND
569                           object_cinfo = @object_name)
570               BEGIN
571                   update master..sysattributes
572                   set char_value = @classname
573                   where class = 6 AND
574                       attribute = @attrib_id AND
575                       object_type = @object_type AND
576                       object_cinfo = @object_name
577               END
578               ELSE
579               BEGIN
580                   insert master..sysattributes
581                   (class, attribute, object_type,
582                       object_cinfo, char_value)
583                   values (6, @attrib_id, @object_type,
584                       @object_name, @classname)
585               END
586   
587               IF attrib_notify(6, @attrib_id, @object_type, NULL,
588                       NULL, NULL, NULL, @object_name, NULL, @classname,
589                       NULL, NULL, "", @action) = 0
590               BEGIN
591                   /*
592                   ** 18261, "Failed to bind '%1!' to execution class
593                   **	'%2!'. Check server errorlog for any
594                   **	additional information."
595                   */
596                   delete sysattributes where (class = 6 AND
597                           attribute = @attrib_id AND
598                           object_type = @object_type AND
599                           char_value = @classname AND
600                           object_cinfo = @object_name)
601                   raiserror 18261, @object_name, @classname
602                   return (1)
603               END
604           END
605       END
606   
607       return (0)
608   


exec sp_procxmode 'sp_bindexeclass', 'AnyMode'
go

Grant Execute on sp_bindexeclass to public
go
DEFECTS
 MEST 4 Empty String will be replaced by Single Space 317
 MEST 4 Empty String will be replaced by Single Space 355
 MEST 4 Empty String will be replaced by Single Space 375
 MEST 4 Empty String will be replaced by Single Space 414
 MEST 4 Empty String will be replaced by Single Space 434
 MEST 4 Empty String will be replaced by Single Space 467
 MEST 4 Empty String will be replaced by Single Space 490
 MEST 4 Empty String will be replaced by Single Space 529
 MEST 4 Empty String will be replaced by Single Space 553
 MEST 4 Empty String will be replaced by Single Space 589
 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 @object_type: varchar(2) = varchar(255) 77
 MTYP 4 Assignment type mismatch attribute: smallint = int 349
 MTYP 4 Assignment type mismatch attribute: smallint = int 408
 MTYP 4 Assignment type mismatch attribute: smallint = int 463
 MTYP 4 Assignment type mismatch attribute: smallint = int 524
 MTYP 4 Assignment type mismatch attribute: smallint = int 583
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 212
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 213
 QTYP 4 Comparison type mismatch smallint = int 213
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 231
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 232
 QTYP 4 Comparison type mismatch smallint = int 232
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 330
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 331
 QTYP 4 Comparison type mismatch smallint = int 331
 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 362
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 363
 QTYP 4 Comparison type mismatch smallint = int 363
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 389
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 390
 QTYP 4 Comparison type mismatch smallint = int 390
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 397
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 398
 QTYP 4 Comparison type mismatch smallint = int 398
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 421
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 422
 QTYP 4 Comparison type mismatch smallint = int 422
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 449
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 450
 QTYP 4 Comparison type mismatch smallint = int 450
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 455
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 456
 QTYP 4 Comparison type mismatch smallint = int 456
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 475
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 476
 QTYP 4 Comparison type mismatch smallint = int 476
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 504
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 505
 QTYP 4 Comparison type mismatch smallint = int 505
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 513
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 514
 QTYP 4 Comparison type mismatch smallint = int 514
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 536
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 537
 QTYP 4 Comparison type mismatch smallint = int 537
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 566
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 567
 QTYP 4 Comparison type mismatch smallint = int 567
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 573
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 574
 QTYP 4 Comparison type mismatch smallint = int 574
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 596
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 597
 QTYP 4 Comparison type mismatch smallint = int 597
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 161
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 172
 MGTP 3 Grant to public master..sysattributes  
 MGTP 3 Grant to public master..syslogins  
 MGTP 3 Grant to public sybsystemprocs..sp_bindexeclass  
 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' 236
 MNER 3 No Error Check should check @@error after update 336
 MNER 3 No Error Check should check @@error after insert 346
 MNER 3 No Error Check should check @@error after delete 362
 MNER 3 No Error Check should check @@error after update 395
 MNER 3 No Error Check should check @@error after insert 405
 MNER 3 No Error Check should check @@error after delete 421
 MNER 3 No Error Check should check @@error after update 453
 MNER 3 No Error Check should check @@error after insert 461
 MNER 3 No Error Check should check @@error after delete 475
 MNER 3 No Error Check should check @@error after update 510
 MNER 3 No Error Check should check @@error after insert 521
 MNER 3 No Error Check should check @@error after delete 536
 MNER 3 No Error Check should check @@error after update 571
 MNER 3 No Error Check should check @@error after insert 580
 MNER 3 No Error Check should check @@error after delete 596
 MUCO 3 Useless Code Useless Brackets 56
 MUCO 3 Useless Code Useless Brackets 69
 MUCO 3 Useless Code Useless Brackets 74
 MUCO 3 Useless Code Useless Brackets 82
 MUCO 3 Useless Code Useless Brackets 88
 MUCO 3 Useless Code Useless Brackets 91
 MUCO 3 Useless Code Useless Brackets 97
 MUCO 3 Useless Code Useless Brackets 101
 MUCO 3 Useless Code Useless Brackets 107
 MUCO 3 Useless Code Useless Brackets 111
 MUCO 3 Useless Code Useless Brackets 117
 MUCO 3 Useless Code Useless Brackets 121
 MUCO 3 Useless Code Useless Brackets 128
 MUCO 3 Useless Code Useless Brackets 133
 MUCO 3 Useless Code Useless Brackets 141
 MUCO 3 Useless Code Useless Brackets 145
 MUCO 3 Useless Code Useless Brackets 149
 MUCO 3 Useless Code Useless Brackets 155
 MUCO 3 Useless Code Useless Brackets 159
 MUCO 3 Useless Code Useless Brackets 162
 MUCO 3 Useless Code Useless Brackets 169
 MUCO 3 Useless Code Useless Brackets 173
 MUCO 3 Useless Code Useless Brackets 193
 MUCO 3 Useless Code Useless Brackets 195
 MUCO 3 Useless Code Useless Brackets 196
 MUCO 3 Useless Code Useless Brackets 203
 MUCO 3 Useless Code Useless Brackets 204
 MUCO 3 Useless Code Useless Brackets 206
 MUCO 3 Useless Code Useless Brackets 221
 MUCO 3 Useless Code Useless Brackets 228
 MUCO 3 Useless Code Useless Brackets 236
 MUCO 3 Useless Code Useless Brackets 245
 MUCO 3 Useless Code Useless Brackets 250
 MUCO 3 Useless Code Useless Brackets 257
 MUCO 3 Useless Code Useless Brackets 265
 MUCO 3 Useless Code Useless Brackets 270
 MUCO 3 Useless Code Useless Brackets 280
 MUCO 3 Useless Code Useless Brackets 287
 MUCO 3 Useless Code Useless Brackets 296
 MUCO 3 Useless Code Useless Brackets 314
 MUCO 3 Useless Code Useless Brackets 325
 MUCO 3 Useless Code Useless Brackets 362
 MUCO 3 Useless Code Useless Brackets 368
 MUCO 3 Useless Code Useless Brackets 372
 MUCO 3 Useless Code Useless Brackets 384
 MUCO 3 Useless Code Useless Brackets 421
 MUCO 3 Useless Code Useless Brackets 427
 MUCO 3 Useless Code Useless Brackets 431
 MUCO 3 Useless Code Useless Brackets 444
 MUCO 3 Useless Code Useless Brackets 475
 MUCO 3 Useless Code Useless Brackets 480
 MUCO 3 Useless Code Useless Brackets 484
 MUCO 3 Useless Code Useless Brackets 499
 MUCO 3 Useless Code Useless Brackets 536
 MUCO 3 Useless Code Useless Brackets 543
 MUCO 3 Useless Code Useless Brackets 561
 MUCO 3 Useless Code Useless Brackets 596
 MUCO 3 Useless Code Useless Brackets 602
 MUCO 3 Useless Code Useless Brackets 607
 MUOT 3 Updates outside transaction 596
 MUPK 3 Update column which is part of a PK or unique index object 511
 QAFM 3 Var Assignment from potentially many rows 230
 QISO 3 Set isolation level 65
 QIWC 3 Insert with not all columns specified missing 9 columns out of 15 347
 QIWC 3 Insert with not all columns specified missing 9 columns out of 15 406
 QIWC 3 Insert with not all columns specified missing 11 columns out of 15 462
 QIWC 3 Insert with not all columns specified missing 8 columns out of 15 522
 QIWC 3 Insert with not all columns specified missing 10 columns out of 15 581
 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}
212
 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}
231
 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}
330
 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}
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: {object_type, object, object_cinfo, attribute, class}
362
 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}
389
 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}
397
 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}
421
 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}
449
 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}
455
 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, attribute, class}
475
 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}
504
 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}
513
 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: {attribute, object_type, object_info1, object_cinfo, object, class}
536
 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}
566
 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}
573
 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}
596
 VNRD 3 Variable is not read @dummy 200
 MSUB 2 Subquery Marker 148
 MSUB 2 Subquery Marker 158
 MSUB 2 Subquery Marker 161
 MSUB 2 Subquery Marker 172
 MSUB 2 Subquery Marker 211
 MSUB 2 Subquery Marker 272
 MSUB 2 Subquery Marker 283
 MSUB 2 Subquery Marker 289
 MSUB 2 Subquery Marker 299
 MSUB 2 Subquery Marker 329
 MSUB 2 Subquery Marker 388
 MSUB 2 Subquery Marker 448
 MSUB 2 Subquery Marker 503
 MSUB 2 Subquery Marker 565
 MTR1 2 Metrics: Comments Ratio Comments: 32% 22
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 72 = 96dec - 26exi + 2 22
 MTR3 2 Metrics: Query Complexity Complexity: 318 22

DATA PROPAGATION detailed
ColumnWritten To
@classnamesysattributes.char_value   sysattributes.int_value   °.char_value   sp_dropdevice_rset_001.device sp_dropdevice_rset_001.device sp_forceonline_object_rset_001.status sp_forceonline_object_rset_002.status sp_forceonline_page_rset_001.status sp_forceonline_page_rset_002.status sp_listsuspect_object_rset_001.Access
sp_listsuspect_page_rset_001.Access sp_makesuspect_obj_rset_001.Indid °.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_002.Indid °.LogType °.PageType
°.ErrType °.Delay °.TotalNum sp_makesuspect_obj_rset_003.Indid °.LogType °.PageType °.ErrType °.Delay °.TotalNum sp_passwordpolicy_rset_001.message
sp_passwordpolicy_rset_002.value sp_passwordpolicy_rset_003.value sp_passwordpolicy_rset_004.Policy_option sp_rjs_retrieve_rset_001.host_name sp_setsuspect_granularity_rset_001.Online mode sp_ssladmin_rset_001.certificate_path sp_ssladmin_rset_002.Cipher Suite Name °.Preference
@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 master..syslogins (1)  
calls proc sybsystemprocs..sp_aux_checkroleperm  
   reads table master..sysconfigures (1)  
   reads table master..syscurconfigs (1)  
reads table sybsystemprocs..sysobjects  
read_writes table sybsystemprocs..sysattributes  
reads table sybsystemprocs..sysusers  
read_writes table master..sysattributes (1)