Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Monitoring the contents of SQL statements

Re: Monitoring the contents of SQL statements

From: Sylvain Faust <sfaust_at_sfi-software.com>
Date: 2000/05/19
Message-ID: <F4155D9F9AA4D111B9990020AFBA52D534B4FE@class06.ip061.sfi-software.com>#1/1

SQL-Optimizer/DBA does the job great in terms of monitoring the SQL running on the server, more like a "Trader" screen. It also suggest SQL modification for better performance.

Info here:
http://www.sfi-software.com/products.htm

Look for SQL-OPTIMIZER(tm) from Sylvain Faust (SFI) http://www.sfi-software.com

> -----Original Message-----
> From: Niall Litchfield [SMTP:n-litchfield_at_audit-commission.gov.uk]
> Posted At: Wednesday, May 17, 2000 5:29 AM
> Posted To: server
> Conversation: Monitoring the contents of SQL statements
> Subject: Re: Monitoring the contents of SQL statements
>
> there are a number of third party tools you can get hold of (TOAD
> seems the
> most recommended).
>
> We use an in house application to monitor sql by connection. The
> relevant
> code (j++) is reproduced below and contains the sql statement I think
> you
> might be looking for. Also Oracle Performance pack for ent manager
> gives
> some tools as well
>
> public void refresh ()
> {
> Statement statement;
> ResultSet resultSet;
>
> try
> {
> statement = connection.createStatement();
>
> resultSet = statement.executeQuery
> (
> "SELECT sql_text " +
> "FROM v$sqltext t,v$session s " +
> "WHERE t.address = s.sql_address " +
> "AND s.sid = " + sid + " " +
> "ORDER BY piece"
> );
>
> String s = "";
> StringBuffer b = null;
> int j;
>
> while (resultSet.next ())
> {
> b = new StringBuffer(resultSet.getString(1));
> for (j = 0;j < b.length();j++)
> {
> switch (b.charAt(j))
> {
> case '\r' :
> case '\n' :
> b.setCharAt(j,' ');
> break;
> }
> }
> s = s + b;
> }
>
> edit1.setText (s);
> sqlText = s;
>
> statement.close ();
> }
> catch (SQLException e)
> {
> MessageBox.show (e.getMessage (),"SQL Error 3.1");
> }
> }
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> "Tom Lewis" <telewis_at_my-deja.com> wrote in message
> news:8fp2t0$a60$1_at_nnrp1.deja.com...
> > I'm trying to monitor the contents of SQL statements issued by an
> > application (mainly selects and inserts). I've tryed to monitor
> > V$SQLAREA but its rather messy. Any better ways to do this?
> >
> > --
> > Tom Lewis
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
Received on Fri May 19 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US