DatabaseProcApplicationCreatedLinks
sybsystemprocssp_checkreswords  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/src/%M% %I% %G%" */
3     
4     /*
5     **Messages for "sp_checkreswords"	18035
6     **
7     ** 17232, "No user with the specified name exists in the current database."
8     ** 18035, "Reserved Words Used as Database Object Names for Database, "
9     ** 18036, " Upgrade renames sysobjects.schema to sysobjects.schemacnt."
10    ** 18037, " Found no reserved words used as names for database-wide objects."
11    ** 18038, " Found no reserved words used as database object names."
12    */
13    create procedure sp_checkreswords
14        @user_name_param varchar(30) = NULL
15    as
16    
17    
18        declare @msg varchar(1024)
19    
20        declare @baduse_cnt int /* Return the count of items that */
21        /* have reserved word names.	  */
22        declare @owner_cnt int /* Count of owner-based bad items */
23    
24        declare @uid_param int
25        declare @user_name varchar(30)
26        declare @dbname varchar(30)
27        declare @uid int
28    
29        /*
30        ** Note: do not set isolation level, because this sproc must run in
31        ** 4.x as well as System 10.
32        **
33        ** Also, do not call sp_getmessage since this sproc must run on 4.8
34        ** which cannot support the '%1!' syntax in the print statement.
35        ** The main side affect of this is that the messages printed out by
36        ** this sproc are not localized.
37        */
38    
39        set nocount on
40    
41        /*
42        ** 18035, "Reserved Words Used as Database Object Names for Database, "
43        **
44        ** NOTE:  sp_getmessage is not used for retrieving message text
45        ** because this sproc must also run on 4.8 servers which cannot
46        ** support the '%1!' syntax in the print statement.
47        */
48        select @dbname = db_name()
49        select @msg = description from master.dbo.sysmessages
50        where error = 18035
51            and langid is NULL
52        select @msg = @msg + @dbname + "."
53        print @msg
54        print ""
55    
56        select @baduse_cnt = 0
57    
58        create table #uids
59        (
60            uid int NULL,
61            catagory char(1)
62        )
63    
64        if (@user_name_param is NULL or @user_name_param = "dbo")
65        begin
66            /*
67            ** 18036, " Upgrade renames sysobjects schema to sysobjects schemacnt."
68            **
69            ** NOTE:  sp_getmessage is not used for retrieving message text
70            ** because this sproc must also run on 4.8 servers which cannot
71            ** support the '%1!' syntax in the print statement.
72            */
73            select @msg = description from master.dbo.sysmessages
74            where error = 18036
75                and langid is NULL
76            print @msg
77            print ""
78        end
79    
80        if (@user_name_param is not NULL)
81        begin
82            select @uid_param = user_id(@user_name_param)
83            if (@uid_param is NULL)
84            begin
85                /*
86                ** 17232, "No user with the specified name exists in the 
87                **	   current database."
88                **
89                ** NOTE:  sp_getmessage is not used for retrieving message text
90                ** because this sproc must also run on 4.8 servers which cannot
91                ** support the '%1!' syntax in the print statement.
92                */
93                select @msg = description from master.dbo.sysmessages
94                where error = 17232
95                    and langid is NULL
96                print @msg
97                return (0)
98            end
99    
100           insert #uids
101           select o.uid, "c"
102           from sysobjects o, master.dbo.spt_values v, syscolumns c
103           where lower(c.name) = v.name and v.type = 'W'
104               and c.id = o.id
105               and o.uid = @uid_param
106               and not (o.id = 1 and c.name = "schema")
107           group by o.uid
108           order by o.uid
109   
110           insert #uids
111           select o.uid, "i"
112           from sysobjects o, master.dbo.spt_values v, sysindexes i
113           where lower(i.name) = v.name and v.type = 'W'
114               and i.id = o.id
115               and o.uid = @uid_param
116               and i.indid != 0 and i.indid != 255
117           group by o.uid
118           order by o.uid
119   
120           insert #uids
121           select o.uid, "o"
122           from sysobjects o, master.dbo.spt_values v
123           where lower(o.name) = v.name and v.type = 'W'
124               and o.uid = @uid_param
125           group by o.uid
126           order by o.uid
127   
128           insert #uids
129           select t.uid, "t"
130           from systypes t, master.dbo.spt_values v
131           where lower(t.name) = v.name and v.type = 'W'
132               and t.uid = @uid_param
133           group by t.uid
134           order by t.uid
135       end
136       else
137       begin
138           /*
139           ** Get the uids into a temp table.
140           */
141   
142           insert #uids
143           select o.uid, "c"
144           from sysobjects o, master.dbo.spt_values v, syscolumns c
145           where lower(c.name) = v.name and v.type = 'W'
146               and c.id = o.id
147               and not (o.id = 1 and c.name = "schema")
148           group by o.uid
149           order by o.uid
150   
151           insert #uids
152           select o.uid, "i"
153           from sysobjects o, master.dbo.spt_values v, sysindexes i
154           where lower(i.name) = v.name and v.type = 'W'
155               and i.id = o.id
156               and i.indid != 0 and i.indid != 255
157           group by o.uid
158           order by o.uid
159   
160           insert #uids
161           select o.uid, "o"
162           from sysobjects o, master.dbo.spt_values v
163           where lower(o.name) = v.name and v.type = 'W'
164           group by o.uid
165           order by o.uid
166   
167           insert #uids
168           select t.uid, "t"
169           from systypes t, master.dbo.spt_values v
170           where lower(t.name) = v.name and v.type = 'W'
171           group by t.uid
172           order by t.uid
173       end
174   
175       /* Not using cursors because this sproc must run in 4.x, in order for 
176       ** clients to check their databases before upgrade.
177       */
178   
179       select @user_name = min(user_name(uid)) from #uids
180   
181       while (@user_name is not NULL)
182       begin
183           /* Print the owner-specific information:
184           **    columns, indexes, objects(tables, sprocs, etc.), and datatypes
185           */
186   
187           select @uid = user_id(@user_name)
188           select "Owner" = @user_name
189   
190           if exists (select * from #uids
191                   where user_name(uid) = @user_name and catagory = "c")
192           begin
193               select "Table" = o.name,
194                   "Reserved Word Column Names " = c.name
195               from sysobjects o, master.dbo.spt_values v, syscolumns c
196               where lower(c.name) = v.name and v.type = 'W'
197                   and c.id = o.id
198                   and o.uid = @uid
199                   and not (o.id = 1 and c.name = "schema")
200               order by o.name, c.name
201   
202               select @baduse_cnt = @baduse_cnt + @@rowcount
203           end
204   
205           if exists (select * from #uids
206                   where user_name(uid) = @user_name and catagory = "i")
207           begin
208               select "Table" = o.name,
209                   "Reserved Word Index Names" = i.name
210               from sysobjects o, master.dbo.spt_values v, sysindexes i
211               where lower(i.name) = v.name and v.type = 'W'
212                   and i.id = o.id
213                   and o.uid = @uid
214                   and i.indid != 0 and i.indid != 255
215               order by o.name, i.name
216   
217               select @baduse_cnt = @baduse_cnt + @@rowcount
218           end
219   
220           if exists (select * from #uids
221                   where user_name(uid) = @user_name and catagory = "o")
222           begin
223               select "Object Type" = convert(char(30), x.name),
224                   "Reserved Word Object Names" = o.name
225               from sysobjects o, master.dbo.spt_values v,
226                   master.dbo.spt_values x
227               where lower(o.name) = v.name and v.type = 'W'
228                   and o.uid = @uid
229                   and o.sysstat & 2063 = x.number
230                   and x.type = "O"
231               order by x.name, o.name
232   
233               select @baduse_cnt = @baduse_cnt + @@rowcount
234           end
235   
236           if exists (select * from #uids
237                   where user_name(uid) = @user_name and catagory = "t")
238           begin
239               select "Reserved Word Datatype Names" = t.name
240               from systypes t, master.dbo.spt_values v
241               where lower(t.name) = v.name and v.type = 'W'
242                   and t.uid = @uid
243               order by t.name
244   
245               select @baduse_cnt = @baduse_cnt + @@rowcount
246           end
247   
248           /* Get next id  */
249           select @user_name = min(user_name(uid)) from #uids
250           where user_name(uid) > @user_name
251   
252           /* If there are more user names, print a dividing mark between them. */
253           if (@user_name is not NULL)
254           begin
255               select "-------------------------------------------------------------"
256           end
257       end
258   
259   
260       if (@user_name_param is NULL)
261       begin
262   
263           select @owner_cnt = @baduse_cnt
264   
265           if (@baduse_cnt != 0)
266           begin
267               select "-------------------------------------------------------------"
268           end
269           select "Database-wide Objects" = " "
270   
271           /*
272           ** Print the database wide objects: users and segments
273           */
274   
275           if exists (select * from sysusers u, master.dbo.spt_values v
276                   where lower(u.name) = v.name and v.type = 'W'
277                       and u.name != "public")
278           begin
279               select "Reserved Word User Names" = u.name
280               from sysusers u, master.dbo.spt_values v
281               where lower(u.name) = v.name and v.type = 'W'
282                   and u.name != "public"
283               order by u.name
284   
285               select @baduse_cnt = @baduse_cnt + @@rowcount
286           end
287   
288           if exists (select * from syssegments s, master.dbo.spt_values v
289                   where lower(s.name) = v.name and v.type = 'W'
290                       and s.name != "default")
291           begin
292               select "Reserved Word Segment Names" = s.name
293               from syssegments s, master.dbo.spt_values v
294               where lower(s.name) = v.name and v.type = 'W'
295                   and s.name != "default"
296               order by s.name
297   
298               select @baduse_cnt = @baduse_cnt + @@rowcount
299           end
300   
301   
302           if (db_name() = "master")
303           begin
304               /* Print the Server-wide information:
305               **	logins, charsets, databases, and languages
306               */
307   
308               if exists (select * from master.dbo.syslogins l,
309                           master.dbo.spt_values v
310                       where lower(l.name) = v.name and v.type = 'W')
311               begin
312                   select "Reserved Word Login Names" = l.name
313                   from master.dbo.syslogins l, master.dbo.spt_values v
314                   where lower(l.name) = v.name and v.type = 'W'
315                   order by l.name
316   
317                   select @baduse_cnt = @baduse_cnt + @@rowcount
318               end
319   
320               if exists (select * from master.dbo.syscharsets c,
321                           master.dbo.spt_values v
322                       where lower(c.name) = v.name and v.type = 'W')
323               begin
324                   select "Reserved Word Charset Names" = c.name
325                   from master.dbo.syscharsets c, master.dbo.spt_values v
326                   where lower(c.name) = v.name and v.type = 'W'
327                   order by c.name
328   
329                   select @baduse_cnt = @baduse_cnt + @@rowcount
330               end
331   
332               if exists (select * from master.dbo.sysdatabases d,
333                           master.dbo.spt_values v
334                       where lower(d.name) = v.name and v.type = 'W')
335               begin
336                   select "Reserved Word Database Names" = d.name
337                   from master.dbo.sysdatabases d, master.dbo.spt_values v
338                   where lower(d.name) = v.name and v.type = 'W'
339                   order by d.name
340   
341                   select @baduse_cnt = @baduse_cnt + @@rowcount
342               end
343   
344               if exists (select * from master.dbo.syslanguages l,
345                           master.dbo.spt_values v
346                       where lower(l.name) = v.name and v.type = 'W')
347               begin
348                   select "Reserved Word Language Names" = l.name
349                   from master.dbo.syslanguages l, master.dbo.spt_values v
350                   where lower(l.name) = v.name and v.type = 'W'
351                   order by l.name
352   
353                   select @baduse_cnt = @baduse_cnt + @@rowcount
354               end
355   
356               if exists (select * from master.dbo.sysdevices d,
357                           master.dbo.spt_values v
358                       where lower(d.name) = v.name and v.type = 'W')
359               begin
360                   select "Reserved Word Device Names" = d.name
361                   from master.dbo.sysdevices d, master.dbo.spt_values v
362                   where lower(d.name) = v.name and v.type = 'W'
363                   order by d.name
364   
365                   select @baduse_cnt = @baduse_cnt + @@rowcount
366               end
367   
368               if exists (select * from master.dbo.sysremotelogins r,
369                           master.dbo.spt_values v
370                       where lower(r.remoteusername) = v.name and v.type = 'W')
371               begin
372                   select "Reserved Word Remote Logins" =
373                       r.remoteusername
374                   from master.dbo.sysremotelogins r,
375                       master.dbo.spt_values v
376                   where lower(r.remoteusername) = v.name and v.type = 'W'
377                   order by r.remoteusername
378   
379                   select @baduse_cnt = @baduse_cnt + @@rowcount
380               end
381   
382               if exists (select * from master.dbo.sysservers s,
383                           master.dbo.spt_values v
384                       where lower(s.srvname) = v.name and v.type = 'W')
385               begin
386                   select "Reserved Word Server Names" = s.srvname
387                   from master.dbo.sysservers s, master.dbo.spt_values v
388                   where lower(s.srvname) = v.name and v.type = 'W'
389                   order by s.srvname
390   
391                   select @baduse_cnt = @baduse_cnt + @@rowcount
392               end
393   
394               if exists (select * from master.dbo.sysservers s,
395                           master.dbo.spt_values v
396                       where lower(s.srvnetname) = v.name and v.type = 'W')
397               begin
398                   select "Reserved Word ServerNetNames" = s.srvnetname
399                   from master.dbo.sysservers s, master.dbo.spt_values v
400                   where lower(s.srvnetname) = v.name and v.type = 'W'
401                   order by s.srvnetname
402   
403                   select @baduse_cnt = @baduse_cnt + @@rowcount
404               end
405           end
406           if (@baduse_cnt != 0 and @owner_cnt = @baduse_cnt)
407           begin
408               /*
409               ** 18037, " Found no reserved words used as names for 
410               **	    database-wide objects."
411               **
412               ** NOTE:  sp_getmessage is not used for retrieving message text
413               ** because this sproc must also run on 4.8 servers which cannot
414               ** support the '%1!' syntax in the print statement.
415               */
416               select @msg = description from master.dbo.sysmessages
417               where error = 18037
418                   and langid is NULL
419               print @msg
420           end
421       end
422   
423   
424       if (@baduse_cnt = 0)
425       begin
426           /*
427           ** 18038, " Found no reserved words used as database object names."
428           **
429           ** NOTE:  sp_getmessage is not used for retrieving message text
430           ** because this sproc must also run on 4.8 servers which cannot
431           ** support the '%1!' syntax in the print statement.
432           */
433           select @msg = description from master.dbo.sysmessages
434           where error = 18038
435               and langid is NULL
436           print @msg
437       end
438   
439       return (@baduse_cnt)
440   


