This discussion is archived
3 Replies Latest reply: Jul 6, 2013 5:56 PM by NeilZhang RSS

srvctl change OS user during start database

6b47573c-d94d-469a-8d6e-7c85827ad4a3 Newbie
Currently Being Moderated

Scenario:

Aix 7.1

Oracle Grid Infrastructure Standalone Server 11.2.0.3

Patch 16083653: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.3.6 (INCLUDES DB PSU 11.2.0.3.6)

 

Oracle RDBMS Single Instance Installation 11.2.0.3

Patch 16056266: DATABASE PATCH SET UPDATE 11.2.0.3.6 (INCLUDES CPUAPR2013)

Patch 16036950: N-APPLY PATCH 11.2.0.3 FOR CRITCAL AIX BUGS BUNDLE #1

 

Owner of Grid Install is grid11g

Owner of RDBMS Install is ora11g

 

After install both binaries and patches, i created +ASM instance and Diskgroups using raw device (OS user grid11g).

Using DBCA i created a single instance, executing all scripts in manual mode (OS user ora11g).

 

Add instance to clusterware using:

srvctl add database -d "$SID" -o /ora11g/app/product/11.2.0.3/$SID -p "+DG_$SID_DATA/$SID/spfile$SID.ora" -n "$SID" -a "DG_$SID_DATA"

 

My problem is:

When i start database with logged user ora11g using command: srvctl start database -d $SID, all process of instance are started with grid owner install (grid11g).

output of ps -ef | grep $SID

 

grid11g 5439526   1   2 21:04:53  -  0:00 oracle$SID (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid11g 5963952   1   0 21:04:35  -  0:00 ora_dbw4_$SID
grid11g 6488118   1   3 21:04:53  -  0:00 ora_m002_$SID
grid11g 6619268   1   0 21:04:35  -  0:00 ora_dbw7_$SID
grid11g 6684858   1   0 21:04:44  -  0:00 ora_o001_$SID
grid11g 6881424   1   0 21:04:35  -  0:00 ora_smon_$SID
grid11g 7078066   1   0 21:04:35  -  0:00 ora_ocf0_$SID

 

But when i start database using sqlplus /nolog;conn / as sysdba; startup open. All process of instance started with correct owner (ora11g).

output of ps -ef | grep $SID

  ora11g 5963950   1   0 20:22:16  -  0:00 ora_s000_$SID
  ora11g 6619262   1   0 20:22:15  -  0:00 ora_ckpt_$SID
  ora11g 7143426   1   0 20:22:16  -  0:01 ora_mmnl_$SID
  ora11g 7340278   1   0 20:22:15  -  0:00 ora_dbw6_$SID
  ora11g 7536702   1   0 20:22:15  -  0:00 ora_lgwr_$SID
  ora11g 7798912   1   0 20:27:30  -  0:00 ora_smco_$SID
  ora11g 7930010   1   0 20:22:15  -  0:00 ora_dbw2_$SID

 

Has anyone had any similar situation?

 

Thanks for help

 

Gustavo

 

Output:

With ora11g

srvctl config database -d $SID

Database unique name: $SID

Database name:

Oracle home: /ora11g/app/product/11.2.0.3/$SID

Oracle user: ora11g

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: MANUAL

Database instance: $SID

Disk Groups: DG_$SID_DATA


With grid11g

crsctl stat res ora.$SID.db -p

NAME=ora.$SID.db

TYPE=ora.database.type

ACL=owner:grid11g:rwx,pgrp:dba:r-x,other::r--,group:dba:r-x,user:ora11g:rwx

ACTIVE_PLACEMENT=1

AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%

AUTO_START=never

CARDINALITY=1

CHECK_INTERVAL=1

CHECK_TIMEOUT=30

CLUSTER_DATABASE=false

DATABASE_TYPE=SINGLE

DB_UNIQUE_NAME=$SID

DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=database) PROPERTY(DB_UNIQUE_NAME= CONCAT(PARSE(%NAME%, ., 2), %USR_ORA_DOMAIN%, .)) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%) ELEMENT(DATABASE_TYPE= %DATABASE_TYPE%)

DEGREE=1

DESCRIPTION=Oracle Database resource

ENABLED=1

FAILOVER_DELAY=0

FAILURE_INTERVAL=60

FAILURE_THRESHOLD=1

GEN_AUDIT_FILE_DEST=/ora11g/app/admin/$SID/adump

GEN_START_OPTIONS=open

GEN_USR_ORA_INST_NAME=$SID

INSTANCE_FAILOVER=1

LOAD=1

LOGGING_LEVEL=1

MANAGEMENT_POLICY=MANUAL

OFFLINE_CHECK_INTERVAL=0

ONLINE_RELOCATION_TIMEOUT=0

ORACLE_HOME=/ora11g/app/product/11.2.0.3/$SID

PLACEMENT=balanced

RESTART_ATTEMPTS=1

ROLE=PRIMARY

SCRIPT_TIMEOUT=60

SERVER_POOLS=

START_DEPENDENCIES=weak(type:ora.listener.type,uniform:ora.ons) hard(ora.DG_$SID_DATA.dg)

START_TIMEOUT=600

STATE_CHANGE_TEMPLATE=

STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DG_$SID_DATA.dg)

STOP_TIMEOUT=600

TYPE_VERSION=3.2

UPTIME_THRESHOLD=1h

USR_ORA_DB_NAME=

USR_ORA_DOMAIN=

USR_ORA_ENV=

USR_ORA_FLAGS=

USR_ORA_INST_NAME=$SID

USR_ORA_OPEN_MODE=open

USR_ORA_OPI=false

USR_ORA_STOP_MODE=immediate

VERSION=11.2.0.3.0

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points