Showing posts with label oracl. Show all posts
Showing posts with label oracl. Show all posts

Wednesday, March 21, 2012

Linked Server in SQL Server Express

I am just trying to setup a connection to an Oracl DB with a linked server i
n
SQL Server Express. It was successful to setup the linkedserver, since I
needed to login I tried a script like this:
USE [MyDB]
GO
EXEC sp_addlinkedsrvlogin [ @.rmtsrvname = ] 'MylinkedServer'
@.useself = 'FALSE',
@.locallogin = NULL,
@.rmtuser = 'me',
@.rmtpassword = 'myrmtpassword'
GO
Now I got a message wrong syntax near MylinkedServer (message 102, level 15,
status 1, line 2) and I do not know what that means. Also I thought I would
be able to see my linkedserver somewhere in SQL Server Management Studio
Express, but unfortunately all articles only refer to Enterprise Manager
which I do not have with the Express Edition.Hi,
In your call to sp_addlinkedsrvlogin do you really have the square
brackets ([ and ]) around @.rmtsrvname? If you do, this is what is
causing the error. Also, you are missing a comma after the
'MyLinkedServer'. Try calling sp_addlinkedsrvlogin like:
EXEC sp_addlinkedsrvlogin @.rmtsrvname = 'MylinkedServer',
@.useself = 'FALSE',
@.locallogin = NULL,
@.rmtuser = 'me',
@.rmtpassword = 'myrmtpassword'
This doesn't generate any syntax errors on my SQL Server Express
instance so maybe it will work for you.
In SQL Server Management Studio Express you can see your linked servers
under the "Server Objects" node. Your object browser in Management
Studio Express should look like:
Instance Name
|
| <There's some stuff in the middle but don't worry about it>
|
|
-- Server Objects
|
|
-- Linked Servers
Hope that helps a bit|||Hi,
thanks I really forgot to remove the brackets. Sometimes you just don't see
the forest for the trees.
However in SQL Server Management Studio Express I still cannot find the
server. (Unfortunately) I do have a german version of it, by translating the
names I can find Serverobjects and something that might be a translation of
linked servers. There is only another submenu called contractor (with a lot
of entries) and nowhere is my linked server.
Since I am just reading through all that stuff, could you or anybody else
also tell me how to query tables on the linked server? I hoped to see them
somewhere under the linked server in the management studio and get a first
hint by that...|||Sorry I was to fast, got the answer for my last question about querying the
linked server here:
http://msdn.microsoft.com/library/d...br />
5xix.asp|||...and after restarting the management studio I can see my linked server!|||Hi Thomas,
Yeah, I find that sometimes a fresh pair of eyes to look at something
is good...

>From what you are describing I think you have found the linked servers
node. I believe the submenu (contractor) you are talking about would be
the "Provider" menu in the English version. Just for information, this
menu lists the provides (e.g. OLE DB, Native, Jet) that you can use to
connect to a linked server. No need to worry about this menu so much.
It's strange that you can't see your linked server in the GUI. Have you
tried adding a linked server via Management Studio Express. You can add
a linked server by clicking on the linked servers node and selecting
"New Linked Server..." (not sure what that would be in German)|||> It's strange that you can't see your linked server in the GUI. Have you
> tried adding a linked server via Management Studio Express. You can add
> a linked server by clicking on the linked servers node and selecting
> "New Linked Server..." (not sure what that would be in German)
I can see it now, it just needs a refresh sometimes. Do you have some
experience about its performance regarding queries? I linked an oracle serve
r
and when I query something it is relatively slow, even compared to Jet which
I used before.|||Not really, sorry. Are you running across a network? Maybe congestion
has something to do with it?
Also, I remember hearing that certain queries cause an entire result
set to be transmitted to your local server and not just the rows you
want. Don't remember any more than that, sorry.sql

Linked Server in SQL Server Express

I am just trying to setup a connection to an Oracl DB with a linked server in
SQL Server Express. It was successful to setup the linkedserver, since I
needed to login I tried a script like this:
USE [MyDB]
GO
EXEC sp_addlinkedsrvlogin [ @.rmtsrvname = ] 'MylinkedServer'
@.useself = 'FALSE',
@.locallogin = NULL,
@.rmtuser = 'me',
@.rmtpassword = 'myrmtpassword'
GO
Now I got a message wrong syntax near MylinkedServer (message 102, level 15,
status 1, line 2) and I do not know what that means. Also I thought I would
be able to see my linkedserver somewhere in SQL Server Management Studio
Express, but unfortunately all articles only refer to Enterprise Manager
which I do not have with the Express Edition.Hi,
In your call to sp_addlinkedsrvlogin do you really have the square
brackets ([ and ]) around @.rmtsrvname? If you do, this is what is
causing the error. Also, you are missing a comma after the
'MyLinkedServer'. Try calling sp_addlinkedsrvlogin like:
EXEC sp_addlinkedsrvlogin @.rmtsrvname = 'MylinkedServer',
@.useself = 'FALSE',
@.locallogin = NULL,
@.rmtuser = 'me',
@.rmtpassword = 'myrmtpassword'
This doesn't generate any syntax errors on my SQL Server Express
instance so maybe it will work for you.
In SQL Server Management Studio Express you can see your linked servers
under the "Server Objects" node. Your object browser in Management
Studio Express should look like:
Instance Name
|
| <There's some stuff in the middle but don't worry about it>
|
|
-- Server Objects
|
|
-- Linked Servers
Hope that helps a bit|||Hi,
thanks I really forgot to remove the brackets. Sometimes you just don't see
the forest for the trees.
However in SQL Server Management Studio Express I still cannot find the
server. (Unfortunately) I do have a german version of it, by translating the
names I can find Serverobjects and something that might be a translation of
linked servers. There is only another submenu called contractor (with a lot
of entries) and nowhere is my linked server.
Since I am just reading through all that stuff, could you or anybody else
also tell me how to query tables on the linked server? I hoped to see them
somewhere under the linked server in the management studio and get a first
hint by that...|||Sorry I was to fast, got the answer for my last question about querying the
linked server here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_oa-oz_5xix.asp|||...and after restarting the management studio I can see my linked server!|||Hi Thomas,
Yeah, I find that sometimes a fresh pair of eyes to look at something
is good...
>From what you are describing I think you have found the linked servers
node. I believe the submenu (contractor) you are talking about would be
the "Provider" menu in the English version. Just for information, this
menu lists the provides (e.g. OLE DB, Native, Jet) that you can use to
connect to a linked server. No need to worry about this menu so much.
It's strange that you can't see your linked server in the GUI. Have you
tried adding a linked server via Management Studio Express. You can add
a linked server by clicking on the linked servers node and selecting
"New Linked Server..." (not sure what that would be in German)|||> It's strange that you can't see your linked server in the GUI. Have you
> tried adding a linked server via Management Studio Express. You can add
> a linked server by clicking on the linked servers node and selecting
> "New Linked Server..." (not sure what that would be in German)
I can see it now, it just needs a refresh sometimes. Do you have some
experience about its performance regarding queries? I linked an oracle server
and when I query something it is relatively slow, even compared to Jet which
I used before.|||Not really, sorry. Are you running across a network? Maybe congestion
has something to do with it?
Also, I remember hearing that certain queries cause an entire result
set to be transmitted to your local server and not just the rows you
want. Don't remember any more than that, sorry.