Solved

linked server create index

Posted on 2010-08-18
2
338 Views
Last Modified: 2012-05-10
What would be the syntax to create, drop an index across a linked server connection on the other server?
I tried using the four part name, but the maximum number of prefixes allowed was 2. I tried to use parentheses []  for the first 3 parts of the name. parsed successfully but, executing gives error
Msg 1088, Level 16, State 12, Line 1
Cannot find the object because it does not exist or you do not have permissions.       

The linked server connection login is the database owner for the db and the object exists
0
Comment
Question by:sqlserverdba
2 Comments
 
LVL 13

Expert Comment

by:dwkor
ID: 33467422
I would suggest to create SP on the linked server and do index creation from there. Maybe via dynamic SQL
0
 
LVL 4

Accepted Solution

by:
pbarry1 earned 250 total points
ID: 33547447
Easiest way (if running SQL 2005+):

EXEC ('DROP INDEX TableName.IndexName") AT LinkedServerName

Note that your linked server must have the RPC options enabled.

0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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