PL/SQL ..Oracle.. Procedural Option
I installed oracle 8i personal on my PC.
going through the Introduction to SQL PL/SQL course. The SELECT Statement is working fine. But When I reach to write programs/scripts with ACCEPT, TTITLE, BTITLE.
I am getting THe following Error message:
"You can use PL/SQL only if you have ORACLE with the procedural option".
I don't know from where I can get the procedural option.
Please tell me what to do.
Thanks
Malik.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by malik riman ([email protected]):
I installed oracle 8i personal on my PC.
going through the Introduction to SQL PL/SQL course. The SELECT Statement is working fine. But When I reach to write programs/scripts with ACCEPT, TTITLE, BTITLE.
I am getting THe following Error message:
"You can use PL/SQL only if you have ORACLE with the procedural option".
I don't know from where I can get the procedural option.
Please tell me know what to do.
Thanks
Malik.<HR></BLOCKQUOTE>
null
Similar Messages
-
How to install Procedural Option in Oracle 10g Database express edition
When i try execute exec send_mail shows error ORA-00900: invalid SQL statement.
Error code shows "This error can occur if the Procedural Option is not installed "
How to install Procedural Option in Oracle 10g express edition
I'm using Oracle 10g Database express edition. Let me know how to run a procedure.I'm not sure of the meaning of ORA-00900 for Oracle XE but I think that PL/SQL is already installed by default according to the XE features list.
See the Oracle® Database Express Edition 2 Day Developer Guide about procedure call. -
SQL Server Procedures to Oracle Functions
Is there an option in the Migration Assistant 1.2.0 that will convert the SQL Server procedures into Oracle Functions (rather than procedures)?
By default the T/SQL procedures return a integer status code. Our middle-tier requires calls to procedures to return a status code (integer), and I'd like the migration to modify the "procedure" to a "Function returning Integer" rather than Procedure.Thomas,
This is not an option currently. We will look into this for a future release. You could manually make the changes post conversion, prior to generation. As well as adding appropriate RETURN statements, you may want to add additional exception handling so the appropriate error is passed back.
Donal -
How to write a PL/SQL stored procedure in Oracle to call Webservice
Can any one pelase send me a code on how to write a PL/SQL stored procedure in Oracle database to call the Webservice ?
Thanks,
RajeshWere you able to solve this problem
-
Help in calling sql loader and an oracle procedure in a script
Hi Guru's
please help me in writing an unix script which will call sql loader and also an oracle procedure..
i wrote an script which is as follows.
!/bin/sh
clear
#export ORACLE_SID='HOBS2'
sqlldr USERID=load/ps94mfo16 CONTROL=test_nica.ctl LOG=test_nica.log
retcode=`echo $?`
case "$retcode" in
0) echo "SQL*Loader execution successful" ;;
1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
3) echo "SQL*Loader execution encountered a fatal error" ;;
*) echo "unknown return code";;
esac
sqlplus USERID=load/ps94mfo16 << EOF
EXEC DO_TEST_SHELL_SCRIPT
it is loading the data in to an oracle table
but the procedure is not executed..
any valuable suggestion is highly appriciated..
Cheersmultiple duplicate threads:
to call an oracle procedure and sql loader in an unix script
Re: Can some one help he sql loader issue. -
Conversion from SQL Server Stored Procedures to Oracle Procedures
We are having an ERP Package which runs on SQL Server 7.0. For the Reports and Transaction windows, we are using the stored procedures extensively.Now , we want to convert it to Oracle Procedures.Where can i find the resource for this subject.
Please mail me to [email protected]
Regards,
BuhariOracle provides a tool, called the Migration Workbench, that can do an automated conversion. In the newest release of SQL Developer, Oracle's PL/SQL development GUI, the Migration Workbench is built in.
Be aware, though, that there are limits to what an automated tool is capable of doing. In all probability, you'll want to manually adjust at least a handful of the procedures after any automated tool converts them in order to make things more efficient or to adjust logic that may depend on database-specific behavior. If you have code, for example, that assumes that writers block readers, that code will no longer block in Oracle, which might require re-assessing your algorithm. In addition, there are numerous approaches to developing procedures that are very common in SQL Server (the use of temp tables, for example), that while possible in Oracle generally aren't the most efficient approach.
Justin -
Migrate MS SQL Server procedure to Oracle
Can any one suggest me any user friendly tool to Migrate MS SQL Server procedure to Oracle. I think using OMWB we can migrate schemas, as i could not find any interface to migrate a single procedure
I tried using swisssql, but the trial version only migrates 10 tables and 10 indexes and no other objects. Is there any other tool which shall migrate only procedures? If so plz suggest me.....
-
Migrating Transact SQL Stored Procedure & Funtions to Oracle 9i Procedures
Is it possible to Migrate Transact SQL Stored Procedure & Funtions in MS-SQL to Oracle 9i Procedures & Funtion . I am an Bigginer in Oracle and SQL.Is their any tool available for this?
This feature is currently available in the Oracle Migration Workbench. with the Microsoft SQL Server plugins.
Have you tried it?
Regards,
Niall -
Execute Sql Server Procedure from Oracle Forms
Hi,
I have Forms6i and need to create a form that execute a procedure in a SQL Server Database. This procedure inserts records retrieves from our Oracle Database (i passed the fields as parameters of the SQL Server procedure).
What did i need to do to achieve this task.-
Thanks in advance.-See
http://www.oracle.com/technology/products/forms/pdf/275201.pdf
Also search the forum and you will find discussions on this topic.
Message was edited by:
Mark Roberts -
Calling ORACLE/SQL stored procedure...
Hello,
Is it possible to invoke non-parametrized Stored Procedures (a procedure that, neither having IN parameter nor OUT parameter) from BizTalk.?
Any suggestion/solution?
Thanks,
Prajakt.
Praj DixitPraj,
Yes possible.
Create a .NET helper which will call the stored procedure and handle the return value/recordset from sp and in your BizTalk artifacts call this .NET helper/wrapper to SQL stored procedure.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
How to zip a csv file in a oracle procedure
Hi
i've just created an oracle procedure to put a 120 MB csv file in a shared folder but i need a way to zip this file...is it possible inside a procedure with a command??
My only alternative is to use toad after a SELECT...but it isn't my goal?
Please help meHi,
You can create a stored procedure that will contain a PL/SQL code that will "create" a scheduled job. Take a look at example below:
-- I created a bash file that will be executed in order to create the zipped file
oracle@legatti:/tmp> cat zipfile.sh
#!/bin/sh
/usr/bin/zip /tmp/test.zip /tmp/test.dmp
-- This is the file that will be zipped
oracle@legatti:/tmp> ls -lh test.dmp
-rwxrwxrwx 1 oracle oinstall 193M 2007-12-27 10:10 test.dmp
-- I will connect to Oracle in order to create the stored procedure
oracle@legatti:/tmp> sqlplus / as sysdba
SQL*Plus: Release 10.1.0.2.0 - Production on Thu Dec 27 10:18:39 2007
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
-- Let's create the stored procedure
SQL> create or replace procedure zip is
2 begin
3 dbms_scheduler.create_job(job_name => 'zipfile',
4 job_type => 'executable',
5 job_action => '/tmp/zipfile.sh',
6 enabled => true,
7 auto_drop => true);
8 end;
9 /
Procedure created.
-- Now, run the procedure created above
SQL> exec zip;
PL/SQL procedure successfully completed.
-- Just certify that job was executed successfully
SQL> select job_name,status,log_date,run_duration
2 from dba_scheduler_job_run_details
3 where job_name='ZIPFILE';
JOB_NAME STATUS LOG_DATE RUN_DURATION
ZIPFILE SUCCEEDED 27/12/07 10:19:18,883833 -02:00 +000 00:00:17
-- Now you can take a look at zipped file below
SQL> !ls -lh test.*
-rwxrwxrwx 1 oracle oinstall 193M 2007-12-27 10:10 test.dmp
-rw-r--r-- 1 oracle oinstall 32M 2007-12-27 10:19 test.zipHave a lot of fun ... ;-)
Cheers
Legatti -
Calling oracle procedure from ABAP program
There is a requirement to call the oracle stored procedure with some input parameter from ABAP program.
Suppose we have order number which is entered by the user in ABAP program.
This order number needs to be passed to oracle stored procedure as an input parameter in the same ABAP program.
We can call the oracle stored procedure without parameter using the following syntax
exec sql
execute procedure <procedure name>
end exec.
But do not know how to execute the oracle stored procedure with some input parameter?Apologies , following is the correct code.
This will definetly solve your problem.
DATA scarr_carrid TYPE scarr-carrid.
SELECT-OPTIONS s_carrid FOR scarr_carrid NO INTERVALS.
DATA s_carrid_wa LIKE LINE OF s_carrid.
DATA name TYPE c LENGTH 20.
TRY.
EXEC SQL.
CREATE FUNCTION selfunc( input CHAR(3) )
RETURNING char(20);
DEFINE output char(20);
SELECT carrname
INTO output
FROM scarr
WHERE mandt = '000' AND
carrid = input;
RETURN output;
END FUNCTION;
ENDEXEC.
LOOP AT s_carrid INTO s_carrid_wa
WHERE sign = 'I' AND option = 'EQ'.
TRY.
EXEC SQL.
EXECUTE PROCEDURE selfunc( IN :s_carrid_wa-low,
OUT :name )
ENDEXEC.
WRITE: / s_carrid_wa-low, name.
CATCH cx_sy_native_sql_error.
MESSAGE `Error in procedure execution` TYPE 'I'.
ENDTRY.
ENDLOOP.
EXEC SQL.
DROP FUNCTION selfunc;
ENDEXEC.
CATCH cx_sy_native_sql_error.
MESSAGE `Error in procedure handling` TYPE 'I'.
ENDTRY.
Reward points if usefull.
Thanks and regards,
Veerendranath. -
Procedural Option, how to install it?
Hello,
Some of my fellow developers is getting an ORA-900 error when trying to
issue an "exec <PROCEDURE>...." from toad and other external server
apps.
Regarding the explanation of the error in oracle documentation
(http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96525/e900.htm)
it seems that if the PL/SQL info does not appear in the SQL*Plus banner
the component is not installed.
I tried as suggested:
$ sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.7.0 - Production on Thu Jan 25 09:00:32 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
PL/SQL Release 9.2.0.7.0 - Production
CORE 9.2.0.7.0 Production
TNS for IBM/AIX RISC System/6000: Version 9.2.0.7.0 - Production
NLSRTL Version 9.2.0.7.0 - Production
SQL> select comp_name, version, status from dba_registry
COMP_NAME VERSION
STATUS
Oracle9i Packages and Types 9.2.0.7.0
VALID
Oracle9i Catalog Views 9.2.0.7.0
VALID
Oracle Workspace Manager 9.2.0.1.0
VALID
I am a bit puzzled since SQL*Plus banner does not show PL/SQL info but
v$version does. Anyway, I still haven't found in the web/metalink a way
to reinstall Procedural Option. Please, can someone help me on this?
Thanks in advance.If you are trying to run a procedure already created, you have procedural option since you were able to create that procedure.
Not all modules in toad will allow you to do a EXEC command. Goto the SQL command line mode in TOAD (should be there, I do not use TOAD so do not know) and try the EXEC there.
or as suggested above, always resort to using BEGIN ... END ; construct. -
Unable to use the values returned by a PL/SQL stored procedure in a XSQL page
Hi,
I've been messing around with XML and XSQL in particular. I was trying to write a xsql page to display a report with account totals...I have the following .xsql which calls a PL/SQL stored procedure :
<?xml version="1.0"?>
<xsql:query connection="pfcdm" xmlns:xsql="urn:oracle-xsql">
<xsql:set-session-param name="zasset_total" value="100">
<xsql:dml connection="pfcdm">
rraman.sp_vw_id(zasset_total,zinvm_total,zmkt_val);
</xsql:dml>
</xsql:set-session-param>
select 'Asset total is {@zasset_total}' as "ASSET_TOTAL" from dual
</xsql:query>
My procedure sp_vw_id returns the values that it should. But, I am not sure how to declare variables within a page, and to output the return values. There is very scanty documentation on the usage of <xsql:dml> or <xsql:ref-cursor-function>.
Any response would be greatly appreciated.
Thanks,
RajaHere is the example from the Oracle9i (complete rewrite) of the XSQL Chapter in our Oracle documentation.
Question
I using <xsql:dml> to call a stored procedure which has one OUT parameter, but I was not able to see any results. The executed code results in the following statement:
<xsql-status action="xsql:dml" rows="0"/>
Answer
You cannot set parameter values by binding them in the position of OUT variables in this release using <xsql:dml>. Only IN parameters are supported for binding. You can create a wrapper procedure that constructs XML elements using the HTP package and then your XSQL page can invoke the wrapper procedure using <xsql:include-owa> instead.
For an example, suppose you had the following procedure:
CREATE OR REPLACE PROCEDURE addmult(arg1 NUMBER,
arg2 NUMBER,
sumval OUT NUMBER,
prodval OUT NUMBER) IS
BEGIN
sumval := arg1 + arg2;
prodval := arg1 * arg2;
END;You could write the following procedure to "wrap" it, taking all of the IN arguments that the procedure above expects, and then "encoding" the OUT values as a little XML datagram that you print to the OWA page buffer:
CREATE OR REPLACE PROCEDURE addmultwrapper(arg1 NUMBER, arg2 NUMBER) IS
sumval NUMBER;
prodval NUMBER;
xml VARCHAR2(2000);
BEGIN
-- Call the procedure with OUT values
addmult(arg1,arg2,sumval,prodval);
-- Then produce XML that encodes the OUT values
xml := '<addmult>'| |
'<sum>'| |sumval| |'</sum>'| |
'<product>'| |prodval| |'</product>'| |
'</addmult>';
-- Print the XML result to the OWA page buffer for return
HTP.P(xml);
END;This way, you can build an XSQL page like this that calls the wrapper procedure:
<page connection="demo" xmlns:xsql="urn:oracle-xsql">
<xsql:include-owa bind-params="arg1 arg2">
BEGIN addmultwrapper(?,?); END;
</xsql:include-owa>
</page>This allows a request like:
http://yourserver.com/addmult.xsql?arg1=30&arg2=45
to return an XML datagram that reflects the OUT values like this:
<page> <addmult><sum>75</sum><product>1350</product></addmult>
</page> -
PL/SQL Stored procedures vs C# code.
Hi All
We are going to start designing a kind of transactional application with huge volume of data (150 million records per month). Our selected DB engine is Oracle 10.g while C# is selected development language.
Because of big volume of data performance is one of the most important factors for us, and the technical design should gain the best level of performance.
What i'm looking for and studing for it is to define which kind of operation shall be done by Stored Procedure which will be written by PL/SQL or by C# classes?
I don't interested in to handle complicated and complex jobs using PL/SQL stored procedures while the performance really deserve it.Hello,
Well, my philosophy is to leverage the database as much as possible. I have worked with applications that had no "select", "insert", "update" or "delete" statements in them. Instead, stored procedures and functions inside of PL/SQL packages and bodies were used. Some people will argue strongly against that, but I belong to the "thick database" group rather than the "the database is just a persistence layer that I have to deal with" group. To me it makes sense to co-locate the code that works on the data with the data. If you are working with large volumes of data, I find the bulk operations available via PL/SQL to be very handy.
Here's an AskTom thread that deals with this general issue:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:12083187196917
Whilst the thread is primarily about Java, you can substitute just about any other language and the meaning will still carry over.
Regards,
Mark
Maybe you are looking for
-
I'm ruining Arch 3.13.6-1-Arch 64bit. I have nvivda-304xx(utils, opencl, libvdpau, libcl) installed. I can't start Xfce4, using startx or from KDM. I can run Kde but the windows have no titlebar and Alt-F2 only shows single letters when typing in a p
-
Hi all, I'm starting migrating a address base into my system via LSMW and RSADRLSM02. I have some basic problem with this program RSADRLSM02. I don't know where to fing logical patch to log file. In specyfing files I configured converted data to be s
-
Hello Sir, I am using Web Application and using Crystal Rpt . When Crystal Report OPens it gives me an Error as: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. Please solve this issue ...
-
i see strange red light the bottom the my Mac pro black cylinger. its went out about less than 3 sec. so what was that??
-
Premiere PRO save project error if CC is runing.
I have a problem with my Premiere Pro which wont save or auto-save if Creative Cloud application is running. I do save directly in a folder which CC is syncin to cloud. I have same setup at home and at office, sicne I can work from either locations (