Friday 25 March 2011

How find out active database user connection in Oracle

Use either one:

SELECT   'Currently, '    ||
 (SELECT COUNT(*) FROM V$SESSION)   || ' out of '    || VP.VALUE    || ' connections are used.' AS USAGE_MESSAGE FROM    V$PARAMETER VP WHERE VP.NAME = 'sessions' ;

SELECT   'Currently, '    || (SELECT COUNT(*) FROM V$SESSION)   || ' out of '    ||
DECODE(VL.SESSIONS_MAX,0,'unlimited',VL.SESSIONS_MAX)    || ' connections are used.' AS USAGE_MESSAGE FROM    V$LICENSE VL;

Wednesday 23 March 2011

how to find JDK or Java version in UNIX/Linux?

$which java
/usr/java/1.5.0

$java -version
java version "1.5.0"

Using AD Relink to Relink AD Executables

adrelink.sh force={y|n} [<optional args>] "<targets>"
or
adrelink.sh force={y|n} [<optional args>] filelist=<file>

The following is an example of using
adrelink.sh to force relink the
adadmin
module:
$adrelink.sh force=y "ad adadmin"

The following is an example of using
adrelink.sh to force relink the
adadmin
and adpatch modules:
$adrelink.sh force=y "ad adadmin""ad adpatch"

The following is an example of using
executables:
adrelink.sh to force relink all AD$adrelink.sh force=y "ad all"

Changing Application,Oracle and the APPLSYS/APPS password

An
example, an AP Specialist using Oracle Financials is defined as an application
user. An Oracle user is a database user only and is a schema owner of
modules that are used in the application; for example,
times it is necessary to change passwords for application users, Oracle
users, or the

$FNDCPASS APPS/APPS 0 Y system/manager USER grudd passwd#1

FNDCPASS [apps_user]/[apps_passwd] 0 Y system/[passwd] ORACLE
[user_name] [password]

FNDCPASS [apps_user]/[apps_passwd] 0 Y system/[passwd]
SYSTEM APPLSYS [password]

difference is the use of the
application user is a user that is defined in the E-Business Suite. ForAP, GL, and BEN. AtAPPS and APPLSYS passwords.
Note When changing the different types of user passwords with FNDCPASS, the primaryUSER, ORACLE, or SYSTEM parameter. The USER
parameter is for application users. The
owners. The

ORACLE parameter is used for Oracle schemaSYSTEM parameter is for changing the APPLSYS and APPS passwords.

Online Cloning E-Business Suite Without shutdown Apps & DB

Jul 292008
Our company runs Oracle E Business Suite 11.5.9 and 11.5.10, mostly application and database server running 24×7 to support production. We have own development team to enhance our applications regarding the user needs. And sometime our development team needs to refresh development server with current data and applications from production server. But we don’t have enough time to cloning applications and database if we have to shut it down first. To solve this problem, we have a solution to “On-line” cloning application and database from production into development. Some of these steps can be found on Note: 230672.1.
1.       Prepare the Source System
Execute the following commands to prepare the source system for cloning.
    a.       Prepare the source system database tier for cloning
  Log on to the source system as the ORACLE user and run the following commands:
    #  cd <RDBMS ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>
    # perl adpreclone.pl dbTier
           
b.       Prepare the source system application tier for cloning
Log on to the source system as the APPLMGR user and run the following commands on each node that contains an APPL_TOP:
    # cd <COMMON_TOP>/admin/scripts/<CONTEXT_NAME>
    # perl adpreclone.pl appsTier

2.       Copy the source system to the target system.
a.       For Application, we can copy it although the applications still using by user. We don’t need to shut down the application tier server processes.
Copy the following application tier directories from the source node to the target application tier node:
·   <APPL_TOP>
·   <OA_HTML>
·   <OA_JAVA>
·   <OA_JRE_TOP>
·   <COMMON_TOP>/util
·   <COMMON_TOP>/clone
·   <COMMON_TOP>/_pages  (when this directory exists)
·   <806 ORACLE_HOME>
·   <iAS ORACLE_HOME>
b.       For Database, we will do these steps :
·      Copy the database (DBF) files from the source to the target system using Hot Backup, we don’t need to shut the database down :
§      SQL> Alter Database Backup Controlfile to Trace;
(The trace file can be found on user_dump_dest directory, this file used for create control file on the target system).
§      SQL> select sequence# from v$log where status = ‘CURRENT’; (to get the first archive log before hot backup)
§      Alter tablespace Begin Backup
§      Copy the datafiles from source system to the target system
§      Alter tablespace End Backup
§      SQL> select sequence# from v$log where status = ‘CURRENT’; (to get the latest archive log after hot backup)
§      SQL> alter system switch logfile;
§      After that, copy the first and the latest archive log files (that we got from step 1 and 5) from the source system into the target system.
·      Copy the source database ORACLE_HOME to the target system

3.       Configure the Target System
Execute the following commands to configure the target system.  
a.     Configure the target system database server
To configure the database, first we can do as we do clone a database (Note: 224274.1).
After the database open, log on to the target system as the ORACLE user and type the following commands to configure: 
    # cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
    # perl adcfgclone.pl dbTechStack

b.    Configure the target system application tier server nodes
        Log on to the target system as the APPLMGR user and type the following commands:
          # cd <COMMON_TOP>/clone/bin
          # perl adcfgclone.pl appsTier.

And now, our development team no needs waiting for so long to get the scheduled downtime of the production environment, if they need to refresh the development server they can ask DBA anytime.