linked server create index

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
Who is Participating?
pbarry1Connect With a Mentor Commented:
Easiest way (if running SQL 2005+):

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

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

I would suggest to create SP on the linked server and do index creation from there. Maybe via dynamic SQL
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.