| 1 |
/* |
| 2 |
* PROGRAM: Database analysis tool |
| 3 |
* MODULE: dbaswi.h |
| 4 |
* DESCRIPTION: dba switches |
| 5 |
* |
| 6 |
* The contents of this file are subject to the Interbase Public |
| 7 |
* License Version 1.0 (the "License"); you may not use this file |
| 8 |
* except in compliance with the License. You may obtain a copy |
| 9 |
* of the License at http://www.Inprise.com/IPL.html |
| 10 |
* |
| 11 |
* Software distributed under the License is distributed on an |
| 12 |
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express |
| 13 |
* or implied. See the License for the specific language governing |
| 14 |
* rights and limitations under the License. |
| 15 |
* |
| 16 |
* The Original Code was created by Inprise Corporation |
| 17 |
* and its predecessors. Portions created by Inprise Corporation are |
| 18 |
* Copyright (C) Inprise Corporation. |
| 19 |
* |
| 20 |
* All Rights Reserved. |
| 21 |
* Contributor(s): ______________________________________. |
| 22 |
*/ |
| 23 |
|
| 24 |
#ifndef DBA_DBASWI_H |
| 25 |
#define DBA_DBASWI_H |
| 26 |
|
| 27 |
#include "../common/classes/Switches.h" |
| 28 |
#include "../jrd/constants.h" |
| 29 |
|
| 30 |
// Switch handling constants. Note that the first IN_SW_DATA_ITEMS |
| 31 |
// switch constants refer to data items. The remaining switch constants |
| 32 |
// refer to actual switches. |
| 33 |
|
| 34 |
const int IN_SW_DBA_0 = 0; // not a known switch |
| 35 |
const int IN_SW_DBA_SYSTEM = 1; // analyze system relations |
| 36 |
const int IN_SW_DBA_DATA = 2; // analyze data pages |
| 37 |
const int IN_SW_DBA_INDEX = 3; // analyze index leaf pages |
| 38 |
const int IN_SW_DBA_VERSION = 4; // display version number |
| 39 |
const int IN_SW_DBA_HEADER = 5; // analyze header page |
| 40 |
//const int IN_SW_DBA_LOG = 6; // analze log pages |
| 41 |
const int IN_SW_DBA_DATAIDX = 7; // analyze data and index pages |
| 42 |
const int IN_SW_DBA_USERNAME = 8; // username |
| 43 |
const int IN_SW_DBA_PASSWORD = 9; // password |
| 44 |
const int IN_SW_DBA_RECORD = 10; // analyze record versions |
| 45 |
const int IN_SW_DBA_RELATION = 11; // analyze specific relations |
| 46 |
const int IN_SW_DBA_NOCREATION = 12; // don't print creation date |
| 47 |
#ifdef TRUSTED_AUTH |
| 48 |
const int IN_SW_DBA_TRUSTEDAUTH = 13; // trusted user name |
| 49 |
#endif |
| 50 |
const int IN_SW_DBA_FETCH_PASS = 14; // fetch password from file |
| 51 |
const int IN_SW_DBA_ENCRYPTION = 15; // analyze pages encryption |
| 52 |
const int IN_SW_DBA_HELP = 16; // show help |
| 53 |
const int IN_SW_DBA_ROLE = 17; // SQL role |
| 54 |
|
| 55 |
const static struct Switches::in_sw_tab_t dba_in_sw_table[] = |
| 56 |
{ |
| 57 |
{IN_SW_DBA_DATAIDX, 0, "ALL", 0,0,0, false, false, 22, 1, NULL}, // msg 22: -a analyze data and index pages |
| 58 |
{IN_SW_DBA_DATA, isc_spb_sts_data_pages, "DATA", 0,0,0, false, true, 23, 1, NULL}, // msg 23: -d analyze data pages |
| 59 |
{IN_SW_DBA_ENCRYPTION, isc_spb_sts_encryption, "ENCRYPTION", 0,0,0, false, true, 51, 1, NULL}, // msg 51: -e analyze database encryption |
| 60 |
{IN_SW_DBA_HEADER, isc_spb_sts_hdr_pages, "HEADER", 0,0,0, false, true, 24, 1, NULL}, // msg 24: -h analyze header page |
| 61 |
{IN_SW_DBA_INDEX, isc_spb_sts_idx_pages, "INDEX", 0,0,0, false, true, 25, 1, NULL}, // msg 25: -i analyze index leaf pages |
| 62 |
// {IN_SW_DBA_LOG, isc_spb_sts_db_log, "LOG", 0,0,0, false, true, 26, 1, NULL}, // msg 26: -l analyze log page |
| 63 |
{IN_SW_DBA_SYSTEM, isc_spb_sts_sys_relations, "SYSTEM", 0,0,0, false, true, 27, 1, NULL}, // msg 27: -s analyze system relations |
| 64 |
{IN_SW_DBA_USERNAME, 0, "USERNAME", 0,0,0, false, false, 32, 1, NULL}, // msg 32: -u username |
| 65 |
{IN_SW_DBA_PASSWORD, 0, "PASSWORD", 0,0,0, false, false, 33, 1, NULL}, // msg 33: -p password |
| 66 |
{IN_SW_DBA_FETCH_PASS, 0, "FETCH_PASSWORD", 0,0,0, false, false, 37, 2, NULL}, // msg 37: -fetch fetch password from file |
| 67 |
{IN_SW_DBA_RECORD, isc_spb_sts_record_versions,"RECORD", 0,0,0, false, true, 34, 1, NULL}, // msg 34: -r analyze average record and version length |
| 68 |
{IN_SW_DBA_RELATION, isc_spb_sts_table, "TABLE", 0,0,0, false, false, 35, 1, NULL}, // msg 35: -t tablename |
| 69 |
{IN_SW_DBA_RELATION, isc_spb_sts_table, "TABLE", 0,0,0, false, true, 0, 1, NULL}, // no msg: let run old buggy code |
| 70 |
{IN_SW_DBA_ROLE, 0, "ROLE", 0,0,0, false, false, 57, 1, NULL}, // msg 57: -role SQL role name |
| 71 |
// special switch to avoid including creation date, only for tests (no message) |
| 72 |
{IN_SW_DBA_NOCREATION, isc_spb_sts_nocreation, "NOCREATION", 0,0,0, false, true, 0, 1, NULL}, // msg (ignored) -n suppress creation date |
| 73 |
#ifdef TRUSTED_AUTH |
| 74 |
{IN_SW_DBA_TRUSTEDAUTH, 0, "TRUSTED", 0,0,0, false, false, 36, 2, NULL}, // msg 36: -tr use trusted authentication |
| 75 |
#endif |
| 76 |
{IN_SW_DBA_VERSION, 0, "Z", 0,0,0, false, false, 28, 1, NULL}, // msg 28: -z display version number |
| 77 |
{IN_SW_DBA_HELP, 0, "?", 0,0,0, false, false, 0, 1, NULL}, // Help |
| 78 |
{IN_SW_DBA_0, 0, NULL, 0,0,0, false, false, 0, 0, NULL} // End of List |
| 79 |
}; |
| 80 |
#endif // DBA_DBASWI_H |
| 81 |
|