Solved

linked server create index

Posted on 2010-08-18
2
323 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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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

17 Experts available now in Live!

Get 1:1 Help Now