DatabaseProcApplicationCreatedLinks
sybsystemprocssp_modify_time_range  14 déc. 14Defects Propagation Dependencies

1     
2     /* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */
3     
4     /*
5     ** Messages for "sp_modify_time_range"
6     **
7     ** 17260, "Can't run %1! from within a transaction."
8     ** 17261, "Only the System Administrator (SA) may execute this procedure."
9     ** 18182, "Timerange name must be non-NULL."
10    ** 18186, "Unknown startday %1!."
11    ** 18187, "Unknown endday %1!."
12    ** 18189, "Unknown starting time value %1!."
13    ** 18190, "Unknown ending time value %1!."
14    ** 18191, "Ending time must be later in the day than starting time."
15    ** 18197, "At least one of the starting day, ending day, starting time, or ending time must be non-NULL."
16    ** 18199, "Unknown time range name '%1!'."
17    ** 18200, "at all times' range may not be modified."
18    ** 18201, "Modification would cause overlap with range %1!."
19    ** 18773, "HA_LOG: HA consistency check failure in stored procedure '%1!' on companion server '%2!'"
20    */
21    
22    /* 
23    ** IMPORTANT: Please read the following instructions before
24    **   making changes to this stored procedure.
25    **
26    **	To make this stored procedure compatible with High Availability (HA),
27    **	changes to certain system tables must be propagated 
28    **	to the companion server under some conditions.
29    **	The tables include (but are not limited to):
30    **		syslogins, sysservers, sysattributes, systimeranges,
31    **		sysresourcelimits, sysalternates, sysdatabases,
32    **		syslanguages, sysremotelogins, sysloginroles,
33    **		sysalternates (master DB only), systypes (master DB only),
34    **		sysusers (master DB only), sysprotects (master DB only)
35    **	please refer to the HA documentation for detail.
36    **
37    **	Here is what you need to do: 
38    **	For each insert/update/delete statement, add three sections to
39    **	-- start HA transaction prior to the statement
40    **	-- add the statement
41    **	-- add HA synchronization code to propagate the change to the companion
42    **
43    **	For example, if you are adding 
44    **		insert master.dbo.syslogins ......
45    **	the code should look like:
46    **	1. Before that SQL statement:
47    **		
48    **	2. Now, the SQL statement:
49    **		insert master.dbo.syslogins ......
50    **	3. Add a HA synchronization section right after the SQL statement:
51    **		
52    **
53    **	You may need to do similar change for each built-in function you
54    **	want to add.
55    **
56    **	Finally, add a separate part at a place where it can not
57    **	be reached by the normal execution path:
58    **	clean_all:
59    **		
60    **		return (1)
61    */
62    
63    create or replace procedure sp_modify_time_range
64        @name varchar(255) = NULL, /* range name */
65        @startday varchar(30) = NULL, /* first day of range */
66        @endday varchar(30) = NULL, /* last day of range */
67        @starttime varchar(30) = NULL, /* starting time */
68        @endtime varchar(30) = NULL /* ending time */
69    as
70    
71        declare @range_being_modified smallint
72        declare @current_range smallint
73        declare @start_dt datetime
74        declare @end_dt datetime
75        declare @cur_start_dt datetime
76        declare @cur_end_dt datetime
77        declare @startdaynum int
78        declare @enddaynum int
79        declare @cur_startdaynum int
80        declare @cur_enddaynum int
81        declare @tmp_starttime varchar(30)
82        declare @tmp_endtime varchar(30)
83        declare @msg varchar(1024)
84        declare @HA_CERTIFIED tinyint /* Is the SP HA certified ? */
85        declare @retstat int
86        declare @nullarg char(1)
87        declare @dummy int
88        declare @status int
89        declare @gp_enabled int
90    
91    
92    
93    
94        select @HA_CERTIFIED = 0
95    
96    
97    
98    
99        /* check to see if we are using HA specific SP for a HA enabled server */
100       exec @retstat = sp_ha_check_certified 'sp_modify_time_range', @HA_CERTIFIED
101       if (@retstat != 0)
102           return (1)
103   
104       if @@trancount > 0
105       begin
106           /*
107           ** 17260, "Can't run %1! from within a transaction." 
108           */
109           raiserror 17260, "sp_modify_time_range"
110           return (1)
111       end
112   
113       /* 
114       ** If granular permissions is not enabled then sa_role is required.
115       ** If granular permissions is enabled then the permission 
116       ** 'manage resource limit' is required.  proc_role and proc_auditperm will 
117       ** also do auditing if required. Both will also print error message if required.
118       */
119   
120       select @nullarg = NULL
121       execute @status = sp_aux_checkroleperm "sa_role", "manage resource limit",
122           @nullarg, @gp_enabled output
123   
124       /* For Auditing */
125       if (@gp_enabled = 0)
126       begin
127           if (proc_role("sa_role") = 0)
128           begin
129               /*
130               ** 17261, "Only the System Administrator (SA) may execute 
131               ** this procedure."
132               */
133               raiserror 17261
134               return (1)
135           end
136       end
137       else
138       begin
139           select @dummy = proc_auditperm("manage resource limit", @status)
140       end
141   
142       if (@status != 0)
143           return (1)
144   
145       /* Make sure we have at least the minimum of args */
146       if (@startday is null) and (@endday is null) and (@starttime is null) and (@endtime is null)
147       begin
148           /*
149           ** 18197, "At least one of the starting day, ending day, starting time, or ending time must be non-NULL."
150           */
151           raiserror 18197
152           return (1)
153       end
154   
155       /* Has a valid range name been specified? */
156   
157       select @name = rtrim(@name)
158   
159       if (@name is null)
160       begin
161           /*
162           ** 18182, "Timerange name must be non-NULL."
163           */
164           raiserror 18182
165           return (1)
166       end
167       else
168       begin
169           if not exists (select * from master.dbo.systimeranges
170                   where upper(name) = upper(@name))
171           begin
172               /*
173               ** 18199, "Unknown time range name '%1!'."
174               */
175               raiserror 18199, @name
176               return (1)
177           end
178           select @range_being_modified = id from master.dbo.systimeranges
179           where upper(name) = upper(@name)
180       end
181   
182       /* "at all times" cannot be modified */
183       if (@range_being_modified = 1)
184       begin
185           /*
186           ** 18200, "at all times' range may not be modified."
187           */
188           raiserror 18200
189           return (1)
190       end
191   
192       /* Get the start day's number based on the day name */
193       if (@startday is not null)
194           select @startdaynum = daytonum(@startday)
195       else
196           select @startdaynum = startday from master.dbo.systimeranges
197           where upper(name) = upper(@name)
198   
199       if (@startdaynum = - 1)
200       begin
201           /*
202           ** 18186, "Unknown startday %1!."
203           */
204           raiserror 18186, @startday
205           return (1)
206       end
207   
208       /* Get the end day's number based on the day name */
209       if (@endday is not null)
210           select @enddaynum = daytonum(@endday)
211       else
212           select @enddaynum = endday from master.dbo.systimeranges
213           where upper(name) = upper(@name)
214   
215       if (@enddaynum = - 1)
216       begin
217           /*
218           ** 18187, "Unknown endday %1!."
219           */
220           raiserror 18187, @endday
221           return (1)
222       end
223   
224       /* If we're modifying the start time, convert it to datetime
225       ** so we can do arithmetic 
226       */
227       if (@starttime is not null)
228       begin
229           select @start_dt = convert(datetime, @starttime)
230           if (@start_dt is null)
231           begin
232               /*
233               ** 18189, "Unknown starting time value %1!."
234               */
235               raiserror 18189, @starttime
236               return (1)
237           end
238       end
239       else
240           select @start_dt = convert(datetime, starttime)
241           from master.dbo.systimeranges
242           where upper(name) = upper(@name)
243   
244       /* If we're modifying the end time, convert it to datetime
245       ** so we can do arithmetic 
246       */
247       if (@endtime is not null)
248       begin
249           select @end_dt = convert(datetime, @endtime)
250           if (@end_dt is null)
251           begin
252               /*
253               ** 18190, "Unknown ending time value %1!."
254               */
255               raiserror 18190, @endtime
256               return (1)
257           end
258       end
259       else
260           select @end_dt = convert(datetime, endtime)
261           from master.dbo.systimeranges
262           where upper(name) = upper(@name)
263   
264       /* Make sure the start and end times are in the right order.
265       ** The exception is when endtime is 00:00, which can
266       ** be taken to mean midnight.
267       */
268       if ((datepart(hour, @end_dt) != 0) or
269               (datepart(minute, @end_dt) != 0) or
270               (datepart(second, @end_dt) != 0)) and
271           (@start_dt > @end_dt)
272       begin
273           /*
274           ** 18191, "Ending time must be later in the day than starting time."
275           */
276           raiserror 18191
277           return (1)
278       end
279   
280       /* Cursor result: ranges used by user/applications with at least
281       ** 1 limit defined during @range_being_modified
282       */
283       declare c1 cursor for
284       select distinct rangeid from master.dbo.sysresourcelimits a
285       where exists (select * from master.dbo.sysresourcelimits b
286               where ((a.name = b.name) or (a.name is null) or (b.name is null)) and
287                   ((a.appname = b.appname) or (a.appname is null) or (b.appname is null)) and
288                   (b.rangeid = @range_being_modified))
289       /*
290       order by name, appname
291       */
292   
293       open c1
294   
295       fetch c1 into @current_range
296   
297       /* We need to peruse the cursor results to see if modifying
298       ** this range would cause a limit overlap for any given
299       ** user/application.
300       */
301       while (@@sqlstatus != 2)
302       begin
303   
304           if (@current_range != @range_being_modified)
305           begin
306   
307               /* Get the start and end days for current range */
308               select @cur_startdaynum = startday from
309                   master.dbo.systimeranges
310               where id = @current_range
311               select @cur_enddaynum = endday from
312                   master.dbo.systimeranges
313               where id = @current_range
314   
315               /* Get the start and end times for current range */
316               select @tmp_starttime = starttime from
317                   master.dbo.systimeranges
318               where id = @current_range
319               select @tmp_endtime = endtime from
320                   master.dbo.systimeranges
321               where id = @current_range
322               select @cur_start_dt = convert(datetime, @tmp_starttime)
323               select @cur_end_dt = convert(datetime, @tmp_endtime)
324   
325               /* See if the modified range overlaps with any other
326               ** range used by limits for this user/application
327               ** (excepting limits defined for the exact
328               ** same timerange).
329               */
330   
331               /* This is the non-wrapping case, for starttime.
332               ** If (the current range doesn't wrap around the
333               ** end of the week)
334               ** and
335               ** (the days of the modified range
336               ** overlap with the current range)
337               ** and 
338               ** (the starttime of the modified range is after
339               ** the starttime of the current range)
340               ** and 
341               ** (the endtime of the modified range is before
342               ** the endtime of the current range, with 00:00
343               ** being taken as midnight)
344               ** then we have an overlap, so raise an error
345               ** and return.
346               */
347               if
348                   (@cur_startdaynum <= @cur_enddaynum)
349                   and
350                   (((@startdaynum >= @cur_startdaynum) and
351                           (@startdaynum <= @cur_enddaynum)) or
352                       ((@enddaynum >= @cur_startdaynum) and
353                           (@enddaynum <= @cur_enddaynum)) or
354                       ((@startdaynum <= @cur_startdaynum) and
355                           (@enddaynum >= @cur_enddaynum)))
356                   and
357                   (@start_dt >= @cur_start_dt)
358                   and
359                   ((@start_dt < @cur_end_dt) or
360                       ((datepart(hour, @cur_end_dt) = 0) and
361                           (datepart(minute, @cur_end_dt) = 0) and
362                           (datepart(second, @cur_end_dt) = 0)))
363               begin
364                   /*
365                   ** 18201, "Modification would cause overlap with range %1!."
366                   */
367                   raiserror 18201, @current_range
368                   close c1
369                   return (1)
370               end
371   
372               /* This is the wrapping case, for starttime.
373               */
374               if
375                   (@cur_startdaynum > @cur_enddaynum)
376                   and
377                   ((@startdaynum >= @cur_startdaynum) or
378                       (@startdaynum <= @cur_enddaynum) or
379                       (@enddaynum >= @cur_startdaynum) or
380                       (@enddaynum <= @cur_enddaynum))
381                   and
382                   (@start_dt >= @cur_start_dt)
383                   and
384                   ((@start_dt < @cur_end_dt) or
385                       ((datepart(hour, @cur_end_dt) = 0) and
386                           (datepart(minute, @cur_end_dt) = 0) and
387                           (datepart(second, @cur_end_dt) = 0)))
388               begin
389                   /*
390                   ** 18201, "Modification would cause overlap with range %1!."
391                   */
392                   raiserror 18201, @current_range
393                   close c1
394                   return (1)
395               end
396   
397               /* This is the non-wrapping case, for endtime.
398               ** If (the current range doesn't wrap around the
399               ** end of the week)
400               ** and
401               ** (the days of the modified range
402               ** overlap with the current range)
403               ** and 
404               ** (the endtime of the modified range is before
405               ** the endtime of the current range, with 00:00
406               ** being taken as midnight)
407               ** and 
408               ** (the endtime of the modified range is after
409               ** the starttime of the current range)
410               ** then we have an overlap, so raise an error
411               ** and return.
412               */
413               if
414                   (@cur_startdaynum <= @cur_enddaynum)
415                   and
416                   (((@startdaynum >= @cur_startdaynum) and
417                           (@startdaynum <= @cur_enddaynum)) or
418                       ((@enddaynum >= @cur_startdaynum) and
419                           (@enddaynum <= @cur_enddaynum)) or
420                       ((@startdaynum <= @cur_startdaynum) and
421                           (@enddaynum >= @cur_enddaynum)))
422                   and
423                   ((@end_dt <= @cur_end_dt) or
424                       ((datepart(hour, @cur_end_dt) = 0) and
425                           (datepart(minute, @cur_end_dt) = 0) and
426                           (datepart(second, @cur_end_dt) = 0)))
427                   and
428                   (@end_dt > @cur_start_dt)
429               begin
430                   /*
431                   ** 18201, "Modification would cause overlap with range %1!."
432                   */
433                   raiserror 18201, @current_range
434                   close c1
435                   return (1)
436               end
437   
438               /* This is the wrapping case, for endtime.
439               */
440               if
441                   (@cur_startdaynum > @cur_enddaynum)
442                   and
443                   ((@startdaynum >= @cur_startdaynum) or
444                       (@startdaynum <= @cur_enddaynum) or
445                       (@enddaynum >= @cur_startdaynum) or
446                       (@enddaynum <= @cur_enddaynum))
447                   and
448                   ((@end_dt <= @cur_end_dt) or
449                       ((datepart(hour, @cur_end_dt) = 0) and
450                           (datepart(minute, @cur_end_dt) = 0) and
451                           (datepart(second, @cur_end_dt) = 0)))
452                   and
453                   (@end_dt > @cur_start_dt)
454               begin
455                   /*
456                   ** 18201, "Modification would cause overlap with range %1!."
457                   */
458                   raiserror 18201, @current_range
459                   close c1
460                   return (1)
461               end
462   
463               /* This is the non-wrapping case, where
464               ** the modified range completely
465               ** covers the current range.
466               */
467               if
468                   (@cur_startdaynum <= @cur_enddaynum)
469                   and
470                   (((@startdaynum >= @cur_startdaynum) and
471                           (@startdaynum <= @cur_enddaynum)) or
472                       ((@enddaynum >= @cur_startdaynum) and
473                           (@enddaynum <= @cur_enddaynum)) or
474                       ((@startdaynum <= @cur_startdaynum) and
475                           (@enddaynum >= @cur_enddaynum)))
476                   and
477                   (@start_dt < @cur_start_dt)
478                   and
479                   (((@end_dt > @cur_end_dt) and
480                           ((datepart(hour, @cur_end_dt) != 0) or
481                               (datepart(minute, @cur_end_dt) != 0) or
482                               (datepart(second, @cur_end_dt) != 0)))
483                       or
484                       ((datepart(hour, @end_dt) = 0) and
485                           (datepart(minute, @end_dt) = 0) and
486                           (datepart(second, @end_dt) = 0)))
487               begin
488                   /*
489                   ** 18201, "Modification would cause overlap with range %1!."
490                   */
491                   raiserror 18201, @current_range
492                   close c1
493                   return (1)
494               end
495   
496               /* This is the wrapping case, where
497               ** the modified range completely
498               ** covers the current range.
499               */
500               if
501                   (@cur_startdaynum > @cur_enddaynum)
502                   and
503                   ((@startdaynum >= @cur_startdaynum) or
504                       (@startdaynum <= @cur_enddaynum) or
505                       (@enddaynum >= @cur_startdaynum) or
506                       (@enddaynum <= @cur_enddaynum))
507                   and
508                   (@start_dt < @cur_start_dt)
509                   and
510                   (((@end_dt > @cur_end_dt) and
511                           ((datepart(hour, @cur_end_dt) != 0) or
512                               (datepart(minute, @cur_end_dt) != 0) or
513                               (datepart(second, @cur_end_dt) != 0)))
514                       or
515                       ((datepart(hour, @end_dt) = 0) and
516                           (datepart(minute, @end_dt) = 0) and
517                           (datepart(second, @end_dt) = 0)))
518               begin
519                   /*
520                   ** 18201, "Modification would cause overlap with range %1!."
521                   */
522                   raiserror 18201, @current_range
523                   close c1
524                   return (1)
525               end
526   
527           end
528   
529           fetch c1 into @current_range
530       end
531   
532       close c1
533   
534       /* Can we even find a range to modify? */
535       if (select count(*) from master.dbo.systimeranges
536               where upper(name) = upper(@name)) = 0
537       begin
538           /*
539           ** 18242, "No such time range found in systimeranges."
540           */
541           raiserror 18242
542           return (1)
543       end
544   
545   
546   
547       /* Update! */
548       if (@startday is not null)
549       begin
550           update master.dbo.systimeranges
551           set startday = @startdaynum where upper(name) = upper(@name)
552   
553   
554   
555       end
556   
557       if (@endday is not null)
558       begin
559           update master.dbo.systimeranges
560           set endday = @enddaynum where upper(name) = upper(@name)
561   
562   
563   
564       end
565   
566       if (@starttime is not null)
567       begin
568           update master.dbo.systimeranges
569           set starttime = @starttime where upper(name) = upper(@name)
570   
571   
572   
573       end
574   
575       if (@endtime is not null)
576       begin
577           update master.dbo.systimeranges
578           set endtime = @endtime where upper(name) = upper(@name)
579       end
580   
581   
582       dbcc waketimerange
583   
584       return (0)
585   
586   clean_all:
587   
588       return (1)
589   


exec sp_procxmode 'sp_modify_time_range', 'AnyMode'
go

Grant Execute on sp_modify_time_range to public
go
DEFECTS
 MURC 6 Unreachable Code 586
 MURC 6 Unreachable Code 588
 MTYP 4 Assignment type mismatch startday: tinyint = int 551
 MTYP 4 Assignment type mismatch endday: tinyint = int 560
 MTYP 4 Assignment type mismatch starttime: varchar(10) = varchar(30) 569
 MTYP 4 Assignment type mismatch endtime: varchar(10) = varchar(30) 578
 QCSC 4 Costly 'select count()', use 'exists()' 535
 TNOU 4 Table with no unique index master..sysresourcelimits master..sysresourcelimits
 TNOU 4 Table with no unique index master..systimeranges master..systimeranges
 CUNU 3 Cursor not updated: cursor should contain 'for read only' clause c1 284
 MAW1 3 Warning message on %name% master..systimeranges.id: Warning message on systimeranges 178
 MAW1 3 Warning message on %name% master..systimeranges.id: Warning message on systimeranges 310
 MAW1 3 Warning message on %name% master..systimeranges.id: Warning message on systimeranges 313
 MAW1 3 Warning message on %name% master..systimeranges.id: Warning message on systimeranges 318
 MAW1 3 Warning message on %name% master..systimeranges.id: Warning message on systimeranges 321
 MGTP 3 Grant to public master..sysresourcelimits  
 MGTP 3 Grant to public master..systimeranges  
 MGTP 3 Grant to public sybsystemprocs..sp_modify_time_range  
 MNER 3 No Error Check should check @@error after update 550
 MNER 3 No Error Check should check @@error after update 559
 MNER 3 No Error Check should check @@error after update 568
 MNER 3 No Error Check should check @@error after update 577
 MUCO 3 Useless Code Useless Brackets 101
 MUCO 3 Useless Code Useless Brackets 102
 MUCO 3 Useless Code Useless Brackets 110
 MUCO 3 Useless Code Useless Brackets 125
 MUCO 3 Useless Code Useless Brackets 127
 MUCO 3 Useless Code Useless Brackets 134
 MUCO 3 Useless Code Useless Brackets 142
 MUCO 3 Useless Code Useless Brackets 143
 MUCO 3 Useless Code Useless Brackets 152
 MUCO 3 Useless Code Useless Brackets 159
 MUCO 3 Useless Code Useless Brackets 165
 MUCO 3 Useless Code Useless Brackets 176
 MUCO 3 Useless Code Useless Brackets 183
 MUCO 3 Useless Code Useless Brackets 189
 MUCO 3 Useless Code Useless Brackets 193
 MUCO 3 Useless Code Useless Brackets 199
 MUCO 3 Useless Code Useless Brackets 205
 MUCO 3 Useless Code Useless Brackets 209
 MUCO 3 Useless Code Useless Brackets 215
 MUCO 3 Useless Code Useless Brackets 221
 MUCO 3 Useless Code Useless Brackets 227
 MUCO 3 Useless Code Useless Brackets 230
 MUCO 3 Useless Code Useless Brackets 236
 MUCO 3 Useless Code Useless Brackets 247
 MUCO 3 Useless Code Useless Brackets 250
 MUCO 3 Useless Code Useless Brackets 256
 MUCO 3 Useless Code Useless Brackets 277
 MUCO 3 Useless Code Useless Brackets 301
 MUCO 3 Useless Code Useless Brackets 304
 MUCO 3 Useless Code Useless Brackets 369
 MUCO 3 Useless Code Useless Brackets 394
 MUCO 3 Useless Code Useless Brackets 435
 MUCO 3 Useless Code Useless Brackets 460
 MUCO 3 Useless Code Useless Brackets 493
 MUCO 3 Useless Code Useless Brackets 524
 MUCO 3 Useless Code Useless Brackets 542
 MUCO 3 Useless Code Useless Brackets 548
 MUCO 3 Useless Code Useless Brackets 557
 MUCO 3 Useless Code Useless Brackets 566
 MUCO 3 Useless Code Useless Brackets 575
 MUCO 3 Useless Code Useless Brackets 584
 MUCO 3 Useless Code Useless Brackets 588
 MUOT 3 Updates outside transaction 577
 QAFM 3 Var Assignment from potentially many rows 178
 QAFM 3 Var Assignment from potentially many rows 196
 QAFM 3 Var Assignment from potentially many rows 212
 QAFM 3 Var Assignment from potentially many rows 240
 QAFM 3 Var Assignment from potentially many rows 260
 QAFM 3 Var Assignment from potentially many rows 308
 QAFM 3 Var Assignment from potentially many rows 311
 QAFM 3 Var Assignment from potentially many rows 316
 QAFM 3 Var Assignment from potentially many rows 319
 QGWO 3 Group by/Distinct/Union without order by 284
 QSWV 3 Sarg with variable @range_being_modified, Candidate Index: sysresourcelimits.csysresourcelimits clustered(name, appname... 288
 QSWV 3 Sarg with variable @current_range, Candidate Index: systimeranges.csystimeranges clustered(id) F 310
 QSWV 3 Sarg with variable @current_range, Candidate Index: systimeranges.csystimeranges clustered(id) F 313
 QSWV 3 Sarg with variable @current_range, Candidate Index: systimeranges.csystimeranges clustered(id) F 318
 QSWV 3 Sarg with variable @current_range, Candidate Index: systimeranges.csystimeranges clustered(id) F 321
 VNRD 3 Variable is not read @dummy 139
 VUNU 3 Variable is not used @msg 83
 CRDO 2 Read Only Cursor Marker (has a 'distinct' option) 284
 MSUB 2 Subquery Marker 169
 MSUB 2 Subquery Marker 535
 MSUC 2 Correlated Subquery Marker 285
 MTR1 2 Metrics: Comments Ratio Comments: 42% 63
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 93 = 110dec - 19exi + 2 63
 MTR3 2 Metrics: Query Complexity Complexity: 272 63
 PRED_QUERY_COLLECTION 2 {r=master..sysresourcelimits, r2=master..sysresourcelimits} 0 285

DATA PROPAGATION detailed
ColumnWritten To
@enddaysystimeranges.endday  
@endtimesystimeranges.endtime  
@startdaysystimeranges.startday  
@starttimesystimeranges.starttime  

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_ha_check_certified  
   reads table tempdb..sysobjects (1)  
read_writes table master..systimeranges (1)  
reads table master..sysresourcelimits (1)  
calls proc sybsystemprocs..sp_aux_checkroleperm  
   reads table master..syscurconfigs (1)  
   reads table master..sysconfigures (1)