RE: PL/sql example

RE: PL/sql example

 

  

hmmmm.... just signed on to this site - i am in the process of tuning a query. the cost of the SQL statement is 24. does anyone have a rule of thumb for that they consider a poor performing statement in regards to cost?

thanks!

-----Original Message-----
From: Patterson Joel
[mailto:oracledba-ezmlmshield-x17181413.[Email address protected]
Sent: Thursday, March 31, 2005 10:05 AM
To: LazyDBA Discussion
Subject: RE: PL/sql example


Yeah and for a quick and dirty SQLPLUS query that can be spooled and
edited for which rows are returned:

select 'alter system kill session '||''''||sid||','||serial#||';' from
v$session;


-----Original Message-----
From: James Oddo
[mailto:oracledba-ezmlmshield-x28815249.[Email address protected]
Sent: Thursday, March 31, 2005 10:18 AM
To: LazyDBA Discussion
Subject: RE: PL/sql example

WOW That's not an example that's writing the code for me.......

Great work and Thanks!!!!!!!

-----Original Message-----
From: Pepling Todd C.
[mailto:oracledba-ezmlmshield-x16314105.[Email address protected]
Sent: Thursday, March 31, 2005 9:49 AM
To: LazyDBA Discussion
Subject: RE: PL/sql example

begin
for rec in (
select sid,serial#
from sys.v_$session
where schemaname <> 'SYS'
and audsid <> sys_context('USERENV','SESSIONID')
)
loop
dbms_output.put_line('alter system kill session
'||chr(39)||rec.sid||','||rec.serial#||chr(39)||';');
execute immediate 'alter system kill session
'||chr(39)||rec.sid||','||rec.serial#||chr(39);
end loop;
end;
/

-----Original Message-----
From: James Oddo
[mailto:oracledba-ezmlmshield-x91416810.[Email address protected]
Sent: Thursday, March 31, 2005 8:48 AM
To: LazyDBA Discussion
Subject: PL/sql example


Does any one have an example of a pl/sql block that will query connected
sessions place the sid and serial # in a cursor then loop thru cursor
and perform a alter system kill session.........

Just trying to drop a user that holds a connection to DB from
application and automate the process

Thnaks all!!!!


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html





--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html




Oracle LazyDBA home page