I created a new stored procedure on one server because this is the only
server we can create new stored procedures on, however, all of my select
statements in this procedures are on a different server. How do I execute
this stored procedure on the other server, database, table, and login?Create a REMOTE Server or LINK Server, which you may not be able to do. You
can setup a Linked server to run under the context of one account.
"Ryan D" <RyanD@.discussions.microsoft.com> wrote in message
news:C749A1D6-F81F-4F50-8CDA-6681AF057BCD@.microsoft.com...
>I created a new stored procedure on one server because this is the only
> server we can create new stored procedures on, however, all of my select
> statements in this procedures are on a different server. How do I execute
> this stored procedure on the other server, database, table, and login?
>|||Andy,
I need the syntax for this please. Do you mean to use the
sp_addlinkedserver command? And then do I use the USE statement, followed b
y
the query?
"Andy Wilbourn" wrote:
> Create a REMOTE Server or LINK Server, which you may not be able to do. Yo
u
> can setup a Linked server to run under the context of one account.
> "Ryan D" <RyanD@.discussions.microsoft.com> wrote in message
> news:C749A1D6-F81F-4F50-8CDA-6681AF057BCD@.microsoft.com...
>
>|||Off the top of my head:
1. create a linked server.
2. change your select statements to have fully qualified names.
for example,
select colA, colB
from MyLinkServer.MyDatabase.dbo.MyTable
if you need to execute a stored procedure that exists on another server or
dynamic sql and it should run on that other server, exec
MyLinkServer.master.dbo.sp_executesql MySPName/@.SQL
Hope that helps,
Joe
"Ryan D" wrote:
> I created a new stored procedure on one server because this is the only
> server we can create new stored procedures on, however, all of my select
> statements in this procedures are on a different server. How do I execute
> this stored procedure on the other server, database, table, and login?
>
Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts
Friday, February 17, 2012
Friday, February 10, 2012
Connect to SQL Server
Hello,
It occurs something from strange.
I can reach Entreprise Manager, to visualize the tables, stored procedures...
But on the other hand I cannot install the Starter Kits "Connection Problem to the database".
Connections are done with SQL Server and Windows.
It occurs something from strange.
I can reach Entreprise Manager, to visualize the tables, stored procedures...
But on the other hand I cannot install the Starter Kits "Connection Problem to the database".
Connections are done with SQL Server and Windows.
Do you have an idea?
Thanks.I think the starter kits assume yopu connect using Windows Authentication - meaning the _currently logged in account_ needs rights on the DB
if you're using mixed-mode as you suggest, then no wonder. see here :
http://rtfm.atrax.co.uk/infinitemonkeys/articles/miscellaneous/981.asp
but substitute your login account for installer access
Subscribe to:
Posts (Atom)