Func dyn size_set.c

309 views
245 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
309
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Func dyn size_set.c

  1. 1. func_dyn_size_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_size_set (int version, int sentencia) { static char dyn_size[MAX_VAR_SIZE]; vaciar_cadena (dyn_size,MAX_VAR_SIZE); switch (sentencia) { case CASE_ORACLE_VERSION: strcpy (dyn_size,"800"); break; case CASE_ACTIVE_PARAMETERS: strcpy (dyn_size,"3555400"); break; case CASE_USERS_CONNECTED: strcpy (dyn_size,"0804150608151611220"); break; case CASE_WAIT_STATISTICS: strcpy (dyn_size,"1010300"); break; case CASE_DATAFILE_I_0: switch (version) { case VERSION_ORACLE_920: strcpy (dyn_size,"0808080860100"); break; case VERSION_ORACLE_817: case VERSION_ORACLE_816: case VERSION_ORACLE_734: strcpy (dyn_size,"06060606600"); break; default: break; } break; case CASE_DATAFILE_BLOCKS_R_W: strcpy (dyn_size,"600606060"); break; case CASE_WAIT_EVENTS: strcpy (dyn_size,"082010300"); break; case CASE_INSTANCE_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"03080910220503101020300"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"061815121209081010200"); break; default: break; } break; case CASE_TEMPORAL_SPACE_BY_USER: Página 1
  2. 2. func_dyn_size_set.c switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"1010101010300"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"09070706060506060808080808060"); default: break; } break; case CASE_TOT_FREELIST_WAIT_PERCENT: strcpy (dyn_size,"120"); break; case CASE_LAST_CHECKPOINT_TIME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"15220"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"150"); break; default: break; } break; case CASE_LIST_TABLESPACES: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"1510100610100708101010100"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"1510100610100708101010100"); break; } break; case CASE_ACTIVE_TRANSACTIONS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"102208080810040605400"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"0820070808100706051010100"); break; } break; case CASE_LATCH_DETAILS: strcpy (dyn_size,"100408080805070808250"); break; case CASE_RESOURCE_LIMITS: switch (version) { Página 2
  3. 3. func_dyn_size_set.c case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"30101010100"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"50100"); break; } break; case CASE_LIST_DATAFILES: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"7010080"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"7010080"); break; } break; case CASE_LIST_DATAFILES_NEW_9I: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"0660181212080"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"0660181212080"); break; } break; case CASE_LIST_TABLESPACES_NEW_9I: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"062510121212121212121210101010100"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"062510121212121212121210101010100"); break; } break; case CASE_ACTIVE_SESSIONS: strcpy (dyn_size,"04041015221009221509400"); break; case CASE_SESSIONS_WAITS: strcpy(dyn_size,"04040505150825201010101010101010101010101010100"); break; case CASE_DEFAULT_STORAGE_SETS_TABLESPACE: strcpy (dyn_size,"2012121212070"); break; case CASE_ALL_TABLES_STORAGE_SETTINGS: strcpy (dyn_size,"152020101010080"); break; case CASE_ALL_NON_SYS_TABLES_SETTINGS: switch (version) { case VERSION_ORACLE_816: Página 3
  4. 4. func_dyn_size_set.c case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"18202008081018080"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"18202008081018080"); break; } break; case CASE_ALL_NON_SYS_INDEXES_SETTINGS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"12252008081018080"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"12252008081018080"); break; } break; case CASE_USER_DEFINED: printf ("Pasando Seteo ColSize 24 n0"); switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"201812202020221010100"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"201812202020221010100"); break; } break; case CASE_LIST_DATAFILE_REDO_CONTROL_FILES: strcpy (dyn_size,"7020100"); break; case CASE_LIST_DATAFILES_USED_BLOCKS: strcpy (dyn_size,"2560121212120"); break; case CASE_LIST_SORT_BY_USER: strcpy (dyn_size,"141806202510100"); break; case CASE_LIST_LOCK_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"0909040607041111082504090"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"0909040405041111082504090"); break; } break; case CASE_LIST_USER_BY_CPU_USAGE: strcpy (dyn_size,"050710102310252007700"); break; case CASE_SQL_STATEMENT_BY_THIS_USER: strcpy (dyn_size,"700"); break; Página 4
  5. 5. func_dyn_size_set.c case CASE_REDO_LOGS_STATUS: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"0707101010101012200"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"0707101010101012200"); break; } break; case CASE_ARCHIVED_LOGS_HISTORY: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"06075010230808100"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"0607180808500"); break; } break; case CASE_REDO_LOG_RECOVERY_REPORT: strcpy (dyn_size,"061252080"); break; case CASE_ARCHIVE_LOG_HISTROY: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_size,"08101717220"); break; case VERSION_ORACLE_734: strcpy (dyn_size,"06080808220"); break; } break; case CASE_SESSION_LATCH_WAITS_SQL: strcpy (dyn_size,"053030600"); break; case CASE_SESSION_PROGRAM_RUNNING_SQL: strcpy (dyn_size,"073060800"); break; case CASE_PRIVILEGES_BY_USER: strcpy (dyn_size,"2525400"); break; case CASE_DETAILED_LOCKING_CAUSES: strcpy (dyn_size,"3005152810181814500"); break; case CASE_CURRENT_STATISTICS_VALUES: strcpy (dyn_size,"0855150"); break; case CASE_TABLE_DESCRIPTION_USER_TABLENAME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"12123208190707070707070707070707070"); break; Página 5
  6. 6. func_dyn_size_set.c case VERSION_ORACLE_734: strcpy(dyn_size,"12123208190707070707070707070707070"); break; } break; case CASE_INDEX_DESCRIPTION_USER_INDEXNAME: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy(dyn_size,"15121512080915060606060606060706070707070"); break; case VERSION_ORACLE_734: strcpy(dyn_size,"15121512080915060606060606060706070707070"); break; } break; case CASE_CURRENT_ACTIVITY_REPORT: strcpy (dyn_size,"10120812990"); break; case CASE_DICTIONARY_TABLE_COMMENTS: strcpy (dyn_size,"35700"); break; case CASE_DICTIONARY_TABLE_COLUMNS_DESCRIP: strcpy (dyn_size,"253065150806120"); break; case CASE_SGA_STATISTIC_GENERAL: strcpy (dyn_size,"042510101005101010450"); break; case CASE_SGA_STATISTIC_MEMORY_USAGE: strcpy (dyn_size,"15351212120"); break; case CASE_SGA_STATISTIC_INFORMATION: strcpy (dyn_size,"40200"); break; case CASE_ROW_CACHE_INFORMATION: strcpy (dyn_size,"060625101007101010070506060"); break; case CASE_PERFORMANCE_DISK_I_O: strcpy (dyn_size,"501010100"); break; case CASE_RECURSIVE_CALLS: strcpy (dyn_size,"30200"); break; case CASE_SYSTEM_EVENTS: strcpy (dyn_size,"40121212120"); break;/* -------------------------------------------------------------- */ /*#define CASE_SQL_AREA_ALL_ENTRIES 52 */ case CASE_SQL_AREA_ALL_ENTRIES: strcpy (dyn_size,"0807090909050303030305050519"); strcat (dyn_size,"0508080815151508071215080505060"); break; /*#define CASE_SQL_AREA_CPU_USAGE 53 */ case CASE_SQL_AREA_CPU_USAGE: strcpy (dyn_size,"0807070707050303030305050519"); strcat (dyn_size,"050808081515150807121508050506"); break; /* Página 6
  7. 7. func_dyn_size_set.c#define CASE_SQL_AREA_MEMORY_USAGE 54 */ case CASE_SQL_AREA_MEMORY_USAGE: strcpy (dyn_size,"0807070707050303030305050519"); strcat (dyn_size,"050808081515150807121508050506"); break; /* /*#define CASE_SQL_AREA_BUFFER_GET_SUM 55 */ case CASE_SQL_AREA_BUFFER_GET_SUM: strcpy (dyn_size,"0807070707050303030305050519"); strcat (dyn_size,"050808081515150807121508050506"); break; /*#define CASE_INIT_PARAMETERS_VALUES_STATUS 56 */ case CASE_INIT_PARAMETERS_VALUES_STATUS: strcpy (dyn_size,"05355005050508050535"); break;/* -------------------------------------------------------------- */ case CASE_TABLESPACE_FRAGMENTATION: strcpy (dyn_size,"250909091516120606060"); break; case CASE_SHOW_NLS_PARAMETERS: strcpy (dyn_size,"30404040350"); break; case CASE_CONTROL_FILES_STATUS: strcpy (dyn_size,"50120"); break; case CASE_SORT_SEGMENTS_USERS: strcpy (dyn_size,"1506080706070707090709"); strcat (dyn_size,"07070708060609090909090"); break; case CASE_ORACLE_QUOTAS: strcpy (dyn_size,"30191111111111"); break; case CASE_TABLE_GENERAL_DESCRIPTION: strcpy (dyn_size,"20303012120909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909"); break; case CASE_TABLE_COLUMN_DESCRIPTION: strcpy (dyn_size,"2040350"); break; case CASE_TABLE_CONSTRAINTS: strcpy (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); strcat (dyn_size,"09090909090909090909"); break; case CASE_INDEX_GENERAL_DESCRIPTION: strcpy (dyn_size,"2535063525151515"); break; case CASE_AUDIT_DEFINITION: strcpy (dyn_size,"3520301212"); break; case CASE_SHOW_SEGMENTS_EXTENTS: strcpy (dyn_size,"122525301212121212121212"); break; case CASE_SHOW_EXTENTS_INSIDE_DATAFILES: Página 7
  8. 8. func_dyn_size_set.c strcpy (dyn_size,"08253012250808080880"); break; case CASE_SHOW_USER_LISTS: strcpy (dyn_size,"30083010302312081010101010101010"); break; case CASE_SHOW_ROLES_PRIVILEGES: strcpy (dyn_size,"1010101010101010101010101010"); break; case CASE_SHOW_PRIVILEGES_COLUMNS: strcpy (dyn_size,"10101010101010101010"); break; case CASE_SHOW_LOCKS_VIEWS: strcpy (dyn_size,"082020201020101020101010"); break; case CASE_GRAPH_LOCK_WAITS: strcpy (dyn_size,"08653025"); break; case CASE_OBJECT_ACCESS_SESSION: strcpy (dyn_size,"087015"); break; case CASE_SHOW_LATCHES: strcpy (dyn_size,"10101010101010101010"); strcat (dyn_size,"10101010101010101010"); strcat (dyn_size,"10101010"); break; case CASE_SHOW_STATISTICS: strcpy(dyn_size,"05101010101010101015151515151515151515"); break; case CASE_SHOW_TRANSACTIONS: strcpy (dyn_size,"0509060606060606060609"); strcat (dyn_size,"10101010101010100707"); strcat (dyn_size,"10071010100610101008"); strcat (dyn_size,"08101008080810101010"); break; case CASE_SHOW_DATAFILES_STATUS: strcpy (dyn_size,"063007101010101010"); strcat (dyn_size,"1010101013121260"); break; case CASE_SHOW_DB_OBJECT_CACHE: strcpy (dyn_size,"202006060606061060"); break; case CASE_TABLE_ALERT_EXTENT_USED: strcpy (dyn_size,"30301010101006"); break; case CASE_INDEX_ALERT_EXTENT_USED: strcpy (dyn_size,"30301010101006"); break; case CASE_USER_TIME_WORKING: strcpy (dyn_size,"13200923122008081522"); break; case CASE_IS_USER_WORKING: strcpy (dyn_size,"10200923122008081522"); break; case CASE_VER_SQL_PROGRAM: strcpy (dyn_size,"0606060813201222212010"); break; case CASE_SQL_SESS_IO: strcpy (dyn_size,"05301218090909090909"); break; case CASE_SQL_SESSION_EVENT: strcpy (dyn_size,"05301218320808080808"); break; case CASE_SQL_SESSION_WAIT: strcpy(dyn_size,"053012180615121009121009121009070707"); break; case CASE_SQL_SESSION_LONG_OPER: Página 8
  9. 9. func_dyn_size_set.c strcpy (dyn_size,"05281218071840060808061818050505"); strcat (dyn_size,"1825101408"); break; case CASE_SQL_LOCKED_OBJECTS: strcpy (dyn_size,"080808080830121509"); break; case CASE_SQL_TRANSACTION_DETAIL: strcpy (dyn_size,"1010101010101010101010101010"); break; case CASE_SQL_LOCK_MEDIUM_INFO: strcpy (dyn_size,"160507251218252507071212"); break; case CASE_SQL_LOCK_FULL_INFO: strcpy (dyn_size,"300610351515151525"); break; case CASE_SQL_LOCK_BY_SESSION_ID: strcpy(dyn_size,"101010101010101010101010101010101010"); break; case CASE_SQL_WHO_IS_WAITING_FOR: strcpy(dyn_size,"101010101010101010101010101010101010"); break; case CASE_SQL_WHICH_SQL_RUNNING: strcpy(dyn_size,"101010101010101010101010101010101010"); break; case CASE_WHICH_OBJECTS_LOCKED_BY_USER: strcpy(dyn_size,"1010101010101010101010101010101010101010101010101010"); break;/* ------------------------------------------------- *//************* Agregado 25-Agosto-2005 ***************/ case CASE_BUFFER_CACHE_DEFINED: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_size,"1010101010101010101010101010101010101010101010101010"); break; } break;/* ------------------------------------------------- */ case CASE_BUFFER_CACHE_TOTAL_SIZE: switch (version) { case VERSION_ORACLE_920: strcpy(dyn_size,"1010101010101010101010101010101010101010101010101010"); break; } break;/* ------------------------------------------------- */ case CASE_OPTIMIZER_INDEX_COST_ADJ_ESTIMATE: switch (version) { case VERSION_ORACLE_920: strcpy (dyn_size,"1010"); break; } break;/* ------------------------------------------------- */ case CASE_OPTIMIZER_INDEX_CACHING_ESTIMAGE: switch (version) Página 9
  10. 10. func_dyn_size_set.c { case VERSION_ORACLE_920: strcpy (dyn_size,"1010"); break; }/* ------------------------------------------------- */ default: strcpy (dyn_size,"800"); break; } return (dyn_size); } Página 10

×