exec sp_procxmode 'sp_checkreswords', 'AnyMode'
go

Grant Execute on sp_checkreswords to public
go
RESULT SETS
sp_checkreswords_rset_018
sp_checkreswords_rset_017
sp_checkreswords_rset_016
sp_checkreswords_rset_015
sp_checkreswords_rset_014
sp_checkreswords_rset_013
sp_checkreswords_rset_012
sp_checkreswords_rset_011
sp_checkreswords_rset_010
sp_checkreswords_rset_009
sp_checkreswords_rset_008
sp_checkreswords_rset_007
sp_checkreswords_rset_006
sp_checkreswords_rset_005
sp_checkreswords_rset_004
sp_checkreswords_rset_003
sp_checkreswords_rset_002
sp_checkreswords_rset_001

DEFECTS
 QJWI 5 Join or Sarg Without Index 103
 QJWI 5 Join or Sarg Without Index 113
 QJWI 5 Join or Sarg Without Index 145
 QJWI 5 Join or Sarg Without Index 154
 QJWI 5 Join or Sarg Without Index 196
 QJWI 5 Join or Sarg Without Index 211
 QJWI 5 Join or Sarg Without Index 289
 QJWI 5 Join or Sarg Without Index 294
 QJWI 5 Join or Sarg Without Index 396
 QJWI 5 Join or Sarg Without Index 400
 MEST 4 Empty String will be replaced by Single Space 54
 MEST 4 Empty String will be replaced by Single Space 77
 MINU 4 Unique Index with nullable columns master..syslanguages master..syslanguages
 MINU 4 Unique Index with nullable columns master..sysmessages master..sysmessages
 MINU 4 Unique Index with nullable columns master..sysremotelogins master..sysremotelogins
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
103
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
113
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysobjects.ncsysobjects unique
(name, uid)
Intersection: {uid}
115
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysindexes.csysindexes unique clustered
(id, indid)
Intersection: {indid}
116
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
123
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
131
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
145
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
154
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysindexes.csysindexes unique clustered
(id, indid)
Intersection: {indid}
156
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
163
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
170
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
196
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
211
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysobjects.ncsysobjects unique
(name, uid)
Intersection: {uid}
213
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: sysindexes.csysindexes unique clustered
(id, indid)
Intersection: {indid}
214
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
227
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
241
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
276
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
281
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
289
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
294
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
310
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
314
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
322
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
326
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
334
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
338
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
346
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
350
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
358
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
362
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use JOIN Candidate index: sysremotelogins.csysremotelogins unique clustered
(remoteserverid, remoteusername)
Intersection: {remoteusername}
Uncovered: [remoteserverid]
370
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
370
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use JOIN Candidate index: sysremotelogins.csysremotelogins unique clustered
(remoteserverid, remoteusername)
Intersection: {remoteusername}
Uncovered: [remoteserverid]
376
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
376
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
384
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
388
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
396
 QPUI 4 Join or Sarg with Un-Rooted Partial Index Use SARG Candidate index: spt_values.spt_valuesclust clustered
