Re: How to make a select to another database using sp_addlinkedserver?
- From: "Hari Prasad" <hari_prasad_k@xxxxxxxxxxx>
- Date: Tue, 12 Jul 2005 18:54:58 +0530
Hi,
In Link server you could also use OPEN QUERY to query the databases
Open Query
Select * from openquery('<Linked Server>','select * from
DBNAME.Table_owner.Table_Name')
Thanks
Hari
SQL Server MVP
"Marcelo Moreira" <marcelo.moreira@xxxxxxxxxxxxxxx> wrote in message
news:e6LaETghFHA.2484@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I trying to use sp_addlinkedserver, after I added successfully a new
> linked server I do not know how to use the server...
>
> I did this to add the server:
>
> exec sp_addlinkedserver
> 'Server2','sqloledb','Northwind','myComputer','','','Region'
>
> Now, I want to do a simple SELECT statement to the Region table of
> Northwind, how do I do this?
>
> Obviously, I am in another database...like for example "pubs"
>
> Thanks for help,
>
> Marcelo Moreira
>
.
- References:
- How to make a select to another database using sp_addlinkedserver?
- From: Marcelo Moreira
- How to make a select to another database using sp_addlinkedserver?
- Prev by Date: Re: SQL Login from remote Enterprise manager - both XP Pro
- Next by Date: SQL Server 2000 64-bit linked server Oracle
- Previous by thread: Re: How to make a select to another database using sp_addlinkedserver?
- Next by thread: SQL Login from remote Enterprise manager - both XP Pro
- Index(es):
Relevant Pages
|