Solved

linked server create index

Posted on 2010-08-18
2
350 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
union query column need default text 2 20
tempdb log keep growing 7 45
Stored Procedure needs owner to execute 5 45
MS SQL Conditional WHERE clause 3 38
In this article I will describe the Backup & Restore 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.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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