Monday 27 December 2010

وَلَهُمْ عَذَابٌ أَلِيمٌ

وَلَهُمْ عَذَابٌ أَلِيمٌ

Sunday 26 December 2010

Make XP auto login

Click Start > Run and type

CONTROL USERPASSWORDS2

Select the user account from the list (the account to which you want to automatically logon). Uncheck Users must enter a user name and password to use this computer option, and click Ok. Type the user account password and complete the process.

For Windows XP Home, don't try to auto-login as the built-in Administrator, as you'll receive an error message.

Thanks to site: http://windowsxp.mvps.org/Autologon.htm

Friday 17 December 2010

Tracing ORA-01427

To Trace Oracle error ORA-01427


SQL> alter system set events '1427 trace name ERRORSTACK level 10';


After the error occurs, see the trace generated in the udump directory.

To disable tracing:

SQL> alter system set events '1427 trace name ERRORSTACK off';


Testing on 15 Dec 2010, now sql that caused the error, is listed on trace file.

Stats Pack or AWR

Since none of my databases are Enterprice Licenced, I dont get to use AWR year on year.
So hence alwasy foget the AWR command, still surviving with the stats pack command.

Here's one that I need remember:


@?/rdbms/admin/awrrpt.sql

Thursday 16 December 2010

Munin 10+ cpu patch

for 10 or cpu box:


please login to lnx-db28.nid as root.

vi /usr/share/munin/plugins/cpu

search for NCPU

remove a space e.g.

From

NCPU=`expr \`grep '^cpu. ' /proc/stat | wc -l\` - 1`


To (Only removing the space after cpu.)

NCPU=`expr \`grep '^cpu.' /proc/stat | wc -l\` - 1`


Restart munin node on that box

/etc/init.d/munin-node restart

How to find the tables that have stale statistics?

How to find the tables that have stale statistics?

SET SERVEROUTPUT ON

DECLARE
ObjList dbms_stats.ObjectTab;
BEGIN

dbms_stats.gather_database_stats(objlist=>ObjList, options=>'LIST STALE');

FOR i in ObjList.FIRST..ObjList.LAST
LOOP
dbms_output.put_line(ObjList(i).ownname || '.' || ObjList(i).ObjName || ' ' || ObjList(i).ObjType || ' ' || ObjList(i).partname);
END LOOP;
END;
/


ref: http://oraclespin.wordpress.com/2009/04/19/how-to-find-the-tables-that-have-stale-statistics/



DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'AR_SILVER1_AUTOSLIM', objlist=>ObjList, options=>'LIST STALE');