[Last Call] Learn how to a build a cloud-first strategyRegister Now


How to create Stored Procedure on Oracle 9i?

Posted on 2008-11-07
Medium Priority
Last Modified: 2013-12-19
I have to write a stored procedure on Oracle 9i Database.
In this SP, I will have to talk to two different databases other than the one on which it is written.
Do I need to have DB links created between the database on which this SP is written and the other two databases?
Out of the other two databases, one is a MSSQL database. Will there be any limitations for the stored procedure if it has to talk to a non Oracle Database?
Question by:AdithiPalli
  • 5
  • 2
LVL 74

Accepted Solution

sdstuber earned 1000 total points
ID: 22904972
you will have to create database links to talk to other databases from within a pl/sql stored procedure.  If you write a java stored procedure you can open additional jdbc connections to other databases.

If you want to create a database link to a non-oracle database you will need to explore "heterogeneous services" or the oracle gateway product (which uses the heterogeneous services)
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 22904981
>Do I need to have DB links created between the database on which this SP is written
yes, pointing to the other 2 databases.

>and the other two databases?

>Out of the other two databases, one is a MSSQL database
that will be less evident, check out the oracle heteregeneous services, which are needed to create a db link towards a non-oracle db.
LVL 74

Expert Comment

ID: 22905258
wouldn't a split be more appropriate?

We gave the same answer at approximately the same time.


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 74

Expert Comment

ID: 22905378
or, if a single answer were to be accepted, then I believe mine would have been more appropriate, it did come in first (albeit slightly) and I did offer the alternative of java stored procedures with jdbc connections.

Author Comment

ID: 22905400
I did not know a split can be done as Iam new to Experts Exchange. Please let me know how can I do that?
LVL 74

Expert Comment

ID: 22905472
when you accept answers you can choose which ones you want to accept and you can even assign points individually to them.  So, if you wanted to weight one more than another you can assign more to that one, up to the total you originally assigned to the question.

Since you accepted angeliii's and not mine, I assume you found his somehow more valuable, so you can assign his answer more points than what you assign to mine.

I am curious though as to what prompted your acceptance of that answer over mine.  To me, they seem almost equivalent except mine has a tiny bit more.  But I'll try to do better if you can tell me how.

If you do want to change your acceptance or redistribute points, click the "Request Attention" link at the top of the question to have an admin reopen the question.


Author Comment

ID: 22905525
I found Angel's answer more to the point, that was why I slected it immediately.
LVL 74

Expert Comment

ID: 22905624
hmmm, ok,  I'm not sure how to improve with that.

If anything it could be argued that the simple "yes" answer was incorrect, since it's not "essential" to create database links.  However, if we assume pl/sql then it is required and that's a reasonable assumption for most instances.

thank you for the feeback though, I'll try to be more succinct

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question