How to show stored procedure code
Hi,
how can I get the create code of a stored procedure by using sqlplus instead of sql-developer? I want to get the whole code of the stored procedure. I've seen that by writing
SQL> desc proced_1
I get Argument Name, Type and In/Out Default of the stored procedure but if I want to get the "create procedure" code, how can I do?
Thanks!
Hai
Try this
Select * from user_source where name='Procedure_name'
order by line;
Regards
Srikkanth.M
Similar Messages
-
How to use Stored Procedures in form 6i Blocks
Dear Friends,
I would like to know how to use Stored Procedures while creating blocks in Data Block Wizard in forms 6i application.
Please send me sample code of stored procedure.
Regards,
Khader.The Data Block Wizard is not for creating stored procedures. It will allow you to use a stored procedure in your form. See the help documentation for how to use the wizard.
Here's an example of a simple procedure. If you search the database forum or the web, you will find many examples.
CREATE OR REPLACE PROCEDURE procedure_name (value OUT NUMBER ) AS
BEGIN
SELECT COUNT(*) INTO value
FROM your_table;
END;
Message was edited by:
Mark Roberts -
How to call stored procedure in hibernate
hi ,
can any one help me how to call stored procedure in hibernate.Given code in hbm.xml
and also plz tell me what is the use of <return-property/>in given hbm.xml file.
<sql-query name="selectEmployees_SP" callable="true">
<return alias="emp" class="com.centris.Employee">
<return-property name="eno" column="eno"/>
<return-property name="ename" column="ename"/>
<return-property name="address" column="address"/>
<return-property name="salary" column="salary"/>
{ ? = call p_retrieve_employees() }
</return>
</sql-query>Hi,
Your question isn't related to Java Programming and should be asked in a [Hibernate forum|http://forum.hibernate.org/]
Kaj -
How to call stored procedure from Pro*C
How to call stored procedure from Pro*C ?
my system spec is SuSE Linux 9.1, gcc version : 3.3.3, oracle : 10g
my Pro*C code is the following..
EXEC SQL EXECUTE
begin
test_procedure();
end;
END-EXEC;
the test_procedure() has a simple update statement. and it works well in SQL Plus consol. but in Pro*C, there is a precompile error.
will anybody help me what is the problem ??I'm in the process of moving C files (with embedded SQL, .PC files) from Unix to Linux. One program I was trying to compile had this piece of code that called an Oracle function (a standalone), which compiled on Unix, but gives errors on Linux:
EXEC SQL EXECUTE
BEGIN
:r_stat := TESTSPEC.WEATHER_CHECK();
END;
END-EXEC;
A call similar to this is in another .PC file which compiled on Linux with no problem. Here is what the ".lis" file had:
Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Error at line 193, column 5 in file weather_check.pc
193 BEGIN
193 ....1
193 PCC-S-02346, PL/SQL found semantic errors
Error at line 194, column 8 in file weather_check.pc
194 :r_stat := TESTSPEC.WEATHER_CHECK();
194 .......1
194 PLS-S-00000, Statement ignored
Error at line 194, column 18 in file weather_check.pc
194 :r_stat := TESTSPEC.WEATHER_CHECK();
194 .................1
194 PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
System default option values taken from: /oracle_client/product/v10r2/precomp/ad
min/pcscfg.cfg
Error at line 194, column 18 in file weather_check.pc
:r_stat := TESTSPEC.WEATHER_CHECK();
.................1
PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
Error at line 194, column 8 in file weather_check.pc
:r_stat := TESTSPEC.WEATHER_CHECK();
.......1
PLS-S-00000, Statement ignored
Semantic error at line 193, column 5, file weather_check.pc:
BEGIN
....1
PCC-S-02346, PL/SQL found semantic errors -
How to call stored procedures from EF 6.1.3
Hi
I need to create many reports and I wanna use SPs, with parameters, the question is how to use it from ntity Framework CodeFirst ? I am using EF 6.1.3
I 've found examples using EF but not EF CF, any sample please ?
thanks in advance
Salu2 Sergio TYou create a type to return and pass it as a type...
Like this:
http://stackoverflow.com/questions/20901419/how-to-call-stored-procedure-in-entity-framework-6-code-first
context.Database.SqlQuery<YourEntityType>("storedProcedureName",params);
ps
That was pretty easy to google, by the way.
And... it's not really wpf.
Shrug.
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
How to use Stored Procedure Call in Sender JDBC adapter
Hi All,
Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
XierHi Xler
refer these links
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, you can check Sriram's blog for executing Stored Procedures,
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
This blog might be helpfull on stored procedures for JDBC
JDBC Stored Procedures
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Please go through these threads and see if it helps...
Re: How to execute Stored Procedure?
Re: Problem with JDBC stored procedure
Thnaks !! -
How to modify stored procedures in SQL Azure database in SQL server express 2012
Hi,
I want to modify stored procedures in SQL Azure database in SQL Server Express 2012. But when right click on the stored procedure in Object Explorer, there is no option "Modify" as for SQL Server database. I wonder how to modify stored procedures in SQL
Azure database in SQL Server Express 2012. Thanks.
YorkHi,
Not sure whay there is no modify..
As a workaround can you try this and see if you can modify proc..
Script Procedure As-> Alter To->New query window..
- Chintak (My Blog) -
HOW TO USE STORED PROCEDURES IN JASPERREPORTS(URJENT)
Hi,
i'm using jasperreports in struts based project. How to use stored procedures in jasperreports. pls send the solution urjent
Thanks in advance
rameshHi,
Refer the below link:
JDBC:
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
Stored Procedures-
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
http://www.ics.com/support/docs/dx/1.5/tut6.html
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
http://www.ics.com/support/docs/dx/1.5/tut6.html
http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
http://www.sqlteam.com/article/stored-procedures-an-overview
HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
refer the below link which has all the associated action
http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
Chirag -
How to use stored procedures in DIAdem and Can the stored procedures be used to return values?
Can anyone please tell me how to use stored procedures in diadem and to return values from it. Its really important, can you please answer it at the earliest.
Thanks In advance
spiyaHi Spria,
I'm very sorry for the mix-up, I thought Allen was going to answer you back with the particulars that we found out. Check out the attached Word document and the below tidbits:
The built-in DIAdem ODBC functions {SQL_...()} can only call stored functions, which return a scaler result {found then in SQL_Result(1,1)}. The syntax for this with an ORACLE db is
"select function(parameters) from package"
...where package defaults to "dual" if you don't use your own package.
There might be exceptions to that though, and the syntax will be different for other databases. Note that stored ORACLE procedures can NOT be called from the ODBC functions, instead you must use either ADO function calls in the DIA
dem VBScript or the OO4O COM wrapper that ORACLE provides (this is described in further detail in the below Word document).
Hope this helps,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Attachments:
Calling_ORACLE_Stored_Procedures_from_DIAdem.doc 28 KB -
How to use Stored Procedures in JDBC sender side and receiver side
Hello,
Can anyone explain how to use stored procedures in configuring the scenario using JDBC adapter at bothe sides sender nad receiver..
Thanks,
SooryaHi,
Refer the below link:
JDBC:
Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 --> for jdbc receiver: file -JDBC
Stored Procedures-
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
http://www.ics.com/support/docs/dx/1.5/tut6.html
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
http://www.ics.com/support/docs/dx/1.5/tut6.html
http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
http://www.sqlteam.com/article/stored-procedures-an-overview
HI in the message mapping structure u need to specify the different action and also u need to specify the procedure name.
refer the below link which has all the associated action
http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
Chirag -
How to implement Stored procedure in OBIEE
Hi experts
How to implement Stored Procedure in OBIEE..
My Input is Date..
Thanks in advance
Regards
FrndsDouble post :
Re: How to get the previous monthend data and currentdate data in OBIEE report
You don't need a stored procedure.
If you want the amount only for one date, you can use the filter option in the formula :
FILTER("Sales Facts"."Amount Sold" USING (Time.Day = '31 jan'))You can calculate the last day with the timestampdiff function
31Jan = 1 Feb - 1 dayIf you want the amount of the month see my post here :
Re: How to get the previous monthend data and currentdate data in OBIEE report -
How to edit stored procedure from sqlplus ?
Hi,
Can anyone advise how to edit stored procedure from sqlplus ?
Many thanks.You can get the source for an object from SQL*Plus by querying the user_source table, i.e.
SQL> create procedure foo
2 as
3 begin
4 dbms_output.put_line( 'foo' );
5 end;
6 /
Procedure created.
SQL> select text
2 from user_source
3 where name = 'FOO'
4 order by line;
TEXT
procedure foo
as
begin
dbms_output.put_line( 'foo' );
end;Most commonly, though, if you are using SQL*Plus and a text editor to develop stored procedures, you will have all your stored procedures in .sql files that you edit and just use SQL*Plus to create (or recreate) the stored procedures.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
XSQL: how to invoke stored procedure from XSQL
Any one has example on how to invoke stored procedure within XSQL with associated *.xsl? What the syntax looks like? Thanks.
If you want to simply invoke a stored procedure, use:
<xsql:dml>
begin
proc(args);
end;
</xsql:dml>
If you want to return XML that your stored procedure "prints" to the OWA page buffer, then use:
<xsql:include-owa>
If you want to invoke a stored function that returns a REF CURSOR function, then use <xsql:ref-cursor-function>
null -
How to exclude stored procedures from migration
Is there a way to excloude procedures functions and views from migration sybase to oracle
Hi,
In the v4 SQL*Develeoper ONLINE migration in the TRANSLATE panel you can remove the 'ALL_PROCEDURES' object.
Alternatively, in the script generated to create the objects you could manually remove the stored procedure code.
Regards,
Mike -
How to Migrate Stored procedure on Sql server 2008 to Oracle Database
Guys, I need help vey badly as I am new in this field.
Problem is that, I have to migrate stored procedure on Sql server 2008 to oracle Oracle database:
Whole scenario--
1. Sql Server 2008 application on Windows server (source machine)
2. I have to migrate 70 Stored Procedure
3. To Oracle Database on Linux machine (Target machine)
Any method (no problem)
Please, help me or give me any reference as I don't know which keyword is differ in both database.
Thanks in advanceHi,
You could the free Oracle SQL*Developer to do this.
There is information and a download link here -
Oracle SQL Developer</title><meta name="Title" content="Oracle SQL Developer"><meta n…
and information on using it for migrations here -
http://www.oracle.com/technetwork/database/migration/index-084442.html
You could use it in 2 ways -
1. Go through a migration but just pull the stored procedure code from the file created after you generate the SQL from the SQL*Server database
2. Use the scratch editor accessed from -
- Tools - Migration - Scratch Editor
and paste the SQL*Server stored procedure code into the window and it will convert it to Oracle code. The tool is very good but may have problems if you have very complicated procedures that use SQL*Server specific utilities.
Regards,
Mike
Maybe you are looking for
-
I am using a Mac and when I save my files as a jpeg, the files become much smaller, and consequently darker and blurrier. What can I do to fix this? I have tried to figure out how to chat with someone at Adobe, but they certainly don't make it easy
-
Oracle 8i: Oracle enterprise manager console
Dear all, I installed oracle 8i (8.1.6) server on linux and client on my own NT machine. I had no problem to access the database using sqlplus and DBA studio. I also configured oracle management server and tried to using Oracle Enterprise Manager Con
-
Is there a way to make my HP 6400 printer/fax compatible with WIndows 8.1?
I have tried to install my printer software for my HP all-in-one 6400, but have gotten a message that it is not compatible with Windows 8.1. Is there any type of "patch" or anyhting I can do short of purchasing a new printer?
-
Need help clearing up an image of a front license plate from a break in at my office
I had a break in at my office and got a video of the car and front plate. Unfortunately Dropcam's quality is not great so the image is a little blurry. I'm hoping someone on this forum can help me clear it up. I've tried various filters in Photoshop
-
Service Notification and service order in ISU
Dear's I want to know that how to configure Service notification and service order in ISU and in ISU their is any posibility if i put a note with meter reading the notification is auto genrate? Witing for your positive responce Regards, Syed Zahoor A