27th October 2009
in
Session
set lines 100 pages 999
col ID format a15
col osuser format a15
col login_time format a14
select username
, osuser
, sid || ',' || serial# "ID"
, status
, to_char(logon_time, 'hh24:mi dd/mm/yy') login_time
, last_call_[...]
Tags: Sessions sorted
No Comments
27th October 2009
in
Session
set lines 100 pages 999
col ID format a15
select username
, sid || ',' || serial# "ID"
, status
, last_call_et "Last Activity"
from v$session
where username is not null
order by status desc
, las[...]
Tags: connected users
No Comments
27th October 2009
in
Unix
I’ve noticed that one of our interface directories has a lot of old files, some of them were more than a year old. I checked it with our implementers and it turns out that we can delete all files that are older tha[...]
Tags: Delete the 500 oldest files
No Comments
27th October 2009
in
Status
select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
from v$instance
/
[...]
Tags: database startup time
No Comments
26th October 2009
in
Status
This will return 9000′ish if it is…
select count(*)
from all_objects
where object_type like '%JAVA%'
and owner = 'SYS'
/
[...]
Tags: java installed in the database
No Comments
25th October 2009
in
Session
set pages 999
select sess.username
, sess.sid
, sess.serial#
, stat.value cursors
from v$sesstat stat
, v$statname sn
, v$session sess
where sess.username is not null
and sess.sid = stat.sid
and stat.statistic# = sn.sta[...]
Tags: open cursors
No Comments
24th October 2009
in
Init Parameters
select name
, value
from v$parameter
where ismodified != 'FALSE'
/
[...]
1 Comment
22nd October 2009
in
Init Parameters
Setting a parameter to =’ ‘ often isn’t enough. Do this instead…
alter system reset <parameter> scope=spfile sid='*'
/
The sid='*' bit is always necessary, even in non RAC database.
[...]
Tags: Reset/Unset a spfile parameter
No Comments
22nd October 2009
in
Init Parameters
select name
, value
from v$parameter
where ismodified != 'FALSE'
/
or for name='parameter' style...
set pages 999 lines 100
select name || '=' || decode(type, 2, '''') || value
|| decode(type, 2, '''') param[...]
Tags: oracle non-default parameters
No Comments