Solved

What is the best way to create a stored procedure for a Linked Server?

Posted on 2013-12-27
3
380 Views
Last Modified: 2013-12-27
How can I create then alter a stored procedure for a linked server using sql server 2012?
0
Comment
Question by:rhservan
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
Are you asking for creating and altering the stored procedure on the remote server, or on the local server but using a linked server for some references?

The first needs to be done by dynamic SQL, as you have to be in the DB you create/alter objects (metadata, DDL). Something like
exec srv.db..sp_executesql N'create procedure ...'

Open in new window

0
 

Author Comment

by:rhservan
Comment Utility
I want to pull the data from the 'linked' server configuration on my localhost through a stored procedure.   Is there someway to create the stored procedure on the Linked Server.  Please elaborate.
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Creating the procedure on the linked server is exactly what I posted.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now