오라클이 아닌 다른 유저로 접속하는 방법(퍼온글)

오라클 owner 가 아닌 다른유저가 sqlplus 사용하기 위해

.profile 까지 다 세팅 해 놓은 상태에서 sqlplus 실행시 다음과 같은 에러 발생

PMODB1A:/home/pdauser]sqlplus /nolog
/usr/lib/pa20_64/dld.sl: Unable to find library ‘libsqlplus.sl’.
Killed

Oracle Version : 10.2.0.2 HP-UX Superdom V11.23

cd $ORACLE_HOME/lib

[PMOF] /oracle1/product/10.2.0/lib> ls -al libsqlplus.sl
-r-xr-xr-x   1 orafms     dba         916968 Feb 27 16:34 libsqlplus.sl

[PMOF] /oracle1/product/10.2.0/lib> ls -al libnnz10.sl
-r-xr-xr-x   1 orafms     dba        2559928 Feb 27 16:34 libnnz10.sl

Note:344772.1

/usr/lib/pa20_64/dld.sl: Mmap Failed For The Library `$ORACLE_HOME/lib/libsqlplus.sl

[PMOF] /oracle1/product/10.2.0/lib>  chmod 555 libsqlplus.sl
[PMOF] /oracle1/product/10.2.0/lib> chmod 555 libnnz10.sl
[PMOF] /oracle1/product/10.2.0/lib> ls -al libsqlplus.sl libnnz10.sl
-r-xr-xr-x   1 orafms     dba        2559928 Feb 27 16:34 libnnz10.sl
-r-xr-xr-x   1 orafms     dba         916968 Feb 27 16:34 libsqlplus.sl

위는 정상인데 which libsqlplus.sl 해주니 못찾음 원인은 $ORACLE_HOME/lib 디렉토리 권한 문제 lib 디렉토리 권한은 755 로변경

해주고 나니 다음과 같은 에러 발생

PMODB1A:/home/pdauser]sqlplus /nolog
/usr/lib/pa20_64/dld.sl: Unable to find library ‘libclntsh.sl.10.1’.
Killed

[PMOF] /oracle1/product/10.2.0/lib> ls -al libclntsh.sl.10.1
-rwxr-x—   1 orafms     dba        18942960 May  2 13:46 libclntsh.sl.10.1

[PMOF] /oracle1/product/10.2.0/lib> chmod 555 libclntsh.sl.10.1

[PMOF] /oracle1/product/10.2.0/lib> ls -al libclntsh.sl.10.1
-r-xr-xr-x   1 orafms     dba        18942960 May  2 13:46 libclntsh.sl.10.1

해주고 나니 이번에는 또 다음과 같은 에러 발생

PMODB1A:/home/pdauser]sqlplus /nolog
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Note:353315.1

Unable To Login Sqlplus, Message File Sp1.Msb Not Found

[PMOF] /oracle1/product/10.2.0/lib> cd $ORACLE_HOME/sqlplus

[PMOF] /oracle1/product/10.2.0/sqlplus> ls -al mesg*
total 490
drwxr-x—   2 orafms     dba           1024 May  2 13:24 .
drwxr-x—   9 orafms     dba           1024 May  2 13:24 ..
-rw-r–r–   1 orafms     dba           4096 Aug 14  2005 cpyko.msb
-rw-r—–   1 orafms     dba           4096 Aug 14  2005 cpyus.msb
-rw-r—–   1 orafms     dba           4369 Jun 17  2005 cpyus.msg
-rw-r–r–   1 orafms     dba          13824 Aug 14  2005 sp1ko.msb
-rw-r—–   1 orafms     dba          11776 Aug 14  2005 sp1us.msb
-rw-r—–   1 orafms     dba          17273 Jun 17  2005 sp1us.msg
-rw-r–r–   1 orafms     dba          32256 Aug 14  2005 sp2ko.msb
-rw-r—–   1 orafms     dba          31744 Aug 14  2005 sp2us.msb
-rw-r—–   1 orafms     dba         126498 Jun 17  2005 sp2us.msg

Note 356850.1

SP2-0750 and “Message File Sp1<Lang>.Msb Not Found” when Execute Sqlplus v10.2 as non-Oracle User on UNIX

chmod -R 755 $ORACLE_HOME/sqlplus

chmod 755 $ORACLE_HOME/sqlplus
chmod 755 $ORACLE_HOME/sqlplus/mesg
chmod 755 $ORACLE_HOME/sqlplus/mesg/sp1us.msb
chmod 755 $ORACLE_HOME/nls
chmod 755 $ORACLE_HOME/nls/data
chmod 755 $ORACLE_HOME/nls/data/lx1boot.nlb
chmod 755 $ORACLE_HOME/oracore
chmod 755 $ORACLE_HOME/oracore/zoneinfo
chmod 755 $ORACLE_HOME/oracore/zoneinfo/timezlrg.dat

위와 같이 해주니깐 정상적으로 작동됨

———————————————————————————————————————-

Note:344772.1

/usr/lib/pa20_64/dld.sl: Mmap Failed For The Library `$ORACLE_HOME/lib/libsqlplus.sl

