How to generate sessions manually in Oracle

Guys can anybody tell me how I can automatically generate sessions by using some codes rather manually triggering sessions.
See I'm going to implement a multithreading tool by running the tool on different sessions but on a single instant. So I have to run the scripts manually. So I'm unable to run it at the same time. So can anybody tell me how I can generate multiple sessions at the same time & I can run my tool at same time on different sessions(bt in single instant) so that multiple threads(cursors) in multiple sessions can start at same time. So I can check my multithreading tool's performance?

A new feature in Oracle8i called autonomous transactions allows you to make and
save (or roll back) changes within a single PL/SQL block—without affecting the outer or main transaction.
To make a PL/SQL block an autonomous transaction, simply include this statement in the declaration section of the block:
PRAGMA AUTONOMOUS_TRANSACTION;
You can use this statement in any procedure and function and in any non-nested
anonymous block.
Example
create table audit_tab (uname varchar2(30), dt date, msg varchar2(4000));
create or replace trigger emp_trigger
before update of SAL on emp
for each row
declare
     -- this pragma will allow our trigger to commit and
     -- capture an audit trail record. We can then fail
     -- the triggering statement, preventing the update from
     -- occurring
     pragma autonomous_transaction;
     l_cnt     number;
begin
     -- this query just makes sure the empno being updated
     -- is a person who reports to the employee doing the update.
     -- connect by is a nice way to build this hierarchy.
     -- since the where clause is processed after the hierarchy
     -- is built, we can easily use exists on this
     select count(*)
     into l_cnt
     from dual
where exists ( select empno
               from emp
               where empno = :new.empno
               start with mgr =
               (select empno from emp where ename=USER)
               connect by prior empno = mgr );
     -- If the exists returns no rows, we have attempted
     -- to update someone who does not work for us. We
     -- will audit the attempt as well as fail the attempt.
     -- the employee salary will not be updated and we will
     -- have a record of the attempt
     if ( l_cnt = 0 )
     then
     insert into audit_tab values ( user, sysdate,
          'Attempt to update salary of ' ||
          :new.ename || '-' || :new.empno);
     commit;
     raise_application_error( -20001,
          'You have tried to do something you should '||
          'not have and we know it');
     end if;
end;
Trigger created.
Benefits
With autonomous transactions, you can write and save messages in an database log without affecting the main transaction.
You can execute from SQL PL/SQL functions that change the database.
You can write PL/SQL components or cartridges that behave nicely in a distributed
computing environment.
Khurram Siddiqui

