Monday 21 December 2015

ORA-09925: Unable to create audit trail file SVR4 Error: 13: Permission denied login with /as sysdba


ORACLE 10G  and 11.2.0.3

Login with /as sysdba
ORA-09925: Unable to create audit trail file 
SVR4 Error: 13: Permission denied 


Problem:-  I have installed a 10g database with Oracle owner, group DBA and it is working fine with Oracle owner.

Again I have created a  new user USER1 and add it in DBA group and also in other group in which Oracle user exists to run same command as Oracle user .

But getting below error.

su - user1
password:-
-bash-3.2$ . oraenv
ORACLE_SID = [] ? orcl
-bash-3.2$ sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Dec 22 06:17:32 2015

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter user-name: /as sysdba
ERROR:
ORA-09925: Unable to create audit trail file
SVR4 Error: 13: Permission denied
Additional information: 9925
ORA-09925: Unable to create audit trail file
SVR4 Error: 13: Permission denied
Additional information: 9925


Solution:- 

1. Login with Oracle owner and change the file permission as mentioned below.

cd /u01/app/oracle/product/10.2/dbhome/bin/

$ls -lrth oracle
$-rwxr-x--x   1 oracle   oinstall    120M Jun 24  2015 oracle

$chmod 6751 oracle
$ls -lrth oracle
$-rwsr-s--x   1 oracle   oinstall    120M Jun 24  2015 oracle

2.Now login with user1

-bash-3.2$ . oraenv
ORACLE_SID = [user1] ? orcl
-bash-3.2$ sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Dec 22 07:04:21 2015

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode from V$database;

NAME      OPEN_MODE
--------- ----------
ORCL     READ WRITE




Wednesday 9 December 2015

STEPS FOR APPLYING PSU ON ORACLE 11G DATABASE AND GRID HOME.

STEPS FOR APPLY PSU6 ON ORACLE 11G DATABASE AND GRID HOME.


1.    Download the PSU6 for 11.2.0.4 Grid Infrastructure (Patch Number 20485808) from https://support.oracle.com for according to your operating system and version.


2.    Login as grid user and unzip the patch

$ cd /u02/orabackup/patch/PSU6
$ unzip p20485808 solarix-64.zip


3.    Check the Opatch utility version and Patch applied on Both Oracle and GRID home before applying PSU6. By running below command

                                          i.    $ORACLE_HOME/OPatch/opatch version (check version is upgraded)
                                         ii.    $ORCLE_HOME/OPatch/opatch lsinventory(check inventory is displayed without any errors)

                                        iii.    $GRID_HOME/OPatch/opatch version (check version is upgraded)
                                       iv.    $GRID_HOME/OPatch/opatch lsinventory(check inventory is displayed without any errors)

Note:-Opatch utility should be of latest version before applying PSU. If you don’t have latest Opatch version you can download  it via oracle support.

4.    Create OCM response file for database home.  (Login as oracle user)
$. oraenv
  orcl
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/orabackup/ocmrep_PSU6.rsp


5.    Stop database (oracle user)
srvctl stop database -d  orcl

6.    Apply patch on GI home from Root user.
bash-3.2# id
uid=0(root) gid=0(root)
bash-3.2# cd /u02/orabackup/patch/PSU6/20485808
bash-3.2# hostname
orclserver
bash-3.2# /u01/app/grid/product/11.2.0/grid/OPatch/opatch auto /u02/orabackup/patch/PSU6/20485808 -ocmrf /u02/orabackup/ocmrep_PSU6.rsp
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /u02/orabackup/patch/PSU6 -patchn 20485808 -ocmrf /u02/orabackup/ocmrep_PSU6.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2015-12-08_19-30-15.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2015-12-08_19-30-15.report.log

2015-12-08 19:30:15: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params

Stopping RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

patch /u02/orabackup/patch/PSU6/20485808/20299013  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1
patch /u02/orabackup/patch/PSU6/20485808/20420937/custom/server/20420937  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1

Stopping CRS...

Stopped CRS successfully

patch /u02/orabackup/patch/PSU6/20485808/20299013  apply successful for home  /u01/app/grid/product/11.2.0/grid

patch /u02/orabackup/patch/PSU6/20485808/20420937  apply successful for home  /u01/app/grid/product/11.2.0/grid
patch /u02/orabackup/patch/PSU6/20485808/20299019  apply successful for home  /u01/app/grid/product/11.2.0/grid

Starting CRS...
CRS-4123: Oracle High Availability Services has been started.

Starting RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Started RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

opatch auto succeeded.

7.    Change permission of oracle binaries (grid user)
$. oraenv
+ASM
$ls -lrth /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle 
$ORACLE_HOME/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
$ls -lrth /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle

8.    Check opatch lsinventory once patch is applied from both grid and oracle (rdbms) home and start database.

ORACLE USER
$. oraenv
orcl
     $ $ORACLE_HOME/OPatch/opatch lsinventory
     GRID  USER
$. oraenv
orcl
     $ $ORACLE_HOME/OPatch/opatch lsinventory

9.    Check the status of ASM resource and start the Oracle database.

     (from grid home only)
     $crsctl stat res -t
(from database home only)
     $srvctl start database -d  orcl
Note  : In case database is not started using srvctl start it using sqlplus command
           
10.  Apply PSU to database.

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql