DatabaseProcApplicationCreatedLinks
sybsystemprocssp_spaceusage  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** Generated by spgenmsgs.pl on Mon Nov 20 03:34:15 2006 
4     */
5     /*
6     ** raiserror Messages for spaceusage [Total 4]
7     **
8     ** 17993, "'%1!' is not a valid argument."
9     ** 19194, "Argument '%1!' is either invalid or non-unique. Valid arguments are: %2!"
10    ** 19491, "Archive prefix name '%1!' cannot exceed %2! bytes as this can cause the extended name of the archive table to be an invalid identifier."
11    ** 19530, "Argument '%1!' is invalid with argument '%2!'. Type '%3!' for usage information."
12    */
13    /*
14    ** sp_getmessage Messages for spaceusage [Total 0]
15    */
16    /*
17    ** End spgenmsgs.pl output.
18    */
19    /*
20    **	 SP_SPACEUSAGE
21    **
22    ** 	Driver interface to get space usage information on different types of 
23    ** 	enitities. This will in turn call the entity and action specific 
24    **	sub-procedures.
25    **
26    **	Parameters
27    **		@action	- The action to be performed. The using_clause, if any,
28    **			  is part of this string. The real action keyword is 
29    **			  extracted from this string.
30    **		@arg1	- This is:
31    **			   o action word on which help is sought, if @action = 
32    **			     "help".
33    **			   o entity type string.
34    **		@arg2	- This is:
35    **			   o entity type string, if @action = "help".
36    **			   o entity name identifier pattern string.
37    **		@optarg1- This optional argument can be:
38    **			   o SELECT list to project the result set for 'display'
39    **			     or 'report' action word.
40    **			   o WHERE clause to filter the result set otherwise.
41    **		@optarg2- This optional argument can be:
42    **			   o WHERE clause to filter the result set for 'display'
43    **			     or 'report' action word.
44    **			   o ORDER BY clause to order the result set for 
45    **			     'display summary' or 'report summary' action word.
46    **			   o command to run on the table for 'archive' action
47    **			     word.
48    **		@optarg3- This optional argument can be:
49    **			   o ORDER BY clause to order the result set for 
50    **			     'display' or 'report' action word.
51    **			   o command to run on the table for 'display summary'
52    **			     action word.
53    **			   o archive date from when on to get data for 'report
54    **			     summary' action word.
55    **			   o ignored otherwise.
56    **		@optarg4- This optional argument can be:
57    **			   o command to run on the table for 'display' action 
58    **			     word.
59    **			   o archive date from when on to get data for 'report'
60    **			     action word.
61    **			   o archive date till when to get data for 'report
62    **			     summary' action word.
63    **			   o ignored otherwise.
64    **		@optarg5- This optional argument can be:
65    **			   o archive date till when to get data for 'report' 
66    **			     action word.
67    **			   o ignored otherwise.
68    **				
69    **	Returns
70    **		0 - if all goes well
71    **		1 - invalid action
72    **		2 - invalid entity type
73    **		3 - invalid entity name
74    **		4 - invalid command
75    **		5 - invalid USING clause
76    **		6 - archive table not found
77    **		7 - invalid datetime format [from_date/to_date]
78    **		8 - invalid SELECT list, WHERE clause or ORDER BY clause
79    **	    other - error while execution 
80    {
81    */
82    create or replace procedure sp_spaceusage
83    (
84        @action varchar(350) = NULL
85        , @arg1 varchar(20) = NULL
86        , @arg2 varchar(550) = NULL
87        , @optarg1 varchar(1536) = NULL
88        , @optarg2 varchar(1536) = NULL
89        , @optarg3 varchar(768) = NULL
90        , @optarg4 varchar(100) = NULL
91        , @optarg5 varchar(30) = NULL
92    )
93    as
94        begin -- { 	
95    
96            declare
97                @entity_type varchar(12)
98                , @entity_name varchar(550)
99                , @select_list varchar(1536)
100               , @where_clause varchar(1536)
101               , @orderby_clause varchar(768)
102               , @command varchar(100)
103               , @from_date varchar(30)
104               , @to_date varchar(30)
105   
106               , @actionword varchar(20)
107               , @action_help varchar(5)
108               , @action_archive varchar(10)
109               , @action_display varchar(10)
110               , @action_display_summary varchar(20)
111               , @action_report varchar(10)
112               , @action_report_summary varchar(20)
113   
114               , @uname varchar(255)
115               , @tname varchar(255)
116               , @iname varchar(255)
117               , @tmpname varchar(255)
118               , @tmpname2 varchar(255)
119               , @archive_db varchar(30)
120               , @archive_prefix varchar(255)
121               , @unit varchar(6)
122               , @maxtabnamelen int
123               , @maxtranlogprefix int
124               , @maxobjectprefix int
125   
126               , @entity_table varchar(6)
127               , @entity_index varchar(6)
128               , @entity_tranlog varchar(8)
129               , @entity_database varchar(9)
130               , @valid_actions varchar(75)
131               , @valid_entity_types varchar(30)
132   
133               , @archive_table_name varchar(320)
134               , @using_clause varchar(350)
135               , @left_substr varchar(350)
136               , @right_substr varchar(350)
137               , @usingIndex int
138               , @returnStatus int
139               , @commaPos int
140               , @nouname bit
141   
142               , @msg varchar(256)
143   
144           select
145               @action_help = "help"
146               , @action_archive = "archive"
147               , @action_display = "display"
148               , @action_display_summary = "display summary"
149               , @action_report = "report"
150               , @action_report_summary = "report summary"
151   
152               , @entity_table = "table"
153               , @entity_index = "index"
154               , @entity_tranlog = "tranlog"
155   
156               , @usingIndex = 0
157               , @unit = "KB"
158               , @archive_db = db_name()
159               , @nouname = 0
160   
161           /* Get the maximum length of a table name. */
162           select @maxtabnamelen = c.length
163           from master..syscolumns c
164           where c.id = object_id('sysobjects')
165               and c.name = 'name'
166   
167           /* Get the maximum length allowed for the prefizx strenth. */
168           select @maxtranlogprefix = @maxtabnamelen
169               - datalength("spaceusage_tranlog")
170               , @maxobjectprefix = @maxtabnamelen
171               - datalength("spaceusage_object")
172   
173           select
174               @valid_entity_types = "'" + @entity_table
175               + "', '" + @entity_index
176               + "', '" + @entity_tranlog
177               + "'"
178   
179               , @valid_actions = "'" + @action_help
180               + "', '" + @action_archive
181               + "', '" + @action_display
182               + "', '" + @action_display_summary
183               + "', '" + @action_report
184               + "', '" + @action_report_summary
185               + "'"
186   
187           /* Extract the action word from the input action string. */
188           if @action is NULL
189           begin
190               select @actionword = @action_help
191           end
192           else
193           begin
194               select @usingIndex = charindex("USING", upper(@action))
195   
196               select @actionword = case @usingIndex
197                       when 0 then @action
198                       else substring(@action, 1,
199                               @usingIndex - 1)
200                   end
201   
202               select @actionword = lower(ltrim(rtrim(@actionword)))
203           end
204   
205           /* Extract the USING clause from the input action string. */
206           if @usingIndex = 0
207               select @using_clause = NULL
208           else
209           begin
210               exec sp_split_string @action, "USING", 0, @left_substr out
211                   , @right_substr out
212   
213               select @using_clause = ltrim(rtrim(@right_substr))
214           end
215   
216           if @actionword not in (@action_help
217                   , @action_archive
218                   , @action_display
219                   , @action_display_summary
220                   , @action_report
221                   , @action_report_summary)
222           begin
223               raiserror 19194, @actionword, @valid_actions
224               return (1)
225           end
226   
227           if @actionword = @action_help
228           begin
229               exec sp_spaceusage_showhelp @arg1, @arg2
230                   , @valid_actions
231                   , @valid_entity_types
232               return (0)
233           end
234   
235           select @entity_type = lower(ltrim(rtrim(@arg1)))
236               , @entity_name = @arg2
237   
238           if @entity_type not in (@entity_table
239                   , @entity_index
240                   , @entity_tranlog)
241           begin
242               raiserror 19194, @entity_type, @valid_entity_types
243               return (2)
244           end
245   
246           if @entity_type in (@entity_table, @entity_index)
247           begin -- {	-- Index/Table begins
248   
249               if @actionword not in (@action_archive
250                       , @action_display
251                       , @action_display_summary
252                       , @action_report
253                       , @action_report_summary)
254               begin
255                   raiserror 19530, @actionword, @entity_type, "sp_spaceusage [help]"
256                   return (1)
257               end
258   
259               if @actionword = @action_display
260               begin
261                   select @select_list = @optarg1
262                       , @where_clause = @optarg2
263                       , @orderby_clause = @optarg3
264                       , @command = @optarg4
265               end
266               else if @actionword = @action_display_summary
267               begin
268                   select @where_clause = @optarg1
269                       , @orderby_clause = @optarg2
270                       , @command = @optarg3
271               end
272               else if @actionword = @action_report
273               begin
274                   select @select_list = @optarg1
275                       , @where_clause = @optarg2
276                       , @orderby_clause = @optarg3
277                       , @from_date = @optarg4
278                       , @to_date = @optarg5
279               end
280               else if @actionword = @action_report_summary
281               begin
282                   select @where_clause = @optarg1
283                       , @orderby_clause = @optarg2
284                       , @from_date = @optarg3
285                       , @to_date = @optarg4
286               end
287               else if @actionword = @action_archive
288               begin
289                   select @where_clause = @optarg1
290                       , @command = @optarg2
291               end
292   
293               exec @returnStatus = sp_spaceusage_paramcheck
294                   @actionword
295                   , @entity_type
296                   , @entity_name
297                   , @using_clause
298                   , @command
299                   , @from_date
300                   , @to_date
301                   , @select_list
302                   , @where_clause
303                   , @orderby_clause
304   
305               if @returnStatus != 0
306                   return (@returnStatus)
307   
308               /* 
309               ** Extract the owner name, object name and index name pattern
310               ** from the entity name string.
311               */
312               if @entity_type = @entity_index
313               begin
314   
315                   -- The name would be 3-part or 2-part, i.e., either 
316                   -- 'owner.table.index' or '.table.index' or
317                   -- 'table.index'.
318                   --
319                   exec sp_namecrack @entity_name, @tmpname out
320                       , @uname out
321                       , @tname out
322                       , @iname out
323   
324                   if @uname is NULL
325                   begin
326                       select @uname = user_name()
327                           , @nouname = 1
328                   end
329   
330                   if @tname is NULL or @iname is NULL
331                   begin
332                       raiserror 17993, @entity_name
333                       return (3)
334                   end
335   
336               end
337               else -- entity type is 'table'
338               begin
339   
340                   -- The name would be 2-part or 1-part, i.e., either 
341                   -- 'owner.table' or '.table' or 'table'.
342                   --
343                   exec sp_namecrack @entity_name, @tmpname out
344                       , @tmpname2 out
345                       , @uname out
346                       , @tname out
347   
348                   if @uname is NULL
349                   begin
350                       select @uname = user_name()
351                           , @nouname = 1
352                   end
353   
354                   if @tname is NULL
355                   begin
356                       raiserror 17993, @entity_name
357                       return (3)
358                   end
359   
360                   select @iname = "%"
361   
362               end
363   
364               /* Run the command, if any, for the display/archive action. */
365               if @actionword in (@action_archive
366                       , @action_display
367                       , @action_display_summary)
368               begin
369                   if @command is not NULL
370                   begin
371                       exec @returnStatus = sp_spaceusage_runcmd
372                           @uname
373                           , @tname
374                           , @command
375                           , 1
376   
377                       if @returnStatus != 0
378                           return (@returnStatus)
379   
380                   end
381               end
382   
383               /* 
384               ** Extract the archive database and/or the prefix string from 
385               ** the using_clause, if any, for the archive/report action, and
386               ** the unit specifier, if any.
387               */
388               if @using_clause is not NULL
389               begin
390                   exec @returnStatus = sp_spaceusage_processusing
391                       @using_clause
392                       , @archive_db out
393                       , @archive_prefix out
394                       , @unit out
395   
396                   if @returnStatus != 0
397                       return (@returnStatus)
398   
399                   if @archive_prefix is not NULL
400                       and datalength(@archive_prefix) > @maxobjectprefix
401                   begin
402                       raiserror 19491, @archive_prefix, @maxobjectprefix
403                       return (5)
404                   end
405   
406                   if @archive_db is NULL
407                       select @archive_db = db_name()
408   
409                   if @unit is NULL
410                       select @unit = "KB"
411   
412               end
413   
414               exec @returnStatus = sp_spaceusage_object
415                   @actionword
416                   , @unit
417                   , @archive_db
418                   , @archive_prefix
419                   , @entity_type
420                   , @nouname
421                   , @uname
422                   , @tname
423                   , @iname
424                   , @select_list
425                   , @where_clause
426                   , @orderby_clause
427                   , @from_date
428                   , @to_date
429   
430               if exists (select 1 from sysattributes
431                       where object_type = "TI" and object_info1 & 4096 = 4096
432                           and object = object_id(@tname))
433               begin
434                   select @msg = "Table " + @tname + " has columns dropped by no datacopy method."
435                   print @msg
436                   select @msg = "Space for such columns won't be freed until next reorg-rebuild or datacopy operation."
437                   print @msg
438               end
439   
440               if @returnStatus != 0
441                   return (@returnStatus)
442   
443           end -- }	-- Index/Table done! 
444   
445           else if @entity_type = @entity_tranlog
446   
447           begin -- {	-- Transaction log begins
448   
449               if @actionword not in (@action_archive
450                       , @action_display
451                       , @action_report)
452               begin
453                   raiserror 19530, @actionword, @entity_type, "sp_spaceusage [help]"
454                   return (1)
455               end
456   
457               if @actionword = @action_display
458               begin
459                   select @select_list = @optarg1
460                       , @where_clause = @optarg2
461                       , @orderby_clause = @optarg3
462               end
463               else if @actionword = @action_report
464               begin
465                   select @select_list = @optarg1
466                       , @where_clause = @optarg2
467                       , @orderby_clause = @optarg3
468                       , @from_date = @optarg4
469                       , @to_date = @optarg5
470               end
471               else if @actionword = @action_archive
472               begin
473                   select @where_clause = @optarg1
474               end
475   
476               exec @returnStatus = sp_spaceusage_paramcheck
477                   @actionword
478                   , @entity_type
479                   , @entity_name
480                   , @using_clause
481                   , NULL
482                   , @from_date
483                   , @to_date
484                   , @select_list
485                   , @where_clause
486                   , @orderby_clause
487   
488               if @returnStatus != 0
489                   return (@returnStatus)
490   
491               /* 
492               ** Extract the archive database and/or the prefix string from 
493               ** the using_clause, if any, for the archive/report action, and
494               ** the unit specifier, if any.
495               */
496               if @using_clause is not NULL
497               begin
498                   exec @returnStatus = sp_spaceusage_processusing
499                       @using_clause
500                       , @archive_db out
501                       , @archive_prefix out
502                       , @unit out
503   
504                   if @returnStatus != 0
505                       return (@returnStatus)
506   
507                   if @archive_prefix is not NULL
508                       and datalength(@archive_prefix) > @maxtranlogprefix
509                   begin
510                       raiserror 19491, @archive_prefix, @maxtranlogprefix
511                       return (5)
512                   end
513   
514                   if @archive_db is NULL
515                       select @archive_db = db_name()
516   
517                   if @unit is NULL
518                       select @unit = "KB"
519   
520               end
521   
522               exec @returnStatus = sp_spaceusage_tranlog
523                   @actionword
524                   , @unit
525                   , @archive_db
526                   , @archive_prefix
527                   , @select_list
528                   , @where_clause
529                   , @orderby_clause
530                   , @from_date
531                   , @to_date
532   
533               if @returnStatus != 0
534                   return (@returnStatus)
535   
536           end -- }	-- Transaction log done! 
537   
538           return (0)
539   
540       end -- }	-- }	
541   


