Func dyn column_set.c

1,271 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,271
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Func dyn column_set.c

  1. 1. func_dyn_column_set.c#include <stdio.h>#include <stdlib.h>#include <string.h>#include "constant_definition.h"#include "case_constant_definition.h"#include "case_constant_sql_stmt_def.h"#include "constant_oracle_versions.h"extern vaciar_cadena();char *func_dyn_column_set (int version, int sentencia) { static char dyn_column [MAX_VAR_SIZE]; vaciar_cadena (dyn_column,MAX_VAR_SIZE ); switch (sentencia) { case CASE_ORACLE_VERSION: strcpy (dyn_column,"|ORACLE_VERSION|"); break; case CASE_ACTIVE_PARAMETERS: strcpy (dyn_column,"|NOMBRE|VALOR|DESCRIPCION|"); break; case CASE_USERS_CONNECTED: strcpy(dyn_column,"|DIRECCION|SES|NOMBRE|CMD|ESTADO|PID|TERMINAL|LOCKWAIT|INICIADO|"); break; case CASE_WAIT_STATISTICS: strcpy (dyn_column,"|CANTIDAD|TIEMPO|CLASE|"); break; case CASE_DATAFILE_I_0: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_column,"|READPHY|READBLK|WRITPHY||WRITBLK|DATAFILE|IO_STAT|"); break; case VERSION_ORACLE_817: case VERSION_ORACLE_816: case VERSION_ORACLE_734: strcpy(dyn_column,"|READPHY|READBLK|WRITPHY|WRITBLK|DATAFILE|"); break; default: break; } break; case CASE_DATAFILE_BLOCKS_R_W: strcpy(dyn_column,"|DATAFILE|BLKREAD|BLKWRITE|BLKTOT|"); break; case CASE_WAIT_EVENTS: strcpy (dyn_column,"|SID|USUARIO|CANTIDAD|EVENTO|"); break; case CASE_INSTANCE_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|INSTNRO|INSTNAME|HOSTNAME|VERSION|INICIADO|ESTADO|PARALELO|DATAESTA|INSTROLE|ACTSTATUS|LOG_MODE|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|INSTNAME|CREADA|ARCHIVESTATUS|CHECK_CHANGE|ARCHI_CHANGE|DATASTATE| Página 1
  2. 2. func_dyn_column_set.cSHUTDOWN?|INICIADA|HORA|LOG_MODE|"); break; default: break; } break; case CASE_TEMPORAL_SPACE_BY_USER: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|SES|SERIAL|USER|EXTENTS|CONTENTS|SIZEKB"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|TBLSPACE|EXTSIZE|CURUSER|TOTEXT|TOTBLK|USEXT|USEBLK|FREEXT|FREEBLK|MUSESIZE|MUSEBLK|MSORTSIZE|MSORTBLK|"); default: break; } break; case CASE_TOT_FREELIST_WAIT_PERCENT: strcpy (dyn_column,"|PCTFREE|"); break; case CASE_LAST_CHECKPOINT_TIME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|CHEKPOINT_VALUE|FECHA|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|CHEKPOINT_VALUE|FECHA|"); break; default: break; } break; case CASE_LIST_TABLESPACES: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|TBLSPACE|CONTENT|AVAILA_KB|MAX_ID|USED_KB|FREE_KB|PCT_USED|STATUS|MANAGMENT|ALLOCTYPE|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|TBLSPACE|CONTENT|AVAILA_KB|MAX_ID|USED_KB|FREE_KB|PCT_USED|STATUS|"); break; } break; case CASE_ACTIVE_TRANSACTIONS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|ADDRESS|TIMESTART|ESTADO|BLK_USED|KB_USED|USED_UREC|SESSION|SERIAL Página 2
  3. 3. func_dyn_column_set.c|NOMBRE|USUARIO|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|ADDRESS|TIMESTART|ESTADO|BLK_USED|KB_USED|USED_UREC|SESSION|SERIAL|NOMBRE|USUARIO|"); break; } break; case CASE_LATCH_DETAILS: strcpy(dyn_column,"|GETS|MISS|HITRATIO|IMM_GETS|IMM_MISS|SLEEP|GETSPIN|ADDRESS|LATCH|NOMBRE|"); break; case CASE_RESOURCE_LIMITS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|NOMBRE|INIT_ALLOC|CURR_UTILIZA|MAX_UTILIZA|LIMITE|"); break; case VERSION_ORACLE_734: strcpy (dyn_column,"|NOMBRE|LIMITE|"); break; } break; case CASE_LIST_DATAFILES: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|DATAFILE|MBYTES|ESTADO|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|DATAFILE|MBYTES|ESTADO|"); break; } break; case CASE_LIST_DATAFILES_NEW_9I: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|ESTADO|DATAFILE|TBLSPACE|SIZE_KB|USED_KB|USED_PCT|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|ESTADO|DATAFILE|TBLSPACE|SIZE_KB|USED_KB|USED_PCT|"); break; } break; case CASE_LIST_TABLESPACES_NEW_9I: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|ESTADO|TBLSPACE|TIPO|EXTENT_MGM|SIZE_KB|USED_KB|USED_PCT|"); break; case VERSION_ORACLE_734: Página 3
  4. 4. func_dyn_column_set.c strcpy(dyn_column,"|ESTADO|TBLSPACE|TIPO|EXTENT_MGM|SIZE_KB|USED_KB|USED_PCT|"); break; } break; case CASE_ACTIVE_SESSIONS: strcpy(dyn_column,"|SES|SERIAL|TIPO|OS_USER|LOGON|ESTADO|PROCESO|MAQUINA|NOMBRE|PID|PROGRAMA|"); break; case CASE_SESSIONS_WAITS: strcpy(dyn_column,"|SES|SEQ|W_T|S_W_T|USUARIO|ESTADO|EVENT|STATE|P1TEXT|P1|P1RAW|P2TEXT|P2|P2RAW|P3TEXT|P3|P3RAW|"); break; case CASE_DEFAULT_STORAGE_SETS_TABLESPACE: strcpy(dyn_column,"|TBLSPACE|INI_EXT|NEX_EXT|MIN_EXT|MAX_EXT|PCT_INC|"); break; case CASE_ALL_TABLES_STORAGE_SETTINGS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|OWNER_TABLE|SEG_NAME|TBLSPACE|BLOCKS|SIZE_KB|EXTENTS|MAX_EXT|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|OWNER_TABLE|SEG_NAME|TBLSPACE|BLOCKS|SIZE_KB|EXTENTS|MAX_EXT|"); break; } break; case CASE_ALL_NON_SYS_TABLES_SETTINGS: strcpy(dyn_column,"|OWNER|TABLNAME|TBLSPACE|BLOCK|NROWS|BUFF_POOL|LAST_ANALIZE|SIZE_KB"); break; case CASE_ALL_NON_SYS_INDEXES_SETTINGS: strcpy(dyn_column,"|OWNER|INDEXNAME|TBLSPACE|LEAFBLK|NROROWS|BUFFPOOL|LASTANALIZ|SIZE_KB|"); break; case CASE_USER_DEFINED: printf ("Pasando Seteo Columna 24 n"); switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|USUARIO|ESTADO|EXPIRY DATE|DEFAULT TBLNAME|TEMPTBLNAME|PROFILE|CREATED|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|USUARIO|ESTADO|EXPIRY DATE|DEFAULT TBLNAME|TEMPTBLNAME|PROFILE|CREATED|"); break; } break; case CASE_LIST_DATAFILE_REDO_CONTROL_FILES: strcpy (dyn_column,"|FILENAME|TBLSPACE|ESTADO|"); break; case CASE_LIST_DATAFILES_USED_BLOCKS: strcpy(dyn_column,"|TBLSPACE|FILENAME|BYTES|HIGHWATER|"); Página 4
  5. 5. func_dyn_column_set.c break; case CASE_LIST_SORT_BY_USER: strcpy(dyn_column,"|VALOR|TYPESORT|SID|OS_USER|DB_USER|"); break; case CASE_LIST_LOCK_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|ADDRESS|KADDRESS|SES|TIPO|OBJ_ID|ID2|LOCK TYP|REQU TYP|OBJECTTYPE|OWNER.NAME|LOCK_SID|TIME|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|ADDRESS|KADDRESS|SES|TIPO|OBJ_ID|ID2|LOCK TYP|REQU TYP|OBJECTTYPE|OWNER.NAME|LOCK_SID|TIME|"); break; } break; case CASE_LIST_USER_BY_CPU_USAGE: strcpy(dyn_column,"|SES|SERIAL|TYPE|OSUSER|LOGON|PROCESS|MACHINE|USER|VALUE|PROGRAM|"); break; case CASE_SQL_STATEMENT_BY_THIS_USER: strcpy (dyn_column,"|TEXT_SQL|"); break; case CASE_REDO_LOGS_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|GRUPO|THREAD|SEQUENCE|BYTES|MEMBER|ARCHIVED|ESTADO|FSTCHANGE|FSTTIME|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|GRUPO|THREAD|SEQUENCE|BYTES|MEMBER|ARCHIVED|ESTADO|FSTCHANGE|FSTTIME|"); break; } break; case CASE_ARCHIVED_LOGS_HISTORY: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|THREAD|SEQUEN|NAME|FSTCHANGE|FSTTIME|BLOCKS|BLKSIZE|COMPTIME|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|THREAD|SEQUEN|TIME|LOW_CHANGE|HIGH_CHANGE|NAME"); break; } break; case CASE_REDO_LOG_RECOVERY_REPORT: strcpy (dyn_column,"|GROUP|FSTCHANGE|MEMBER|SEQUENCE|"); break; case CASE_ARCHIVE_LOG_HISTROY: switch (version) { Página 5
  6. 6. func_dyn_column_set.c case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|THREAD|SEQUENCE|FSTCHANGE|SWICHANGE|FSTTIME|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|THREAD|SEQUENCE|FSTCHANGE|SWICHANGE|FSTTIME|"); break; } break; case CASE_SESSION_LATCH_WAITS_SQL: strcpy (dyn_column,"|SES|USER|STATUS|SQLTEXT|"); break; case CASE_SESSION_PROGRAM_RUNNING_SQL: strcpy (dyn_column,"|SES|USER|PROGRAM|SQLTEXT|"); break; case CASE_PRIVILEGES_BY_USER: strcpy (dyn_column,"|GRANTEE|USER|PRIVILEGE|"); break; case CASE_DETAILED_LOCKING_CAUSES: strcpy(dyn_column,"|USERNAME|SID|TERMINAL|TAB|COMMAND|LMODE|REQUEST|LADDR|LOCKT|LOCKTYPE|"); break; case CASE_CURRENT_STATISTICS_VALUES: strcpy (dyn_column,"|STATISTIC|NOMBRE|VALOR|"); break; case CASE_TABLE_DESCRIPTION_USER_TABLENAME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|TBLSPACE|OWNER|TABLENAME|NROWS|LASTANALIZED|INIEXT|NEXEXT|MINEXT|MAXEXT|PCTINC|BUFPOL|BLOCKS|FREELST|PCTFREE|INITRANS|MAXTRANS|FREEGRP"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|TBLSPACE|OWNER|TABLENAME|NROWS|LASTANALIZED|INIEXT|NEXEXT|MINEXT|MAXEXT|PCTINC|BUFPOL|BLOCKS|FREELST|PCTFREE|INITRANS|MAXTRANS|FREEGRP"); break; } break; case CASE_INDEX_DESCRIPTION_USER_INDEXNAME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_column,"|OWNER|IDXNAME|TABLEOWNER|TABLENAME|TBLTYPE|UNIQUE|TBLSPACE|INITRA|MAXTRA|INIEXT|NEXEXT|MINEXT|MAXEXT|PCTINC|FREELIST|FRELISTGRP|PCTFREE|BLEVEL|LEAFBLK|"); break; case VERSION_ORACLE_734: strcpy(dyn_column,"|OWNER|IDXNAME|TABLEOWNER|TABLENAME|TBLTYPE|UNIQUE|TBLSPACE|INITRA|MAXTRA|INIEXT|NEXEXT|MINEXT|MAXEXT|PCTINC|FREELIST|FRELISTGRP|PCTFREE|BLEVEL|LEAFBLK|"); break; } break; case CASE_CURRENT_ACTIVITY_REPORT: Página 6
  7. 7. func_dyn_column_set.c strcpy(dyn_column,"|DIRECCION|BUF_GETS|NRO_EXEC|AVG_EXEC|SQL_TEXT|"); break; case CASE_DICTIONARY_TABLE_COMMENTS: strcpy (dyn_column,"|TABLE NAME|COMMENTS|"); break; case CASE_DICTIONARY_TABLE_COLUMNS_DESCRIP: strcpy(dyn_column,"|TABNAME|COL_NAME|COMMENTS|SQL_TYPE|IMAGEIDX|COL_ID|STATUS|"); break; case CASE_SGA_STATISTIC_GENERAL: strcpy(dyn_column,"|NUM|VALUE|ISDEFAULT|ISMODIFIED|ISADJUSTED|TYPE|ISSES_MODIFIABLE|ISSYS_MODIFIABLE|DESCRIPTION|UPDATE_COMMENT|"); break; case CASE_SGA_STATISTIC_MEMORY_USAGE: strcpy(dyn_column,"|POOL|NAME|KBYTES|USAGE_PCT|VALUE|"); break; case CASE_SGA_STATISTIC_INFORMATION: strcpy (dyn_column,"|NAME|VALUE_KBYTE|"); break; case CASE_ROW_CACHE_INFORMATION: strcpy(dyn_column,"CACHE#|SUBORDINATE#|PARAMETER|GETS|GETMISSES|GETMISSRATIO|SCANS|SCANMISSES|SCANCOMPLETES|SCANMISSRATIO|COUNT|USAGE|FIXED|FLUSHES|MODIFICATIONS|"); break; case CASE_PERFORMANCE_DISK_I_O: strcpy (dyn_column,"|NAMES|READS|WRITES|WEIGHT|"); break; case CASE_RECURSIVE_CALLS: strcpy (dyn_column,"|NAME|VALUE|"); break; case CASE_SYSTEM_EVENTS: strcpy(dyn_column,"|EVENT|TOTAL_WAITS|TOTAL_TIMEOUTS|TIME_WAITED|AVERAGE_WAIT|"); break;/* -------------------------------------------------------------- */ /*#define CASE_SQL_AREA_ALL_ENTRIES 52 */ case CASE_SQL_AREA_ALL_ENTRIES: strcpy(dyn_column,"|AVGETS|SQLTEX|SHAMEM|PERMEM|RUNMEM|"); strcat(dyn_column,"SORTS|VCO|VLO|VOP|UOP|EXECS|UEXEC|LOADS|"); strcat(dyn_column,"FIRSTLOADTIME|INVAL|PARCALLS|DSKREADS|"); strcat (dyn_column,"BUFGETS|SQLADDR|HASHVAL|SQLHVAL|"); strcat (dyn_column,"ROWPROC|CMDTYPE|OPTMODE|PARUSER|"); strcat(dyn_column,"PARSCHEM|KEPTVER|MOD|ACTION|SERABEND|"); break; /*#define CASE_SQL_AREA_CPU_USAGE 53 */ case CASE_SQL_AREA_CPU_USAGE: strcpy(dyn_column,"|AVGETS|SQLTEX|SHAMEM|PERMEM|RUNMEM|"); strcat(dyn_column,"SORTS|VCO|VLO|VOP|UOP|EXECS|UEXEC|LOADS|"); strcat(dyn_column,"FIRSTLOADTIME|INVAL|PARCALLS|DSKREADS|"); strcat (dyn_column,"BUFGETS|SQLADDR|SQLHVAL|ROWPROC|"); strcat (dyn_column,"CMDTYPE|OPTMODE|PARUSER|PARSCHEM|"); strcat (dyn_column,"KEPTVER|MOD|ACTION|SERABEND|"); break; Página 7
  8. 8. func_dyn_column_set.c /*#define CASE_SQL_AREA_MEMORY_USAGE 54 */ case CASE_SQL_AREA_MEMORY_USAGE: strcpy(dyn_column,"|AVGETS|SHAMEM|PERMEM|RUNMEM|SORTS|"); strcat(dyn_column,"VCO|VLO|VOP|UOP|EXECS|UEXEC|LOADS|INVAL|PARCALLS|"); strcat(dyn_column,"DSKREADS|BUFGETS|ROWSPROC|KEPTVER|"); strcat (dyn_column,"SERABEND|"); break; /*#define CASE_SQL_AREA_BUFFER_GET_SUM 55 */ case CASE_SQL_AREA_BUFFER_GET_SUM: strcpy(dyn_column,"|AVGETS|SQLTEXT|SHAMEM|PERMEM|RUNMEM|"); strcat(dyn_column,"SORTS|VCO|VLO|VOP|UOP|EXECS|UEXEC|LOADS|FIRSTLOADTIME|INVAL|"); strcat(dyn_column,"PARCALLS|DSKREADS|BUFGETS|SQLADDR|HASHVAL|"); strcat (dyn_column,"SQLHVAL|ROWPROC|CMDTYPE|OPTMODE|"); strcat(dyn_column,"PARUSER|PARSCHEM|KEPTVER|MOD|ACTION|SERABEND|"); break; /* /*#define CASE_INIT_PARAMETERS_VALUES_STATUS 56 */ case CASE_INIT_PARAMETERS_VALUES_STATUS: strcpy(dyn_column,"|NUM|NAME|VALUE|ISDEF|ISMOD|ISADJ|TYPE|"); strcat (dyn_column,"ISSESMOD|ISSYSMOD|DESCRIP|"); break;/* -------------------------------------------------------------- */ case CASE_TABLESPACE_FRAGMENTATION: strcpy(dyn_column,"|TABLESPACE|KBYTES|NROEXT|SUMKBYTE|USAGE|BYTESEXT|CHANGED?|FILEID|EXTID|BLKID|"); break; case CASE_SHOW_NLS_PARAMETERS: strcpy(dyn_column,"|NAME|VALUE_DBMS|VALUE_INST|VALUE_SES|COMMENTS|"); break; case CASE_CONTROL_FILES_STATUS: strcpy (dyn_column,"|NAME|STATUS|"); break; case CASE_SORT_SEGMENTS_USERS: strcpy(dyn_column,"|TABLESPACE_NAME|SEGFIL|SEGBLOCK|EXTSIZE|"); strcat(dyn_column,"CURUSR|TOTEXTENT|TOTBLCKS|USEDEXT|"); strcat(dyn_column,"USEDBLCKS|FREEXT|FREEBLCKS|ADDEXTS|"); strcat(dyn_column,"EXTHITS|FREEEXT|FREEREQU|MSIZE|MBLCKS|"); strcat (dyn_column,"MUSEDSIZE|MUSEDBLCKS|MSORTSIZE|"); strcat (dyn_column,"MSORTBLCKS|TEMP|"); break; case CASE_ORACLE_QUOTAS: strcpy(dyn_column,"|TABLESPACE_NAME|USERNAME|KBYTES|MAX_KBYTES|"); strcat (dyn_column,"BLOCKS|MAX_BLOCKS|USAGEPERC|"); break; case CASE_TABLE_GENERAL_DESCRIPTION: Página 8
  9. 9. func_dyn_column_set.c strcpy(dyn_column,"|OWNER|OBJECT_NAME|TABLE_NAME|OBJECT_TYPE|OBJECT_TYPE|R_OBJECT_TYPE|IMAGE_INDEX|"); strcat(dyn_column,"OBJECT_NAME|SYNONYM_OWNER|CREATED|LAST_DDL_TIME|STATUS|TABLESPACE_NAME|PCT_FREE|"); strcat(dyn_column,"PCT_USED|PCT_INCREASE|NEXT_EXTENT|INI_TRANSMAX_TRANS|INITIAL_EXTENT|MIN_EXTENTS|"); strcat(dyn_column,"MAX_EXTENTS|FREELISTS|FREELIST_GROUPS|BACKED_UP|NUM_ROWS|BLOCKS|EMPTY_BLOCKS|AVG_SPACE|"); strcat(dyn_column,"CHAIN_CNT|AVG_ROW_LEN|DEGREE|INSTANCES|CACHE|LAST_ANALYZED|LOGGING|PARTITIONED|"); strcat(dyn_column,"BUFFER_POOL|IOT_NAME|IOT_TYPE|TABLE_LOCK|NESTED|AVG_SPACE_FREELIST_BLOCKS|"); strcat(dyn_column,"NUM_FREELIST_BLOCKS|SAMPLE_SIZE|table_type_owner|table_type|SECONDARY|ROW_MOVEMENT|"); strcat(dyn_column,"GLOBAL_STATS|USER_STATS|DURATION|SKIP_CORRUPT|MONITORING|TEMPORARY|"); break; case CASE_TABLE_COLUMN_DESCRIPTION: strcpy (dyn_column,"|OWNER|TABLNAME|COLUMN|"); break; case CASE_TABLE_CONSTRAINTS: strcpy (dyn_column,"| | | | | | | | | | | || | | | | |"); strcat (dyn_column,"| | | | | | | | | | | || | | | | |"); strcat (dyn_column,"| | | | | | | | | | | || | | | | |"); strcat (dyn_column,"| | | | | | | | | | | || | | | | |"); break; case CASE_INDEX_GENERAL_DESCRIPTION: strcpy(dyn_column,"|INDEX_OWNER|INDEX_NAME|COLPOS|COLUMN_NAME|"); strcat(dyn_column,"SQL_TYPE|NULLABLE|DESCEND|IMAGE_INDEX|"); break; case CASE_AUDIT_DEFINITION: strcpy(dyn_column,"|OBJECT_NAME|OBJECT_TYPE|AUDIT_OPTION|WHENEVER_SUCC|WHENEVER_UNSUCC|"); break; case CASE_SHOW_SEGMENTS_EXTENTS: strcpy(dyn_column,"|OWNER|SEGMENT_NAME|SEGMENT_TYPE|TABLESPACE_NAME|KBYTES|"); strcat(dyn_column,"BLOCKS|EXTENTS|NEXT_EXTENT|PCT_INCREASE|MAX_EXTENTS|"); strcat (dyn_column,"FREE_EXTENTS|IMAGE_INDEX|"); break; case CASE_SHOW_EXTENTS_INSIDE_DATAFILES: strcpy(dyn_column,"|EXTENT_ID|OWNER|SEGMENT_NAME|SEGMENT_TYPE|"); strcat(dyn_column,"TABLESPACE_NAME|FILE_ID|BLOCK_ID|KBYTES|BLOCKS|FILE_NAME|"); break; case CASE_SHOW_USER_LISTS: strcpy(dyn_column,"|USERNAME|USER_ID|DEFAULT_TABLESPACE|password|TEMPORARY_TABLESPACE|"); strcat(dyn_column,"CREATED|PROFILE|ACCOUNT_STATUS|LOCK_DATE|EXPIRY_DATE|"); Página 9
  10. 10. func_dyn_column_set.c strcat(dyn_column,"INITIAL_RSRC_CONSUMER_GROUP|SYSDBA|SYSOPER|"); break; case CASE_SHOW_ROLES_PRIVILEGES: strcpy(dyn_column,"|PRIVILEGE|OWNER|TABLE_NAME|GRANTOR|GRANTEE|GRANTABLE|COL_PRIVS|"); break; case CASE_SHOW_PRIVILEGES_COLUMNS: strcpy(dyn_column,"|COLUMN_NAME|GRANTOR|GRANTEE|PRIVILEGE|GRANTABLE|DATA_TYPE|"); strcat (dyn_column,"SQL_TYPE|NULLABLE|IMAGE_INDEX|"); break; case CASE_SHOW_LOCKS_VIEWS: strcpy(dyn_column,"|id1|type|lmode|request|object_name|owner|"); strcat (dyn_column,"object_type|image_index|"); break; case CASE_GRAPH_LOCK_WAITS: strcpy (dyn_column,"|SID|PROGRAM|USERNAME|TERMINAL|"); break; case CASE_OBJECT_ACCESS_SESSION: strcpy (dyn_column,"|SID|OBJECT ACCESED|TYPE|"); break; case CASE_SHOW_LATCHES: strcpy(dyn_column,"|ADDR|LATCH#|LEVEL#|NAME|GETS|MISSES|SLEEPS|IMMEDIATE_GETS|"); strcat(dyn_column,"IMMEDIATE_MISSES|WAITERS_WOKEN|WAITS_HOLDING_LATCH|SPIN_GETS|"); strcat(dyn_column,"SLEEP1|SLEEP2|SLEEP3|SLEEP4|SLEEP5|SLEEP6|SLEEP7|SLEEP8|"); strcat (dyn_column,"SLEEP9|SLEEP10|SLEEP11|NAME|"); break; case CASE_SHOW_STATISTICS: strcpy(dyn_column,"|ID|NAME|SET_MSIZE|CNUM_REPL|CNUM_WRITE|"); strcat(dyn_column,"CNUM_SET|BUF_GOT|SUM_WRITE|SUM_SCAN|"); strcat(dyn_column,"FREE_BUF_WAIT|WRI_COM_WAIT|BUF_BUSY_WAIT|"); strcat(dyn_column,"FREE_BUF_INSPECTED|DIRTY_BUF_INSPECTED|"); strcat (dyn_column,"DB_BLOCK_CHANGE|DB_BLOCK_GETS|"); strcat (dyn_column,"CONSIST_GETS|PHYS_READ|PHYS_WRIT|"); break; case CASE_SHOW_TRANSACTIONS: strcpy(dyn_column,"|SID|ADDR|XIDUSN|XIDSLOT|XIDSQN|UBAFIL|UBABLK|UBASQN|UBAREC|STATUS|"); strcat(dyn_column,"START_TI|START_SCNB|START_SCNW|START_UEXT|START_UBAFIL|"); strcat(dyn_column,"START_UBABLK|START_UBASQN|START_UBAREC|SES_ADDR|FLAG|SPACE|"); strcat(dyn_column,"RECURSIVE|NOUNDO|PRV_XIDUSN|PRV_XIDSLT|PRV_XIDSQN|PTX|PTX_XIDUSN|"); strcat(dyn_column,"PTX_XIDSLT|PTX_XIDSQN|DSCN_B|DSCN_W|USED_UBLK|USED_UREC|LOG_IO|"); strcat (dyn_column,"PHY_IO|CR_GET|CR_CHANGE|"); break; case CASE_SHOW_DATAFILES_STATUS: strcpy(dyn_column,"|FILEID|TABLESPACE_NAME|AUEXT|MAXBYTES|NEXT_SIZE|"); strcat(dyn_column,"KBYTES|BLOCKS|STATUS|MAX_CHUNK_SPACE|MIN_CHUNK_SPACE|FREE_SPACE|"); strcat(dyn_column,"FRAGMENTS|USAGE_PCT|BACKUP_STATUS|BACKUP_CHANGE#|BACKUP_TIME|"); strcat (dyn_column,"FILE_NAME|"); break; Página 10
  11. 11. func_dyn_column_set.c case CASE_SHOW_DB_OBJECT_CACHE: strcpy(dyn_column,"|OWNER|NAMESPACE|LOADS|EXECS|LOCKS|PINS|KEPT|SHAREDMEM|NAME|"); break; case CASE_TABLE_ALERT_EXTENT_USED: strcpy(dyn_column,"|OWNER|TABLENAME|TIPO|MINEXT|MAXEXT|EXTUSED|PORCEN|"); break; case CASE_INDEX_ALERT_EXTENT_USED: strcpy(dyn_column,"|OWNER|INDEXNAME|TIPO|MINEXT|MAXEXT|EXTUSED|PORCEN|"); break; case CASE_USER_TIME_WORKING: strcpy(dyn_column,"|OSUSER|USUARIO|ESTADO|KILL|PIDUNIX|VTEXT|READS|GETS|"); strcat (dyn_column,"MINUTOS|LOGON|"); break; case CASE_IS_USER_WORKING: strcpy(dyn_column,"|OSUSER|USERNAME|ESTADO|KILL|PIDUNIX|VTEXT|READS|GETS|"); strcat (dyn_column,"MINUTOS|LOGON|"); break; case CASE_VER_SQL_PROGRAM: strcpy(dyn_column,"|PID|SPID|SID|STATUS|OSUSER|USERNAME|MACHINE|TERMINAL|KILL|VTEXT|MINUTOS|"); break; case CASE_SQL_SESS_IO: strcpy(dyn_column,"|SID|USERNAME|TERMINAL|MACHINE|BLCKGETS|"); strcat (dyn_column,"CONSISGETS|PHYSREADS|BLCKCHGS|"); strcat (dyn_column,"CONSISCHGS|"); break; case CASE_SQL_SESSION_EVENT: strcpy (dyn_column,"|SID|USERNAME|TERMINAL|MACHINE|"); strcat (dyn_column,"EVENT|TOTWAIT|TOTTIME|TIMWAITED|"); strcat (dyn_column,"AVGWAIT|MAXWAIT|"); break; case CASE_SQL_SESSION_WAIT: strcpy (dyn_column,"|SID|USERNAME|TERMINAL|MACHINE|"); strcat (dyn_column,"SEQ#|EVENT|P1TEXT|P1|P1RAW|"); strcat (dyn_column,"P2TEXT|P2|P2RAW|P3|P3TEXT|P3RAW|"); strcat (dyn_column,"WAIT_TIME|SECINWAIT|STATE|"); break; case CASE_SQL_SESSION_LONG_OPER: strcpy(dyn_column,"|SID|USERNAME|TERMINAL|MACHINE|SERIAL#|OPNAME|TARGET|"); strcat(dyn_column,"TARGET_DESC|SOFAR|TOTALWORK|UNITS|START_TIME|"); strcat(dyn_column,"LAST_UPDATE_TIME|TIME_REMAINING|ELAPSED_SECONDS|"); strcat(dyn_column,"CONTEXT|MESSAGE|USERNAME|SQL_ADDRESS|"); strcat (dyn_column,"SQL_HASH_VALUE|QCSID|"); break; case CASE_SQL_LOCKED_OBJECTS: strcpy(dyn_column,"|XIDUSN|XIDSLOT|XIDSQN|OBJID|SESID|ORAUSER|"); strcat (dyn_column,"OSUSER|PROCESS|LOCKMODE|"); break; case CASE_SQL_TRANSACTION_DETAIL: strcpy(dyn_column,"|ADDR|XIDUSN|XIDSLOT|XIDSQN|UBAFIL|"); strcat(dyn_column,"UBABLK|UBASQN|UBAREC|START_UBAFIL|"); strcat(dyn_column,"START_UBABLK|START_UBASQN|START_UBAREC|"); Página 11
  12. 12. func_dyn_column_set.c strcat (dyn_column,"LOG_IO|PHY_IO|"); break; case CASE_SQL_LOCK_MEDIUM_INFO: strcpy(dyn_column,"|SADDR|SID|SERIAL|USERNAME|TERMINAL|TYPE|"); strcat (dyn_column,"TABLE|OWNER|ID1|ID2|LMODE|RMODE|"); break; case CASE_SQL_LOCK_FULL_INFO: strcpy(dyn_column,"|USER|SID|TERMINAL||||||||||||||||"); break; case CASE_SQL_LOCK_BY_SESSION_ID: strcpy (dyn_column,"|USER OS|PID|SID|USERORA|LOCKS|TYPE|MODE|WAIT|"); break; case CASE_SQL_WHO_IS_WAITING_FOR: strcpy (dyn_column,"|WAITING USER|USEROS|SID|PID|HOLDING USER|"); strcat (dyn_column,"USER OS|SID|PID|"); break; case CASE_SQL_WHICH_SQL_RUNNING: strcpy (dyn_column,"||||||||||||||||"); break; case CASE_WHICH_OBJECTS_LOCKED_BY_USER: strcpy(dyn_column,"|ADDR|INDX|INST_ID|KGLLKADR|KGLLKUSE|"); strcat(dyn_column,"KGLLKSES|KGLLKSNM|KGLLKHDL|KGLLKPNC|KGLLKPNS|"); strcat(dyn_column,"KGLLKCNT|KGLLKMOD|KGLLKREQ|KGLLKFLG|KGLLKSPN|"); strcat(dyn_column,"KGLLKHTB|KGLNAHSH|KGLHDPAR|KGLHDNSP|USER_NAME|"); strcat (dyn_column,"KGLNAOBJ|"); break;/* ------------------------------------------------- *//************* Agregado 25-Agosto-2005 ***************/ case CASE_BUFFER_CACHE_DEFINED: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_column,"|ID|NAME|BLOCK_SZ|CURRENT_SZ|"); strcat (dyn_column,"BUFFERS|"); break; } break;/* ------------------------------------------------- */ case CASE_BUFFER_CACHE_TOTAL_SIZE: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_column,"|TOT_CUR_SIZE|TOT_BUFFERS|"); break; } break;/* ------------------------------------------------- */ case CASE_OPTIMIZER_INDEX_COST_ADJ_ESTIMATE: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_column,"|OPTIMIZER_INDEX_COST_ADJ|"); break; } break;/* ------------------------------------------------- */ Página 12
  13. 13. func_dyn_column_set.c case CASE_OPTIMIZER_INDEX_CACHING_ESTIMAGE: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_column,"|OPTIMIZER_INDEX_CACHING|"); break; } break;/* ------------------------------------------------- *//* ------------------------------------------------- */ default: strcpy (dyn_column,"|ORACLE_VERSION|"); break; } return (dyn_column); } Página 13

×