I write applications in VS.net that run against SQL Server 2000. I am
trying to write a stored procedure that accesses a database in different SQL
server than the one hosting the data. I entered into the FROM statement
"<OtherServerName>.<DatabaseName>.MyTable" and I get back a message that it
can't find the server "OtherServerName" and tells me to run the store
procedure "sp_addlinkedserver" to correct this. My question is:
Where do I find this sp? Do I run it from the VS.net environment, at the
console of one of the servers? What is the procedure to run it?
Any help is greatly apperceived.
Hi,
You have to create a linked server from local server when you want to access
a database resides in another SQL server. So you have to login into SQL
server
using Query Analyzer or Enterprise Manager and create a linked server.
See sp_addlinkedserver and sp_addlinkedsrvlogin in books online or use the
enterprise manager -- conenct to source sql server --
Expand the security -- select linked server and create a new connection to
new server.
Thanks
Hari
MCDBA
"Greg Smith" <gjs@.umn.edu> wrote in message
news:eJ0ZWcYdEHA.384@.TK2MSFTNGP10.phx.gbl...
> I write applications in VS.net that run against SQL Server 2000. I am
> trying to write a stored procedure that accesses a database in different
SQL
> server than the one hosting the data. I entered into the FROM statement
> "<OtherServerName>.<DatabaseName>.MyTable" and I get back a message that
it
> can't find the server "OtherServerName" and tells me to run the store
> procedure "sp_addlinkedserver" to correct this. My question is:
> Where do I find this sp? Do I run it from the VS.net environment, at the
> console of one of the servers? What is the procedure to run it?
> Any help is greatly apperceived.
>
sql
Showing posts with label accesses. Show all posts
Showing posts with label accesses. Show all posts
Wednesday, March 28, 2012
Wednesday, March 21, 2012
Run SQL T-SQL Job Step across Different Domains
I have two sql 2005 servers in two different domains. I have a SQL job on
one of the servers that runs a T-SQL script that accesses databases on the
SQL box inthe other domain.
I'm getting a message in the job history that the job won't run because of
the security context.
How can I set this up?
Thanks for your help.
--
MWDWhat Operating Systems are these two servers running?
What trusts, if any, are set up between the two domains?
How are you trying to connect?
What is the exact error number and error message?
-Sue
On Thu, 9 Aug 2007 08:10:09 -0700, MWD
<MWD@.discussions.microsoft.com> wrote:
>I have two sql 2005 servers in two different domains. I have a SQL job on
>one of the servers that runs a T-SQL script that accesses databases on the
>SQL box inthe other domain.
>I'm getting a message in the job history that the job won't run because of
>the security context.
>How can I set this up?
>Thanks for your help.sql
one of the servers that runs a T-SQL script that accesses databases on the
SQL box inthe other domain.
I'm getting a message in the job history that the job won't run because of
the security context.
How can I set this up?
Thanks for your help.
--
MWDWhat Operating Systems are these two servers running?
What trusts, if any, are set up between the two domains?
How are you trying to connect?
What is the exact error number and error message?
-Sue
On Thu, 9 Aug 2007 08:10:09 -0700, MWD
<MWD@.discussions.microsoft.com> wrote:
>I have two sql 2005 servers in two different domains. I have a SQL job on
>one of the servers that runs a T-SQL script that accesses databases on the
>SQL box inthe other domain.
>I'm getting a message in the job history that the job won't run because of
>the security context.
>How can I set this up?
>Thanks for your help.sql
Subscribe to:
Posts (Atom)