exec sp_procxmode 'sp_spaceusage', 'AnyMode'
go

Grant Execute on sp_spaceusage to public
go
DEFECTS
 MINU 4 Unique Index with nullable columns sybsystemprocs..sysattributes sybsystemprocs..sysattributes
 MTYP 4 Assignment type mismatch @helpentity: varchar(12) = varchar(550) 229
 MTYP 4 Assignment type mismatch @orderby_clause: varchar(768) = varchar(1536) 269
 MTYP 4 Assignment type mismatch @command: varchar(100) = varchar(768) 270
 MTYP 4 Assignment type mismatch @from_date: varchar(30) = varchar(100) 277
 MTYP 4 Assignment type mismatch @orderby_clause: varchar(768) = varchar(1536) 283
 MTYP 4 Assignment type mismatch @from_date: varchar(30) = varchar(768) 284
 MTYP 4 Assignment type mismatch @to_date: varchar(30) = varchar(100) 285
 MTYP 4 Assignment type mismatch @command: varchar(100) = varchar(1536) 290
 MTYP 4 Assignment type mismatch @archive_prefix: varchar(238) = varchar(255) 418
 MTYP 4 Assignment type mismatch @from_date: varchar(30) = varchar(100) 468
 MTYP 4 Assignment type mismatch @archive_prefix: varchar(237) = varchar(255) 526
 QPUI 4 Join or Sarg with Un-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, object_info1, object_type}
