Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Executing procedures

Re: Executing procedures

From: M. Armaghan Saqib <armaghan_at_yahoo.com>
Date: Tue, 14 Dec 1999 12:44:43 GMT
Message-ID: <835e3r$vfh$1@nnrp1.deja.com>


What I understand from your description is that you want to see the execution results of your packages or procedures in SQL Plus.

SQL Plus does not directly provide any command to do so. What you can do is:

  1. Create another procedure (test) to call this procedure with whatever paramters you want to pass/return.
  2. Write this parameters to display using dbms_output.put_line.
  3. Issue a command SET SERVEROUTPUT ON SIZE 1000000
  4. Execute this (test) procedure in SQLPlus with EXECUTE test

regards,

M. Armaghan Saqib


<simonbach_at_my-deja.com> wrote in message news:<835avr$th4 $1_at_nnrp1.deja.com>...
> I have not really used the SQL/PL in oracle before , but I have
> written in other SQL languages. I have used the Oracle Migration
> WorkBench to migrate a database over from MSQL Server and this worked
> well. I managed after some manipulation to get 78 stored procedures
> across ( all of the ones that I needed ). I have written stored
> procedures as tests before and tried to run them in SQL*Plus , but
> only the without parameters or recordsets being returned seem to
> work even though they are valid the actual execution in SQL*Plus
> does not seem to work.
>
> A typical example of the code I am running is below:
>
> SPCASESDISTPkg PACKAGE CODE :
>
> AS
> TYPE RT1 IS RECORD (
> acronym rtpes.acronym%TYPE --
> name rtpes.name%TYPE --
> );
> TYPE RCT1 IS REF CURSOR RETURN RT1 ;
>
> END;
>
> *************************************************************
>
> PROCEDURE CODE :
>
> (
> RC1 IN OUT SPCASESDISTPkg.RCT1)
> AS
> Sto0_selcnt INTEGER;
> Sto0_error INTEGER;
> Sto0_rowcnt INTEGER;
> Sto0_crowcnt INTEGER := 0;
> Sto0_fetchstatus INTEGER := 0;
> Sto0_errmsg varchar2(255);
> Sto0_sqlstatus INTEGER;
> BEGIN
> OPEN RC1 FOR
> SELECT acronym, rtpes.name FROM rtpes;
> RETURN;
> END spCasesDist;
>
> *************************************************************
>
> How do I execute this procedure in SQL*Plus in order to return
> a recordset.
>
> I am sorry about the simplicity of the problem , but I am just a
> beginner to this and I have to start somewhere.
>
> Any help will be extremely appreciated.
>
> Michael O'Sullivan
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 14 1999 - 06:44:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US