Pausing and resuming a PL/SQL proc from oracle PL/SQL DEVELOPER tool

I need to test a PL/SQL on how it reacts to an exception. I need to PAUSE it, do something outside of the proc and then resume the proc. Is there a PROMPT command in PL/SQL where it would wait for user input? Can I use DBMS_OUTPUT.GET_LINE to do this? Where does the GET_LINE raed its input from?

Perhaps the following demo will help. It uses straight SQL, since the PRIMARY KEY stuff does not require any sort of PL/SQL.
I set up 2 sessions in SQLPlus.
Session 1 - create a table with a primary key, insert and do not commit:
session 1:
C:\Users\Hans>sqlplus test/test
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 10 15:40:13 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> create table abc ( a number primary key enable);
Table created.
SQL> insert into abc values (1);
1 row created.Go to session 2 and insert:
C:\Users\Hans>sqlplus test/test
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 10 15:36:45 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> insert into abc values (1);it hangs here.
Switch back to session 1 and commit;
SQL> commit;
Commit complete.
SQL>and in session 2 I see
insert into abc values (1)
ERROR at line 1:
ORA-00001: unique constraint (TEST.SYS_C006468) violated
SQL>Trying this for different test cases: session 1 insert value (2) and session s, insert value (3)
Session 1
SQL> insert into abc values (2);
1 row created.
SQL>Session 2
SQL> insert into abc values (3);
1 row created.
SQL>Back to session 1
SQL> commit;
Commit complete.
SQL>Back to session 2
SQL> insert into abc values (3);
1 row created.
SQL>So I conclude that dups will block during insert.
For your original question - SQL and PL/SQL are run in separate engines. PL/SQL sends the SQL command to the SQL engine, which runs that and returns any return info (rowset, error, ...).
So any questions about SQL and SQL transaction control may be handled in a purely SQLPlus (or TOAD or SQLDeveloper) test case.
OTOH, questions about PL/SQL can be answered using a debug environment such as SQLDeveloper - see http://www.oracle.com/technology/obe/sqldev/plsql_debug/plsql_debug.htm

