?
Solved

linked server create index

Posted on 2010-08-18
2
Medium Priority
?
402 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 1000 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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
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 Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

850 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