# TSTodbc.def: Tests Oracle Database Access using ODBC # $Id: TSTodbc.def,v 1.6 2012/04/25 07:03:58 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/TSTodbc.def,v 1.6 2012/04/25 07:03:58 mschenke Exp $ # # Change History # 20120423 MSC Improve the credential management. =head1 NAME TSTodbc - Tests Oracle Database Access Using ODBC =head1 DESCRIPTION This tools requires an ODBC Data Source Name as argument. -vdT odbc: =cut echo tput('bold'),'Processing ODBC test module ...',tput('off') echo 'Setting logins ...' # Force ODBC access call switchDb('odbc',getSetting('SQL_LOGIN','SYSTEM'),undef,\ getSetting('TST_ARGS')) =pod It loads the passwords that are encoded in the setup file and collects the following information: =over 4 =item o Current user =item o Content of the C table =item o Content of the C table =item o Content of the C table =item o Value of the C parameter =item o Records of the C table with a null C =item o Macro library information =item o List of available data source names =back =cut call setDbTrace(setTrace()) set $job {# ECHO Current User: "# ECHO ============= "# SQL "SELECT USER " FROM dual "/ "# ECHO "# ECHO v$version "# ECHO ========= "# SQL "SELECT * " FROM v$version "/ "# ECHO "# ECHO v$database "# ECHO ========== "# SQL "SELECT * " FROM v$database "/ "# ECHO "# ECHO v$pwfile_users "# ECHO ============== "# SQL "SELECT * " FROM v$pwfile_users "/ "# ECHO "# ECHO remote_login_passwordfile Parameter "# ECHO =================================== "# SQL "SELECT value " FROM v$parameter " WHERE name = 'remote_login_passwordfile' "/ "# ECHO "# ECHO dba_triggers (null table_name) "# ECHO ============================== "# SQL "SELECT owner,trigger_name,triggering_event,trigger_type,status " FROM dba_triggers " WHERE table_name IS NULL " ORDER BY 1,2 "/ } if loadDb($job) {loop $lin(grepLastDb('.*')) dump $lin } if getDbMessage() echo last dump dump 'DBI Information' dump '===============' dump 'DB Provider: ',getDbProvider() dump 'DB Version: ',getDbVersion() dump dump join("\012 ",'Available drivers:',getDrivers()) dump dump 'DBM Driver: ',nvl(isDriverAvailable('DBM'),'(Not available)') dump 'ODBC Driver: ',nvl(isDriverAvailable('ODBC'),'(Not available)') dump 'Oracle Driver: ',nvl(isDriverAvailable('Oracle'),'(Not available)') dump dump 'ODBC Data Sources' dump '=================' loop $dsn (getDataSources()) dump $dsn =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut