Dbtest

DbTest database information tool

DbTest is a simple tool for dumping database metadata. It can be used to examine attributes which a particular database vendor supports such as transaction support, and table column sizes. DbTest reads the properties/rdbm.properties file to obtain the database connection information.

DbTest can be invoked from the uPortal build directory using ant by simply typing:

ant dbtest

It will produce output similar to the following (this is for a PostgreSQL database):

% ant dbtest
Buildfile: build.xml

prepare:

compile:
     [copy] Copying 2 files to C:\portal\build\WEB-INF\classes\properties

dbtest:
     [echo] Invoking DbTest
     [java] Database name: 'PostgreSQL'
     [java] Database version: '7.4.5'
     [java] Driver name: 'PostgreSQL Native Driver'
     [java] Driver version: 'PostgreSQL 7.4.5 JDBC3 with SSL (build 215)'
     [java] Driver class: 'org.postgresql.Driver'
     [java] Connection URL: 'jdbc:postgresql://localhost:5432/test'
     [java] User: 'postgres'
     [java] supportsANSI92EntryLevelSQL: true
     [java] supportsANSI92FullSQL: false
     [java] supportsCoreSQLGrammar: false
     [java] supportsExtendedSQLGrammar: false
     [java] supportsTransactions: true
     [java] supportsMultipleTransactions: true
     [java] supportsOpenCursorsAcrossCommit: false
     [java] supportsOpenCursorsAcrossRollback: false
     [java] supportsOpenStatementsAcrossCommit: true
     [java] supportsOpenStatementsAcrossRollback: true
     [java] supportsStoredProcedures: false
     [java] supportsOuterJoins: true
     [java] supportsFullOuterJoins: true
     [java] supportsLimitedOuterJoins: true
     [java] supportsBatchUpdates: true
     [java] supportsColumnAliasing: true
     [java] supportsExpressionsInOrderBy: true
     [java] supportsOrderByUnrelated: true
     [java] supportsPositionedDelete: false
     [java] supportsSelectForUpdate: true
     [java] supportsUnion: true
     [java] supportsUnionAll: true

     [java] getMaxColumnNameLength: 63
     [java] getMaxColumnsInIndex: 32
     [java] getMaxColumnsInOrderBy: 0
     [java] getMaxColumnsInSelect: 0
     [java] getMaxColumnsInTable: 1600
     [java] getMaxConnections: 8192
     [java] getMaxCursorNameLength: 63
     [java] getMaxIndexLength: 0
     [java] getMaxRowSize: 1073741824
     [java] getMaxStatements: 1
     [java] getMaxTableNameLength: 63
     [java] getMaxTablesInSelect: 0
     [java] getMaxUserNameLength: 63
     [java] getSearchStringEscape: \\

     [java] Table Types: INDEX,SEQUENCE,SYSTEM INDEX,SYSTEM TABLE,SYSTEM TOAST I
NDEX,SYSTEM TOAST TABLE,SYSTEM VIEW,TABLE,TEMPORARY INDEX,TEMPORARY TABLE,VIEW
     [java] SQL Types: bool,bytea,char,name,int8,int2,int2vector,int4,regproc,te
xt,oid,tid,xid,cid,oidvector,SET,pg_type,pg_attribute,pg_proc,pg_class,pg_shadow
,pg_group,pg_database,smgr,point,lseg,path,box,polygon,line,_line,float4,float8,
abstime,reltime,tinterval,unknown,circle,_circle,money,_money,macaddr,inet,cidr,
_bool,_bytea,_char,_name,_int2,_int2vector,_int4,_regproc,_text,_oid,_tid,_xid,_
...............