“Oracle SETASMGIDWRAP” (An illegitimate Google Whack)

When creating a database on a new or seldom used version of Oracle I always like to use the “Generate Database Creation Scripts” option of DBCA so I can have a look at what it’s going to do for me before I decide which scripts I want to run. I recently saw the following line in one of these scripts generated by an 11.2 DBCA:

host /u01/grid/11.2.0/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle 

The name is pretty self explanatory (it’s the step that changes the group ownership of the oracle binary from the software owner’s primary group (probably OINSTALL) to the OSASM group) but I thought I’d have a quick search on My Oracle Support to find out more…

No results found.

Nothing unusual there, since Metalink was downgraded to its present state I’ve become accustomed to this message :). Let’s try the Oracle documentation:

Your search term oracle setasmgidwrap did not match any topics.

Surely Google will hit something…

Your search – oracle setasmgidwrap – did not match any documents

No hits again. So I’ve created this post purely to create an illegitimate Oracle Google Whack. At least once this post is indexed by the search engines. It’s illegitimate by the way because:

A Googlewhack must consist of two actual words found in a dictionary.

Below is a demonstration of SETASMGIDWRAP in action (watch the group ownership on the oracle binary):

%*> ls -l $ORACLE_HOME/bin/oracle
-rwsr-s--x    1 oracle   oinstall  260199063 Jan 12 15:15 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
%*> $CRS_HOME/bin/setasmgidwrap o=$ORACLE_HOME/bin/oracle
%*> ls -l $ORACLE_HOME/bin/oracle
-r-sr-s--x    1 oracle   asmadmin  260199063 Jan 12 15:15 /u01/app/oracle/product/11.2.0/db_1/bin/oracle 
About these ads

13 thoughts on ““Oracle SETASMGIDWRAP” (An illegitimate Google Whack)

  1. Thank You for good idea.

    > $CRS_HOME/bin/setasmgidwrap o=$ORACLE_HOME/bin/oracle

    But we’re changing permission in $ORACLE_HOME/bin/oracle file. we should shutdown before or not …

    $ ls -l /u01/app/product/11.2.0/dbhome_1/bin/oracle
    -rwsr-s–x 1 oracle oinstall 211075466 Feb 25 10:58 /u01/app/product/11.2.0

    $ /u01/app/grid/bin/setasmgidwrap o=$ORACLE_HOME/bin/oracle

    $ ls -l /u01/app/product/11.2.0/dbhome_1/bin/oracle
    -r-sr-s–x 1 oracle osasm 211075466 Feb 25 10:58 /u01/app/product/11.2.0/dbhome_1/bin/oracle

    Alert Log:
    Sat Feb 27 03:23:10 2010
    Process m000 died, see its trace file
    Process m001 died, see its trace file
    Process m000 died, see its trace file
    Sat Feb 27 03:23:22 2010
    Errors in file /u01/app/diag/rdbms/orcl/orcl/trace/orcl_j000_30592.trc:
    ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 501 (oinstall), current egid = 506 (osasm)

    -)

    • Hi Surachart.
      You are correct, you want to shut down any instances using the oracle binary before changing the group. The second “s” in the file permissions is where your process picks up the effective group ID (EGID) of “osasm” (in your case). You now have a different EGID for the instance than for any new processes that will start and the instance doesn’t look too happy about it :) A restart should see you fine.
      It’s worth bearing in mind that you may not need to change the group at all. In my installation the “oracle” user has been used for the ASM home and the database home so the group isn’t too significant, just interesting.
      Kind regards

  2. Hi there,

    the question is:
    Why does oracle change the group during creation of a database? Right after installation (after linking) it would be more suitable…
    Even when I install a patch that relinks oracle binary, or when relink all, permissions are wrong again.
    For my point of view the action to change the group should be part of a post install script, like root.sh

    Regards Mathias Zarick

    • Hi Mathias (apologies for late reply – I didn’t get an email alerting me to the comment),
      This group change is only included if you use ASM. For filesystem based databases the commands are not put there by DBCA so I’m guessing the intention is to only change it when necessary – (which is foolproof as we all use DBCA don’t we ;)
      It’s not very joined up thinking though because if you start with a filesystem based database and then add a second ASM based one, DBCA will change the GID of the oracle binary and we’d get a situation like Surachart’s above.
      I’d not considered the impact of a relink – good thinking. I’m planning to apply the April PSU in a week or two so I’ll be sure to check the permissions afterwards.
      Thanks

  3. Pingback: ASMCMD privileges in Grid Infrastructure « ORAganism

    • Hi Eduardo,
      Which problem are you experiencing?
      Certainly if the ownership of the Oracle binary has changed while the instance was up then you’ll be having some problems. Either switching the permissions back or restarting the instance would fix the symptoms.
      It would be nice to know what error you have and what activity caused it though.
      Kind regards

  4. Pingback: Oracle Executables « Oracle Applications and OBIEE DBA

  5. I had same problem and see below messages . when I was creating instance on asm using dbca. instance was created but it killed all the existing instance . shutdown the new instace and restarted other instance and started new instance . no errors in alert log

    My understadning dbca has changed group permission at the time installion ( using ASM )

    ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 300 (oinstall), current egid = 312 (osasm)
    2011-12-13 10:01:52.435000 +11:00
    Process J000 died, see its trace file

    • Yes it certainly looks that way. Pre ASM the group for the oracle binary was oinstall but after installing ASM the group was changed to allow you to access the storage. Thanks for the information Raj.
      Regards
      Neil

  6. Hi Neil,

    I had the same problem, I am trying duplicate my PRD RAC ASM database to DEV RAC ASM. So when use rman comand duplicate database, i got the error bellow.

    channel ORA_AUX_DISK_1: restoring control file
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 04/26/2013 12:22:18
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-10038: database session for channel ORA_AUX_DISK_1 terminated unexpectedly

    my alert.log show me this error.
    ORACLE_BASE from environment = /u02/app/oracle/devvttk
    Errors in file /u02/app/oracle/devvttk/diag/rdbms/devvttk/devvttk1/trace/devvttk1_rbal_3339.trc:
    ORA-15183: ASMLIB initialization error [driver/agent not installed]
    WARNING: FAILED to load library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so
    Errors in file /u02/app/oracle/devvttk/diag/rdbms/devvttk/devvttk1/trace/devvttk1_rbal_3339.trc:
    ORA-15183: ASMLIB initialization error [driver/agent not installed]
    Mon Apr 29 10:18:02 2013
    SUCCESS: diskgroup DG_TTK was mounted
    Errors in file /u02/app/oracle/devvttk/diag/rdbms/devvttk/devvttk1/trace/devvttk1_ora_3379.trc (incident=359669):
    ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []
    Incident details in: /u02/app/oracle/devvttk/diag/rdbms/devvttk/devvttk1/incident/incdir_359669/devvttk1_ora_3379_i359669.trc
    Use ADRCI or Support Workbench to package the incident.

    I have changed the permission for $ORACLE_HOME/bin/oracle binary. and i receveid this error from rman.

    rman auxiliary /

    Recovery Manager: Release 11.2.0.3.0 – Production on Mon Apr 29 11:23:08 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04006: error from auxiliary database: ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 1020 (asmadmin)

    • Hi Mauro,
      I guess many DBAs will see this error at least once in their careers – hopefully only once though.
      Thanks for leaving a comment
      Neil

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s