Similar Messages

  • How are firefox download pause and resume features implemented? A high-level logic/algorithm would be greatly appreciated.

    ''dupe of https://support.mozilla.org/en-US/questions/1000658''
    I would write a stand-alone program (supporting the pause and resume features) to download stuff from internet. Can someone provide info how this can be done?

    Sorry that is beyond the scope of this Firefox user support forum. <br />
    https://developer.mozilla.org/en-US/

  • Changing CMS and Audit Repository databases from Oracle to SQl server 2008

    Hi guys,
      We have a Business Objects Dev environment which was installed with Oracle 10g database for CMS and Audit Repository.
    Our database team now decided to change the CMS and Audit databases of Dev BOE from Oracle to  SQL server 2008.
    What is the ideal way to achieve this? I'm concerned because the old DB is Oracle and the new one would be SQL server.
    Earlier, I have changed CMS database from one to another by stopping SIA , taking the backup of old DB into new and changing it in the Update Databse option. But in that case both old and new CMS databses were on SQL server 2005.
    Thanks,
    Ganga

    Denise,
      Thanks for the solution.
    We have done Windows AD and SAP integration on the Dev BOE. Will there be any issue with those after the DB change. I am guessing there won't be, but just want to confirm. Please reply.
      Also, we need to stop the old SIA and start using the new SIA after the step two is done right?

  • App Store Download pause and resume problem in MAC OS lion

    Hello,
    I am facing a problem in App Store Download pause and resume problem in MAC OS lion. My internet connection has a problem of disconnecting frequently
    because of this App store can not complete a download as its resuming download from the beginning again please help me
    Thanks in advance
    -Ashok Athukuri

    Dear Ashok, I also facing the same problem....It shows keep on waiting state.I will share you if have a solution for it...

  • Audiobooks skip backwards multiple chapters often when pausing and resuming

    As the title states I am having an issue where if I pause and resume sometimes the book will skip back multiple hours.
    This issue is very inconsistent sometimes it happens sometimes not.  It is something I will experience on almost every book multiple times at some point.
    I am having an issue that spans: OS 5-7 or more, iPhone 4, 4s, 5s, iPad 2 and other.  I believe Ive had the issue show itself on iTunes but I rarely use iTunes but fairly certain it has happened.
    I make most of my audiobooks from CDs that I purchase but I have had the problem on others as well.  I also sometime download audiobooks that are in MP3 format and convert them.
    I have used different programs with the same outcome but at the moment I am using chapter and verse to create my audiobooks.  I usually break them into 2 or 3 files because of how horrible the reliability is to begin with.
    The M4B format seems to be plagued with issues and I am hoping I can put my finger on this one because it is by far the most annoying.
    If it matters I typically use voice setting, high efficiency setting, VBR setting,  64kbits if stereo setting but set it to mono so it is 32kbits, and I have the sample rate set to auto.  It results in files around 160MB/10HRs and sound no worse than what audible publishes them as.
    I doubt that matters though since I have experienced this issues with different settings.
    I also am currently setting my chapters to every 10 minutes to make skipping easier because of how common this issue is.  If they are longer finding my spot is very difficult using the slider on an iPhone. I might even go smaller on the next book and make smaller files as well.
    Any insight would be great.  I am most certainly NOT the only person with this issue since I have been able to recreate it hundreds of times with CD source, mp3 source, on my MacBook, on my PC, with several different programs, without using any special program at all (iTunes only)
    Apple most def will not be resolving an issue that is several years old so I'd like to know how to format my books in a way to avoid this.

    One thing you can look at is if in iTunes, you right click on the audiobook track, choose get info, and go to the options tab, remember playback position should be checked.

  • How exactly do firefox download pause and resume features work?

    Could I get technical information on how exactly these functionalities work? If you could provide enough details to enable writing a stand-alone program to download stuff from internet with pause and resume functionalities, it would be of great help.

    Open the download window''' <Control> J.''' Right click on the file in question
    and select pause. '''Warning ! !''' Sometimes the resume does not work on
    some web sites.

  • "Pause" and "Resume" No Longer Work...HELP PLEASE!!!

    Whenever I download podcasts, the "pause" and "resume" feature does not work!!! If I "pause" any of my downloads in mid-download..and then hit "resume"...I lose everything that has downloaded to that point and it goes back to the very beginning...this is aggravating since I have dial-up internet and it takes hours to download some podcasts. Do you know if this is a problem with iTunes for Mac or with the podcasts, all of which are from NPR websites? Personally I think it's iTunes...Has anyone else complained of this problem?? It only started to happen, I believe, after I updated my iTunes to version 7.5(19). Thanks so much for your help. ~spinniken

    It's not just podcasts! I have had the same problem off and on, but it's just happened again. My internet access is only 64K (not much faster than the old 56K dial-up!) and I was 60MB into the new iPhone software when I paused. That's three hours gone!

  • Can we call a Java Stored Proc from a PL/SQL stored Proc?

    Hello!
    Do you know how to call a Java Stored Proc from a PL/SQL stored Proc? is it possible? Could you give me an exemple?
    If yes, in that java stored proc, can we do a call to an EJB running in a remote iAS ?
    Thank you!

    For the java stored proc called from pl/sql, the example above that uses dynamic sql should word :
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE Ref_Cursor_t IS REF CURSOR;
    FUNCTION get_good_ids RETURN VARCHAR2 ;
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t;
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    FUNCTION get_good_ids RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'MyServer.getGoodIds() return java.lang.String';
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t
    IS table_cursor Ref_Cursor_t;
    good_ids VARCHAR2(100);
    BEGIN
    good_ids := get_good_ids();
    OPEN table_cursor FOR 'SELECT id, name FROM TableA WHERE id IN ( ' &#0124; &#0124; good_ids &#0124; &#0124; ')';
    RETURN table_cursor;
    END;
    END MyPackage;
    public class MyServer{
    public static String getGoodIds() throws SQLException {
    return "1, 3, 6 ";
    null

  • Can we Pause and Resume Copy/Paste in Mac Systems ?

    Hello,
    We all know that we can pause and resume copy/pase function in windows system using various tools, so my concern is, can we do the same in Mac systems????

    Ahhh you mean something like tera copy that is available for windows system....??
    Well i dont thing so there is any application that offers pause and resume a copy process on mac, however looking for a solution I found an application that actually provides similar functionality and a few more features for mac copying process.
    The tools name is turbo copy pro and you can find it here: http://www.turbocopypro.com/
    But unfortunately, as for all the mac applications, this one is a paid tool. I had a trial run with this application and it seemed to work fine.

  • Error while trying to call external  web service from oracle PL/SQL 10.2 g

    Hi I am trying to call an external web service from oracle PL/SQL .I am getting following run time error when I try to set the opeartion style.
    But as per the oracle documentation this is one of the 2 valid values.
    ORA-29532: Java call terminated by uncaught Java exception: operation style: "document" not supported.Teh webservice does expect the operation style as document.
    Following is the code I am executing.
    FUNCTION email
    return varchar2
    AS
    service_ SYS.utl_dbws.SERVICE;
    call_ SYS.utl_dbws.CALL;
    service_qname SYS.utl_dbws.QNAME;
    port_qname SYS.utl_dbws.QNAME;
    operation_qname SYS.utl_dbws.QNAME;
    string_type_qname SYS.utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params SYS.utl_dbws.ANYDATA_LIST;
    l_input_params SYS.utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://service.xmlservices.global.freedomgroup.com/';
    -- search for 'service name' in the wsdl
    service_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanService');
    -- this is just the actual wsdl url
    service_ := SYS.utl_dbws.create_service(HTTPURITYPE('http://hostname/GlobalWebServices/services/ClientCoreWebService?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := SYS.utl_dbws.to_qname(l_namespace, 'ClientCoreWebServiceBeanPort');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := SYS.utl_dbws.to_qname(l_namespace, 'postalCodelookup');
    -- bind things together
    call_ := SYS.utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    SYS.utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    SYS.utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    SYS.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'DOCUMENT');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
    -- thus the return type is 'string", removing 'xsd:'
    string_type_qname := SYS.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- in the line <wsdl:operation name="getCity" parameterOrder="zip">
    -- the parameterOrder is 'zip', thus we put in 'zip'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
    --vj this cud be either params or xml
    SYS.utl_dbws.add_parameter(call_, 'param1', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.add_parameter(call_, 'param2', string_type_qname, 'ParameterMode.IN');
    SYS.utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('<TFGGlobalBasicXMLDO><systemCd>GLOBAL</systemCd><username>GlobalAdmin</username><password>GlobalAdmin</password><localID>1</localID></TFGGlobalBasicXMLDO>');
    params(1) := ANYDATA.convertvarchar('<TFGGlobalPostalCodeLookupIDDO><postalCode>02446</postalCode><countryCode>USA</countryCode><stateCode>MA</stateCode><cityDisplay>BROOKLINE</cityDisplay><countyDisplay>NORFOLK</countyDisplay><include_inactive_flag>True</include_inactive_flag></TFGGlobalPostalCodeLookupIDDO>');
    -- invoke the web service
    retx := SYS.utl_dbws.invoke(call_, params);
    dbms_output.put_line(retx.gettypename);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('done' || retx_string);
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    SYS.utl_dbws.release_service(service_);
    return retx_string;
    end email;

    thsi is urgent anybody ????

  • Error -While create a connection to Microsoft SQL Sever from Oracle SQL Dev

    Dear All,
    While I am trying to create a connection to Microsoft SQL Sever from Oracle SQL Developer. The following error: "Cannot connect to Microsoft SQL Server on localhost" has been occurred.
    Can anyone please guide me to solve this..
    Thanks in advance,
    Rider

    Hi,
    Issue not supported in sharepoint on-premise team.
    In addition, as this issue is related to Powerview, I suggest you create a new thread on for Powerview forum, more experts will assist you.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=powerview
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Error Connecting to TFS 2013 from Oracle PL/SQL using MSSCCI

    Hi,
    previously we were able to connect to TFS 2008 through MSSCCI.
    we have MSSCCI 2013 provider, Teamexplorer 2013 andVersion Control Interface installed.
    While trying to connect to TFS 2013 from ORacle PL/SQL Developer 10.5 through MSSCCI ; there is an error coming up when we enter the server url ... it is allowing us only until <tfs home url> without collection...
    "The request failed with the error message
    <head><title>Document moved></title></head>
    <body><h1>Object Model</h1>This document may be found<aHREF=/<Collectionname>/Services/v1.0/ServerStatus.asmx>">http://<tfshome
    url>/<Collectionname>/Services/v1.0/ServerStatus.asmx> But the plugin picks it up automatically.. Am i correct?
    How to resolve the above error?
    Thank you
    Su

    Hi Su, 
    Thanks for your post.
    How do you manually build  your PL/SQL/Oracle projects?
    TFS Build invoke MSBuild command to build project/solution on build agent machine by default. If these projects can be built using MSBuild command line manually, then we can use TFS Build(default build process template) to build these projects.
    If these projects need be built using another complier, and this compiler support run the command line to invoke it, so you can add the InvokeProcess activity(execute the command line) to invoke this compiler to build these projects in build process template,
    then create build definition using this customized build process template.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error: ORA-03113 while executing complex java code from Oracle PL/SQL

    Hi,
    I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
    ERROR:
    ORA-03114: not connected to ORACLE
    begin
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 13685
    Session ID: 21 Serial number: 20
    Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
    Regards,
    Saravana

    Hi Saravana:
    You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
    Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
    Best regards, Marcelo.
    PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround.

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

  • Error while converting schema from oracle to SQL server

    Hello,
    I am getting following error while converting schema from oracle to SQL server using SSMA.
    I get Errors 1-3 while migrating procedures and error 4 while migrating a table.
    1- O2SS0050: Conversion of identifier 'SYSDATE' is not supported.
    2- O2SS0050: Conversion of identifier 'to_date(VARCHAR2, CHAR)' is not supported.
    3- O2SS0050: Conversion of identifier 'regexp_replace(VARCHAR2, CHAR)' is not supported.
    4- O2SS0486: <Primary key name> constraint is disabled in Oracle and cannot be converted because SQL Server does not support disabling of primary or unique constraint.
    Please suggest.
    Thanks.

    The exact statement in oracle side which causing this error (O2SS0050:
    Conversion of identifier 'to_date(VARCHAR2, CHAR)' is not supported.) is below:
    dStartDate:= to_date(sStartDate,'MON-YYYY');
    Statement causing error O2SS0050:
    Conversion of identifier 'regexp_replace(VARCHAR2, CHAR)' is not supported is below.
    nCount2:= length(regexp_replace(sDataRow,'[^,]'));
    So there is no statement which is using to_date(VARCHAR2,
    CHAR) and regexp_replace(VARCHAR2, CHAR) in as such. 'MON-YYYY'  and '[^,]'
    are CHAR values hence SSMA is unable to convert it from varchar2 to char.
    Regarding SYSDATE issue, you mean to put below code in target(SQL) side in SSMA ?
    dDate date := sysdate;
    Thanks.

Maybe you are looking for

  • Cannot connect to a local user in pdborcl

    Hi all, I created a local user named "dwh" in the pdborcl (a pdb)...Impossible to connect using sqlplus...(On windows 7) So .. SELECT v.name, v.open_mode, NVL(v.restricted, 'n/a') "RESTRICTED", d.status FROM v$pdbs v, dba_pdbs d WHERE v.guid = d.guid

  • Mapping O/R

    Hi; I would like to use Hibernate for my web application, with the following contraints : 1- I have already 50% of the SQL requestes (complex select) which are implemented 2- My application is used for only consulting of the data (nothing update in t

  • Where do i find what version of iTunes i have

    where do i find what version of itunes i am using and where do i go to see if update is available? Thnx

  • How to install Safari Extensions

    Hello, I began using Safari on Windows 8 from yesterday. When I tried to install Safari Extensions, I alwas get this message: This developer's server appears to be busy. Please try again later. What is the reason and how can I install extensions?

  • AVI's in FCP

    I have a job I'm about to begin and at the time of capture I used Sony Vegas, so all my ingested footage was captured as AVI's files. I understand that I can use AVI's in FCP but what I'm curious about, is there any loss of quality or will it cause F