Category Archives: howto

How to reproduce ORA-04031

You are able to reproduce the ORA-04031 with shared pool depletion by pin dbms_shared_pool procedure by all the cursor on the SGA as shown below, it prohibits the release.
 

 conn / as sysdba
declare
i number;
j char (30);
sqlstr varchar2 (100);
cursor cur_pin is
select rawtohex (address) | | ',' | | to_char (hash_value)
from sys.v_ $ sql where kept_versions = 0;
rec_pin varchar2 (1000);
begin
i: = 1;
loop
loop
i: = i +1;
exit when i mod 1000 = 0;
sqlstr: = 'select''' | | i | |'' 'from dual';
execute immediate sqlstr into j;
end loop;
open cur_pin;
loop
fetch cur_pin into rec_pin;
exit when cur_pin% notfound;
dbms_shared_pool.keep (rec_pin, 'x');
end loop;
close cur_pin;
end loop;
end;
/ 
 
Source: http://www.doppo1.net/oracle/trouble/ORA-04031.html

HOW TO: Disable DNS caching

For Solaris:
To disable the DNS cache on Solaris
1. Edit the file /etc/nscd.conf as follows:
a. un-comment the line # enable-cache hosts no.
b. add the line enable-cache ipnodes no after the line above.
2. To activate the changes, restart the nscd daemon by typing the command:
$ svcadm restart svc:/system/name-service-cache

For AIX:
To disable the DNS cache on AIX 6.1
DNS caching is managed by the network caching daemon (netcd).
1. stop the network caching daemon : #stopsrc -s netcd
2. prevent the network caching daemon from starting at boot time, edit the file /etc/rc.tcpip:
a. comment the line for the netcd daemon as follows:
# Start up binld daemon
#start /usr/sbin/binld “$src_running”
For more information see IBM Technote T1010925

For Linux:
To disable the DNS cache on Linux
1. Edit the file /etc/nscd.conf as follows:
a. un-comment or update the line to reflect: enable-cache hosts no
2. To activate the changes, restart the nscd daemon by typing the command:
# service nscd restart
3. Make sure the dnsmasq service not running:
a. stop the service : # service dnsmasq stop
b. disable the service from starting at boot time :
# chkconfig dnsmasq off
# chkconfig –list dnsmasq
dnsmasq         0:off   1:off   2:off   3:off   4:off   5:off   6:off
#

Pagefile Management for Windows Server Core

First you need to disable the automatic management:

wmic
>computersystem where name=”hostname” set AutomaticManagedPagefile=False

Next, you select where to put the pagefile and how big it should be (expressed in MB)

wmic
>pagefileset where name=”C:\pagefile.sys” set InitialSize=8192,MaximumSize=8192

More info : http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2007/12/27/page-files-in-server-core.aspx

Free eBook: Understanding Microsoft Virtualization R2 Solutions

Learn about the latest Microsoft Virtualization technologies, including Hyper-V and Windows Azure. Download Understanding Microsoft Virtualization R2 Solutions, written by industry expert Mitch Tulloch along with the Microsoft Virtualization team.

http://blogs.technet.com/b/johnbaker/archive/2011/11/04/free-ebook-understanding-microsoft-virtualization-r2-solutions.aspx