SQL Server Error Messages - Msg 117
Error Message
Server: Msg 117, Level 15, State 2, Line 4
The object name 'Object Name' contains more than the maximum number of prefixes. The maximum is 2.
Causes
There are different ways of encountering this error message which usually involves accessing or manipulating objects on a linked server. One way is when updating a table on another server using a linked server, as follows:
UPDATE [SQLServer2].[MyDatabase2].[dbo].[MyTable2]
SET [MyName] = B.[MyName]
FROM [MyDatabase1].[dbo].[MyTable1] B
WHERE [SQLServer2].[MyDatabase2].[dbo].[MyTable2].[MyKey] = B.[MyKey]
Msg 117, Level 15, State 2, Line 4
The number name 'SQLServer2.MyDatabase2.dbo.MyTable2' contains more than the maximum number of
prefixes. The maximum is 3.
Another way is when trying to create a table on another SQL Server using the data from one SQL Server using the SELECT INTO statement:
SELECT *
INTO [SQLServer2].[MyDatabase2].[dbo].[MyTable2]
FROM [MyDatabase1].[dbo].[MyTable1]
Msg 117, Level 15, State 1, Line 3
The object name 'SQLServer2.MyDatabase2.dbo.' contains more than the maximum number of prefixes.
The maximum is 2.
Yet another way is while trying to drop a table on a linked SQL Server:
DROP TABLE [SQLServer2].[MyDatabase2].[dbo].[MyTable2]
Msg 117, Level 15, State 1, Line 1
The object name 'SQLServer2.MyDatabase2.dbo.' contains more than the maximum number of prefixes.
The maximum is 2.