Similar Messages

  • How to generate trace file in oracle application forms

    hi
    I want to generate trace fle in oracle application
    Regards
    9841672839

    Hi,
    Refer to the following documents.
    Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=296559.1
    Note: 130182.1 - HOW TO TRACE FROM FORM, REPORT, PROGRAM AND OTHERS IN ORACLE APPLICATIONS
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=130182.1
    Regards,
    Hussein

  • How to generate MT files from Oracle EBS Payables

    Hi, does anyone has experience in generating MT files from Oracle Payables?
    All contributions are welcome...

    Hi,
    are you talking about MT-940 format files? If so, what is the use case behind this issue?
    I created a custom loader process to upload MT-940 bank statements into Cash Management
    some time ago, but as far as i understood your question, you want to create those files based
    on payables data?
    Regards

  • How to Start/Stop manually an oracle 9i database with a bat file?

    Hi;
    I have a manual Start/Stop of the db.
    How can i Start/Stop the 9i database all services with a batch file (windows 2000) ?
    All in one batch files ( One for Start & one for Stop)(Including listener)
    thanks for your answer !

    Save the scripts below in a batch file and use the first one to start your services, and the second one to shutdown.
    This script will shutdown your database first using SQL*Plus and stop the service later. This way you will avoid the timeout.
    Also will ask you for confirmation if you are sure to start Oracle services and database. press Y for yes and N for No.
    @echo off
    %systemdrive%
    REM #
    echo.
    echo You are about to start Oracle Services and Database
    echo.
    set /p Input=Do you want to continue? (Y=Yes N=No) =
    IF /i "%Input%"=="Y" (goto Proceed)
    exit /b
    :Proceed
    echo Oracle Instance and Services Startup in progress
    echo.
    Net start OracleOraHome92Agent
    Net start OracleOraHome92HTTPServer
    Net Start OracleOraHome92TNSListener
    Net Start OracleMTSRecoveryService
    Net Start OracleServiceORCL
    echo.
    echo Oracle ORCL Instance and Services Startup completed Successfully
    echo Good Bye
    echo on
    EXIT /BSave this one in a seperate batch, again it will ask for confirmation, and shutdown the database using SQL to avoid timeout
    Just replace the connect string with your own and the {SID} with your Database name
    @echo off
    %systemdrive%
    echo.
    echo You are about to shutdown Oracle Instance and Services
    echo.
    set /p Input=Do you want to continue? (Y=Yes N=No) =
    if /i "%Input%"=="y" (goto Proceed)
    exit /b
    :Proceed
    echo.
    echo Closing and Dismounting ORCL Database
    echo.
    echo shutdown immediate | sqlplus "/ @ORCL as sysdba"
    echo.
    echo Shutting down Oracle system services
    echo.
    Net Stop OracleService{SID}
    Net Stop OracleOraHome92HTTPServer
    Net Stop OracleOraHome92TNSListener
    Net Stop OracleMTSRecoveryService
    Net Stop OracleOraHome92Agent
    echo.
    echo Oracle Instance and Services Shutdown completed successfully
    echo Good Bye
    echo on
    EXIT /bTony Garabedian

  • How to save Session Data using Oracle?

    Hi
    I am creating a web application that will be running on an infrastructure which will utilise a number of web servers, web gardens and a load balancer.
    As the application is using Sessions, and that our application is using Oracle as the database, we would like to use the database to save the Session data. However, I am struggling to find any good examples on how to do this with Oracle.
    I note that Oracle provides the following class: Oracle.Web.SessionState.OracleSessionStateStore, but I am unsure what I need to do in the Code Behind and what if any tables do I need to create in the database.
    Can anyone help me, please?

    You can store Oracle session state in the Oracle DB or in the mid-tier with Oracle Coherence.
    Here's a link to the Oracle ASP.NET provider doc:
    http://download.oracle.com/docs/cd/E17666_01/doc/win.112/e17192/toc.htm
    Chapter 1 has instructions about setting up the DB store ASP.NET provider data and schema objects.

  • How to generate 855 outbound from oracle apps

    Hi,
    I need to generate 855 outbound edi file from
    oracle->bpel->b2b->customer.
    I have installed b2b and SOA(BPELL).Now I dont know how to start.How to get 855 xml file from oracle?
    Could somebody provide some steps to start.
    Regards,
    ashok

    This forum addresses B2B challenges and its integration with BPEL. You might want to refer Apps adapter forum for the Integration with Ebiz suite.
    Rgds,Ramesh

  • How to generate excel file in oracle forms 10g on client machine

    dear Sir,
    I am using just file server(installed 10g dev suite) not a oracle application server,
    I am running my application from another machine ,it running fine i want to generate excel report on client machine
    presently i m using OLE2 for fetching the data in excel , it is working fine but it generates the excel file on file server machine and i want get the output excel on the client machine. aftre OLE2 i m using CLIENT_OLE2 with webutil (instead of OLE2) its get compile successfully but during runtime it give error "oracle.forms.webutil.ole.OleFunctions bean not "found.CLIENT_OLE2.create_obj will not work"
    *so please tell me without oracle application server is this possible or not .*

    your webutil on server side is not configured
    you need to re install the webutil jacob.dll files etc. then it will work fine..
    you can also generate excel file using reports to change the destination format in SPREADSHEET

  • How to generate XML file from oracle database query result

    Hi dudes,
    as stated on the subject, can anyone suggests me how can i achieve the task stated above??
    Here is a brief description of my problem:
    I need to create a XML file once i query from the oracle database, and the query result returned from the database will be stored in XML file.
    I'd searched around the JAXB, DOM, SAXP and the like basic concepts, but i still don't know how to start??
    Any suggestions ???

    Read this:
    http://www.cafeconleche.org/books/xmljava/chapters/ch08s05.html
    You might have to read more of the book to understand that chapter.

  • How to generate Excel files in Oracle Reports

    Hi,
    I've already built a JSP using oracle reports and Deploy on the report service. I also add a button to the left of the JSP.The next thing I want to do is:when user click on the button, the system will prompt a excel file contains the same content as the JSP file.
    Can anybody teach me how to do? Thanks very much

    Hi Ni,
    It may not be possible to see the output of the SAME report in Excel as well. You will have to design another report which can open in Excel. You can follow this demo:
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/excel/index.html
    Then you can add an action to your button so that it opens the new report in a new browser window. This new browser window will open MS Excel and show the report inside Excel.
    The reason that you can't output the SAME report in HTML as well as MS Excel is because we use page contentType to specify the application that the browser should open the document in (the application can be MS Word, MS Excel, etc). For example,
    <%@ page contentType="application/vnd.ms-excel" %>
    But we can only specify one contentType for a JSP, so the report can either be viewed as HTML or inside MS Excel.
    Navneet.

  • How to generate Shipping Notifications in Oracle EBS?

    Hello,
    I have to generate Shipping Notifications. Anyone know that from where we can generate Shipping Notification?
    Regards,
    Kapil
    Edited by: Kapil Mistry on Mar 21, 2013 5:11 AM

    Hi,
    From order management.
    Oracle Shipping Execution
    Delivery Workflow (WSHDEL item type) - Supports the processing of outbound
    deliveries. The Delivery workflow is triggered when the first line requiring picking is
    assigned to a delivery. You can extend delivery workflow processes to meet your
    specific business requirements using seeded customizable activities and notifications;
    however, the Delivery workflow does not support response-required notifications or
    deferred activities. You can use the seeded and custom processes for deliveries by
    assigning them in the shipping lookup R_DEL_GEN for your organization. For more
    information, see: Using Oracle Workflow in Oracle Order Management.Thanks

  • How to start manually an oracle 8i database with a bat file?

    Hi all,
    I know it's not the place but it is a really common question: how can i start manually an oracle 8i database on windows 2000 without using a service? I don't remember the command. I tried: oracle start SID without success...
    Thanks
    JMi

    Dear JMD,
    If you would like to startup the Oracle instance using a batch file then first create a SQL file (say ABC.SQL) wherein enter the following two lines:
    connect internal/<INTERNAL_PASSWORD>
    STARTUP
    <INTERNAL_PASSWORD> above is the password for the INTERNAL user account (default password is "oracle")
    Then create a batch file (say START.BAT) and enter the following single line:
    <ORACLE_HOME>\bin\svrmgrl @<ABC_DIR>\ABC.SQL
    where <ORACLE_HOME>\bin\svrmgrl is the full path of the SVRMGRL.EXE executable and <ABC_DIR> is the directory in which you have placed the ABC.SQL file.
    Now you can startup the Oracle database by simply double-clicking on the START.BAT batch file.
    Ciao!
    null

  • Generate .PDF file from Oracle Form and print .pdf

    Hello, I am new to oracle form. I need direction on how to create .pdf file on a button click.
    The requirement is when user click a button on a form, I need to write some data to the pdf file and open the .pdf file for print.
    I am using Oracle Form builder 10.1.2.0.2
    Thanks a lot! Please help!

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • How to generate web services for OAS with wsdl extension

    Hi,
    I wanted to know how to generate web services from Oracle Application Server especially with .wsdl extension and with document/literal style.
    I know that earlier there was a tool called SmartConnect from BEA WebLogic.
    But that will work only with ALSB (Aqua logic Service Bus). I guess that ALSB has been renamed as Oracle Service Bus by Oracle after the acquisition of WebLogic. My question is what is the new name for the SmartConnect Tool from WebLogic, which generates wsdl very easily from Oracle database.
    I am unable to know the new name for SmartConnect and how to download that tool from Oracle web site.
    Also, I want to know, whether there is any other way to generate the wsdl from Oracle, if so, please let me know.
    Regards
    Raman

    Hi Jeethandra,
    Please refere to the below link might be some help.
    [http://help.sap.com/saphelp_mdmgds55/helpdata/en/45/069152856241e1e10000000a1553f6/frameset.htm]
    regards
    shankar

  • Generate PDF file from oracle Table

    We need to populate pdf file into oracle table of column blob through informatica by taking
    path\name(/path/filename.PDF) as input from source table.
    The pdf file is on some other server so, we need to create a stored procedure which will give pdf file as output from
    other server by taking path\name from source table column as mentioned above.
    So please suggest how we can create a stored procedure for that purpose.
    If possible please share some script.

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • Generate Association rules using Oracle 10 g Data Mining Tool

    Hi,
    How to Generate Association rules using Oracle 10 g Data Mining Tool ?

    As far as I remember in 10g it is pretty much the same
    http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28129/market_basket.htm
    Regards,
    Husnu

Maybe you are looking for

  • When I try to open an email I get an error that adobe reader 8.1 is not working

    I have tried to fix this with no luck any suggestions ?

  • MAudio Delta 1010 PCI Digital Recording Rack Mount and Mac Pro

    A great digital audio rack-mount converter is MAudio's Delta 1010. It uses a PCI card for which I heard one could get a replacement PCI-X interface card, but such is not available for PCI-Express slots which are all the Mac Pro workstations have. Doe

  • Strange behavior from this forum?

    Hello all, did anybody ever experience this? I subscribes to a post because I wanted to see people's responses. I have now received three messages telling me that there are new posts on that entry. When I go to the post there ain't any. The other wei

  • Auto resolve alert - Polling interval

    Hi, When service is stopped, alert is generated but once i restart the service alert gets auto-resolved within a minute. When alert is generated if database size is full, once we increase the size it will take more than an hour for alert to get auto-

  • Hotspot VM crash on Solaris

    Hello everyone, I am seeing this error when running an app on Solaris. HotSpot Virtual Machine Error, Internal Error Please report this error at http://java.sun.com/cgi-bin/bugreport.cgi Error ID: 53414645504F494E540E4350500366 01 Problematic Thread: