Wednesday, January 31, 2018


Find ORACLE_SID

There are several commands, some internal and some external to Oracle that will find your current ORACLE_SID.  Within Oracle (SQL*Plus) you can display your ORACLE_SID with any of these commands:

SQL>  select distinct sid from v$mystat;

SQL>  select * from global_name;

SQL>  select instance from v$thread;

SQL> select name from v$database;


There are also external commands that show the current settings for the ORACLE_SID variable:

[oradev@test ~]$ . /u01/dev/devdb/tech_st/11.2.0/DEV_test.env

[oradev@test ~]$ ps -ef | grep pmon

oradev 8034 1 0 Jan29 ? 00:00:34 ora_pmon_DEV
orarman 19983 1 0 2017 ? 00:19:40 ora_pmon_rmandb
oradev 29537 29494 0 12:00 pts/6 00:00:00 grep pmon

Tuesday, January 30, 2018



Hyper-V Linux Client Can't Talk To Network

#tail -f /var/log/messages
#tail -f -n 200 /var/log/messages

Eventually dmesg fills up with noise like:

eth2: 21140 transmit timed out, status fc6981c7, SIA fffffe00 00000068 00000070 fffffec8, resetting...
(or whatever your eth device is).

Solution:

# chkconfig irqbalance off 

# reboot


(Source)

Friday, January 19, 2018


How to resolve error "-bash: fork: retry: Resource temporarily unavailable" launching wsadmin scripts

Increasing the value of the ulimit -u (NPROC - max user processes) setting will prevent and eliminate the problem.
Check the current values of ulimit settings by issuing the following command as root (superuser) user:
ulimit -a
Red Hat Enterprise Linux v6 has default values of 1024 for both ulimit -u (nproc : maximum user processes) and ulimit -n (nofiles : open files : file descriptors) which are grossly inadequate for WebSphere environments.
WebSphere Support recommends a value of '131072' for NPROC. Engage the Unix / Linux System Administrator, to login to the affected Linux system or server as root (superuser) user, and issue the following command:
ulimit -u 131072
The value of the ulimit -n (NOFILES) setting should also be increased to the recommended value of '65536' at the same time, if it is at the default value of 1024, or a lower value than 65536, in order to prevent a variety of failures in WebSphere environments that can occur during install, update, jvm startup, application startup, administration, and application deployment operations, by issuing the following command as root user:
ulimit -n 65536

Tuesday, January 16, 2018


CHANGE SYS PASSWORD IN ORACLE

1. Re-create password file

If you want to reset the password of sys. you can recreate the password file with below cmd.
$ orapwd
Usage: orapwd file=<fname> password=<password> entries=<users> force=<y/n> nosysdba=<y/n>
where
file – name of password file (mand),
password – password for SYS (mand),
entries – maximum number of distinct DBA,
force – whether to overwrite existing file (opt),
nosysdba – whether to shut out the SYSDBA logon (opt for Database Vault only).
There are no spaces around the equal-to (=) character.


[root@test devapps]# su - oradev
[oradev@test ~]$ . /u01/dev/devdb/tech_st/11.2.0/DEV_test.env
[oradev@test ~]$ orapwd file=$ORACLE_HOME/dbs/orapwDEV password=oracle entries=30


2. Type the following commands:

$ sqlplus "/ as sysdba"


 SQL> ALTER USER SYS IDENTIFIED BY [password]; 

 SQL> ALTER USER SYSTEM IDENTIFIED BY [password];

Sunday, November 12, 2017



ORA-28001: the password has expired

sqlplus /nolog 

SQL> connect / as SYSDBA 

Connected.

--------------------------------------------------------------------------------------------------------------------------

check "PASSWORD_LIFE_TIME" by

Sql > select * from dba_profiles;

Set to Never expire

Sql> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Then reset the password of locked user

Sql> alter user myuser identified by mynewpassword account unlock;

--------------------------------------------------------------------------------------------------------------------------



Friday, November 10, 2017


ORA-03113: end-of-file on communication channel

[root@testwms orawms]# ps -ef |grep smon
orawms    6818     1  0 15:49 ?        00:00:00 ora_smon_AAD
oradev    6930     1  0 Oct19 ?        00:03:09 ora_smon_ADV
oradev    7500     1  0 Oct19 ?        00:02:08 ora_smon_AAD4
root      8068  3227  0 15:55 pts/2    00:00:00 grep smon
orawms    9300     1  0 Oct19 ?        00:03:13 ora_smon_AAD3


Case:

While trying to open db 11g on linux machine we encounter the error ORA-03113: end-of-file on communication channel.



Investigation and solution:

Returning back to the alert log file we can see the following lines:

*************************************************************************************

ORA-19815: WARNING: db_recovery_file_dest_size of 5368709120 bytes is 100.00% used, and has 0 remaining bytes available.

************************************************************************

You have following choices to free up space from recovery area:

1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,

then consider changing RMAN ARCHIVELOG DELETION POLICY.

2. Back up files to tertiary device such as tape using RMAN

BACKUP RECOVERY AREA command.

3. Add disk space and increase db_recovery_file_dest_size parameter to

reflect the new space.

4. Delete unnecessary files using RMAN DELETE command. If an operating

system command was used to delete files, then use RMAN CROSSCHECK and

DELETE EXPIRED commands.

************************************************************************

Errors in file /u01/app/oracle/diag/rdbms/mostprod/mostprod/trace/mostprod_ora_11853.trc:

ORA-19809: limit exceeded for recovery files

ORA-19804: cannot reclaim 42960384 bytes disk space from 5368709120 limit

ARCH: Error 19809 Creating archive log file to ‘/u01/flash_rec_area/MOSTPROD/archivelog/2012_11_21/o1_mf_1_177_%u_.arc’

Errors in file /u01/app/oracle/diag/rdbms/mostprod/mostprod/trace/mostprod_ora_11853.trc:

ORA-16038: log 3 sequence# 177 cannot be archived

ORA-19809: limit exceeded for recovery files

ORA-00312: online log 3 thread 1: ‘/u01/app/oracle/oradata/mostprod/redo03.log’

*************************************************************************************

As you can see the probles is regarding the archive log area is ran out of space.

To solve this issue:
We can follow any of the given suggestions but what we do in our case is to archive some old archived logs and delete then from the archive log area.
Optionally you may change the archive log retention policy to a suitable period of time.
As we remove the archived log files through the OS command we need to tell the database about what we did that is using rman otherwise the database will still failed to open. So…

SQL> startup — Failed to startup, the same ORA-03113 Error

SQL> startup nomount — ORACLE Instance Started

SQL> alter database mount — Database altered

SQL> exit

$ cd $ORACLE_HOME/bin

$ ./rman target /

RMAN> crosscheck archivelog all — Here you will see all the names of archivelogs still exist

RMAN> delete expired archivelog all

RMAN> exit

$ sqlplus / as sysdba

SQL> alter database open — Database altered

Thursday, November 9, 2017


Auto config in Oracle Apps R12 adautocfg.sh


Autoconfig is tool/utility to reconfigure your Oracle Application configuration files using context (XML file) and template files, more information here and here

This post covers steps to run Autoconfig in Oracle Apps R12 (steps are similar to 11i, only change is location of autoconfig script and log files)

.

A) Running Autoconfig on R12 environment Application Tier

1. Login as user owning application tierfor R12 (usually applmgr)

2. Set environment variable by executing env file $INSTALL_BASE/ apps/ apps_st/ appl/ APPL[$SID]_[$hostname].env

3. cd $ADMIN_SCRIPTS_HOME (or $INSTALL_BASE/apps/$CONTEXT_NAME/ admin/ scripts)

4. run adautocfg.sh (Autoconfig script)
 ./adautocfg.sh or sh adautocfg.sh  provide apps password when prompted.
.
B) Running Autoconfig on R12 environment Database Tier

1.Login as user owning database tier for R12 (usually oracle)

2. Set environment variable by executing env file $INSTALL_BASE/ db/ tech_st/ [11.1.0 or 10.2.0]/ [$SID]_[$hostname].env

3. cd $ORACLE_HOME/ appsutil/ scripts/ $CONTEXT_NAME

4. run adautocfg.sh (Autoconfig script)
./adautocfg.sh or sh adautocfg.sh

5. Provide apps password when prompted

Things good to know about Autoconfig in R12
1. Autoconfig logs for R12 application tier are at

$INSTALL_BASE/inst/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log ($INST_TOP/admin/log/[$MMDDhhmm])

2. Autoconfig logs for R12 Database tier are at[$RDBMS_ORACLE_HOME]/appsutil/log/[$CONTEXT_NAME]/[$MMDDhhmm]/adconfig.log



3. R12 system is autoconfig enabled and uses context file stored in [INST_TOP]/appl/admin/[CONTEXT_NAME].xml (Application Tier)
and
[$DATABASR_ORACLE_HOME]/appsutil/[$CONTEXT_NAME].xml (Database Tier)


Related
387859.1 Using AutoConfig to Manage System Configurations in Oracle E-Business Suite Release 12

 RMAN Recovery Catalog About Recovery Catalog RMAN recovery catalog Is another database which is out of your normal databases or which is o...