# TSTsql.def: Tests SQL Settings # $Id: TSTsql.def,v 2.7 2012/04/25 07:03:58 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/TSTsql.def,v 2.7 2012/04/25 07:03:58 mschenke Exp $ # # Change History # 20120423 MSC Improve the credential management. =head1 NAME TSTsql - Tests SQL*Plus Settings and Gets some Database Configuration Information =head1 DESCRIPTION =cut echo tput('bold'),'Processing SQL test module ...',tput('off') =pod This tool loads the passwords that are encoded in the setup file and collects the following information: =over 4 =item o Current user =item o Current SQL*Plus settings =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 =back =cut call setSqlTrace(setTrace()) set $sql {PROMPT Current User: "PROMPT ============= "SELECT USER " FROM dual; " "PROMPT "PROMPT Current SQL*Plus Settings: "PROMPT ========================== "SHOW all " "COLUMN value FORMAT a20 "COLUMN owner FORMAT a10 "COLUMN trigger_name FORMAT a20 "COLUMN status FORMAT a10 "COLUMN triggering_event FORMAT a16 "COLUMN trigger_type FORMAT a16 "SET wrap on "SET heading on "SET linesize 80 " "PROMPT "PROMPT v$version "PROMPT ========= "SELECT * " FROM v$version; " "PROMPT "PROMPT v$database "PROMPT ========== "SELECT * " FROM v$database; " "PROMPT "PROMPT v$pwfile_users "PROMPT ============== "SELECT * " FROM v$pwfile_users; " "PROMPT "PROMPT remote_login_passwordfile Parameter "PROMPT =================================== "SELECT value " FROM v$parameter " WHERE name = 'remote_login_passwordfile'; " "PROMPT "PROMPT dba_triggers (null table_name) "PROMPT ============================== "SELECT owner,trigger_name,triggering_event,trigger_type,status " FROM dba_triggers " WHERE table_name IS NULL " ORDER BY 1,2; } if loadSql($sql) {loop $lin(grepLastSql('.*')) dump $lin } if getSqlMessage() echo last =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