Showing posts with label DBA. Show all posts
Showing posts with label DBA. Show all posts

Wednesday, June 17, 2015

Oracle Apps V$Session Tables: Find Session info

V$SESSION
This view lists session information for each current session.

V$PROCESS
This view contains information about the currently active processes. While the LATCHWAIT column indicates what latch a process is waiting for, the LATCHSPIN column indicates what latch a process is spinning on. On multi-processor machines, Oracle processes will spin on a latch before waiting on it.

V$SESSION_WAIT
V$SESSION_WAIT displays the current or last wait for each session.

V$SESSION_LONGOPS
This view displays the status of various operations that run for longer than 6 seconds (in absolute time).


Oracle standard scripts.
Session_waits.sql script uses the v$session_wait view to display a list of the events currently being waited on by active sessions.  This is useful when trying to discover what each active session is currently doing.


session_waits.sql

SET LINESIZE 200
SET PAGESIZE 1000

COLUMN username FORMAT A20
COLUMN event FORMAT A30
COLUMN wait_class FORMAT A15

SELECT NVL(s.username, '(oracle)') AS username,
       s.sid,
       s.serial#,
       sw.event,
       sw.wait_class,
       sw.wait_time,
       sw.seconds_in_wait,
       sw.state
FROM   v$session_wait sw,
       v$session s
WHERE  see code depot for full script
s.sid = sw.sid
ORDER BY sw.seconds_in_wait DESC;  

longops.sql
The use of the dbms_application_info package to register long operations was discussed in a previous section.  The longops.sql scripts uses the v$session_longops view to identify and monitor sessions performing long operations, including those registered using the dbms_application_info package.


COLUMN sid FORMAT 999
COLUMN serial# FORMAT 9999999
COLUMN machine FORMAT A30
COLUMN progress_pct FORMAT 99999999.00
COLUMN elapsed FORMAT A10
COLUMN remaining FORMAT A10

SELECT s.sid,
       s.serial#,
       s.machine,
       ROUND(sl.elapsed_seconds/60) || ':' || MOD(sl.elapsed_seconds,60) elapsed,
       ROUND(sl.time_remaining/60) || ':' || MOD(sl.time_remaining,60) remaining,
       ROUND(sl.sofar/sl.totalwork*100, 2) progress_pct
FROM   v$session s,
       v$session_longops sl
WHERE s.sid     = sl.sid
AND    s.serial# = sl.serial#;


Sessions.sql
The sessions.sql script uses the v$session view to provide information about all the sessions currently connected to the database instance.  In addition, the v$process view is used to provide the associated operating system process id (SPID) for each session.

SET LINESIZE 500
SET PAGESIZE 1000

COLUMN username FORMAT A15
COLUMN machine FORMAT A25
COLUMN logon_time FORMAT A20

SELECT NVL(s.username, '(oracle)') AS username,
       s.osuser,
       s.sid,
       s.serial#,
       p.spid,
       s.lockwait,
       s.status,
       s.module,
       s.machine,
       s.program,
       TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time
FROM   v$session s,
       v$process p
WHERE s.paddr = p.addr
ORDER BY s.username, s.osuser;

Wednesday, September 19, 2012

Oracle Apps: Forms Personalization Tables

Below is the list of tables that are populated when any Forms Personalization is done
FND_FORM_CUSTOM_RULES
FND_FORM_CUSTOM_SCOPES
FND_FORM_CUSTOM_ACTIONS
FND_FORM_CUSTOM_PARAMS
FND_FORM_CUSTOM_PROP_VALUES
FND_FORM_CUSTOM_PROP_LIST


Use FNDLOAD utility to move one instance to another.
Download:
FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XXPERSON.ldt FND_FORM_CUSTOM_RULES function_name="PERHRTTT"

Upload:
FNDLOAD apps/<Pwd> 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XXPERSON.ldt


at erp, erp, oracleapps, oracleapps erp, oracle erp, oracle ebusiness, oracle application,   
about oracle, oracle developer, oracle jobs, finance software, finance accounting accounting, r12 oracle

Friday, September 7, 2012

Oracle Apps: Kill a Locked session through Toad

Query All the Locked sessions using below SQL and based on your OBJECT find the session locking it

