Posts

Showing posts from January, 2015

Script to get the list of sessions for a user currently in the Database

Script to get the list of sessions for a user currently in the Database select sid,serial#,username,status,module,command, to_char(logon_time,'dd-mm-yy hh:mi:ss') "LOGON", program,last_call_et from v$session where username like '%&usr%' order by logon_time;  Changes the usr as per your requirement.

RMAN Script to take a Hot Backup of Database using Catalog

RMAN Script to take a Hot Backup of Database using Catalog # This script can be used to take a hot backup using RMAN. # Some of the variables in the initial section of the script need to have valid values # Set the catalog to the catalog database # This script will also mail errors encountered in the backup process # ============================= #!/bin/sh export ORACLE_SID=PROD export ORACLE_HOME=.... export PATH=$ORACLE_HOME/bin:$PATH export TNS_ADMIN=$ORACLE_HOME/network/admin DBA="himanshu.apps@gmail.com" INST=`hostname` TODAY=`date +%d%b` BACKUP_DIR=/u01/backup/ LOG_DIR=/u01/backup/logs LOGFILE=$LOG_DIR/rman_backup_${ORACLE_SID}_${TODAY}.log ERRFILE=$LOG_DIR/err_status.log $ORACLE_HOME/bin/rman <<EOF > ${LOG_DIR}/rman_backup_${ORACLE_SID}_${TODAY}.log connect target/ connect catalog rman/rman@rmandb run { allocate channel t1 TYPE DISK; setlimit channel t1 kbytes 2048000; allocate channe...

FRM-92101: There was a failure in the Forms Server during startup. This could happen due to invalid configuration. - R12 Form Issue

Image
FRM-92101: There was a failure in the Forms Server during startup. This could happen due to invalid configuration. Scenario: After cloning, While launching the forms we get the following error Error : FRM-92101: There was a failure in the Forms Server during startup. This could happen due to invalid configuration. Please look into the web-server log file for details. Cause: This is due to ldflags pointing to wrongly to PROD server which should points to (TEST/DEV) respective server. Solution: Source the Apps environment Bring down the application Cd $ORACLE_HOME/lib ls –lrt ldflags  -Would be pointing to production location unlink  ldflags ln -s   /u01/test/apps/tech_st/10.1.2/lib/ldflags ldflags (link to the right path) cd $ORACLE_HOME/forms/lib32/ make -f ins_forms.mk install Now restart the application and check for the same.

How to create APPS readonly user in Oracle Applications

Step 1: Create Apps Read only user. Connect as SYS user to create APPSRO user create user appsro identified by appsro default tablespace APPS_TS_TX_DATA; grant connect, resource to appsro; grant create synonym to appsro; exit;  Step 2: Connect to apps user now to get the synonyms and grant details.  Connect as APPS user and run the SQL commands: bash $ sqlplus apps/apps SQL>set head off SQL> set newpage none SQL> set pagesize 9999 SQL> spool  create_synonyms.sql  SQL> select ‘create synonym ‘ || OBJECT_NAME || ‘ for ‘ || OWNER ||’.’ ||OBJECT_NAME || ‘;’ from all_objects where OWNER not in (‘SYS’,’SYSTEM’) and OBJECT_NAME not like ‘%/%’ and OBJECT_TYPE in (‘TABLE’,’VIEW’,’SYNONYM’,’PACKAGE’,’PACKAGE BODY’,’PROCEDURE’,’FUNCTION’);  SQL> spool off  SQL> spool  grant_select.sql  SQL> select ‘grant select on ‘|| OWNER ||’.’ ||OBJECT_NAME || ‘ to appsro;’ from all_objects where OWNER not in (‘SYS...