cancel
Showing results for 
Search instead for 
Did you mean: 

Chatr command & Oracle

Ankit Grover
Frequent Advisor

Chatr command & Oracle

Hi,

I want to decrease virtual memory data page size. I was trying to do the same using CHATR. But facing problems with permissions. I tried it with Oracle user having full permissions.

oracle-/home/oracle$/usr/bin/chatr +pd D /oracle/product/9.2/bin/oracle
/oracle/product/9.2/bin/oracle:
current values:
64-bit ELF executable
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /oracle/product/9.2/rdbms/lib/:/oracle/product/9.2/lib/:/usr/lib/hpux64:/opt/langtools/lib/hpux64
shared library list:
libodm9.so
libskgxp9.so
libskgxn9.so
libjox9.so
librt.so.1
libnss_dns.so.1
libdl.so.1
libm.so.1
libpthread.so.1
libCsup.so.1
libunwind.so.1
libc.so.1
shared library binding:
deferred
global hash table disabled
global hash table size 1103
shared library mapped private disabled
shared library segment merging enabled
shared vtable support disabled
explicit unloading disabled
segments:
index type address flags size
7 text 4000000000000000 z---c- 16M
8 data 6000000000000000 ---m-- L (largest possible)
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled
address space model: default
caliper dynamic instrumentation disabled
chatr(error): cannot open file for writing /oracle/product/9.2/bin/oracle
oracle-/home/oracle$ll -rt /oracle/product/9.2/bin/oracle
-rwsr-s--x 1 oracle dba 178518464 Apr 4 2006 /oracle/product/9.2/bin/oracle
oracle-/home/oracle$id
uid=106(oracle) gid=104(dba)

Please help.
Ankit
7 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Chatr command & Oracle

You first have to chmod +w, then run chatr, then chatr -w.
Ankit Grover
Frequent Advisor

Re: Chatr command & Oracle

The file permissions are already with Write for Oracle user.

oracle-/home/oracle$ll -rt /oracle/product/9.2/bin/oracle
-rwsr-s--x 1 oracle dba 178518464 Apr 4 2006 /oracle/product/9.2/bin/oracle
Rasheed Tamton
Honored Contributor

Re: Chatr command & Oracle

Hi Anil,

Can you do a trace or tusc on the chatr. Might be some kind of permission or relinking issue.

Hope you have correctly set the env varilables.

Also do a ldd $ORACLE_HOME/bin/oracle

Regards,
Rasheed Tamton.
Ankit Grover
Frequent Advisor

Re: Chatr command & Oracle

The ouput od LDD is:
(oracle)hpux1572:/etc>ldd $ORACLE_HOME/bin/oracle
libodm9.so => /oracle/product/9.2/lib//libodm9.so
libskgxp9.so => /oracle/product/9.2/lib//libskgxp9.so
libskgxn9.so => /oracle/product/9.2/lib//libskgxn9.so
libjox9.so => /oracle/product/9.2/lib//libjox9.so
librt.so.1 => /usr/lib/hpux64/librt.so.1
libnss_dns.so.1 => /usr/lib/hpux64/libnss_dns.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
libm.so.1 => /usr/lib/hpux64/libm.so.1
libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1
libCsup.so.1 => /usr/lib/hpux64/libCsup.so.1
libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
libc.so.1 => /usr/lib/hpux64/libc.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
libuca.so.1 => /usr/lib/hpux64/libuca.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1

But I did not get how to trace CHATR. Can you elaborate it please?
Dennis Handly
Acclaimed Contributor

Re: Chatr command & Oracle

>The file permissions are already with Write for Oracle user.

(Ah, you did provide it the first time.) They look like it. But you can't chatr (change) an executable while it is running.

>But I did not get how to trace CHATR. Can you elaborate it please?

$ tusc -o tusc.out chatr +pd D /oracle/product/9.2/bin/oracle

Then provide tusc.out.
Ankit Grover
Frequent Advisor

Re: Chatr command & Oracle

The TUSC utility is not there on our server.
oracle-/home/oracle$tusc -o tusc.out chatr +pd D /oracle/product/9.2/bin/oracle
su: tusc: not found.

I tried through root user:
[root]/#find / -name tusc
[root]/#

Dennis, but as you have mentioned that this might be due to running state of Oracle executable. But before halting all DB operations at our development center, I just want to confirm whether the things I am doing are going to help my cause or not?

We are facing lots of memory allocation problems on our Unix box. One possible cause & remedy which I have found is:

Decrease the virtual memory data page size for the Oracle9i release 2 (9.2.0.1.0) executable as necessary. Alter the page size setting with the following command:
/usr/bin/chatr +pd newsize $ORACLE_HOME/bin/oracle

Currenly the size id L(Largest), I was trying to make it D(Default). Can I go ahead with this?
Dennis Handly
Acclaimed Contributor

Re: Chatr command & Oracle

>The TUSC utility is not there on our server.

You can get this from anonymous ftp from:
ftp.cup.hp.com
~ftp/dist/networking/tools/
Then pick the right one:
-rw-r--r-- 1 root 628232 Sep 12 2005 tusc.7.8.ia64.shar
-rw-r--r-- 1 root 327213 Sep 12 2005 tusc.7.8.pa.shar

>I just want to confirm whether the things I am doing are going to help my cause or not?

I'm not sure about that.

>We are facing lots of memory allocation problems on our Unix box.

You could just by more memory. I assume you have enough swap space but there is a performance issue with it?

>Currenly the size id L(Largest), I was trying to make it D(Default). Can I go ahead with this?

Hopefully tusc should give you the correct error. I found you do have to add the -fp options so you get the right child chatr.
Here I'm using a copy of chatr on itself:
$ tusc -fp -o tusc.out ./chatr +q3p enable chatr
[13554] open("chatr", O_RDWR, 0666) ......... ERR#26 ETXTBSY

You could try. You could copy to oracle.new and chatr that. Then do:
$ ln oracle oracle.old
$ ln -f oracle.new oracle

I'm not sure if this is safe if you are using oracle and it tries to fork/exec and would get a new version?