473,387 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2574
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.