431
 MAW1 3 Warning message on %name% master..syscolumns.id: Warning message on syscolumns 164
 MGTP 3 Grant to public master..syscolumns  
 MGTP 3 Grant to public sybsystemprocs..sp_spaceusage  
 MGTP 3 Grant to public sybsystemprocs..sysattributes  
 MNER 3 No Error Check should check return value of exec 210
 MNER 3 No Error Check should check return value of exec 229
 MNER 3 No Error Check should check return value of exec 319
 MNER 3 No Error Check should check return value of exec 343
 MNER 3 No Error Check should check return value of exec 414
 MUCO 3 Useless Code Useless Brackets in create proc 83
 MUCO 3 Useless Code Useless Begin-End Pair 94
 MUCO 3 Useless Code Useless Brackets 224
 MUCO 3 Useless Code Useless Brackets 232
 MUCO 3 Useless Code Useless Brackets 243
 MUCO 3 Useless Code Useless Brackets 256
 MUCO 3 Useless Code Useless Brackets 306
 MUCO 3 Useless Code Useless Brackets 333
 MUCO 3 Useless Code Useless Brackets 357
 MUCO 3 Useless Code Useless Brackets 378
 MUCO 3 Useless Code Useless Brackets 397
 MUCO 3 Useless Code Useless Brackets 403
 MUCO 3 Useless Code Useless Brackets 441
 MUCO 3 Useless Code Useless Brackets 454
 MUCO 3 Useless Code Useless Brackets 489
 MUCO 3 Useless Code Useless Brackets 505
 MUCO 3 Useless Code Useless Brackets 511
 MUCO 3 Useless Code Useless Brackets 534
 MUCO 3 Useless Code Useless Brackets 538
 QAFM 3 Var Assignment from potentially many rows 162
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: syscolumns.csyscolumns unique clustered
(id, number, colid)
Intersection: {id}
164
 VNRD 3 Variable is not read @left_substr 210
 VNRD 3 Variable is not read @tmpname 343
 VNRD 3 Variable is not read @tmpname2 344
 VUNU 3 Variable is not used @entity_database 129
 VUNU 3 Variable is not used @archive_table_name 133
 VUNU 3 Variable is not used @commaPos 139
 MSUB 2 Subquery Marker 430
 MTR1 2 Metrics: Comments Ratio Comments: 28% 82
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 32 = 47dec - 17exi + 2 82
 MTR3 2 Metrics: Query Complexity Complexity: 158 82