(number, type)
Intersection: {type}
400
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 116
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 156
 QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int 214
 TNOI 4 Table with no index sybsystemprocs..syssegments sybsystemprocs..syssegments
 TNOU 4 Table with no unique index master..spt_values master..spt_values
 MAW1 3 Warning message on %name% sybsystemprocs..syscolumns.id: Warning message on syscolumns 104
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 104
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 106
 MAW1 3 Warning message on %name% sybsystemprocs..sysindexes.id: Warning message on sysindexes 114
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 114
 MAW1 3 Warning message on %name% sybsystemprocs..syscolumns.id: Warning message on syscolumns 146
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 146
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 147
 MAW1 3 Warning message on %name% sybsystemprocs..sysindexes.id: Warning message on sysindexes 155
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 155
 MAW1 3 Warning message on %name% sybsystemprocs..syscolumns.id: Warning message on syscolumns 197
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 197
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 199
 MAW1 3 Warning message on %name% sybsystemprocs..sysindexes.id: Warning message on sysindexes 212
 MAW1 3 Warning message on %name% sybsystemprocs..sysobjects.id: Warning message on sysobjects 212
 MGTP 3 Grant to public master..spt_values  
 MGTP 3 Grant to public master..syscharsets  
 MGTP 3 Grant to public master..sysdatabases  
 MGTP 3 Grant to public master..sysdevices  
 MGTP 3 Grant to public master..syslanguages  
 MGTP 3 Grant to public master..syslogins  
 MGTP 3 Grant to public master..sysmessages  
 MGTP 3 Grant to public master..sysremotelogins  
 MGTP 3 Grant to public master..sysservers  
 MGTP 3 Grant to public sybsystemprocs..sp_checkreswords  
 MGTP 3 Grant to public sybsystemprocs..syscolumns  
 MGTP 3 Grant to public sybsystemprocs..sysindexes  
 MGTP 3 Grant to public sybsystemprocs..sysobjects  
 MGTP 3 Grant to public sybsystemprocs..syssegments  
 MGTP 3 Grant to public sybsystemprocs..systypes  
 MGTP 3 Grant to public sybsystemprocs..sysusers  
 MNER 3 No Error Check should check @@error after insert 100
 MNER 3 No Error Check should check @@error after insert 110
 MNER 3 No Error Check should check @@error after insert 120
 MNER 3 No Error Check should check @@error after insert 128
 MNER 3 No Error Check should check @@error after insert 142
 MNER 3 No Error Check should check @@error after insert 151
 MNER 3 No Error Check should check @@error after insert 160
 MNER 3 No Error Check should check @@error after insert 167
 MUCO 3 Useless Code Useless Brackets 64
 MUCO 3 Useless Code Useless Brackets 80
 MUCO 3 Useless Code Useless Brackets 83
 MUCO 3 Useless Code Useless Brackets 97
 MUCO 3 Useless Code Useless Brackets 181
 MUCO 3 Useless Code Useless Brackets 253
 MUCO 3 Useless Code Useless Brackets 260
 MUCO 3 Useless Code Useless Brackets 265
 MUCO 3 Useless Code Useless Brackets 302
 MUCO 3 Useless Code Useless Brackets 406
 MUCO 3 Useless Code Useless Brackets 424
 MUCO 3 Useless Code Useless Brackets 439
 MUIN 3 Column created using implicit nullability 58
 QAFM 3 Var Assignment from potentially many rows 49
 QAFM 3 Var Assignment from potentially many rows 73
 QAFM 3 Var Assignment from potentially many rows 93
 QAFM 3 Var Assignment from potentially many rows 416
 QAFM 3 Var Assignment from potentially many rows 433
 QCRS 3 Conditional Result Set 188
 QCRS 3 Conditional Result Set 193
 QCRS 3 Conditional Result Set 208
 QCRS 3 Conditional Result Set 223
 QCRS 3 Conditional Result Set 239
 QCRS 3 Conditional Result Set 255
 QCRS 3 Conditional Result Set 267
 QCRS 3 Conditional Result Set 269
 QCRS 3 Conditional Result Set 279
 QCRS 3 Conditional Result Set 292
 QCRS 3 Conditional Result Set 312
 QCRS 3 Conditional Result Set 324
 QCRS 3 Conditional Result Set 336
 QCRS 3 Conditional Result Set 348
 QCRS 3 Conditional Result Set 360
 QCRS 3 Conditional Result Set 372
 QCRS 3 Conditional Result Set 386
 QCRS 3 Conditional Result Set 398
 QNAJ 3 Not using ANSI Inner Join 102
 QNAJ 3 Not using ANSI Inner Join 112
 QNAJ 3 Not using ANSI Inner Join 122
 QNAJ 3 Not using ANSI Inner Join 130
 QNAJ 3 Not using ANSI Inner Join 144
 QNAJ 3 Not using ANSI Inner Join 153
 QNAJ 3 Not using ANSI Inner Join 162
 QNAJ 3 Not using ANSI Inner Join 169
 QNAJ 3 Not using ANSI Inner Join 195
 QNAJ 3 Not using ANSI Inner Join 210
 QNAJ 3 Not using ANSI Inner Join 225
 QNAJ 3 Not using ANSI Inner Join 240
 QNAJ 3 Not using ANSI Inner Join 275
 QNAJ 3 Not using ANSI Inner Join 280
 QNAJ 3 Not using ANSI Inner Join 288
 QNAJ 3 Not using ANSI Inner Join 293
 QNAJ 3 Not using ANSI Inner Join 308
 QNAJ 3 Not using ANSI Inner Join 313
 QNAJ 3 Not using ANSI Inner Join 320
 QNAJ 3 Not using ANSI Inner Join 325
 QNAJ 3 Not using ANSI Inner Join 332
 QNAJ 3 Not using ANSI Inner Join 337
 QNAJ 3 Not using ANSI Inner Join 344
 QNAJ 3 Not using ANSI Inner Join 349
 QNAJ 3 Not using ANSI Inner Join 356
 QNAJ 3 Not using ANSI Inner Join 361
 QNAJ 3 Not using ANSI Inner Join 368
 QNAJ 3 Not using ANSI Inner Join 374
 QNAJ 3 Not using ANSI Inner Join 382
 QNAJ 3 Not using ANSI Inner Join 387
 QNAJ 3 Not using ANSI Inner Join 394
 QNAJ 3 Not using ANSI Inner Join 399
 QNAM 3 Select expression has no name "-------------------------------------------------------------" 255
 QNAM 3 Select expression has no name "-------------------------------------------------------------" 267
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
50
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
74
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
94
 QPRI 3 Join or Sarg with Rooted Partial Index Use JOIN Candidate index: sysobjects.ncsysobjects unique
