Tom
Tom

Reputation: 8681

Create index error -The object name contains more than the maximum number of prefixes. The maximum is 2

I am getting the error while executing the following statement The object name 'servername.DatabaseName.Schema.TableName' contains more than the maximum number of prefixes. The maximum is 2.

create nonclustered index idx_EstConsensusTemp1
    on [servername].[DatabaseName].[Schema].[TableName](FieldName)

Upvotes: 0

Views: 432

Answers (1)

Sean Lange
Sean Lange

Reputation: 33581

Since the excellent link that Jacob referred to is down I was able to get the page to load but it is horribly slow.

Here is the answer from Grant Fritchey:

Look up the EXECUTE statement in BOL:

EXECUTE ('USE STUFF;DROP INDEX OWNER_idx ON dbo.OWNER') AT SQLnk

The linked server has to support RPC calls:

EXEC master.dbo.sp_serveroption @server=N'SQLnk', @optname=N'rpc', @optvalue=N'true'

Upvotes: 1

Related Questions