DATA PROPAGATION detailed
ColumnWritten To
@actionsp_exec_SQL_rset_001.sqlbNoName57
@arg2sp_autoformat_rset_002._clid#af sp_exec_SQL_rset_001.sqlbNoName57
@optarg1sp_autoformat_rset_001._maxlen#af °._asname#af sp_autoformat_rset_002._clid#af sp_autoformat_rset_003._asname#af sp_exec_SQL_rset_001.sqlbNoName57
@optarg2sp_autoformat_rset_002._clid#af sp_exec_SQL_rset_001.sqlbNoName57
@optarg3sp_exec_SQL_rset_001.sqlbNoName57
@optarg4sp_exec_SQL_rset_001.sqlbNoName57
@optarg5sp_exec_SQL_rset_001.sqlbNoName57

DEPENDENCIES
PROCS AND TABLES USED
reads table sybsystemprocs..sysattributes  
calls proc sybsystemprocs..sp_spaceusage_tranlog  
   writes table tempdb..#syslogsinfo (1) 
   calls proc sybsystemprocs..sp_spaceusage_tranlog_init  
      reads table master..sysusages (1)  
      calls proc sybsystemprocs..sp_exec_SQL  
         writes table sybsystemprocs..sp_exec_SQL_rset_001 
      reads table master..sysdatabases (1)  
      calls proc sybsystemprocs..sp_versioncrack  
         calls proc sybsystemprocs..sp_split_string  
      read_writes table tempdb..#syslogsinfo (1) 
   calls proc sybsystemprocs..sp_spaceusage_tranlog_genoutput  
      calls proc sybsystemprocs..sp_autoformat  
         read_writes table tempdb..#colinfo_af (1) 
         calls proc sybsystemprocs..sp_autoformat  
         writes table sybsystemprocs..sp_autoformat_rset_001 
         writes table sybsystemprocs..sp_autoformat_rset_003 
         reads table master..systypes (1)  
         reads table tempdb..systypes (1)  
         calls proc sybsystemprocs..sp_namecrack  
         writes table sybsystemprocs..sp_autoformat_rset_002 
         reads table master..syscolumns (1)  
         reads table tempdb..syscolumns (1)  
         writes table sybsystemprocs..sp_autoformat_rset_004 
         writes table sybsystemprocs..sp_autoformat_rset_005 
      reads table tempdb..#syslogsinfo (1) 
      calls proc sybsystemprocs..sp_getmessage  
         reads table master..syslanguages (1)  
         reads table master..sysmessages (1)  
         calls proc sybsystemprocs..sp_validlang  
            reads table master..syslanguages (1)  
         reads table sybsystemprocs..sysusermessages  
   calls proc sybsystemprocs..sp_spaceusage_tranlog_archdata  
      calls proc sybsystemprocs..sp_exec_SQL  
      calls proc sybsystemprocs..sp_getmessage  
   calls proc sybsystemprocs..sp_spaceusage_cnvtounit  
      calls proc sybsystemprocs..sp_exec_SQL  
   reads table master..sysdatabases (1)  
