473,786 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Patience for a Oracle Noobie

Hi, I am a SQL Server programmer using Oracle for the first time.

In our .NET client apps which use a SQL Server back end, we would use Stored
Procedure exclusively for all database access for increased security as well
as the pre-compiled advantage.

To minimize trips to the db server, we would often call SPs that return more
than one recordset. For example:

CREATE Stored Procedure HelloWorld As
BEGIN
SELECT * FROM HELLO
SELECT * FROM WORLD
END

Using ADO.NET, the results would be returned as 2 tables within a dataset
object.

We are using Oracle 10g with version 10.2 ODP.NET (data provider) on the
client. Is there a *PRODUCTION* version of software available which allows
me to do this simple task?

If Multiple returned Recordsets are not an option in Oracle SPs, can someone
please show me the latest and greatest (excluding beta software) for writing
a baby Oracle SP to return a query result for use by a client app? I am
found one example that utilizes TYPEs and CURSORs and it looks ugly as hell
and surprisingly complicated for what it is doing and involves looping
through a cursor and populating what looks like an array of TYPES which are
defined as output params. Please tell me that there is a better way of doing
this in Oracle.

We could construct the query as a string on the client but I would really
like to put the DB access in the database as compiled queries.

It would be great if someone could write the Oracle equivalent of the 5 line
SQL Server proc above for me, it would help a lot. If two returned queries
is too much for it, a one query example would still be useful.

Thanks
May 13 '06 #1
1 4363

"Chad" <ch************ *@comcast.netne t> wrote in message
news:Nc******** ************@co mcast.com...
Hi, I am a SQL Server programmer using Oracle for the first time.

In our .NET client apps which use a SQL Server back end, we would use Stored Procedure exclusively for all database access for increased security as well as the pre-compiled advantage.

To minimize trips to the db server, we would often call SPs that return more than one recordset. For example:

CREATE Stored Procedure HelloWorld As
BEGIN
SELECT * FROM HELLO
SELECT * FROM WORLD
END

Using ADO.NET, the results would be returned as 2 tables within a dataset
object.

We are using Oracle 10g with version 10.2 ODP.NET (data provider) on the
client. Is there a *PRODUCTION* version of software available which allows
me to do this simple task?

If Multiple returned Recordsets are not an option in Oracle SPs, can someone please show me the latest and greatest (excluding beta software) for writing a baby Oracle SP to return a query result for use by a client app? I am
found one example that utilizes TYPEs and CURSORs and it looks ugly as hell and surprisingly complicated for what it is doing and involves looping
through a cursor and populating what looks like an array of TYPES which are defined as output params. Please tell me that there is a better way of doing this in Oracle.

We could construct the query as a string on the client but I would really
like to put the DB access in the database as compiled queries.

It would be great if someone could write the Oracle equivalent of the 5 line SQL Server proc above for me, it would help a lot. If two returned queries
is too much for it, a one query example would still be useful.

Thanks


Hi,
Oracle!=SQLServ er. They are two very different products. In Oracle you
don't have to use a stored procedure to get the advantage of "compiled" SQL.
(the explain plan) You do have to use bind variables and that is a good
practice in any RDBMs to get reuse of the execution plan.

That said it is a good idea to use stored procedures for what you are trying
to do. In your case you can use ref cursors as out parameters. You should
also use packages. asktom.oracle.c om has some great examples:
http://asktom.oracle.com/pls/ask/f?p...10369303150185

The select statement gets returned into a ref cursor. If you want to return
two sets then return each one into a ref cursor. (thus you would have 2 out
parameters.)

Don't construct a string on the client even with stored procedures. Use
bind variables and call the stored procedures with bind variables. You will
get better scaling and better performance.
Jim
May 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5228
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no luck yet. Here is a short description of what I did so far: 1. I installed the jdk118_v3-glibc-2.1.3.tar in the /usr/local/ dir and made a symbolic link from /usr/local/java to this 2. I installed all the necessary groups and users (oracle,...
4
19994
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
2
2335
by: osgnamah | last post by:
Hi All; I am getting ready to launch a shareware program in the next few weeks and the last step is going to be creating a website. So the last few days I've been doing some web surfing in trying to figure out how I am going to manage to do that in the next few weeks since it will be my first go at html. Actually that's not true it will be my second go at it since I did a homepage in the good old days of the lynx browser, gophering,...
6
1949
by: Aristotelis E. Charalampakis | last post by:
Hi all, this is a newbie question :-) I was wondering if there was a way to use the switch statement in a manner that each case statement includes more that a simple value. i.e.: switch ( myFloat ) { case >0: // ??? how do i write this ???
63
25666
by: Nick Palmer | last post by:
Hi all, Is there a DB2 equivilant to Oracle's DB Link functionality ? I have two DB2 databases and I need to get access to the tables in one from the other. In Oracle I would just create a DB Link between the two instances. Is such a thing possible between two DB2 databases ? Thanks in advance, Nick
2
3572
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004 rd@stat2.scn.ru:/usr/src/sys/i386/compile/RDSTAT2-ORACLE i386 uname -a under oracle user : Linux stat2.scn.ru 2.4.2 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004 i686 unknown
1
477
by: Chad | last post by:
Hi, I am a SQL Server programmer using Oracle for the first time. In our .NET client apps which use a SQL Server back end, we would use Stored Procedure exclusively for all database access for increased security as well as the pre-compiled advantage. To minimize trips to the db server, we would often call SPs that return more than one recordset. For example: CREATE Stored Procedure HelloWorld As
0
3323
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
3297
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.