In this Document
  Symptoms
  Cause
  Solution
  References

——————————————————————————–

This document is being delivered to you via Oracle Support’s Rapid Visibility (RaV) Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.

Applies to:
Oracle Server – Enterprise Edition – Version: 10.2.0.1.0
This problem can occur on any platform.

Symptoms
After cloning a 10.2.0.1 installation (using the instructions in Note 300062.1 or in the 10.2 OUI and OPatch Users Guide), some executables report errors. For example, SQL*Plus reports theNote 300062.1 or in the 10.2 OUI and OPatch Users Guide), some executables report errors. For example, SQL*Plus reports the following errors:

/usr/lib/pa20_64/dld.sl: Mmap failed for the library </u01/app/oracle/product/10.2.0/lib/libsqlplus.sl> : Bad address.
/usr/lib/pa20_64/dld.sl: Mmap failed for the library </u01/app/oracle/product/10.2.0/lib/libnnz10.sl> : Bad address.
svrmgrl: 9482 Floating exception(coredump)

The problem does not occur in the source home, only the cloned (target) home

The problem affects many of the executables in $ORACLE_HOME/bin

Relinking does not resolve the problem

Applying Patch 4516865 does not resolve the problem

Cause
The cloning process changes the file permissions on some libraries in the target $ORACLE_HOME/lib directory

A bug has been filed with Development to get this problem resolved

Solution
To implement the solution, please execute the following steps:

1. Manually change the permissions on these two libraries:

    cd $ORACLE_HOME/lib

    chmod 555 libsqlplus.sl

    chmod 555 libnnz10.sl

2. Confirm that the SQL*Plus utility now works without errors

If other executables report errors, compare the file permissions between the source and target homes and use the “chmod” command to correct any differences. Typically, the cloning process will have disabled execute permissions on the libraries.

———————————————————————————————————————

Note:353315.1

Unable To Login Sqlplus, Message File Sp1.Msb Not Found

In this Document
  Symptoms
  Cause
  Solution
  References

——————————————————————————–

This document is being delivered to you via Oracle Support’s Rapid Visibility (RaV) Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.

Applies to:
Oracle Server – Enterprise Edition – Version: 10.2.0.1.0
This problem can occur on any platform.

Symptoms
After the installation of 10.2.0.1, the UNIX acccount, other than dba group can’t login SQL*Plus

When running sqlplus getting  “Message file sp1<lang>.msb not found”

Here below are the errors:

Error 6 initializing SQL*Plus

Message file sp1<lang>.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Cause
The permission on ORACLE_HOME/sqlplus/mesg is 750 and the files (*.msb and *.msg) in this directory are -rw-r–r– and -rw-r—–

The ORACLE_HOME and subdirectories are not set correctly to access files within  them. They all have 750 instead of 755

This is bug 4516865 “WRONG PERMISSIONS AFTER INSTALLATION IN OH AND SUBSEQUENT DIRECTORIES”.

Also described in Note 4516865.8 – Bug 4516865 – Wrong permissions after install of 9.2.0.7 patch set

The problem is due to the umask is changed to 007 per OUI development during install.

After installing 10gR2 version,  the directories have wrong privileges.

Solution

1. Manually  change the permissions on all directories and files so that non oracle user
could access the mesg files . That resolves the problem

OR

2. Download and apply Patch 4516865 and follow the Post Install step in the README.txt.

References
Bug 4516865 – Wrong Permissions After Installation In Oh And Subsequent Directories
Note 4516865.8 – Bug 4516865 – Wrong permissions after install of 10gR2 (10.2.0.1)
Patch 4516865 – WRONG PERMISSIONS AFTER INSTALLATION IN OH AND SUBSEQUENT DIRECTORIES

——————————————————————————–

——————————————————————————————————-

