Re: Requirements to create stored procedures

From: Scott Urman <surman_at_oracle.com>
Date: 1995/08/29
Message-ID: <4208r5$c1l_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <DE2oxI.qL_at_mecati.mecasoft.ch>, unter_at_mecati.mecasoft.ch (Stefano UNTERNAEHRER) writes:
|> Hi folks!
|> I'm trying to create my first stored procedure, but it seems I've missed
|> some step. Here is what I've done:
|>
|> 1- as a certain user (table owner) I start an sqlplus session
|> giving this command:
|>
|> SQL> create procedure
|> 2 mecaora.elem_mod_chiave(old_val in integer, new_val in integer)
|> 3 as
|> 4 v_sigla varchar2(6);
|> 5 begin
|> 6 select ...;
|> 7 insert ...;
|> 8 update ...;
|> 9 delete ...;
|> 10 end;
|> 11
|>
|> Here I've noted the first problem... how to STOP the 'create procedure' ??

Just type in a forward slash '/' (without the quotes). It's short for the SQL*Plus 'run' command, and means 'OK, now run what I just typed in'.

|> Why is the '11' arrived ?? So, maybe I don't have run the dbmsstdx.sql
|> script as sys user;
|>
|> 2- as sys user I start an sqlplus session giving the command:
|>
|> SQL> AT/users/oracle7/rdbms/admin/dbmsstdx.sql
|> (sorry for the AT, I can give the 'at' sign in this shell..)
|>
|> Here is the output:
|> **************************** BEGIN OUPUT ******************************
|> drop package dbms_standard
|> *
|> ERROR at line 1:
|> ORA-04043: object DBMS_STANDARD does not exist
|>
|> create package dbms_standard is
|> *
|> ERROR at line 1:
|> ORA-06553: PLS-213: package STANDARD not accessible
|>
|> create package body dbms_standard is
|> *
|> ERROR at line 1:
|> ORA-06553: PLS-213: package STANDARD not accessible
|>
|> Synonym dropped.
|>
|> Synonym created.
|>
|> grant execute on dbms_standard to public
|> *
|> ERROR at line 1:
|> ORA-04042: procedure, function, package, or package body does not exist
|>
|> **************************** END OUPUT ******************************
|>
|> Why is this script failing? What have I missed?

Rather than run dbmsstdx.sql by itself, run catproc.sql. This will run all the necessary scripts to use PL/SQL. Be sure to run this either connected internal, or connected as SYS.

|> What I have to do? Thank you for any info!!!

My pleasure.

|>
|> Stefano
|> ____________________________
|> ______________________| Stefano Unternaehrer |__________________________
|> \ Mecasoft SA | Oracle DBA | fax: +41 93 335 507 /
|> \ 6600 Muralto | and PL/SQL, Pro*C | voice: +41 93 337 444 /
|> \ | C, XWindow & Motif | /
|> / | Software Developer | email: \
|> / Switzerland Europe |____________________________| dba,unter_at_mecasoft.ch \
|> /________________________) (____________________________\
|>
|>
Received on Tue Aug 29 1995 - 00:00:00 CEST

Original text of this message