473,799 Members | 2,941 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 4365

"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
5229
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
19997
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
2337
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
1950
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
25667
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
3573
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
3325
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
3298
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
9540
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10250
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...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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
5463
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
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.