|
The following is a listing of the structures used in the Distributed Tuning Interface.
typedef struct { BTI_CHAR cName[P_MAX_CATEGORY_NAME_LENGTH]; BTI_ULONG numOfSettings; // Name of the category. // Number of settings in the category } PVCATEGORYINFO;
typedef struct { PVSETTINGENUM sType; // Type of setting. BTI_CHAR sName[P_MAX_VALUE_NAME_LENGTH]; // Display name of setting. PVRANKENUM sRank; // Rank of the setting based on usage level. BTI_WORD sClientServer; // (0 = client-side; 1= server-side). } PVSETTINGINFO;
typedef enum { PVSETTING_BOOLEAN = 0; // Boolean type. PVSETTING_LONG, // Long integer type PVSETTING_STRING, // Null terminated string type PVSETTING_SINGLE_SEL, // Single selection type PVSETTING_MULTI_SEL, // Multi selection type }PVSETTINGNUM;
typedef enum { PVRANK_NORMAL = 0; // Frequently used setting PVRANK_ADVANCED, // Advanced setting }PVRANKENUM;
// structure used to pass table names typedef struct TABLEMAPtag { char tableName[TABLENAME_LEN + 1]; }TABLEMAP;
// structure used to pass table properties // typedef struct TABLEINFOtag { char tableName [TABLENAME_LEN + 1]; // dictionary tableName char dataLocation [PATH_LEN + 1]; // actual [path\name]of data file WORD flags; //flags of the table BOOL overwrite; // indicates whether data file or DDF will be // overwritten if one already exists. }TABLEINFO;
B_FLAG_TRUE_NULLABLE = 64Table is true nullable. When the table is created, a one byte null indicator is added before each column that is nullable.
//structure used to pass table stat info typedef struct TABLESTATtag { char tableName [TABLENAME_LEN + 1]; char tableLocation [PATH_LEN + 1]; char dictionaryPath [PATH_LEN + 1]; float fileVersion; BTI_WORD recordLength; BTI_WORD pageSize; BTI_WORD numberOfRecords; BTI_WORD numberOfIndexes; BTI_WORD numberOfDuplicatePtrs; BTI_WORD numberOfUnusedPages; unsigned char variableRecords; unsigned char varRecBlankTruncation; unsigned char dataCompression; unsigned char keyOnlyFile; unsigned char indexBalancing; char freespaceThreshold[FREESPACE_THRESHOLD]; unsigned char usesAlternateCollatingSeq; unsigned char systemDataKey; }TABLESTAT;
// structure used to pass column information typedef struct COLUMNMAPtag { WORD index; //ordinal of the column position char name[COLUMNNAME_LEN + 1]; // column name WORD dataType; // data type WORD size; // field length WORD decimal; // decimal places WORD flags; // field flags char isrName[ISR_LEN + 1]; // international sorting rule name }COLUMNMAP;
B_FLAG_CASE_SENSITIVE = 1Column values are case sensitive on comparisons and as part of index segments.
B_FLAG_NULLABLE = 4If the table is created as true nullable, then a one byte null indicator column is added before the column value to indicate whether the column value is null.
COLUMNMAP dataType can take the following values:
B_TYPE_STRING = 0, B_TYPE_INTEGER = 1, B_TYPE_FLOAT = 2, B_TYPE_DATE = 3, B_TYPE_TIME = 4, B_TYPE_DECIMAL = 5, B_TYPE_MONEY = 6, B_TYPE_LOGICAL = 7, B_TYPE_NUMERIC = 8, B_TYPE_BFLOAT = 9, B_TYPE_LSTRING = 10, B_TYPE_ZSTRING = 11, B_TYPE_NOTE = 12, B_TYPE_LVAR = 13, B_TYPE_BINARY = 14, B_TYPE_AUTOINC = 15, B_TYPE_BIT = 16, B_TYPE_NUMERSTS = 17, B_TYPE_NUMERSA = 18, B_TYPE_CURRENCY = 19, B_TYPE_TIMESTAMP = 20, B_TYPE_BLOB = 21, B_TYPE_GDECIMAL = 22, B_TYPE_WSTRING = 25, B_TYPE_WZSTRING = 26, B_TYPE_DATETIME = 30
// structure used to pass index information typedef struct INDEXMAPtag { WORD index; // Btrieve index number WORD segment; // segment index number char columnName[COLUMNNAME_LEN + 1]; // index the associated field char indexName[INDEXNAME_LEN + 1]; // index name WORD flags; // index attributes }INDEXMAP;
B_FLAG_DUPLICATES = 1Duplicates allowed in index.
B_FLAG_MODIFIABLE = 2Index is modifiable
B_FLAG_SORT_DESCENDING = 64Sort index descending.
typedef struct tagPVDATETIME { BTI_WORD year; // Year (current year minus 1900) BTI_WORD month; // Month (valid values are 0-11; // January = 0) BTI_WORD day; BTI_WORD hour; // Day of month (valid values are 1-31) // Hours since midnight (valid values are 0-59) BTI_WORD minute; // Minutes after hour (valid // values are 0-59) BTI_WORD second; // Seconds after minutes (valid // values are 0-59000) BTI_WORD millisecond; // Milliseconds after minute // Default to 0 if the // smallest time unit // is seconds. } PVDATETIME;
typedef struct tagPVFILEINFO { BTI_BYTE openMode; // File handle's open mode // (0 = Normal; // -1 = Accelerated; // -2 = Read-Only; // 3 = Verify; // -4 = Exclusive) BTI_BYTE locksFlag; // Checks if one or more // record locks is applied // to the file. // ('N' = No locks, // 'S'=Single lock, // 'M'= Multiple locks) BTI_BYTE transFlag; // Checks if the file has a // transaction lock. BTI_BYTE tTSFlag; // Reserved BTI_BYTE readOnly; // Checks if one or more // record locks are applied // to the file. // ('Y' = Yes, 'N' = No) BTI_BYTE continuousOpsFlag; // Set to 1 if file // is in continuos // operation mode, // otherwise 0. BTI_BYTE referentialIntgFlag; // Set to 1 if // referential // int. flag is // defined, // otherwise 0. BTI_ULONG aFLIndex; // Record ID used by the // MicroKernel Engine. BTI_ULONG activeCursors; // Number of open // instances of this // file. BTI_ULONG pageSize; // Page size of the file // in bytes. PVDATETIME openTimeStamp; // Time when the file was // opened. } PVFILEINFO;
typedef struct tagPVFILEHDLINFO { BTI_ULONG clientIndex; // Client ID. BTI_BYTE openMode; // File handle's open mode. // (0= Normal; -1 = Accelerated; // -2 = Read-Only; -3 = Verify; // -4 Exclusive) BTI_BYTE locksFlag; // Checks if one or more // record locks is applied // to the file // ('N' = No locks, //'S' = Single lock, // 'M' = Multiple locks) BTI_BYTE waitFlag; // Checks if the file is in // waiting mode. // (0= not waiting; // 1= waiting for a record; // 2= waiting for // another file) BTI_WORD transState; // Type of transaction lock // held by this handle. // (0= no locks; // 19 = exclusive lock; // 1019 = concurrent lock) BTI_CHAR userName[P_MAX_NAME_SIZE]; // Login name of user who owns this handle. } PVFILEHDLINFO;
typedef struct tagPVCLIENTID { BTI_CHAR clientID[12]; // IP address or // SPX address. BTI_WORD serviceAgentID; // Reserved. BTI_WORD taskNumber; // Task ID. } PVCLIENTID;
typedef struct tagPVMKDECLIENTINFO { BTI_WORD clientSite; // Location of // client's process // (0 = remote; // 1 = local) BTI_WORD clientPlatform; // Client's platform // (Valid values are 0-9; // 0 = Platform not available; // 1 = Windows 3.x; // 2 = Windows 95/98; // 3 = Windows for workgroups; // 4 = Windows NT/2000 Workgroups; // 5 = Windows NT/2000 Server; // 6 = NetWare Server; // 7 = OS/2 Workstation; // 8 = OS/2 Server; // 9 = DOS ) BTI_CHAR netAddress[80]; // Client's network address or machine name BTI_WORD numCursors; // Number of open instances of this client BTI_ULONG recordsDeleted; // Number of record deleted BTI_ULONG recordsUpdated; // Number of records updated. BTI_ULONG recordsInserted; // Number of records inserted. BTI_ULONG recordsRead; // Number of records read since user // first opened the file BTI_ULONG diskAccesses; // Number of times user required // a disk access BTI_ULONG cacheAccesses; // Number of times user required // a cache access BTI_ULONG currentLocks; // Number of locks currently in use. BTI_WORD transState; // Type of lock held by this client. // (0 = no locks; // 19 = exclusive lock; // 1019 = concurrent lock) BTI_WORD transLevel; // Reserved for future. BTI_ULONG btrvID; // System ID of client. BTI_ULONG connectionNumber; // Reserved. BTI_CHAR userName[P_MAX_NAME_SIZE]; // User login name } PVMKDECLIENTINFO;
typedef struct tagPVMKDECLIENTHDLINFO { BTI_BYTE openMode; // Client handle's open mode. // (0=Normal; -1=Accelerated; // -2=Read-only; -3=Verify; // -4=Exclusive) BTI_BYTE locksFlag; // Checks if one or more // record locks is applied // to the handle // ('N'=no locks, // 'S'=Single lock, // 'M'=Multiple locks) BTI_BYTE waitFlag; // Checks if the handle // is in waiting mode BTI_WORD transState; // Type of transaction lock // held by this handle. // (0 = no lock; // 19 = exclusive lock; // 1019 = concurrent lock) BTI_CHAR fileName[P_MAX_PATH_SIZE]; // Path and name of opened handle } PVMKDECLIENTHDLINFO;
typedef struct tagPVMKDEUSAGE { BTI_ULONG currentLicensesInUse; // Number of licenses currently in use. BTI_ULONG peakLicensesInUse; // Peak number of licenses in use BTI_ULONG maxLicenses; // Maximum number of licenses. BTI_WORD curFilesInUse; // Number of active files currently in use. BTI_WORD peakFilesInUse; // Peak number of active files in use BTI_WORD maxFiles; // Maximum number of active files. BTI_WORD curHandlesInUse; // Number of active file handles // currently in use (NetWare only). BTI_WORD peakHandlesInUse; // Peak number of active file handles // in use (NetWare only). BTI_WORD maxHandles; // Maximum number of active file handles // (NetWare only). BTI_WORD curTransInUse; // Number of transactions currently in use. BTI_WORD peakTransInUse; // Peak number of transactions in use. BTI_WORD maxTrans; // Maximum number of transactions in use. BTI_WORD curClients; // Number of clients currently accessing // the MicroKernel. BTI_WORD peakClients; // Peak number of clients accessing the // MicroKernel. BTI_WORD maxClients; // Maximum number of clients accessing // the MicroKernel. BTI_WORD curThreads; // Number of active threads currently in use. BTI_WORD peakThreads; //Peak number of active threads in use. BTI_WORD maxThreads; // Maximum number of active threads in use. BTI_WORD curLocksInUse; // Number of record locks currently in use. BTI_WORD peakLocksInUse; // Peak number of record locks in use. } PVMKDEUSAGE;
typedef struct tagPVMKDEUSAGEEX { BTI_ULONG currentLicensesInUse; // Number of licenses currently in use. BTI_ULONG peakLicensesInUse; // Peak number of licenses in use BTI_ULONG maxLicenses; // Maximum number of licenses. BTI_ULONG curFilesInUse; // Number of active files currently in use. BTI_ULONG peakFilesInUse; // Peak number of active files in use BTI_LONG maxFiles; // Maximum number of active files. BTI_ULONG curHandlesInUse; // Number of active file handles // currently in use (NetWare only). BTI_ULONG peakHandlesInUse; // Peak number of active file handles // in use (NetWare only). BTI_LONG maxHandles; // Maximum number of active file handles // (NetWare only). BTI_ULONG curTransInUse; // Number of transactions currently in use. BTI_ULONG peakTransInUse; // Peak number of transactions in use. BTI_LONG maxTrans; // Maximum number of transactions in use. BTI_ULONG curClients; // Number of clients currently accessing // the MicroKernel. BTI_ULONG peakClients; // Peak number of clients accessing the // MicroKernel. BTI_LONG maxClients; // Maximum number of clients accessing // the MicroKernel. BTI_ULONG curThreads; // Number of active threads currently in use. BTI_LONG peakThreads; //Peak number of active threads in use. BTI_LONG maxThreads; // Maximum number of active threads in use. BTI_ULONG curLocksInUse; // Number of record locks currently in use. BTI_ULONG peakLocksInUse; // Peak number of record locks in use. } PVMKDEUSAGEEX;
#define TARGET_SIZE 5 typedef struct tagPVVERSION { BTI_LONG major; // major version of Pervasive.SQL BTI_LONG minor; // minor version of Pervasive.SQL BTI_LONG build; // build number for release BTI_CHAR target[TARGET_SIZE]; // operation system target } PVVERSION;
typedef struct tagPVCOMMSTAT { BTI_ULONG totalEngineRequestsProcessed; // Total number of requests the // Communication Server processed // since it was loaded. BTI_ULONG currentQueuedRequests; // Number of current requests. BTI_ULONG peakQueuedRequests; // Peak number of requests. BTI_ULONG maxQueuedRequests; // Maximum number of requests. BTI_ULONG currentRemoteSessions; // Number of current remote sessions. BTI_ULONG peakRemoteSessions; // Number of peak remote sessions. BTI_ULONG maxRemoteSessions; // Number of maximum remote sessions. BTI_ULONG currentActiveThreads; // Number of currently active threads. BTI_ULONG peakActiveThreads; // Number of peak active threads. BTI_ULONG maxActiveThreads; // Number of maximum active threads. BTI_ULONG numProtocols; // Number of communication protocols available. PVCOMMPROTOCOLSTAT protocolStat[P_MAX_COMM_PROTOCOLS]; // Information on the available // communication protocols. } PVCOMMSTAT;
typedef struct tagPVCOMMSTATEX { BTI_ULONG totalEngineRequestsProcessed; // Total number of requests the // Communication Server processed // since it was loaded. BTI_ULONG currentQueuedRequests; // Number of current requests. BTI_ULONG peakQueuedRequests; // Peak number of requests. BTI_ULONG maxQueuedRequests; // Maximum number of requests. BTI_ULONG currentRemoteSessions; // Number of current remote sessions. BTI_ULONG peakRemoteSessions; // Number of peak remote sessions. BTI_ULONG maxRemoteSessions; // Number of maximum remote sessions. BTI_ULONG currentActiveThreads; // Number of currently active threads. BTI_ULONG peakActiveThreads; // Number of peak active threads. BTI_ULONG maxActiveThreads; // Number of maximum active threads. BTI_ULONG numProtocols; // Number of communication protocols available. BTI_ULONG totalTimeouts; // Total number of communication timeouts. BTI_ULONG totalRecoveries; // Total number of recoveries made with // Pervasive Auto Reconnect feature. PVCOMMPROTOCOLSTAT protocolStat[P_MAX_COMM_PROTOCOLS]; // Information on the available // communication protocols. } PVCOMMSTATEX;
typedef struct tagPVCOMMPROTOCOLSTAT { BTI_ULONG protocolId; // Protocol ID // (1=SPX; 4=TCP/IP; 12=NETBIOS) BTI_ULONG totalRequestsProcessed; // Total number of requests processed // through this protocol. BTI_ULONG currentRemoteSessions; // Number of current remote sessions // through this protocol. BTI_ULONG peakRemoteSessions; // Number of peak sessions // through this protocol. } PVCOMMPROTOCOLSTAT;
typedef struct tagPVSQLCONNINFO { BTI_CHAR szHostName[MAXLEN_HOSTNAME+1]; // SQL client's machine name or // host name. Set to "Unknown" if available. BTI_CHAR szDSN[SQL_MAX_DSN_LENGTH+1]; // Engine DSN referenced by the SQL // client application. BTI_CHAR szAppDesc[MAXLEN_LAM_APP_DESC+1]; // Name of SQL client's application or module. BTI_CHAR szIP[MAXLEN_LAM_IP+1]; // SQL Client's IP or NetWare address. BTI_CHAR szUserName[MAXLEN_LAM_USER_NAME+1]; // Windows login ID of the connected // SQL client. BTI_WORD ui16Status; // Connection status. // (0=Idle;1=Active) BTI_ULONG ui32CurStatusTime; // Time, in milliseconds, since the // connection has been active. BTI_ULONG ui32ConnectTime; // Time, in seconds, since the // connection was established. BTI_ULONG ui32ProcessId; // Process ID of the SQL client's application. BTI_ULONG ui32ThreadId; // Thread ID of the SQL client's application. } PVSQLCONNINFO;
|
Chapter contents
Prev topic: Error Messages
|