Monday, February 28, 2011

Oracle: Create New Table From a select statement:

CREATE TABLE new_table_name as (SELECT * FROM test WHERE  your_condition)

How to Clear Swap space usage on Linux

Sometime i want to remove swap space used  in the system. 

As root: run the command

swapoff -a && swapon -a

Thursday, February 24, 2011

ORACLE COMMON ADMINISTRATION QUERY

http://www.shutdownabort.com/dbaqueries/Administration_Session.php

ORACLE sql show current sql operation on DB

Select sql_text
from   v$sqlarea
where  (address, hash_value) in
(select sql_address, sql_hash_value
        from v$session
        where username like '&username')

Oracle/PLSQL: ORA-00018 Error

Error:
ORA-00018: maximum number of sessions exceeded.

Cause:
You tried to execute a statement that requested a resource. Since the maximum number of sessions have been reached, Oracle will not process any new resource requests.

The options to resolve this Oracle error are:
    You can wait a few minutes and try to re-execute the statement(s).
    You can shut down Oracle, increase the SESSIONS parameter in the initialization parameter file, and restart Oracle.

Apache performance tuning recomended by IBM

http://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.html

PHP OCI8 performace tuning

http://www.docstoc.com/docs/21514926/Performance-Tuning-for-PHP-with-Oracle-Databases

php : how to generate random code

This small function generate random code:

maybe used in generating  random password whatever i like :

$nc => is the total length of string required.

function randcode($nc, $a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') {
    $l=strlen($a)-1; $r='';
    while($nc-->0) $r.=$a{mt_rand(0,$l)};
    return $r;
}

Wednesday, February 23, 2011

ORA-00018, ORA-00020 maximum number of sessions exceeded

Error Description
Any operation or a new session creation is failed. Like,
ORA-00018: maximum number of sessions exceeded

ORA-00020: maximum number of processes (string) exceeded

In order to solve the problem you have to increase the value of the PROCESSES/ SESSIONS initialization parameter.

You can see the current settings of the SESSIONS and PROCESSES parameter value by querying from v$spparameter or by simply show parameter parameter_name.
SQL> col name format a30
SQL> col value format a10
SQL> select name, value from v$spparameter where name in ('processes','sessions');


NAME VALUE
------------------------------ ----------
processes 150
sessions

The explicitly value of the sessions parameter is not set and so it is left to blank. It's default value is derived from the processes parameter and value=1.1*process_parameter_value+5
You can calculate the default value of sessions parameter by,

SQL> select 1.1*value+5 "sessions par default value" from v$spparameter where name='processes';

sessions par default value
--------------------------
170

In order to change the value of the sessions you have to change it in spfile or pfile. Dynamically it can't be changed.

How to Solve the Problem


If your database start with spfile then,
Alter system set sessions=200 scope=spfile;
or simply you can consider to increase processes parameter by,
Alter system set processes=200 scope=spfile;
shutdown immediate;
startup;

If your database start with pfile then,
Open the pfile with an editor and edit the sessions parameter value and restart your database.

Similarly you can set the processes parameter.

Tuesday, February 22, 2011

How to calculate battery given Load

AH = A(watt)/t (hour)


http://www.powerstream.com/battery-capacity-calculations.htm

apache tuning:: calculate MaxClients

MaxClients ≈ (RAM - size_all_other_processes)/(size_apache_process)

Use 'ps -ylC httpd --sort:rss' to find process size. Divide number by 1024 to get megabytes. Also try 'top'.

Use 'free -m' for a general overview. The key figure to look at is the buffers/cache used value.

Use 'vmstat 2 5' to display the number of runnable, blocked, and waiting processes; and swap in and swap out.


Linux Apache Server Tuning Tips

After having trouble with connection problem with apache, make some tuning base on this guide-line
http://onlamp.com/pub/a/onlamp/2004/02/05/lamp_tuning.html

--
Regards,



ITBIT Technologies
. "We manage IT"



Monday, February 21, 2011

power ke ISO nih ... serial number ke

New updated serial codes!

Name: tupac

key: 7QJ8Y-ZTH15-ZMR5Q-MJE4G-PS8XK

Name: tupacshakur

key:74FHM-9FIY7-LLBBQ-LIFZB-V3­K12



--
Regards,



ITBIT Technologies
. "We manage IT"



Wednesday, February 9, 2011

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...