DatabaseProcApplicationCreatedLinks
sybsystemprocssp_oledb_databases  14 déc. 14Defects Propagation Dependencies

1     
2     
3     /* -------------Catalog -----------------------------*/
4     /* Sccsid = "%Z% generic/sproc/%M% %I% %G%" */
5     
6     create or replace procedure sp_oledb_databases(@database_name varchar(32) = null)
7     as
8         if @@trancount = 0
9         begin
10            set chained off
11        end
12    
13        set transaction isolation level 1
14    
15        if @database_name is null
16        begin
17            select CATALOG_NAME = name,
18                DESCRIPTION = convert(varchar(254), null) /*no description*/
19            from master.dbo.sysdatabases order by name
20        end
21        else
22        begin
23            select CATALOG_NAME = name,
24                DESCRIPTION = convert(varchar(254), null) /*no description*/
25            from master.dbo.sysdatabases where name = @database_name
26            order by name
27        end
28    
29        return (0)
30    


exec sp_procxmode 'sp_oledb_databases', 'AnyMode'
go

Grant Execute on sp_oledb_databases to public
go
RESULT SETS
sp_oledb_databases_rset_002
sp_oledb_databases_rset_001

DEFECTS
 MGTP 3 Grant to public master..sysdatabases  
 MGTP 3 Grant to public sybsystemprocs..sp_oledb_databases  
 MUCO 3 Useless Code Useless Brackets in create proc 6
 MUCO 3 Useless Code Useless Brackets 29
 QCRS 3 Conditional Result Set 17
 QCRS 3 Conditional Result Set 23
 QISO 3 Set isolation level 13
 MRST 2 Result Set Marker 17
 MRST 2 Result Set Marker 23
 MTR1 2 Metrics: Comments Ratio Comments: 16% 6
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 4 = 3dec - 1exi + 2 6
 MTR3 2 Metrics: Query Complexity Complexity: 13 6

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_oledb_databases_rset_002 
writes table sybsystemprocs..sp_oledb_databases_rset_001 
reads table master..sysdatabases (1)