SELECT  l.inst_id, 
    SUBSTR(L.ORACLE_USERNAME,1,8) ORA_USER,  
    SUBSTR(L.SESSION_ID,1,3) SID, 
    S.serial#, 
    SUBSTR(O.OWNER||'.'||O.OBJECT_NAME,1,40) OBJECT, P.SPID  

    OS_PID, 
    DECODE(L.LOCKED_MODE,   0,'NONE', 
    1,'NULL', 
    2,'ROW SHARE', 
    3,'ROW EXCLUSIVE', 
    4,'SHARE', 
    5,'SHARE ROW EXCLUSIVE', 
    6,'EXCLUSIVE', 
    NULL) LOCK_MODE 
    FROM    sys.GV_$LOCKED_OBJECT L 
          , DBA_OBJECTS O 
          , sys.GV_$SESSION S 
          , sys.GV_$PROCESS P 
    WHERE     L.OBJECT_ID = O.OBJECT_ID 
      and     l.inst_id = s.inst_id 
      AND     L.SESSION_ID = S.SID 
      and     s.inst_id = p.inst_id 
      AND     S.PADDR = P.ADDR(+) 
    order by l.inst_id 


Kill the session by below ALTER statement. To perform this operations you need to have full db access, if you face issue, check with your DBA.

ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;  




at erp, erp, oracleapps, oracleapps erp, oracle erp, oracle ebusiness, oracle application,   
about oracle, oracle developer, oracle jobs, finance software, finance accounting accounting, r12 oracle, what is oracle database, oracle database, Oracle 11g, 11g database 

Thursday, August 23, 2012

Oracle Apps: Install Jdeveloper 10g on Linux

Oracle Jdeveloper 10g installation steps on Linux Platform

Software: Oracle Linux 5 installed on Oracle VM on windows 7

Installing Sun SDK 1.4.2_03 for Linux:
For JDeveloper to run successfully, you must install Java SDK release 1.4.2_03 (or later releases). Perform the following steps:
1. Download the self-extracting binary file of version 1.4.2_03 (or later release) of the Sun J2SE for Linux  to your Linux machine.

oracle website for downloading JAVA SDK:
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html#j2sdk-1.4.2_30-sol-JPR

2. Follow the instructions provided on the JavaSoft Web site to install the Java SDK. Note the install location when it is complete.Execute below command using root user in the directory where you downloaded the file
       ./j2sdk-1_4_2_19-linux-i586.bin

Note:
preferably install it in  /usr/java, I got it installed it in /media/sf_ebusiness/j2sdk1.4.2_19


Installing JDeveloper
To install JDeveloper, perform the following steps:
1. Download Oracle10g JDeveloper 9.0.5.1 from http://otn.oracle.com/software/products/jdev/index.html.

2. Open a terminal window and execute the following:
               cd /home/oracle
               mkdir -p jdevoaf
               cd jdevoaf
               unzip <path to zip file>/jdev9051.zip
                  
The JDeveloper software installation is complete. The software now must be configured.


Configuring JDeveloper and SDK
1. Using the text editor gedit or your editor of choice, open the file /home/oracle/jdevoaf/jdev/bin/jdev.conf .

2. Find the SetJavaHome parameter. Change
      # SetJavaHome c:\jdk1.4.2_03
                          to the location where the Java SDK was installed.
      Example:
        SetJavaHome /media/sf_ebusiness/j2sdk1.4.2_19

3. Save the jdev.conf file and exit gedit .


Modifying Your .bash_profile
Now that you have installed JDeveloper, you need to update the /home/oracle/.bash_profile and change your path accordingly. Perform the following steps:

1. Applications>System tools>File Browser
    Because the .bash_profile is hidden you need to enable show hidden files in the browser
    For this tick View>Show hidden files
    Now the file will be visible double click to edit it.

2. Make sure the PATH includes the location for JDeveloper and the Java SDK. Modify the file as below

           JDEV_HOME=/home/oracle/jdevoaf        
           PATH=$PATH:$JDEV_HOME/jdev/bin:/media/sf_ebusiness/j2sdk1.4.2_19;
           export PATH
           export JDEV_HOME

3. Save the .bash_profile file

4. You now need to source the file. Open a terminal window and execute the following commands:
          cd
          . ./.bash_profile


