- if (pDb->dbInf.fetchDirections & SQL_FD_FETCH_RESUME)
- {if (comma++) s += ", "; s += langDBINF_RESUME;}
-#endif
- if (pDb->dbInf.fetchDirections & SQL_FD_FETCH_BOOKMARK)
- {if (comma++) s += ", "; s += langDBINF_BOOKMARK;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_LOCK_TYPES;
- if (pDb->dbInf.lockTypes & SQL_LCK_NO_CHANGE)
- {s += langDBINF_NO_CHANGE; comma++;}
- if (pDb->dbInf.lockTypes & SQL_LCK_EXCLUSIVE)
- {if (comma++) s += ", "; s += langDBINF_EXCLUSIVE;}
- if (pDb->dbInf.lockTypes & SQL_LCK_UNLOCK)
- {if (comma++) s += ", "; s += langDBINF_UNLOCK;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_POS_OPERS;
- if (pDb->dbInf.posOperations & SQL_POS_POSITION)
- {s += langDBINF_POSITION; comma++;}
- if (pDb->dbInf.posOperations & SQL_POS_REFRESH)
- {if (comma++) s += ", "; s += langDBINF_REFRESH;}
- if (pDb->dbInf.posOperations & SQL_POS_UPDATE)
- {if (comma++) s += ", "; s += langDBINF_UPD;}
- if (pDb->dbInf.posOperations & SQL_POS_DELETE)
- {if (comma++) s += ", "; s += langDBINF_DEL;}
- if (pDb->dbInf.posOperations & SQL_POS_ADD)
- {if (comma++) s += ", "; s += langDBINF_ADD;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_POS_STMTS;
- if (pDb->dbInf.posStmts & SQL_PS_POSITIONED_DELETE)
- {s += langDBINF_POS_DEL; comma++;}
- if (pDb->dbInf.posStmts & SQL_PS_POSITIONED_UPDATE)
- {if (comma++) s += ", "; s += langDBINF_POS_UPD;}
- if (pDb->dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE)
- {if (comma++) s += ", "; s += langDBINF_SELECT_FOR_UPD;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_SCROLL_CONCURR;
- if (pDb->dbInf.scrollConcurrency & SQL_SCCO_READ_ONLY)
- {s += langDBINF_READ_ONLY; comma++;}
- if (pDb->dbInf.scrollConcurrency & SQL_SCCO_LOCK)
- {if (comma++) s += ", "; s += langDBINF_LOCK;}
- if (pDb->dbInf.scrollConcurrency & SQL_SCCO_OPT_ROWVER)
- {if (comma++) s += ", "; s += langDBINF_OPT_ROWVER;}
- if (pDb->dbInf.scrollConcurrency & SQL_SCCO_OPT_VALUES)
- {if (comma++) s += ", "; s += langDBINF_OPT_VALUES;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_SCROLL_OPTS;
- if (pDb->dbInf.scrollOptions & SQL_SO_FORWARD_ONLY)
- {s += langDBINF_FWD_ONLY; comma++;}
- if (pDb->dbInf.scrollOptions & SQL_SO_STATIC)
- {if (comma++) s += ", "; s += langDBINF_STATIC;}
- if (pDb->dbInf.scrollOptions & SQL_SO_KEYSET_DRIVEN)
- {if (comma++) s += ", "; s += langDBINF_KEYSET_DRIVEN;}
- if (pDb->dbInf.scrollOptions & SQL_SO_DYNAMIC)
- {if (comma++) s += ", "; s += langDBINF_DYNAMIC;}
- if (pDb->dbInf.scrollOptions & SQL_SO_MIXED)
- {if (comma++) s += ", "; s += langDBINF_MIXED;}
- s += "\n";
-
- comma = FALSE;
- s += langDBINF_STATIC_SENS;
- if (pDb->dbInf.staticSensitivity & SQL_SS_ADDITIONS)
- {s += langDBINF_ADDITIONS; comma++;}
- if (pDb->dbInf.staticSensitivity & SQL_SS_DELETIONS)
- {if (comma++) s += ", "; s += langDBINF_DELETIONS;}
- if (pDb->dbInf.staticSensitivity & SQL_SS_UPDATES)
- {if (comma++) s += ", "; s += langDBINF_UPDATES;}
- s += "\n";
-
-
- s += langDBINF_TXN_CAPABLE;
- switch(pDb->dbInf.txnCapable)
- {
- case SQL_TC_NONE: s += langNO; break;
- case SQL_TC_DML: s += langDBINF_DML_ONLY; break;
- case SQL_TC_DDL_COMMIT: s += langDBINF_DDL_COMMIT; break;
- case SQL_TC_DDL_IGNORE: s += langDBINF_DDL_IGNORE; break;
- case SQL_TC_ALL: s += langDBINF_DDL_AND_DML; break;
- }
- s += "\n";
-
- t.sprintf("%s%d\n", langDBINF_LOGIN_TIMEOUT, pDb->dbInf.loginTimeout);
- s += t;
-
- // Oracle specific information
- if (pDb->Dbms() == dbmsORACLE)
- {
- s += "\n";
- s += langDBINF_ORACLE_BANNER;
- s += "\n";
-
- // Oracle cache hit ratio
- SDWORD cb;
- ULONG dbBlockGets;
- pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'db block gets'");
- pDb->GetNext();
- if (pDb->GetData(1, SQL_C_ULONG, &dbBlockGets, 0, &cb))
- {
- t.sprintf("%s: %lu\n", langDBINF_DB_BLOCK_GETS, dbBlockGets);
- s += t;
- }
-
- ULONG consistentGets;
- pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'consistent gets'");
- pDb->GetNext();
- if (pDb->GetData(1, SQL_C_ULONG, &consistentGets, 0, &cb))
- {
- t.sprintf("%s: %lu\n", langDBINF_CONSISTENT_GETS, consistentGets);
- s += t;
- }
-
- ULONG physReads;
- pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'physical reads'");
- pDb->GetNext();
- if (pDb->GetData(1, SQL_C_ULONG, &physReads, 0, &cb))
- {
- t.sprintf("%s: %lu\n", langDBINF_PHYSICAL_READS, physReads);
- s += t;
- }
-
- ULONG hitRatio = (ULONG)((1.00 - ((float)physReads / (float)(dbBlockGets + consistentGets))) * 100.00);
- t.sprintf("*** %s: %lu%%\n", langDBINF_CACHE_HIT_RATIO, hitRatio);
- s += t;
-
- // Tablespace information
- s += "\n";
- s += langDBINF_TABLESPACE_IO;
- s += "\n";
- ULONG physWrites;
- char tablespaceName[257];
- pDb->ExecSql("SELECT NAME,PHYRDS,PHYWRTS FROM V$DATAFILE, V$FILESTAT WHERE V$DATAFILE.FILE# = V$FILESTAT.FILE#");
- while (pDb->GetNext())
- {
- pDb->GetData(1, SQL_C_CHAR, tablespaceName, 257, &cb);
- pDb->GetData(2, SQL_C_ULONG, &physReads, 0, &cb);
- pDb->GetData(3, SQL_C_ULONG, &physWrites, 0, &cb);
- t.sprintf("%s\n\t%s: %lu\t%s: %lu\n", tablespaceName,
- langDBINF_PHYSICAL_READS, physReads, langDBINF_PHYSICAL_WRITES, physWrites);
- s += t;
- }
-
- s += "\n";
- }
+ if (pDb->dbInf.fetchDirections & SQL_FD_FETCH_RESUME)
+ {if (comma++) s += ", "; s += langDBINF_RESUME;}
+#endif
+ if (pDb->dbInf.fetchDirections & SQL_FD_FETCH_BOOKMARK)
+ {if (comma++) s += ", "; s += langDBINF_BOOKMARK;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_LOCK_TYPES;
+ if (pDb->dbInf.lockTypes & SQL_LCK_NO_CHANGE)
+ {s += langDBINF_NO_CHANGE; comma++;}
+ if (pDb->dbInf.lockTypes & SQL_LCK_EXCLUSIVE)
+ {if (comma++) s += ", "; s += langDBINF_EXCLUSIVE;}
+ if (pDb->dbInf.lockTypes & SQL_LCK_UNLOCK)
+ {if (comma++) s += ", "; s += langDBINF_UNLOCK;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_POS_OPERS;
+ if (pDb->dbInf.posOperations & SQL_POS_POSITION)
+ {s += langDBINF_POSITION; comma++;}
+ if (pDb->dbInf.posOperations & SQL_POS_REFRESH)
+ {if (comma++) s += ", "; s += langDBINF_REFRESH;}
+ if (pDb->dbInf.posOperations & SQL_POS_UPDATE)
+ {if (comma++) s += ", "; s += langDBINF_UPD;}
+ if (pDb->dbInf.posOperations & SQL_POS_DELETE)
+ {if (comma++) s += ", "; s += langDBINF_DEL;}
+ if (pDb->dbInf.posOperations & SQL_POS_ADD)
+ {if (comma++) s += ", "; s += langDBINF_ADD;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_POS_STMTS;
+ if (pDb->dbInf.posStmts & SQL_PS_POSITIONED_DELETE)
+ {s += langDBINF_POS_DEL; comma++;}
+ if (pDb->dbInf.posStmts & SQL_PS_POSITIONED_UPDATE)
+ {if (comma++) s += ", "; s += langDBINF_POS_UPD;}
+ if (pDb->dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE)
+ {if (comma++) s += ", "; s += langDBINF_SELECT_FOR_UPD;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_SCROLL_CONCURR;
+ if (pDb->dbInf.scrollConcurrency & SQL_SCCO_READ_ONLY)
+ {s += langDBINF_READ_ONLY; comma++;}
+ if (pDb->dbInf.scrollConcurrency & SQL_SCCO_LOCK)
+ {if (comma++) s += ", "; s += langDBINF_LOCK;}
+ if (pDb->dbInf.scrollConcurrency & SQL_SCCO_OPT_ROWVER)
+ {if (comma++) s += ", "; s += langDBINF_OPT_ROWVER;}
+ if (pDb->dbInf.scrollConcurrency & SQL_SCCO_OPT_VALUES)
+ {if (comma++) s += ", "; s += langDBINF_OPT_VALUES;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_SCROLL_OPTS;
+ if (pDb->dbInf.scrollOptions & SQL_SO_FORWARD_ONLY)
+ {s += langDBINF_FWD_ONLY; comma++;}
+ if (pDb->dbInf.scrollOptions & SQL_SO_STATIC)
+ {if (comma++) s += ", "; s += langDBINF_STATIC;}
+ if (pDb->dbInf.scrollOptions & SQL_SO_KEYSET_DRIVEN)
+ {if (comma++) s += ", "; s += langDBINF_KEYSET_DRIVEN;}
+ if (pDb->dbInf.scrollOptions & SQL_SO_DYNAMIC)
+ {if (comma++) s += ", "; s += langDBINF_DYNAMIC;}
+ if (pDb->dbInf.scrollOptions & SQL_SO_MIXED)
+ {if (comma++) s += ", "; s += langDBINF_MIXED;}
+ s += "\n";
+
+ comma = FALSE;
+ s += langDBINF_STATIC_SENS;
+ if (pDb->dbInf.staticSensitivity & SQL_SS_ADDITIONS)
+ {s += langDBINF_ADDITIONS; comma++;}
+ if (pDb->dbInf.staticSensitivity & SQL_SS_DELETIONS)
+ {if (comma++) s += ", "; s += langDBINF_DELETIONS;}
+ if (pDb->dbInf.staticSensitivity & SQL_SS_UPDATES)
+ {if (comma++) s += ", "; s += langDBINF_UPDATES;}
+ s += "\n";
+
+
+ s += langDBINF_TXN_CAPABLE;
+ switch(pDb->dbInf.txnCapable)
+ {
+ case SQL_TC_NONE: s += langNO; break;
+ case SQL_TC_DML: s += langDBINF_DML_ONLY; break;
+ case SQL_TC_DDL_COMMIT: s += langDBINF_DDL_COMMIT; break;
+ case SQL_TC_DDL_IGNORE: s += langDBINF_DDL_IGNORE; break;
+ case SQL_TC_ALL: s += langDBINF_DDL_AND_DML; break;
+ }
+ s += "\n";
+
+ t.sprintf("%s%d\n", langDBINF_LOGIN_TIMEOUT, pDb->dbInf.loginTimeout);
+ s += t;
+
+ // Oracle specific information
+ if (pDb->Dbms() == dbmsORACLE)
+ {
+ s += "\n";
+ s += langDBINF_ORACLE_BANNER;
+ s += "\n";
+
+ // Oracle cache hit ratio
+ SDWORD cb;
+ ULONG dbBlockGets;
+ pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'db block gets'");
+ pDb->GetNext();
+ if (pDb->GetData(1, SQL_C_ULONG, &dbBlockGets, 0, &cb))
+ {
+ t.sprintf("%s: %lu\n", langDBINF_DB_BLOCK_GETS, dbBlockGets);
+ s += t;
+ }
+
+ ULONG consistentGets;
+ pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'consistent gets'");
+ pDb->GetNext();
+ if (pDb->GetData(1, SQL_C_ULONG, &consistentGets, 0, &cb))
+ {
+ t.sprintf("%s: %lu\n", langDBINF_CONSISTENT_GETS, consistentGets);
+ s += t;
+ }
+
+ ULONG physReads;
+ pDb->ExecSql("SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'physical reads'");
+ pDb->GetNext();
+ if (pDb->GetData(1, SQL_C_ULONG, &physReads, 0, &cb))
+ {
+ t.sprintf("%s: %lu\n", langDBINF_PHYSICAL_READS, physReads);
+ s += t;
+ }
+
+ ULONG hitRatio = (ULONG)((1.00 - ((float)physReads / (float)(dbBlockGets + consistentGets))) * 100.00);
+ t.sprintf("*** %s: %lu%%\n", langDBINF_CACHE_HIT_RATIO, hitRatio);
+ s += t;
+
+ // Tablespace information
+ s += "\n";
+ s += langDBINF_TABLESPACE_IO;
+ s += "\n";
+ ULONG physWrites;
+ char tablespaceName[257];
+ pDb->ExecSql("SELECT NAME,PHYRDS,PHYWRTS FROM V$DATAFILE, V$FILESTAT WHERE V$DATAFILE.FILE# = V$FILESTAT.FILE#");
+ while (pDb->GetNext())
+ {
+ pDb->GetData(1, SQL_C_CHAR, tablespaceName, 257, &cb);
+ pDb->GetData(2, SQL_C_ULONG, &physReads, 0, &cb);
+ pDb->GetData(3, SQL_C_ULONG, &physWrites, 0, &cb);
+ t.sprintf("%s\n\t%s: %lu\t%s: %lu\n", tablespaceName,
+ langDBINF_PHYSICAL_READS, physReads, langDBINF_PHYSICAL_WRITES, physWrites);
+ s += t;
+ }
+
+ s += "\n";
+ }