Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Func dyn title_set.c

257 views

Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

Func dyn title_set.c

  1. 1. func_dyn_title_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_title_set (int version, int sentencia ) { static char dyn_title[MAX_VAR_SIZE]; vaciar_cadena (dyn_title,MAX_VAR_SIZE); switch ( sentencia ) { case CASE_ORACLE_VERSION: strcpy (dyn_title,"Oracle Version 0"); break; case CASE_ACTIVE_PARAMETERS: strcpy (dyn_title,"Active Parameters 0"); break; case CASE_USERS_CONNECTED: strcpy (dyn_title,"User conected0"); break; case CASE_WAIT_STATISTICS: strcpy (dyn_title,"Wait Statistics0"); break; case CASE_DATAFILE_I_0: strcpy (dyn_title,"Datafile I-O 0"); break; case CASE_DATAFILE_BLOCKS_R_W: strcpy (dyn_title,"Datafile Blocks R+W 0"); break; case CASE_WAIT_EVENTS: strcpy (dyn_title,"Wait Events 0"); break; case CASE_INSTANCE_STATUS: strcpy (dyn_title,"Instance status 0"); break; case CASE_TEMPORAL_SPACE_BY_USER: strcpy (dyn_title,"Temporal Space by user 0"); break; case CASE_TOT_FREELIST_WAIT_PERCENT: strcpy (dyn_title,"Total Freelist Wait Percentage 0"); break; case CASE_LAST_CHECKPOINT_TIME: strcpy (dyn_title,"Last Checkpoint Time 0"); break; case CASE_LIST_TABLESPACES: strcpy (dyn_title,"List Tablespaces 0"); break; case CASE_ACTIVE_TRANSACTIONS: strcpy (dyn_title,"Active Transactions 0"); break; case CASE_LATCH_DETAILS: strcpy (dyn_title,"Latch Details 0"); break; case CASE_RESOURCE_LIMITS: strcpy (dyn_title,"Resource Limits 0"); break; case CASE_LIST_DATAFILES: strcpy (dyn_title,"List Datafiles 0"); break; case CASE_LIST_DATAFILES_NEW_9I: strcpy (dyn_title,"List Datafiles New 9i 0"); Página 1
  2. 2. func_dyn_title_set.c break; case CASE_LIST_TABLESPACES_NEW_9I: strcpy (dyn_title,"List Tablespaces New 9i0"); break; case CASE_ACTIVE_SESSIONS: strcpy (dyn_title,"Active Sessions 0"); break; case CASE_SESSIONS_WAITS: strcpy (dyn_title,"Session Waits 0"); break; case CASE_DEFAULT_STORAGE_SETS_TABLESPACE: strcpy (dyn_title,"Default Storage Settings - ByTablespace 0"); break; case CASE_ALL_TABLES_STORAGE_SETTINGS: strcpy (dyn_title,"All tables Storage (Except SYS andSYSTEM) 0"); break; case CASE_ALL_NON_SYS_TABLES_SETTINGS: strcpy (dyn_title,"Non-Sys Tables 0"); break; case CASE_ALL_NON_SYS_INDEXES_SETTINGS: strcpy (dyn_title,"Non-Sys Indexes 0"); break; case CASE_USER_DEFINED: strcpy (dyn_title,"User Defined 0"); break; case CASE_LIST_DATAFILE_REDO_CONTROL_FILES: strcpy (dyn_title,"List Datafiles, Online Redo Logs,Control Files 0"); break; case CASE_LIST_DATAFILES_USED_BLOCKS: strcpy (dyn_title,"List Datafiles and their Used Blocks0"); break; case CASE_LIST_SORT_BY_USER: strcpy (dyn_title,"List sorts by user 0"); break; case CASE_LIST_LOCK_STATUS: strcpy (dyn_title,"List lock status 0"); break; case CASE_LIST_USER_BY_CPU_USAGE: strcpy (dyn_title,"List Users by CPU Usage 0"); break; case CASE_SQL_STATEMENT_BY_THIS_USER: strcpy (dyn_title,"Sql statement by this user 0"); break; case CASE_REDO_LOGS_STATUS: strcpy (dyn_title,"Redo Logs - Status 0"); break; case CASE_ARCHIVED_LOGS_HISTORY: switch (version) { case VERSION_ORACLE_816: case VERSION_ORACLE_817: case VERSION_ORACLE_920: strcpy (dyn_title,"Archived Logs History - by first TimeStamp 0"); break; case VERSION_ORACLE_734: strcpy (dyn_title,"Archived Logs History - by first TimeStamp 0"); break; } break; case CASE_REDO_LOG_RECOVERY_REPORT: strcpy (dyn_title,"Redo Log Recovery Report - CURRENTOnline Redo log info 0"); Página 2
  3. 3. func_dyn_title_set.c break; case CASE_ARCHIVE_LOG_HISTROY: strcpy (dyn_title,"Archive Log History 0"); break; case CASE_SESSION_LATCH_WAITS_SQL: strcpy (dyn_title,"Session Latch Waits - SQL 0"); break; case CASE_SESSION_PROGRAM_RUNNING_SQL: strcpy (dyn_title,"Session and Program Running - SQL0"); break; case CASE_PRIVILEGES_BY_USER: strcpy (dyn_title,"Privileges by User 0"); break; case CASE_DETAILED_LOCKING_CAUSES: strcpy (dyn_title,"Detailed locking causes 0"); break; case CASE_CURRENT_STATISTICS_VALUES: strcpy (dyn_title,"Current Statistics Values 0"); break; case CASE_TABLE_DESCRIPTION_USER_TABLENAME: strcpy (dyn_title,"Table Description del Usuario[<OWNER>] [<TABLENAME>] 0"); break; case CASE_CURRENT_ACTIVITY_REPORT: strcpy (dyn_title,"Current Activity Report 0"); break; case CASE_DICTIONARY_TABLE_COMMENTS: strcpy (dyn_title,"Table Dictionary Comments 0"); break; case CASE_DICTIONARY_TABLE_COLUMNS_DESCRIP: strcpy (dyn_title,"Table Dictionary Columns Description0"); break; case CASE_SGA_STATISTIC_GENERAL: strcpy (dyn_title,"Sga Statistic General 0"); break; case CASE_SGA_STATISTIC_MEMORY_USAGE: strcpy (dyn_title,"Sga Statistic Memory Usage 0"); break; case CASE_SGA_STATISTIC_INFORMATION: strcpy (dyn_title,"Sga Statistic Memory Information0"); break; case CASE_ROW_CACHE_INFORMATION: strcpy (dyn_title,"Row Cache Information 0"); break; case CASE_PERFORMANCE_DISK_I_O: strcpy (dyn_title,"Performance Disk I-O 0"); break; case CASE_RECURSIVE_CALLS: strcpy (dyn_title,"Recursive Calls 0"); break; case CASE_SYSTEM_EVENTS: strcpy (dyn_title,"System Events 0"); break;/* -------------------------------------------------------------- */ /*#define CASE_SQL_AREA_ALL_ENTRIES 52 */ case CASE_SQL_AREA_ALL_ENTRIES: strcpy (dyn_title,"Sql Area All Information 0"); break; /*#define CASE_SQL_AREA_CPU_USAGE 53 */ case CASE_SQL_AREA_CPU_USAGE: Página 3
  4. 4. func_dyn_title_set.c strcpy (dyn_title,"Sql Area Cpu Usage 0"); break; /*#define CASE_SQL_AREA_MEMORY_USAGE 54 */ case CASE_SQL_AREA_MEMORY_USAGE: strcpy (dyn_title,"Sql Area Memory Usage 0"); break; /* /*#define CASE_SQL_AREA_BUFFER_GET_SUM 55 */ case CASE_SQL_AREA_BUFFER_GET_SUM: strcpy (dyn_title,"Sql Area Buffer Get Sum 0"); break; /*#define CASE_INIT_PARAMETERS_VALUES_STATUS 56 */ case CASE_INIT_PARAMETERS_VALUES_STATUS: strcpy (dyn_title,"Init Parameters Values - Status 0"); break;/* -------------------------------------------------------------- */ case CASE_TABLESPACE_FRAGMENTATION: strcpy (dyn_title,"Tablespace Defragmentation 0"); break; case CASE_SHOW_NLS_PARAMETERS: strcpy (dyn_title,"Show Nls Parameters 0"); break; case CASE_CONTROL_FILES_STATUS: strcpy (dyn_title,"Control File Status 0"); break; case CASE_SORT_SEGMENTS_USERS: strcpy (dyn_title,"Show Sort Segments - Users 0"); break; case CASE_ORACLE_QUOTAS: strcpy (dyn_title,"Quotas by TableSpace - User 0"); break; case CASE_TABLE_GENERAL_DESCRIPTION: strcpy (dyn_title,"Tables General Description 0"); break; case CASE_TABLE_COLUMN_DESCRIPTION: strcpy (dyn_title,"Tables Column Description 0"); break; case CASE_TABLE_CONSTRAINTS: strcpy (dyn_title,"Tables Constraints 0"); break; case CASE_INDEX_GENERAL_DESCRIPTION: strcpy (dyn_title,"Index General Description 0"); break; case CASE_AUDIT_DEFINITION: strcpy (dyn_title,"Audit Definition 0"); break; case CASE_SHOW_SEGMENTS_EXTENTS: strcpy (dyn_title," Show Segments - Extents 0"); break; case CASE_SHOW_EXTENTS_INSIDE_DATAFILES: strcpy (dyn_title," Show Extents Inside Datafiles 0"); break; case CASE_SHOW_USER_LISTS: strcpy (dyn_title," Show Users Lists 0"); break; case CASE_SHOW_ROLES_PRIVILEGES: strcpy (dyn_title," Show Roles - Privileges 0"); break; case CASE_SHOW_PRIVILEGES_COLUMNS: strcpy (dyn_title," Show Privileges by Columns 0"); break; case CASE_SHOW_LOCKS_VIEWS: Página 4
  5. 5. func_dyn_title_set.c strcpy (dyn_title," Show Locks Views (Another Way )0"); break; case CASE_GRAPH_LOCK_WAITS: strcpy (dyn_title," Graph Session Lock Waits 0"); break; case CASE_OBJECT_ACCESS_SESSION: strcpy (dyn_title," Object access by Sid 0"); break; case CASE_SHOW_LATCHES: strcpy (dyn_title," Show Latches 0"); break; case CASE_SHOW_STATISTICS: strcpy (dyn_title," Show Statistics 0"); break; case CASE_SHOW_TRANSACTIONS: strcpy (dyn_title," Show Transaction Status 0"); break; case CASE_SHOW_DATAFILES_STATUS: strcpy (dyn_title," Datafile Status 0"); break; case CASE_SHOW_DB_OBJECT_CACHE: strcpy (dyn_title," Show Database Object Cache 0"); break; case CASE_TABLE_ALERT_EXTENT_USED: strcpy (dyn_title," Table Alert Extent Used 0"); break; case CASE_INDEX_ALERT_EXTENT_USED: strcpy (dyn_title," Index Alert Extent Used 0"); break; case CASE_USER_TIME_WORKING: strcpy (dyn_title," User Active Program Working 0"); break; case CASE_IS_USER_WORKING: strcpy (dyn_title," User Time User Working 0"); break; case CASE_VER_SQL_PROGRAM: strcpy (dyn_title," See SQL*Plus/Other Programs 0"); break; case CASE_SQL_SESS_IO: strcpy (dyn_title," Show Session I/O Activity 0"); break; case CASE_SQL_SESSION_EVENT: strcpy (dyn_title," Show Session Event Times 0"); break; case CASE_SQL_SESSION_WAIT: strcpy (dyn_title," Show Session Wait Reasons 0"); break; case CASE_SQL_SESSION_LONG_OPER: strcpy (dyn_title," Show Session Long Opers 0"); break; case CASE_SQL_LOCKED_OBJECTS: strcpy (dyn_title," Show Locked Objects 0"); break; case CASE_SQL_TRANSACTION_DETAIL: strcpy (dyn_title," Show Transactions Details 0"); break; case CASE_SQL_LOCK_MEDIUM_INFO: strcpy (dyn_title," Show Lock Medium Details 0"); break; case CASE_SQL_LOCK_FULL_INFO: strcpy (dyn_title," Show Lock Full Details 0"); break; case CASE_SQL_LOCK_BY_SESSION_ID: strcpy (dyn_title," Show Lock Session by SID 0"); break; case CASE_SQL_WHO_IS_WAITING_FOR: strcpy (dyn_title,"Locking for who is waiting ? 0"); Página 5
  6. 6. func_dyn_title_set.c break; case CASE_SQL_WHICH_SQL_RUNNING: strcpy (dyn_title,"Which Sql is Running 0"); break; case CASE_WHICH_OBJECTS_LOCKED_BY_USER: strcpy (dyn_title,"Which Object Locked By User 0"); break;/* ------------------------------------------------- *//************* Agregado 25-Agosto-2005 ***************/ case CASE_BUFFER_CACHE_DEFINED: strcpy (dyn_title,"Show Buffer Cached Defined 0"); break;/* ------------------------------------------------- */ case CASE_BUFFER_CACHE_TOTAL_SIZE: strcpy (dyn_title,"Show Buffer Total Size 0"); break;/* ------------------------------------------------- */ case CASE_OPTIMIZER_INDEX_COST_ADJ_ESTIMATE: strcpy (dyn_title,"Estimate parameteroptimizer_index_cost_adj 0"); break;/* ------------------------------------------------- */ case CASE_OPTIMIZER_INDEX_CACHING_ESTIMAGE: strcpy (dyn_title,"Estimate parameteroptimizer_index_caching 0"); break;/* ------------------------------------------------- *//* ------------------------------------------------- */ default: strcpy (dyn_title,"Oracle Version 0"); break; } return dyn_title; } Página 6

×