Database | Proc | Application | Created | Links |
sybsystemprocs | sp_default_charset | 31 Aug 14 | Defects Dependencies |
1 /** SECTION END: CLEANUP **/ 2 3 4 /* 5 ** create a procedure that will query the datasource 6 ** specific syscharset, and sysconfigures tables, and do a join to 7 ** determine what is the correct charset that has been set as a default 8 ** on the server. 9 */ 10 create procedure sp_default_charset 11 as 12 13 if @@trancount = 0 14 begin 15 set chained off 16 end 17 18 set transaction isolation level 1 19 20 select name as DEFAULT_CHARSET from master.dbo.syscharsets 21 where ((select value from master.dbo.sysconfigures 22 where config = 131) /* default charset id */ 23 = master.dbo.syscharsets.id) 24
exec sp_procxmode 'sp_default_charset', 'AnyMode' go Grant Execute on sp_default_charset to public go
RESULT SETS | |
sp_default_charset_rset_001 |
DEFECTS | |
MINU 4 Unique Index with nullable columns master..sysconfigures | master..sysconfigures |
QTYP 4 Comparison type mismatch Comparison type mismatch: int vs tinyint | 21 |
QTYP 4 Comparison type mismatch tinyint = int | 21 |
QTYP 4 Comparison type mismatch Comparison type mismatch: smallint vs int | 22 |
MGTP 3 Grant to public master..syscharsets | |
MGTP 3 Grant to public master..sysconfigures | |
MGTP 3 Grant to public sybsystemprocs..sp_default_charset | |
MUCO 3 Useless Code Useless Brackets | 21 |
QISO 3 Set isolation level | 18 |
QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: syscharsets.csyscharsets unique clustered (id, csid) Intersection: {id} | 21 |
MRST 2 Result Set Marker | 20 |
MSUB 2 Subquery Marker | 21 |
MTR1 2 Metrics: Comments Ratio Comments: 34% | 10 |
MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 | 10 |
MTR3 2 Metrics: Query Complexity Complexity: 10 | 10 |
DEPENDENCIES |
PROCS AND TABLES USED reads table master..sysconfigures (1) reads table master..syscharsets (1) |