calls proc sybsystemprocs..sp_spaceusage_paramcheck  
   calls proc sybsystemprocs..sp_replace_string_plus  
      calls proc sybsystemprocs..sp_substring_count  
         calls proc sybsystemprocs..sp_split_string  
      calls proc sybsystemprocs..sp_split_string  
   calls proc sybsystemprocs..sp_substring_count  
   calls proc sybsystemprocs..sp_split_string  
reads table master..syscolumns (1)  
calls proc sybsystemprocs..sp_spaceusage_runcmd  
   reads table sybsystemprocs..sysobjects  
   calls proc sybsystemprocs..sp_exec_SQL  
   calls proc sybsystemprocs..sp_getmessage  
calls proc sybsystemprocs..sp_spaceusage_object  
   calls proc sybsystemprocs..sp_spaceusage_object_init  
      calls proc sybsystemprocs..sp_versioncrack  
      calls proc sybsystemprocs..sp_exec_SQL  
      reads table sybsystemprocs..sysindexes  
      read_writes table tempdb..#spaceusageinfo (1) 
      reads table sybsystemprocs..sysobjects  
      reads table sybsystemprocs..syspartitions  
      reads table sybsystemprocs..systabstats  
   calls proc sybsystemprocs..sp_spaceusage_object_archdata  
      calls proc sybsystemprocs..sp_getmessage  
      calls proc sybsystemprocs..sp_exec_SQL  
   writes table tempdb..#spaceusageinfo (1) 
   calls proc sybsystemprocs..sp_spaceusage_object_genoutput  
      calls proc sybsystemprocs..sp_autoformat  
      writes table tempdb..#summary1 (1) 
      calls proc sybsystemprocs..sp_exec_SQL  
      writes table tempdb..#summary2 (1) 
      reads table tempdb..#spaceusageinfo (1) 
      calls proc sybsystemprocs..sp_getmessage  
   calls proc sybsystemprocs..sp_spaceusage_cnvtounit  
   reads table master..sysdatabases (1)  
   calls proc sybsystemprocs..sp_spaceusage_object_populate  
      reads table sybsystemprocs..syscolumns  
      read_writes table tempdb..#spaceusageinfo (1) 
      reads table master..sysconfigures (1)  
      calls proc sybsystemprocs..sp_index_row_size_est  
         reads table sybsystemprocs..sysobjects  
         reads table sybsystemprocs..syscolumns  
         reads table sybsystemprocs..sysindexes  
      calls proc sybsystemprocs..sp_aux_checkroleperm  
         reads table master..sysconfigures (1)  
         reads table master..syscurconfigs (1)  
      read_writes table tempdb..#indexData (1) 
      calls proc sybsystemprocs..sp_getmessage  
      calls proc sybsystemprocs..sp_index_space_est  
         reads table sybsystemprocs..sysindexes  
         read_writes table tempdb..#indexData (1) 
         reads table master..syscurconfigs (1)  
calls proc sybsystemprocs..sp_split_string  
calls proc sybsystemprocs..sp_namecrack  
calls proc sybsystemprocs..sp_spaceusage_processusing  
   calls proc sybsystemprocs..sp_split_string  
calls proc sybsystemprocs..sp_spaceusage_showhelp  
   calls proc sybsystemprocs..sp_spaceusage_showhelp_all  
      calls proc sybsystemprocs..sp_spaceusage_showhelp_report  
         calls proc sybsystemprocs..sp_getmessage  
      calls proc sybsystemprocs..sp_spaceusage_showhelp_display  
         calls proc sybsystemprocs..sp_getmessage  
      calls proc sybsystemprocs..sp_spaceusage_showhelp_archive  
         calls proc sybsystemprocs..sp_getmessage  
   calls proc sybsystemprocs..sp_getmessage