Wednesday, December 2, 2009
Importing data from oracle to xl sheet.
Please visit http://www.fasttrackdba.com/oracletips/importfromexcelsheet.html
Tuesday, November 10, 2009
Tablespace Fragmentation
Please visit http://www.fasttrackdba.com/sqlscripts/tablespacefragmentation.html
Saturday, November 7, 2009
Way to find the database table that is accessed the most
Please Visit http://www.fasttrackdba.com/sqlscripts/mostaccessedtable.html
Tuesday, August 18, 2009
Disk Sorts - Database Performance
Please visit http://www.fasttrackdba.com/performancetuning/disksorting.html
Tuesday, July 7, 2009
Shared Pool Advisory
Please visit http://www.fasttrackdba.com/performancetuning/sharedpooladvisor.html
Oracle Database Tuning Statistics
Please visit http://www.fasttrackdba.com/performancetuning/tuningstatistics.html
Script to identify chained rows in a table
Please Visit http://www.fasttrackdba.com/sqlscripts/chainedrowsinatable.html
Monday, July 6, 2009
Buffer Cache Advisory Statistics
Please visit http://www.fasttrackdba.com/performancetuning/buffercache.html
Wednesday, July 1, 2009
Friday, June 26, 2009
Thursday, June 11, 2009
Tuesday, June 2, 2009
Wednesday, April 29, 2009
Tuesday, February 24, 2009
Tuesday, February 17, 2009
Wednesday, February 4, 2009
Monday, February 2, 2009
Thursday, January 22, 2009
SCRIPT:To get the % useage of all available open cursor
---To get the % useage of all available open cursor
SELECT 'session_cached_cursors' parameter, LPAD(value, 5) value,
DECODE(value, 0, ' n/a', to_char(100 * used / value, '990') || '%' ) usage
FROM ( SELECT MAX(s.value) used
FROM v$statname n, v$sesstat s
WHERE
n.name = 'session cursor cache count' and
s.statistic# = n.statistic# ),
(SELECT value
FROM v$parameter
WHERE
name = 'session_cached_cursors' )
UNION ALL
SELECT 'open_cursors', LPAD(value, 5), to_char(100 * used / value, '990') || '%'
FROM
(SELECT MAX(sum(s.value)) used
FROM v$statname n, v$sesstat s
WHERE
n.name in ('opened cursors current', 'session cursor cache count') and s.statistic#=n.statistic#
GROUP BY
s.sid
),
(SELECT value
FROM v$parameter
WHERE
name = 'open_cursors' )
/
DECODE(value, 0, ' n/a', to_char(100 * used / value, '990') || '%' ) usage
FROM ( SELECT MAX(s.value) used
FROM v$statname n, v$sesstat s
WHERE
n.name = 'session cursor cache count' and
s.statistic# = n.statistic# ),
(SELECT value
FROM v$parameter
WHERE
name = 'session_cached_cursors' )
UNION ALL
SELECT 'open_cursors', LPAD(value, 5), to_char(100 * used / value, '990') || '%'
FROM
(SELECT MAX(sum(s.value)) used
FROM v$statname n, v$sesstat s
WHERE
n.name in ('opened cursors current', 'session cursor cache count') and s.statistic#=n.statistic#
GROUP BY
s.sid
),
(SELECT value
FROM v$parameter
WHERE
name = 'open_cursors' )
/
Friday, January 16, 2009
Thursday, January 15, 2009
Friday, January 9, 2009
Thursday, January 8, 2009
Wednesday, January 7, 2009
Tuesday, January 6, 2009
Monday, January 5, 2009
Script:Sql's for Temporary tablespace mining
select segtype, extents, blocks
from v$tempseg_usage
where tablespace = 'TEMP';
To see the default temporary tablespace for a database, execute the following query:
SELECT * FROM DATABASE_PROPERTIES where PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';
Command To resize TEMPFILE:
ALTER DATABASE TEMPFILE 'temp01.dbf' RESIZE 100M;
Command to adding another sparse file:
ALTER TABLESPACE TEMP ADD TEMPFILE 'temp02.dbf' SIZE 100M;
TEMP tablespace resize Command:
ALTER DATABASE TEMPFILE '/u02/oracle/data/oradata/temp02.dbf' RESIZE 100M;
To see the default temporary tablespace for a database, execute the following query:
SQL> SELECT * FROM DATABASE_PROPERTIES where PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE'
Query To Create Temporary tablespace:
CREATE TEMPORARY TABLESPACE temp01
TEMPFILE ‘/u02/xxx/xxx/temp01.dbs’ SIZE 500M;
Subscribe to:
Posts (Atom)