Problem when executing a stored procedure

Hello
im a beginner, using v (10.2.0.1.0) of Oracle 10 g on a linux machine.
Cannot run after the procedure through query iSQLPLUS im interface.

create or replace procedure (pd_hr)
PNO varchar2,
PDT date default sysdate,
PHR number,
perr_msg out varchar2
) as
Start
PHR: = 2;
end pd_hr;

Number of phr VARIABLES;

Perr_msg VARIABLE VARCHAR2 (250);

run pd_hr('pno',,phr,perr_msg).

It flashes the following error when I try to execute the stored procedure:
ERROR on line 1:
ORA-06550: line 1, column 44:
PLS-00201: identifier "PHR" must be declared.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

I ran the following query through DBA connection before performing the procedure:
GRANT EXECUTE ANY PROCEDURE 'SCOTT ';

Any form of assistance will be invaluable!

Peter

Hi, Peter,.

Put a colon (': ') before binding variable names except when declaring:

-- No colons here:
VARIABLE phr number;
VARIABLE perr_msg VARCHAR2(250);

-- Colons needed here
execute pd_hr ('pno', NULL, :phr, :perr_msg);

Tags: Database

Similar Questions

  • How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Hello

    How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Thank you

    Jay.

    Hi if your task is running an informatica mapping you can set your DAC task to run the full mapping for incremental and full loads, so tab task just point to the mapping.

    Hope that helps.

    Thank you

  • How to execute a stored procedure on Sybase with SQL Developer

    We have accessed Sybase 15 with SQL developer.

    We can see the data in the table, if we do not, run the stored procedure (for instance sp_who) developed on Sybase.

    Could you tell me how we execute the stored procedure on Sybase with SQL Developer Sybase?

    Thank you

    Shige

    We will not intended to be a Sybase ASE customer.

    But

    A SQL Developer... @dermotoneill: Workheet advice

  • How to execute a stored procedure that returns a cursor?

    How to execute a stored procedure that returns a cursor?

    Follow the code:

    CREATE OR REPLACE PROCEDURE stp_cashin_grupo
    (p_func in VARCHAR
    p_cod_grup in full
    p_des_grup in VARCHAR
    p_logi in VARCHAR
    p_curs_rset ON infoc.pck_cashin_grupo.curs_rset
    )
    IS
    BEGIN

    If p_func = "1" then
    OPEN FOR P_curs_rset
    Select
    cod_grup
    des_grup
    dat_manu_grup
    des_logi_manu
    of infoc.tbl_cashin_grupo
    order of des_grup;
    end if;
    END stp_cashin_grupo;


    and packaging:

    CREATE or REPLACE PACKAGE pck_cashin_grupo
    AS
    TYPE curs_rset IS REF CURSOR;
    END pck_cashin_grupo;

    My question is how to execute in sql plus?
    Stp_cashin_grupo EXEC ('1', 0, ", '465990', my doubt is how to move the cursor as return)


    Thank you

    It is described in the manual

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14357/CH5.htm#sthref1122

  • Internal error: catalog view incompatible when calling a stored procedure

    Hello

    I use JDeveloper 11.1.1.4

    When you call a stored procedure from AppModuleImpl, I get this error internal error: inconsistent display catalog

    I'll call the stored procedure of this way

    String lErrCode;

    String lErrMsg;

    Result of an integer;

    ARRAY inputArray = null;

    Table STRUCT that can be passed to a PLSQL PROCEDURE

    inputArray =

    JdbcSqlMapper.preparePlSqlArrayUsingVOAttrbs (conn, recordType,

    view, rm);

    OracleCallableStatement st =

    (OracleCallableStatement) conn.prepareCall ("{?}") = call ("+

    procedureName +.

    "(?,?,?))}");

    st.registerOutParameter (1, Types.INTEGER);

    st.setObject (2, inputArray, OracleTypes.ARRAY);

    st.registerOutParameter (2, OracleTypes.ARRAY,

    recordType.getTableType ());

    st.registerOutParameter (3, Types.VARCHAR);

    st.registerOutParameter (4, Types.VARCHAR);

    St.Execute ();

    I checked the subsidies for this package to all users. All users with grants to this package.

    I don't know where I start to debug this issue.

    Kindly help.

    Thank you and best regards,

    John.

    Have yo uchecked the right of the types of data used (at least the TABLE) to the user (referred to Pokusak blog: JPublisher - incompatible catalog display)?

    Timo

  • Trigger that executes the stored procedure does not

    I have a trigger on a table which triggers the update of the column 'APPLICATION_OFFER_SENT '! The trigger looks like this:
    CREATE OR REPLACE TRIGGER SCHEMA.COPY_APPLICATIONS
    AFTER UPDATE
    OF APPLICATION_OFFER_SENT
    ON PPLE_T_APPLICATION 
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
        UPDATE_OR_INSERT_APPL(:old.PK_APPLICATION_NO);
    END;
    Simply, he runs a procedure and takes the "PK_APPLICATION_NO" as a single parameter.

    When I run the SP itdefl: exec UPDATE_OR_INSERT_APPL (1042); It works very well.
    But when its done through the relaxation it doesn't?



    The Proc looks like this:
    CREATE OR REPLACE PROCEDURE SCHEMA.UPDATE_OR_INSERT_APPL (IN_APPL_NO NUMBER) IS
    
    CURSOR c1 IS
    SELECT title, fullname, universityid, appl_no,  appl_no_hash, OFFER_EXPIRATION_DATE, APPLICATION_CANCEL_DATE, room_hall 
      FROM SCHEMA.ACCOM_APPLICATION_VIEW
     WHERE appl_no = IN_APPL_NO;
    
    rowcnt NUMBER;
    
     BEGIN
      FOR rec IN c1
          LOOP  
          SELECT COUNT(*) INTO rowcnt FROM SCHEMA2.ACCOMM_OFFER_ACCEPTANCE a WHERE a.appl_no = IN_APPL_NO;
               
               IF rowcnt = 0  THEN
                   INSERT INTO SCHEMA2.ACCOMM_OFFER_ACCEPTANCE (title, fullname, universityid, appl_no, appl_no_hash, offer_expiration_date, application_cancel_date, room_hall)
                        VALUES (rec.title, rec.fullname, rec.universityid, rec.appl_no, rec.appl_no_hash, rec.offer_expiration_date, rec.application_cancel_date, rec.room_hall);
                        COMMIT;
                        
                        
                        
               ELSIF rowcnt !=0 THEN
               
                    UPDATE SCHEMA2.ACCOMM_OFFER_ACCEPTANCE t
                       SET (t.offer_expiration_date, t.application_cancel_date, t.room_hall) = (select OFFER_EXPIRATION_DATE, APPLICATION_CANCEL_DATE, ROOM_HALL from SCHEMA.ACCOM_APPLICATION_VIEW B
                                                                                                      where B.appl_no = IN_APPL_NO);        
              
               END IF;
    
          END LOOP; 
     END;
    Published by: oraCraft on Oct / 09/2010 09:11

    Published by: oraCraft on Oct / 09/2010 09:11

    >
    Validation is in my stored procedure, is not my trigger. I'm sure it's very good
    >

    It is not very well according to the Application Developer Fundametals guide...

    >
    DDL statements are not allowed in the body of a trigger. Furthermore, no control of transaction
    statements are allowed in a trigger. SAVEPOINT, COMMIT and ROLLBACK cannot be
    used. For system triggers, TABLE {CREATE/ALTER/DROP} instructions and
    EDIT... COMPILE are allowed.
    Note: A procedure is called by a trigger cannot perform the previous transaction control statements,
    because the procedure runs in the context of the body of the trigger.
    >

    There is an exception to this rule if you use the pragma AUTONOMOUS TRANSACTION, but I do not see that in your trigger.

    Kind regards
    Bob

  • RUN THE CALLBACK IMMEDIATE VS? TO EXECUTE THE STORED PROCEDURE

    Hello

    StatementExc: = SYMBOLS. DYNPLSQL_PLUGIN_CALL_BEGIN | rec_WfFunctionSourceCode.Schema | SYMBOLS. DOTc
    || rec_WfFunctionSourceCode.package | SYMBOLS. DOTc
    || rec_WfFunctionSourceCode.OPERATION_FUNCTION_CODE | SYMBOLS. DYNPLSQL_PLUGIN_CALL_END;

    -dbms_output.put_line (4 CALL ' | to_char (SYSTIMESTAMP));
    EXECUTE IMMEDIATE StatementExc with the HELP OF RetVal1, IN OUT eoBufferia;

    How to make the implementation of RECALL as an EXECUTE IMMEDIATE to exec Stored Procedure another package?

    Thanks in advance,

    Best regards

    Domenico Simone

    Hi, Domenico,.

    What is CALLBACK in PLSQL?

    Here is an example of use of object types [emulating callbacks | http://www.adp-gmbh.ch/blog/2005/august/19.html]

    Concerning
    Peter

  • Transaction number when calling a stored procedure in osb

    Hi all

    I created a wrapper procedure to call "soa.delete_instances (this procedure will remove instances of schema SOA_INFRA)" oy locall created the user schema (ASG).

    If I run the direclt wrapper procedure in SqlDeveloper it works fine clean bodies.

    I called this procedure in OSB using the JCA adapter DB file, the procedure of the wrapper is the fine workmanship, but does not remove instances of schema SOA_INFRA.

    any help is nice.

    Thank you...

    I used data XA NO source instead of XA my problem solved.

    Thanks for the replies.

  • Problem when executing the processors in the nodes with disabled local storage

    Hello world

    We test the coherence JSR107 (a.k.a. JCache) implementation of Yannis (https://github.com/yannis666/Coherence-JSR-107) and we found the following issue when you work with a local storage where distributed cache node is disabled (using - Dtangosol.coherence.distributed.localstorage = false). Yannis implementation uses several EntryProcessors for the execution of operations get() or put () in the cache. For example, the following code is used to update a value in the cache:

    / public class PutProcessor implements InvocableMap.EntryProcessor {}

    @Override
    public Object process (input InvocableMap.Entry) {}
    BEntry entry = (BinaryEntry) BinaryEntry;
    return bEntry.isPresent ()? bEntry.getBinaryValue (): null;
    }

    }

    And put operatino is taken from the following code:

    namedCache.invoke (key, CPU)

    where processor argument contains a reference to the PutProcessor object.


    When we call JSR107 performs surgery put in the cache and code above we get following exception:

    java.lang.NullPointerException
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Storage.invoke (PartitionedCache.CDB:10)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:52)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ InvokeRequest.run (PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)

    Of course we have previously started another node in the cluster with local storage enabled.

    It seems that, as no storage card is present at the node, a NullPointerException is thrown when you try to insert the entry.

    Could someone give advice on this problem and how to overcome? This implementation is based on the processor is not compatible with the knots of localstorage cache disabled?

    Thank you in advance,

    Daniel C.

    Hello

    It sounds like COH-7180 - demand deserialization failure results in a cryptic NullPointerException, that has been fixed in one of the 3.7.1 patches. The real problem is that your entryprocessor cannot be deserialized.

  • Problems when executing transition to Oracle 11 g

    Hi all

    I use version 11.2.0.1.0 Oracle.

    I have a primary-Physical Standby (Test environment) Setup. I'm the stage swapping them.

    I followed the steps below: -.

    Primary on: -.

    SQL > select switchover_status from database v$.

    SWITCHOVER_STATUS
    ------------------------------------------------------------
    IN THE STANDBY MODE

    SQL > alter database validation to the transition to physical standby mode;

    Database altered.

    SQL > shutdown immediate;
    ORA-01507: database not mounted


    ORACLE instance stops.
    SQL > bootable media.
    ORACLE instance started.

    Total System Global Area 2054373376 bytes
    Bytes of size 2214856 fixed
    1174406200 variable size bytes
    872415232 of database buffers bytes
    Redo buffers 5337088 bytes
    Mounted database.
    SQL > select switchover_status from database v$.

    SWITCHOVER_STATUS
    ------------------------------------------------------------
    AT THE ELEMENTARY LEVEL

    SQL > select database_role from database v$.

    DATABASE_ROLE
    ------------------------------------------------
    PHYSICAL STANDBY

    On the other side, I'm trying to set up the database pending phyical primary: -.

    First, I checked the switchover_status on the standby database.

    SQL > select switchover_status from database v$.

    SWITCHOVER_STATUS
    ------------------------------------------------------------
    PENDING FAILOVER

    SQL > alter database validation at the grade crossing;
    change the database for validation at the crossing elementary school
    *
    ERROR on line 1:
    ORA-16139: media recovery required


    Now I'm in a situation where I have converted my primary eve physically but primary physical standby does not occur...

    Please advice me on this. I checked the journal report archive for both boxes before the digital switchover and they have been synchronized...

    Your suggestions are required here.

    Kind regards
    Aalami

    Hello

    With the above approach there may be loss of minor transaction & had to rebuild stby, but you can do standby DB up as main.

    With the current senario, check if suggested sequence is generated in primaries & try to save it to stby

    Also check if FAL_ * is solved

    Looks like the problem of sync you should have restarted two DB before you start the digital switchover as a best practice with 2/3 switches

    Thank you
    Ajay more
    http://moreajays.blogspot.com

  • Error in retrieving the stored procedure of the DB JDev adapter

    Hello
    I am facing a problem when configuring Jdeveloper stored procedures using the DB adapter. I use in my Sql Server 2005 database, version Jdeveloper 10.1.3.3 Version 10.1.3.1.Bpel. Connection to the database SQL Server 2005 is good, but it only displays the views and tables. I get the following error message when I try to add the sql stored procedure call
    "An error occurred while getting the database schemas. Make sure the database connection is valid and is supported"

    Can someone help me please.

    Thank you
    Phani

    Published by: Brad on October 28, 2008 11:30

    Post your email and I'll send you a complete tutorial of SQL Server.

  • Problems calling a stored procedure with DG4IFMX

    Hi guys,.

    I try to call stored procedures of database Informix, which is connected by an Oracle for Informix database gateway.

    I ran select, update, delete correctly but when I try to execute a stored procedure, that nothing is happening.

    for example:
    When I run
    call branko"@link_informix (1) «»

    It returns that it is performed successfully, without error, but as you can see below no entry is entered in the branko_test table

    to informix:

    drop the branko procedure;
    Create procedure "informix".branko (integer _vlez)
    returning a Boolean;
    If _vlez = 1 then
    insert into branko_test values ('uspesen test', '1');
    on the other
    insert into branko_test values ('test 2 ', 2' uspesen);

    end if;
    end of procedure;

    the procedure runs ok when called to informix.

    Thanks for any help

    P.S I even tried running:

    declare
    Whole RET;
    Start
    RET: = DBMS_HS_PASSTHROUGH. EXECUTE_IMMEDIATE@link_informix (' branko procedure (2)');
    end;

    but the same thing happens, no entry in the branko_test table.

    Find the root cause:
    When you are using dbaccess to call the original procedure it displays on the screen (expression)
    => remove the return value as it is not managed

    -> looks like not supported return Boolean value. Changes to the procedure of

    drop the branko procedure;
    Create procedure "informix".branko (integer _vlez)

    If _vlez = 1 then
    insert into branko_test values ('uspesen test', '1');
    on the other
    insert into branko_test values ('test 2 ', 2' uspesen);

    end if;
    end of procedure;

    allows me to execute the procedure using passthrough
    DECLARE
    result VARCHAR2 (50);
    BEGIN
    result: = DBMS_HS_PASSTHROUGH. EXECUTE_IMMEDIATE@dg4ifmx (' run the informix.branko procedure (1)');
    END;
    /

    Edited by: kgronau may 6, 2011 07:31

  • How to execute a pl/sql stored procedure as a concurrent program

    Hi all


    I created a PURGE_DEAL_REQUESTS package. It contains a QPR_DELETE_CANCELLED_REQUESTS procedure. I want to execute this stored procedure as simultaneous program in suite ebs...

    Can someone tell me how to perform this procedure as a simultaneous program (in the suite of BSE)...?


    Thank you
    Swathi.

    Switch to the responsibility at the request of the group to which you assigned the request of Conurrent.
    Navigate to view > query > submit a new request to the toolbar.

    Kind regards
    Ousseni

  • Double games of results returned on stored procedure call

    Hello

    I have a stored procedure created Java and called using the Spring JDBC using StoredProcedure class, stored procedure returns duplicate rows, is this a known problem?

    When I run the stored procedure even in DBVizualiser it not show correctly.

    The class below is used to execute the stored procedure:

    public class CustomerSearchProcedureRunner extends StoredProcedure {
     public CustomerSearchProcedureRunner(JdbcTemplate jdbcTemplate) {
      super();
      this.setJdbcTemplate(jdbcTemplate);
      this.declareParameter(new SqlReturnResultSet(RETURN_RESULTS, new CustomerRowMapper()));
      this.declareParameter(new SqlParameter(CUST_SP_IN_PARAM, Types.VARCHAR));
      this.setSql("{CALL INSURANCE.SEARCHCUSTOMER (?) ON ALL}");
      this.setSqlReadyForUse(true);
      this.compile();
     }
    }
    


    and Java Stored Procedure that runs SQLFire is given below:

    public class CustomerSearchProcedure {
     
     private static final String DOLLAR = "\\$";
     private static final String COLON = ":";
     private static final String CUST_NAME = "CUST_NAME";
     private static final String CUST_NO = "CUST_NO";
     private static final String GENDER = "GENDER";
     
     
     public static void searchCustomer (String customers, ResultSet[] outResults,
       ProcedureExecutionContext context) throws SQLException {
      StringBuilder sql = new StringBuilder();
      StringBuilder whereCondt = new StringBuilder();
      String[] tokens = new String[]{};
      
      if (customers != null && customers.trim().length() > 0) {
       tokens = customers.split(DOLLAR);
      }
      
      sql.append("<global>SELECT * FROM INSURANCE.CUSTOMERS ");
      whereCondt.append("WHERE CUST_PRIMARY IN ('Y', 'N') ");
      // Apply dynamic where condt
      for (int i=0; i < tokens.length; i++ ) {
       String token = tokens[i];
       if (token.startsWith(CUST_NO)) {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("CUST_NO = " + token.substring(token.indexOf(COLON)+1));
       }
       if (token.startsWith(CUST_NAME))  {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("CUST_NAME LIKE '"+ token.substring(token.indexOf(COLON)+1).trim() + "%'");
       }
       if (token.startsWith(GENDER)) {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("GENDER ='"+ token.substring(token.indexOf(COLON)+1).trim() + "'");
       }
      } //End of for
      
      if (whereCondt.length() > 0) {
       sql.append(whereCondt.toString());
      }
      
      Connection cxn = context.getConnection();
      Statement stmt = cxn.createStatement();
      ResultSet rs = stmt.executeQuery(sql.toString());
      outResults[0] = rs;
     } //END OF METHOD
    }
    

    A correction preceding: "for the case on the information in the TABLE of the DataSet to be targeted on each node is also sent for the tag requests will target only this dataset (and avoids duplicates).»

    should read "in the case of on TABLE query Tags will only target the local primary data on the node for tables partitioned, while for replicated tables, it is sent to only one of the lines (and so avoids duplicates in both cases).» WHERE clause to TABLE is not used for cutting data only for the size of the set of nodes to the target.

    The tag prunes yet the query to all of the local primary buckets in all cases (i.e. which WE ALL and on GROUPS of SERVERS) so the comment about and equivalent was incorrect. However, this will always be looking for data in duplicate for replicated tables and TABLE is the only way to avoid it for now.

  • Apex. Submit-&gt; process to run one of the two stored procedures on page

    version: 4.2.5

    page one region: form on the stored procedure

    region of page two: form on the stored procedure

    The region button 'submit' for the region page 2:

    ACTION: Redirect URL

    Run Validations: YES

    Target URL: javascript:apex.submit ('CALL_MY_PROC');

    'Treatments' execute the stored procedure

    Point process: submit now - after calculations and Validations

    Enforcement process: once a Page visit (by default)

    ...

    Conditions

    When you press the button:-no Condition button

    Condition type: request = Expression 1

    Expression 1: REQUEST = CALL_MY_PROC

    The expected behavior is to call the stored procedure in the region on two page without invoking the other stored procedure.  Separation of concerns is desired, this button sends the form this proc, this button argues that form to this proc.  Nor should call each other, so to speak.

    The stored procedure is not called when I click 'Submit' (button from region to region page two).  How can I solve this?

    Thanks in advance for any guidance.

    -abe

    Solution: the status... are not REQUEST =

    -abe

Maybe you are looking for

  • How to select the subfolders to sync photo

    How can I select subfolders to synchronize photos from my Windows PC to my iPhone from iTunes? For example, I have a folder of photos called "2016" contains many different folders of different holiday and I want only to synchronize one folder, not al

  • How can I configure the order of networks wifi on my iPhone 6?

    I was browsing the Internet and looking for throughout my general settings but I'm not able to find a way to configure the order of networks wifi on my phone, as I can with my MacBook Air (via Network Preferences > advanced > tab Wi - fi). I had to d

  • Looking for help on the restructuring after several virus attacks

    Hi all! I want to reformat my laptop (Compaq Persario CQ61). I caught a backdoor, Trojan a few months back and I can't keep my computer virus. It takes all the Anti Virus software that I install. I ordered and received Windows 7 operating and the CD

  • Portege M700 - 4 devices called Data Interface in the Device Manager

    I am facing a problem with the toshiba portege m700.In Device Manager, I have 4 devices called Data Interface. I completely wiped the hard drive and formatted in ntfs.Then installed Windows Vista 32-bit and installed all the drivers available on the

  • IKEv2 vpn dynamic sites

    I do ikev2 VPN with the ASA and sites have a dynamic IP. A solution is to do a vpn site-to site, configure ASA headoffice with dynamic crypto map and the asa of the client with static cryptographic cards and put even the intellectual Headquarters pro