Configuring OC4J
To deploy applications in JDeveloper, you must configure OC4J. Perform the following steps:
1. From a terminal window, execute:                        
        cd /home/oracle/jdevoaf/j2ee/home
        java -jar oc4j.jar -install
                             
    At the prompt, enter the password oracle .

Modifying Permissions of Files in Linux
You must carry out a few tasks before running JDeveloper. Perform the following steps:1.  To set the proper permissions, execute the following commands from your terminal window:
chmod -R g+r /home/oracle/jdevoaf/
chmod +x /home/oracle/jdevoaf/jdev/bin/jdev
chmod +x /home/oracle/jdevoaf/jdev/bin/ojc
chmod +x /home/oracle/jdevoaf/jdev/bin/start_oc4j
chmod +x /home/oracle/jdevoaf/jdev/bin/stop_oc4j
chmod -R g+w /home/oracle/jdevoaf/j2ee/home/application-deployments
chmod -R g+w /home/oracle/jdevoaf/j2ee/home/applications
chmod -R g+w /home/oracle/jdevoaf/j2ee/home/config


Adding an Icon to Your Panel
To create an icon on your panel in JDeveloper, perform the following steps:1. Right-click on the desktop (not in the toolbar, an icon, or a window). Select New Launcher from the drop-down menu.

2.  In the Create Launcher Applet window, enter the following and then click No Icon.

           Name: JDeveloper 10g 9.0.5.1
           Comment: JDeveloper 10g 9.0.5.1
           Command: /home/oracle/jdevoaf/jdev/bin/jdev

3.  Enter /home/oracle/jdevoaf/jdev/bin/ in the directory field and select coffee.png .
     Then click OK.

4.  Click OK again to create the icon on the panel.


Running JDeveloper
To run JDeveloper, perform the following steps:
1. Click the icon that you just created in the panel.

2. The first time you run JDeveloper, you may get a message stating that your jdevhome directory does not exist and asking if you want to create it. Click Yes.


at erp, erp, oracleapps, oracleapps erp, oracle erp, oracle ebusiness, oracle application,   
about oracle, oracle developer, oracle jobs, finance software, finance accounting accounting, r12 oracle, what is oracle database, oracle database, Oracle 11g, 11g database 

Thursday, May 10, 2012

Starting your Oracle Apps Instance

The directories used below are based on my environment settings on the Laptop.
Please modify accordingly

Start database
cd /home/oracle/u01/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_oraerp
./addbctl.sh start

Start Listener
./addlnctl.sh start VIS

Start Instance
cd /home/oracle/u01/VIS/inst/apps/VIS_oraerp/admin/scripts
./adstrtal.sh

All the commands should exit with status 0 otherwise check the corresponding log files for any errors



at erp, erp, oracleapps, oracleapps erp, oracle erp, oracle ebusiness, oracle application,  
about oracle, oracle developer, oracle jobs, finance software, finance accounting accounting, r12 oracle, what is oracle database, oracle database, Oracle 11g, 11g database

Thursday, March 15, 2012

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

Error:
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

Issue and its details:
Submit your concurrent Program and the Program ends up in error with log showing
the below error message

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

Cause:
If you go by the error its actually caused when there is huge data being fetched by the Program/Query
and it packs up the allocated TEMP Tablespace. In this case there is nothing much can be done
by the developer and its DBA job.
But do few checks before actually contacting the DBA
  1. Run the Program for different set of Parameters(which will fetch almost same amount of data) and it should
     fail.
    
  2. Run the query in Toad with same/different set of Parameters and you should get the same error.
 
If you don't get the same error in step 1 and 2 its not issue with TEMP space its something do
with your query/Program

Solution:
In case its DBA issue, contact DBA and ask him to perform following steps

1.Verify and modify the datafiles sizes
   SELECT * FROM DBA_DATA_FILES;
  

2.Verify the user’s default tablespace to a bigger one
  SELECT * FROM Dba_Users;


The issue in my case was not with the DBA,as I performed the Step 1 and 2 in Cause section
the error didn't occur.
Actually I was using a OPTIMIZER HINT and it was causing this issue, I removed the HINT and
the error disappeared. But I had hit on performance of my query by removing the HINT