Note 356850.1
SP2-0750 and “Message File Sp1<Lang>.Msb Not Found” when Execute Sqlplus v10.2 as non-Oracle User on UNIX

SymptomsNew installation of Oracle Database 10g Release 2 (10.2.0.1).

When execute ‘sqlplus’ as a user outside of the dba or Oracle group, you get the following errors.

Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Syntax:
$ sqlplus username/password

This problem did not occur in previous releases of Oracle.

Similar problems occur with other client tools, like IMP, EXP, etc.

CauseThe files that sqlplus needs to execute do not have read/execute permissions on the O/S level.

The source of the problem is base bug:
Bug 4516865 – Wrong Permissions After Installation In Oh And Subsequent Directories

For the client installation, which includes SQL*Plus, there are port specific bugs, some of which are:
Bug 4747264 – Wrong Permissions After Client Install Of 10gr2 (10.2.0.1) on LINUX
Bug 4932433 – Wrong Permissions After Client Install Of 10gr2 On Aix 5l (10.2.0.1).
Bug 4965571 – Wrong Permissions After Client Install Of 10gr2 (10.2.0.1) On Solaris

Wrong permissions are set on some files following installation of the 10gR2 base release (10.2.0.1).
Some directories under $ORACLE_HOME have no world read nor execute permission following the instal
l (e.g. rwxr-x—).
This can stop local users not in the oracle code owner group from connecting using the bequeath driver.

SolutionThere is a one-off patch for the base bug 4516865, but this fixes the permissions problem only on the ser
ver side.
Currently, there is still no patch for the client side. However, there are a couple of workarounds:

I. Logged in as the Oracle user (or the user that installed the 10gR2 software), manually change the permissions on the clie
nt. For example:

chmod -R 755 <client_home>

In our case:

chmod -R 755 $ORACLE_HOME/sqlplus

II. If doing a recursive permissions command is not acceptable, then you will need to pinpoint exactly what files the client is
reading at the time of execution, and manually change permissions only on those
files. In our case, we need to pinpoint what files are being accessed by SQL*P
lus. To implement this workaround, please execute the following steps:

1. As the non-Oracle user, run the truss utility to find out which files are being acc
essed. Sample command:
truss -aefo /tmp/truss_sqlplus.out sqlplus username/password

2. Use this truss_sqlplus.out trace file to see what files have error “EACCES” when attempting to access. In our case, the truss_sqlplus.out showed a pr
oblem accessing the following file:
$ORACLE_HOME/sqlplus/mesg/sp1us.msb

3. Logged in as the Oracle user, change permissions on folders leading up to, and inclu
ding sp1us.msb:

chmod 755 $ORACLE_HOME/sqlplus
chmod 755 $ORACLE_HOME/sqlplus/mesg
chmod 755 $ORACLE_HOME/sqlplus/mesg/sp1us.msb

4. After making above permission changes, a different error may appear when executing sqlplus as non-Oracle u
ser, such as:

$ sqlplus username/password
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
$

5. At this point, you need to re-run the truss (as non-Oracle) to see what other files are
trying to be accessed. In our case, the following files were trying to get acce
ssed, but showed “EACCES” failure:

$ORACLE_HOME/nls/data/lx1boot.nlb
$ORACLE_HOME/oracore/zoneinfo/timezlrg.dat

6. Logged in as the Oracle user, change permissions on these files and the directories leading up to these files.

chmod 755 $ORACLE_HOME/nls
chmod 755 $ORACLE_HOME/nls/data
chmod 755 $ORACLE_HOME/nls/data/lx1boot.nlb
chmod 755 $ORACLE_HOME/oracore
chmod 755 $ORACLE_HOME/oracore/zoneinfo
chmod 755 $ORACLE_HOME/oracore/zoneinfo/timezlrg.dat

7. Now, invoking sqlplus as a non-Oracle user was successful in our case.

ReferencesBug 4516865 – Wrong Permissions After Installation In Oh And Subsequent Directories
Bug 4747264 – Wrong Permissions After Client Install Of 10gr2 (10.2.0.1)
Bug 4932433 – Wrong Permissions After Client Install Of 10gr2 On Aix 5l (10.2.0.1).
Bug 4965571 – Wrong Permissions After Client Install Of 10gr2 (10.2.0.1) On Solaris
Note 110888.1 – How to Trace Unix System Calls

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 Akismet을 사용하여 스팸을 줄입니다. 댓글 데이터가 어떻게 처리되는지 알아보세요.