472,373 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,373 software developers and data experts.

Linked Servers

Greetings all,
I am collecting data from 16 different Oracle databases into a single
database. I have a stored procedure to do this, but I'd like to pass the
procedure a value (linked Oracle database name) and have the stored procedure do
something similar to:

select * from table@v_remoteserver

where v_remoteserver is a variable.

Can I do this?

Thanks all,

Ron Hagerman
http://www.rons-sandbox.com
Jul 19 '05 #1
1 2538
Phoenix <ne**@rons-world.net> wrote
I am collecting data from 16 different Oracle databases into a single
database. I have a stored procedure to do this, but I'd like to pass the
procedure a value (linked Oracle database name) and have the stored procedure do
something similar to:

select * from table@v_remoteserver

where v_remoteserver is a variable.

Can I do this?


Dynamic SQL. In it simplest form, something like this in PL/SQL:

EXECUTE IMMEDIATE 'select * from table@'||v_remoteserver;

See the PL/SQL manual for more details.

--
Billy
Jul 19 '05 #2

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

Similar topics

3
by: Raghuraman | last post by:
Hi, I was thinking abt linked servers deals only with multiple servers physically inter-connected. Now i come accross that we can link our non-sqlserver databases also. It is thru the...
1
by: TBlair | last post by:
I am about to start working on a project where I would be required to dynamically create linked servers during the execution of an application. One of the requirements is for the Link Servers to be...
8
by: Ootyguy | last post by:
Trying to do this all day and googling for answers but found none, hope someone can help. Thanks in advance. select * into OPENROWSET('SQLOLEDB','SERVER';'uid';'pwd',##test) from LocalTable ...
3
by: RandyMartin | last post by:
<<cross posted from microsoft.public.sqlserver.server>> Environment: Windows 2003 Standard Edition SP1, SQL 2005 EE RTM (both servers) I am getting the following messages when I run this...
0
by: cybertoast | last post by:
(Config: SQLServer2005, MySQL5.0 and MySQL4.0 all running on Windows2003 server) I've created linked servers to my MySQL servers from SQL server, and had no problem for several months. I was using...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.