(name, uid)
Intersection: {name}
Uncovered: [uid]
163
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
417
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
434
 MRST 2 Result Set Marker 188
 MRST 2 Result Set Marker 193
 MRST 2 Result Set Marker 208
 MRST 2 Result Set Marker 223
 MRST 2 Result Set Marker 239
 MRST 2 Result Set Marker 255
 MRST 2 Result Set Marker 267
 MRST 2 Result Set Marker 269
 MRST 2 Result Set Marker 279
 MRST 2 Result Set Marker 292
 MRST 2 Result Set Marker 312
 MRST 2 Result Set Marker 324
 MRST 2 Result Set Marker 336
 MRST 2 Result Set Marker 348
 MRST 2 Result Set Marker 360
 MRST 2 Result Set Marker 372
 MRST 2 Result Set Marker 386
 MRST 2 Result Set Marker 398
 MSUB 2 Subquery Marker 190
 MSUB 2 Subquery Marker 205
 MSUB 2 Subquery Marker 220
 MSUB 2 Subquery Marker 236
 MSUB 2 Subquery Marker 275
 MSUB 2 Subquery Marker 288
 MSUB 2 Subquery Marker 308
 MSUB 2 Subquery Marker 320
 MSUB 2 Subquery Marker 332
 MSUB 2 Subquery Marker 344
 MSUB 2 Subquery Marker 356
 MSUB 2 Subquery Marker 368
 MSUB 2 Subquery Marker 382
 MSUB 2 Subquery Marker 394
 MTR1 2 Metrics: Comments Ratio Comments: 22% 13
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 47 = 47dec - 2exi + 2 13
 MTR3 2 Metrics: Query Complexity Complexity: 329 13
 PRED_QUERY_COLLECTION 2 {c=sybsystemprocs..syscolumns, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 101
 PRED_QUERY_COLLECTION 2 {i=sybsystemprocs..sysindexes, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 111
 PRED_QUERY_COLLECTION 2 {o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 121
 PRED_QUERY_COLLECTION 2 {sv=master..spt_values, t=sybsystemprocs..systypes} 0 129
 PRED_QUERY_COLLECTION 2 {c=sybsystemprocs..syscolumns, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 143
 PRED_QUERY_COLLECTION 2 {i=sybsystemprocs..sysindexes, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 152
 PRED_QUERY_COLLECTION 2 {o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 161
 PRED_QUERY_COLLECTION 2 {sv=master..spt_values, t=sybsystemprocs..systypes} 0 168
 PRED_QUERY_COLLECTION 2 {c=sybsystemprocs..syscolumns, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 193
 PRED_QUERY_COLLECTION 2 {i=sybsystemprocs..sysindexes, o=sybsystemprocs..sysobjects, sv=master..spt_values} 0 208
 PRED_QUERY_COLLECTION 2 {o=sybsystemprocs..sysobjects, sv=master..spt_values, sv2=master..spt_values} 0 223
 PRED_QUERY_COLLECTION 2 {sv=master..spt_values, t=sybsystemprocs..systypes} 0 239
 PRED_QUERY_COLLECTION 2 {sv=master..spt_values, u=sybsystemprocs..sysusers} 0 275
 PRED_QUERY_COLLECTION 2 {sv=master..spt_values, u=sybsystemprocs..sysusers} 0 279
 PRED_QUERY_COLLECTION 2 {s=sybsystemprocs..syssegments, sv=master..spt_values} 0 288
 PRED_QUERY_COLLECTION 2 {s=sybsystemprocs..syssegments, sv=master..spt_values} 0 292
 PRED_QUERY_COLLECTION 2 {l=master..syslogins, sv=master..spt_values} 0 308
 PRED_QUERY_COLLECTION 2 {l=master..syslogins, sv=master..spt_values} 0 312
 PRED_QUERY_COLLECTION 2 {c=master..syscharsets, sv=master..spt_values} 0 320
 PRED_QUERY_COLLECTION 2 {c=master..syscharsets, sv=master..spt_values} 0 324
 PRED_QUERY_COLLECTION 2 {d=master..sysdatabases, sv=master..spt_values} 0 332
 PRED_QUERY_COLLECTION 2 {d=master..sysdatabases, sv=master..spt_values} 0 336
 PRED_QUERY_COLLECTION 2 {l=master..syslanguages, sv=master..spt_values} 0 344
 PRED_QUERY_COLLECTION 2 {l=master..syslanguages, sv=master..spt_values} 0 348
 PRED_QUERY_COLLECTION 2 {d=master..sysdevices, sv=master..spt_values} 0 356
 PRED_QUERY_COLLECTION 2 {d=master..sysdevices, sv=master..spt_values} 0 360
 PRED_QUERY_COLLECTION 2 {r=master..sysremotelogins, sv=master..spt_values} 0 368
 PRED_QUERY_COLLECTION 2 {r=master..sysremotelogins, sv=master..spt_values} 0 372
 PRED_QUERY_COLLECTION 2 {s=master..sysservers, sv=master..spt_values} 0 382
 PRED_QUERY_COLLECTION 2 {s=master..sysservers, sv=master..spt_values} 0 386
 PRED_QUERY_COLLECTION 2 {s=master..sysservers, sv=master..spt_values} 0 394
 PRED_QUERY_COLLECTION 2 {s=master..sysservers, sv=master..spt_values} 0 398

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_checkreswords_rset_004 
writes table sybsystemprocs..sp_checkreswords_rset_018 
reads table sybsystemprocs..syssegments  
writes table sybsystemprocs..sp_checkreswords_rset_007 
writes table sybsystemprocs..sp_checkreswords_rset_016 
writes table sybsystemprocs..sp_checkreswords_rset_005 
reads table sybsystemprocs..sysusers  
writes table sybsystemprocs..sp_checkreswords_rset_015 
reads table master..sysremotelogins (1)  
writes table sybsystemprocs..sp_checkreswords_rset_009 
writes table sybsystemprocs..sp_checkreswords_rset_012 
writes table sybsystemprocs..sp_checkreswords_rset_003 
writes table sybsystemprocs..sp_checkreswords_rset_013 
reads table sybsystemprocs..syscolumns  
writes table sybsystemprocs..sp_checkreswords_rset_002 
writes table sybsystemprocs..sp_checkreswords_rset_011 
writes table sybsystemprocs..sp_checkreswords_rset_006 
reads table master..sysservers (1)  
reads table master..sysdatabases (1)  
reads table sybsystemprocs..systypes  
writes table sybsystemprocs..sp_checkreswords_rset_017 
writes table sybsystemprocs..sp_checkreswords_rset_010 
reads table master..sysdevices (1)  
reads table master..spt_values (1)  
writes table sybsystemprocs..sp_checkreswords_rset_014 
reads table master..syslogins (1)  
reads table sybsystemprocs..sysobjects  
reads table sybsystemprocs..sysindexes  
reads table master..syscharsets (1)  
reads table master..sysmessages (1)  
writes table sybsystemprocs..sp_checkreswords_rset_008 
reads table master..syslanguages (1)  
read_writes table tempdb..#uids (1) 
writes table sybsystemprocs..sp_checkreswords_rset_001