Hanging process in Solaris

Hi,
I have a process which is expected to go on for hours , creating shared memory etc.
I would like to know what is the most reliable method to check whether this process
is hanging or not. What are the commands that can be used and what are the
fields I should look for in the output of such commands.
thanks

In this situation, the best debug tool is to use the
truss command.
If the process performs system calls or causes "machine
faults" (truss -m). If it performs some lengthy
calculations you might not see system call / fault
activity for quite some time.
"prstat" (or "top") and "pstack" can be usefull in such a
situation...

Similar Messages

  • How to check hanged process in solaris

    Hi every one ...
    I have a 10 processes running in my server .. suddenly on process got hanged ..
    How can i check the hanged process...is there any specific command or ehat does the notation it shows in prstat command
    Thanks in Advance

    First, if the process is not showing 0% CPU utilization in prstat, it's not hung, although it may be stuck in an infinite loop. That's actually a significant difference, as an infinite loop is a logic error, whereas getting stuck could be a failure of some type.
    To see if it's really hung, you can use the "truss" or "pstack" commands:
    truss -p PID &or
    pstack PID &where PID is the process ID of the process you want to check. Note the ampersand to background the process. That's because if the process is indeed stuck in an unkillable wait for a kernel lock, your truss or pstack process will also be stuck and unkillable.
    The pstack call should just run and return. It will show the current call stack for all threads in the process. Run it several times and see if it changes. The truss call will run as long as the target process is running, and it will show all system calls made by the process. If it doesn't output anything at all the process is running in user space and should still be getting CPU time, or it's stuck.

  • Programme works on Windows hangs on Sun Solaris(8) 5.8

    The programme works fine on Windows but hangs on Solaris 8(5.8).
    The programme hangs after processing of files is done .
    Yes my programme has Synchronization and threading.
    The code waits on a method.
    engine.GetName().equalsIgnoreCase(name)
    the GetName is Synchronized method , if i remove that synchronization it waits on the next synchronizatoin.
    It seems like the locks on the Synch code are not getting released.
    The same programee does not hang on some solaris machines but takes almost 8--9 minutes to exit from that piece of code and safe shutdown of the process on similar configuration machine.
    1)My Question is it a patch issue ,If yes what are the patches I should have for sun solaris8(5.8)
    2)Anything to do with the Environ??
    3)The compilation etc??
    Let me know your answers I can definitely provide more Clues.
    Ani

    The programme works fine on Windows but hangs on
    Solaris 8(5.8)....And this leads you to believe it must be the OS fault and not your code's fault?
    Maybe you have a race/deadlock condition that just so happens to manifest itself when you run it on Solaris because of different processor timing. I'm suggesting maybe it could also hang on Windows, given the right timing condition.

  • Why my core dump file is "???? " in main process  in solaris 10

    why my core dump file is "???? ?" in main process in solaris 10?
    and called funtion is ok , can see the name and address!
    this problem is only occurent in solaris 10, not in solaris 8
    for exampel, pstacking core file is :
    ?????(0x0034x,......)----------this function in main process
    ACE_Rector::svc()(0xff3e........)this is called function

    If i recall correctly its because the binary called a function (in a library for instance) which pstack can not resolve.
    .7/M.

  • How to invoke VI function in LabView running on Windows from a unix process in Solaris

    Labview is only installed on Windows and Process on Solaris is a standard unix process without any Labview installed.

    I'm not sure this is possible. Really, the only way to call a VI are from VIServer or ActiveX. Since you don't have LabVIEW on the other machine, that won't work, and you can't use DCOM from a non Windows machine. There might be a 3rd party application like PCanywhere that will work between environments, but I doubt it. Your best chance might be to rig it so that LabVIEW works as a TCP/IP server and will respond to commands by using the TCP VI's. That should be easy enough to use from a UNIX system.

  • Creation Of Oracle Processes in Solaris

    I am having Oracle 8.1.7.2 installed on Sun Solaris Server. I am accessing Oracle from my application through iPlanet Web Server---> iPlanet Application Server. The problem is that as soon as my Application goes up and users start logging in the number of Processes in OS starts increasing rapidly and speed of application falls drastically. All these processes are in sleep mode and they are under user oracle.
    If anybody could advice the possible reasons please.
    Moreover even after killing some sessions explicitly PMON process is not able to clear them up. Please advice ASAP.
    Thanks in advance...........

    I am having Oracle 8.1.7.2 installed on Sun Solaris Server. I am accessing Oracle from my application through iPlanet Web Server---> iPlanet Application Server. The problem is that as soon as my Application goes up and users start logging in the number of Processes in OS starts increasing rapidly and speed of application falls drastically. All these processes are in sleep mode and they are under user oracle.
    If anybody could advice the possible reasons please.
    Moreover even after killing some sessions explicitly PMON process is not able to clear them up. Please advice ASAP.
    Thanks in advance...........

  • Too Many oracle ora_p0?? processes in Solaris 10

    I have a very intense update process which has about 8 SQL query - every one of them is having the HINT "NO_PARALLEL" as well as the stmt "Alter session disable dml;" before we execute the query.
    Even the Index is also hinted as no parallel.
    Every time this process run, i see number of ora_p??? process comes up and it never went goes down.
    No when ever this happens, I am seeing lot of slowness in my transaction times. Please help and advice....

    1. Oracle 10g 10.2.0
    SQL*Plus: Release 10.2.0.2.0
    2. Yes, solaris 10g has been configured for this.
    3. We have 4 quad procs
    4. Plan
    <PRE>
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop| TQ |IN-OUT| PQ Distrib |
    | 0 | DELETE STATEMENT | | 131K| 11M| 52285 (1)| 00:15:42 | | | | | |
    | 1 | DELETE | TABLE1 | | | | | | | | | |
    | 2 | PX COORDINATOR | | | | | | | | | | |
    | 3 | PX SEND QC (RANDOM) | :TQ10000 | 131K| 11M| 52285 (1)| 00:15:42 | | | Q1,00 | P->S | QC (RAND) |
    | 4 | PX PARTITION RANGE ALL | | 131K| 11M| 52285 (1)| 00:15:42 | 1 | 9| Q1,00 | PCWC | |
    | 5 | INLIST ITERATOR | | | | | | | | Q1,00 | PCWC | |
    |* 6 | TABLE ACCESS BY LOCAL INDEX ROWID| TABLE1 | 131K| 11M| 52285 (1)| 00:15:42 | 1 | 9| Q1,00 | PCWP | |
    |* 7 | INDEX RANGE SCAN | IDX_ID_1 | 218K| | 196 (2)| 00:00:04 | 1 | 9| Q1,00 | PCWP | |
    </PRE>
    Predicate Information (identified by operation id):
    6 - filter("COL1"='ABC')
    7 - access("ID_1"='01234567891092' OR "ID_1" = "0000001233445566')
    22 rows selected.
    Message was edited by:
    user608665

  • Java 1.4.2 hang on intel-Solaris

    We are using several machines to build and for some reason, javac 1.4.2 is
    hanging today (I'm not aware of any changes that would affect this) on intel-Sol.
    1.5 seems to work ok (but a little slow). Here's the truss...
    1408/1: lwp_cond_wait(0x08071248, 0x08071230, 0x00000000, 0) (sleeping.. .)
    1408/1: Received signal #20, SIGWINCH, in lwp_cond_wait() [default]
    1408/1: lwp_cond_wait(0x08071248, 0x08071230, 0x00000000, 0) = 0
    1408/1: lwp_cond_wait(0x08071248, 0x08071230, 0x00000000, 0) (sleeping...)
    and pstack (from a different run)...
    2222: [.../javac -version]
    ----------------- lwp# 1 --------------------------------
    bff50977 lwp_cond_wait (8071248, 8071230, 0, 0)
    bfa7bca7 _1cHMonitorEwait6Mil_i (8071200, 0, 0) + 275
    bfa2d3ae _1cHThreadsJcreate_vm6FpnOJavaVMInitArgs__i (8047280) + 1de
    bfa2d0cb JNI_CreateJavaVM (8047ac4, 8047ac8, 8047280) + 68
    08053321 ???????? (8047ac4, 8047ac8, 8047abc)
    08051de1 main (1, 806d2d8, 8047b10) + 20a
    08051b37 ???????? (2, 8047bdc, 8047c2e, 0, 8047c37, 8047c4b)
    ----------------- lwp# 2 --------------------------------
    You can't ctrl-c, ctrl-d, ctrl-z, or kill -9 the process.
    kill -3 does nothing as well.
    Not much on SunSolve or Google but I did see these...
    #22709: mountd Hangs Waiting for Nameservice java.lang. ...
    Bug ID: 4636691 JVM (Server VM) hangs (apparently) in socket ...}}
    Any ideas? Thanks.
    ps. Could just be random network problems today - how to determine that?
    (besides waiting until tomorrow :) I tried running netstat, prstat, and a couple
    other things.
    pps. Tried with 1.4.2_06 and 1.5 (01, 03, and 06).

    Where does that prerequisite come from?
    On linux x86, Oracle provides the j2se jdk/jre for OracleAS itself, meaning OracleAS Forms & Reports services 9.0.4 does not require you to install a JDK. I think that actually the requirement is that you should not install any JDK. Of course, some other software might require you to install 1.4.2 java sdk.
    You can find the AS 9.0.4 docu libraries here:
    http://www.oracle.com/technology/documentation/appserver10g.html
    (see docu library B13597_05, Platform tab for installation guides)

  • Memory used by oracle 11g processes on solaris 10

    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?
    oracle@taut $ ps -efl|grep cttrain6
    F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
    0 S oracle 2490 1 0 40 20 ? 284111 ? 12:23:37 ? 0:01 ora_q001_cttrain6
    0 S oracle 9698 1 0 40 20 ? 283837 ? 13:37:51 ? 0:00 ora_w000_cttrain6
    0 S oracle 2147 1 0 40 20 ? 285464 ? 12:18:11 ? 0:15 ora_lgwr_cttrain6
    0 S oracle 2135 1 0 40 20 ? 283878 ? 12:18:09 ? 0:17 ora_dia0_cttrain6
    0 S oracle 9979 11472 0 50 20 ? 211 ? 13:40:24 pts/2 0:00 grep cttrain6
    0 S oracle 2157 1 0 40 20 ? 283942 ? 12:18:13 ? 0:47 ora_mmnl_cttrain6
    0 S oracle 2129 1 0 40 20 ? 283830 ? 12:18:09 ? 0:06 ora_diag_cttrain6
    0 S root 2159 1 0 40 20 ? 263214 ? 12:18:13 ? 3:52 ora_dism_cttrain6
    0 S oracle 9565 1 0 40 20 ? 283861 ? 13:35:18 ? 0:00 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2482 1 0 40 20 ? 283837 ? 12:22:55 ? 0:01 ora_q000_cttrain6
    0 S oracle 2884 1 0 40 20 ? 283830 ? 12:27:46 ? 0:01 ora_smco_cttrain6
    0 S oracle 2153 1 0 40 20 ? 283846 ? 12:18:12 ? 0:01 ora_reco_cttrain6
    0 S oracle 2464 1 0 40 20 ? 284150 ? 12:22:42 ? 0:01 ora_fbda_cttrain6
    0 S oracle 2123 1 0 40 20 ? 284270 ? 12:18:08 ? 0:14 ora_pmon_cttrain6
    0 S oracle 2454 1 0 40 20 ? 285190 ? 12:22:34 ? 0:01 ora_arc1_cttrain6
    0 S oracle 2145 1 0 40 20 ? 284792 ? 12:18:11 ? 0:06 ora_dbw3_cttrain6
    0 S oracle 2141 1 0 40 20 ? 284792 ? 12:18:10 ? 0:08 ora_dbw1_cttrain6
    0 S oracle 2149 1 0 40 20 ? 284112 ? 12:18:11 ? 0:25 ora_ckpt_cttrain6
    0 S oracle 9513 1 0 40 20 ? 283885 ? 13:34:18 ? 0:02 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2125 1 0 0 RT ? 283830 ? 12:18:08 ? 0:07 ora_vktm_cttrain6
    0 S oracle 2143 1 0 40 20 ? 284792 ? 12:18:10 ? 0:04 ora_dbw2_cttrain6
    0 S oracle 2459 1 0 40 20 ? 285198 ? 12:22:35 ? 0:01 ora_arc3_cttrain6
    0 S oracle 2451 1 0 40 20 ? 285190 ? 12:22:33 ? 0:01 ora_arc0_cttrain6
    0 S oracle 2131 1 0 40 20 ? 283838 ? 12:18:09 ? 0:02 ora_dbrm_cttrain6
    0 S oracle 2139 1 0 40 20 ? 284872 ? 12:18:10 ? 0:03 ora_dbw0_cttrain6
    0 S oracle 2466 1 0 40 20 ? 283830 ? 12:22:44 ? 0:01 ora_qmnc_cttrain6
    0 S oracle 2151 1 0 40 20 ? 283974 ? 12:18:12 ? 0:05 ora_smon_cttrain6
    0 S oracle 2457 1 0 40 20 ? 285198 ? 12:22:34 ? 0:01 ora_arc2_cttrain6
    0 S oracle 2133 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_psp0_cttrain6
    0 S oracle 2155 1 0 40 20 ? 284656 ? 12:18:12 ? 0:11 ora_mmon_cttrain6
    0 S oracle 2137 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_mman_cttrain6

    user567271 wrote:
    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?As you have already said, it is "virtual" memory. This is not real, "physical" memory. Solaris has a virtual memory sub-system layer in it, as do almost all other modern operating systems. Google "operating system virtual memory" to find out more on what virtual memory is and how it works.
    In terms of your question, virtual memory means that not all of a process's memory space needs to be in physical memory for it to run and execute. The process virtual memory space is broken up into equal sized pages, and only those pages currently being referenced (used) are mapped and read into physical memory pages. Thus the virtual size of a process is irrelevant to how much physical memory is being used. Look at the RSS column (ps -ely) for the physical memory used by each process - Resident Set Size.
    Furthermore, an Oracle shadow server process (oracle) uses a large segment of shared memory for the SGA. This shared memory only exists once in physical memory, and is shared amongst all the shadow server processes. But it is mapped into the address space of each process, and so appears and is counted in the virtual and physical memory of each process.
    So each reported virtual size (SZ) of each oracle process is also counting the mapped shared memory pages in each process, and so counting the same pages multiple times across all the oracle processes. You need to subtract the size of the SGA shared memory from the virtual size of each oracle process to determine the private, local memory per shadow process.
    If you want a further breakdown of the memory map of each process, look at the manual pages for pmap (man pmap), which will break it down by text, private data, zero initialized, shared and other types. By subtracting the shared size from the resident size you can get a true view of the private, local memory per oracle shadow server process.
    John

  • Oracle process ORA_PSP0 & Solaris 10 Memory at 100%

    Oracle was gobbling 100% of system memory until I manually killed the "ora_psp0_IND" process and then Oracle's memory usage drops down to 0.4%. There were numerous "defunct" Oracle processes that listed the "ora_psp0_IND" process as it's owner.
    This has been 3 times in the last 2 weeks. Is this process required by Oracle??? Is there some tuning I can do???
    Oracle 10.2.0.1 on Solaris 10.

    i thinkg ora_psp is a background process for the Oracle PL/SQL server pages:
    http://www.oracle.com/technology/sample_code/products/ias/files/psp/index.html

  • Logon procedure hangs on my Solaris 10, why?

    Today we added more RAM to the Virtual Machine called SRWIKI501 and now it has 1024 GB RAM but after reboot it hangs with this:
    SunOS Release 5.10 Version Generic_127128-11 64 bit
    Copyright 1983-20008 Sun Microsystems Inc. All rights reservd.
    Use is subject to license terms.
    NOTICE: MPO disabled because memory is inter leaved
    Hostname: srwiki501
    /dev/rdsk/c1t0d0s7 is clean
    srwiki501 console login: wcy (then I presses enter ...
    _ (and nothing happens, it hangs)
    I am Sun Solaris 10 (Update 5) 64 bit on Vmware ESX Server 3.0.2. I do not have Vmware Tools installed yet, I was going to, but I am left outside the door, how can I debug this in order to get the system back on track?
    I am new to SunOS 10 and I have my daily work on AIX but I want to learn this. I have googled forward and backwards and I see that other have similar problems, however I get my login they don't. I had a system running before the reboot.
    Weird, because I can do this:
    G:\>ping srwiki501
    Pinging srwiki501.postdk.net [10.135.131.37] with 32 bytes of data:
    Reply from 10.135.131.37: bytes=32 time=1ms TTL=252
    Reply from 10.135.131.37: bytes=32 time<1ms TTL=252
    Reply from 10.135.131.37: bytes=32 time<1ms TTL=252
    Reply from 10.135.131.37: bytes=32 time<1ms TTL=252
    Ping statistics for 10.135.131.37:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms
    G:\>nslookup srwiki501
    Server: srdcna501.postdk.net
    Address: 193.3.121.22
    Name: srwiki501.postdk.net
    Address: 10.135.131.37
    G:\>tracert srwiki501
    Tracing route to srwiki501.postdk.net [10.135.131.37]
    over a maximum of 30 hops:
    1 <1 ms <1 ms <1 ms 10.134.18.3
    2 <1 ms <1 ms <1 ms 10.134.16.5
    3 <1 ms <1 ms <1 ms 10.135.128.3
    4 <1 ms <1 ms <1 ms srwiki501.postdk.net [10.135.131.37]
    Trace complete.
    G:\>ping 10.135.131.1
    Pinging 10.135.131.1 with 32 bytes of data:
    Reply from 10.135.131.1: bytes=32 time<1ms TTL=253
    Reply from 10.135.131.1: bytes=32 time<1ms TTL=253
    Reply from 10.135.131.1: bytes=32 time<1ms TTL=253
    Reply from 10.135.131.1: bytes=32 time<1ms TTL=253
    Ping statistics for 10.135.131.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    Best regards,
    Steen Jensen, Post Danmark

    OK, now I have booted the server up with the -v options and here is the spot where it hangs:
    Jul 28 22:04:08 srwiki501 genunix: model Vmware Virtual IDE CDROM Drive
    Jul 28 22:04:08 srwiki501 genunix: ARA/ATAPI-4 supported, majver 0x1e minver 0x17
    Jul 28 22:04:08 srwiki501 pci: PCI-device: ide@0, ata0
    Jul 28 22:04:08 srwiki501 genunix: ata0 is /pci@0,0/pci-ide-@7,1/ide@0
    Jul 28 22:04:08 srwiki501 genunix: ATA DMA off: disabled. Control with "at api-cd-dma-enabled" property
    Jul 28 22:04:08 srwiki501 genunix: PIO mode 4 selected
    Jul 28 22:04:08 srwiki501 genunix: ATA DMA off: disabled. Control with "at api-cd-dma-enabled" property
    Jul 28 22:04:08 srwiki501 genunix: PIO mode 4 selected
    Jul 28 22:04:08 srwiki501 genunix: ATA DMA off: disabled. Control with "at api-cd-dma-enabled" property
    Jul 28 22:04:08 srwiki501 genunix: PIO mode 4 selected
    Jul 28 22:04:08 srwiki501 genunix: ATA DMA off: disabled. Control with "at api-cd-dma-enabled" property
    Jul 28 22:04:08 srwiki501 genunix: PIO mode 4 selected
    Jul 28 22:04:08 srwiki501 scsi: sd1 at ata0: target 0 lun 0
    Jul 28 22:04:08 srwiki501 genunix: sd1 is /pci@0,0/pci-ide@7,1/ide@0/sd@0,0
    Jul 28 22:04:09 srwiki501 pseudo: pseudo-device: dtrace0
    Jul 28 22:04:09 srwiki501 genunix: dtrace0 is /pseudo/dtrace@0
    Jul 29 07:22:53 srwiki501 genunix:: WARNING: Time of Day clock error: Reason [Stalled]. � Stopped tracking Time Of Day Clock
    IT HANGS FOR GOOD HERE :-(
    Next I will try to boot up in single user mode in order to get a breakthrough, hopefully ...
    Edited by: SteenJensen on 29-07-2008 07:59

  • How to check actual allocated and used memory for java process in solaris?

    Hi,
    I'm testing performance for java application on solaris 10. And I would like to know how to measure actual memory allocated and used for java process.
    I'm setting -Xms512m -Xmx512m for my java process and I use prstat command to monitor it's memory. But I found that when I run prstat to check, in SIZE column is more than I setting (found 644).
    So I'm don't know the actual memory that java process used. (In this case,is it mean the process use memory (644) more than setting (512)?)
    Thank you.

    With Xms/Xmx you specify the Java heap size. On top of that comes the permanent generation (default max size 64m) and the C part of the process (the JVM itself with all its libraries and data).
    With "ps -e -o pid,vsz,rss,args" you get the virtual and set resident size of your processes.
    Nick.

  • 1.6.0_05 JDK hangs periodically on Solaris 9

    Hi,
    We currently got a customer, where application server had to be installed to Solaris 9 system and we've got a problem, that entire JVM hangs permanently sometimes, usually under a heavy load. This happens with 1.6.0 JDK (as our product requires 1.6 as minimum version). The same JDK and application never raised similar problem in version 10 of Solaris.
    So, are there any official or non-official recommendations on JDK 1.6 and Solaris 9 compatibility and/or recommendations on such pair ?
    Our application server is self-contained WAR file, running under Jetty or under external web container, if this does matter. We've played with several GC algorithms and options, but never get a stable result. Usually, hang occurs one-twice per week and typically under a heavy load (large number of users, connecting to the server and initiating server to fire various SQL read/update requets via Hibernate).
    Thanks,
    Dmitri

    Hi Leah,
    Have you tried double clicking?
    If this doesn't solve the issue, you might want to try using a different version of the browser and disable the pop up blocker on your browser.
    Please try this out and let me know.
    Regards
    Mazin

  • Maximum  number of processes on Solaris

    Hi,
    As I see, In Solaris 2.5 , 2.6 , the maximum nunumber of process has been
    put as 30,000 ( MAXPID in param.h ) .
    How is it that this number is kept fixed and not calculated ? What are the
    reasons ?
    Thanks.

    Hi,
    That is improved from Solaris 8 onwards, you have option to change the values.
    In Solaris 8 it can range from 266 to 999,999, whereas default value is still 30000.
    Check for the parameter "pidmax" at docs.sun.com.
    Here is the link: http://docs.sun.com/ab2/coll.707.1/SOLTUNEPARAMREF/@Ab2PageView/1920?DwebQuery=pidmax&oqt=pidmax&Ab2Lang=C&Ab2Enc=iso-8859-1
    Thanks
    Kalpesh

  • Need to start a process in windows from a process in solaris os

    Hi All,
    I am new to Solaris OS. I need to spawn a process existing(Not currently running) in windows 2000 SP4 proffessional edition from a process currently running in Solaris OS. Can any one let me know, what would be the best way to do this. I am using Solaris 8.
    -Justin

    Hi,
    Here is another sample for procedures.Kindly reward points by clicking the star on the left of reply,if it is useful.
    Code Sample for writing a procedure with input and output parameters
    REPORT zzz_jaytest.
    * Getting the regno and total as input parameters
    PARAMETERS : p_regno(10) TYPE c DEFAULT 'R1000',
                               p_total     TYPE i.
    data : v_total type i.
    * In this procedure, we are updating the total of a regno given as input.
    * Here two parameters used in the procedure are input parameters.
    * We are updating the record of regno entered in selection screen and
    * adding the total entered to the already existing total. We have to give semicolon
    * for the statement inside procedure.
    exec sql.
    CREATE or replace PROCEDURE PROC1 ( p_regno in char, p_total in number )
    IS
        BEGIN
          UPDATE stu_det SET total = total + p_total where regno = p_regno;
        END;
    endexec.
    * This is the code to execute the procedure for update.
    * While executing the procedure, the parameter variable should be
    * preceded with colon  :
    EXEC SQL.
      EXECUTE PROCEDURE PROC1 ( in :p_regno, in :p_total )
    ENDEXEC.
    * In this procedure, we are selecting the details for the regno entered
    * as input. Here p_regno is input parameter and v_total is used as output
    * parameter. So that we can use the retrieved value of v_total in our
    * ABAP program
    exec sql.
    CREATE or replace PROCEDURE PROC2 (p_regno in char, v_total out char)
    IS
        BEGIN
          select total into v_total from stu_det
                             where regno = p_regno;
        END;
    endexec.
    * This is the code to execute second procedure.
    EXEC SQL.
      EXECUTE PROCEDURE PROC2 ( in :p_regno, out :v_total )
    ENDEXEC.
    write : / 'Total of ', p_regno, ' is ', v_total.

Maybe you are looking for

  • Video - Play In iTunes Then Won't Sync

    I've just noticed that if I play a video in iTunes it will then no longer sync with the iPod. iTunes says its not a compatible format. I've just tested playing a video on the iPod (OK) then playing on Mac iTunes (OK) then resyncing. The video no long

  • How can I get this stupid Mapneto pop up add off my FFox browser on Mac OSX? It shows "deleted" in Extensions, but now when I open a tab a download ad appears

    Had never seen these pop up pages before I tried to delete the Mapneto tool bar, now every time I open a tab or a link up pops this stupid "download completed" come-on ad which is monstrously annoying. Short of dumping Firefox and re installing, what

  • Query as data source for APD

    Hi, I want to extract data from a query into a transactional ODS via APD. The query is based on an InfoSet that joins 5 InfoObjects. But in APD, I cannot select this query as data source! Is APD not able to work with such queries? Thanks for any help

  • How to route the file, base on the file name without touching file content?

    Hi All, can you please provide me solution how to route the file based on file name with out touching file content. Business criteria : > One source directory having zip files with different file names > File adapter have to pick the zip files and ha

  • Dump is comming

    Hi Expert, As i am getting dump with the below code .cany any one suggest me what to do. if sy-subrc = 0.    sort lt_0000. select  * FROM pa0001 INTO TABLE lt_0001 FOR ALL ENTRIES IN lt_0000 WHERE pernr eq lt_0000-pernr AND abkrs ne 'FP' or abkrs ne