Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to LOCK_SGA on Solaris
Hi Frank,
you cannot lock shared memory segments as oracle as only root can lock shared memory on solaris. If you must use this parameter then you need to simulate the parameter in C so you can still start the database as oracle:
do the following in shell to get the shared segment id or use oradebug instead of ipcs
ipcs -m | grep oracle | awk '{print $2'} | while read segment do fix_in_core $segment
compile the following C program as fix_in_core.c
gcc -o fix_in_core fix_in_core.c
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <errno.h>
int main(int argc,char **argv)
{
int retval; int segment; segment=atol(argv[1]); retval=shmctl(segment, SHM_LOCK, (struct shmid_ds *)0); (retval==0)?printf("locked Segment %d\n",segment):perror("error locking segment %d\n",segment); exit(retval);
I did this from memory as i don't have a solaris box here today to test with but it should work for you.
kind regards
Pete
-- Pete Finnigan email:pete_at_petefinnigan.com Web site: http://www.petefinnigan.com - Oracle security audit specialists Book:Oracle security step-by-step Guide - see http://store.sans.org for details.Received on Wed Dec 31 2003 - 07:38:06 CST