Home » SQL Server Error : 117, Severity: 15. The %S_MSG name ‘%.*ls’ contains more th

SQL Server Error : 117, Severity: 15. The %S_MSG name ‘%.*ls’ contains more th

sql server DBA 999

SQL Server Error : 117 Details


SQL Server Error: 117
Severity: 15
Event Logged or not: No
Description:
The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d.
Severity 15 Description:
Indicates syntax errors in the Transact-SQL command.

 

This error can be encountered in the process of moving a database from one hosting provider to another. The current provider incorporates the domain name into the user name. The domain extension is .co.uk. As a result, some database objects have the fully qualified name [email protected] for example.

But, attempting to change the schema of these objects in order to insert them into a dbo schema by using:

ALTER SCHEMA dbo TRANSFER [email protected]

you get Error Message 117:

The object name ‘[email protected]’ contains more than the maximum number of prefixes. The maximum is 1.

Solution for Resolving the Error

In above example the query processor is interpreting the dots as different prefixes, while in fact, they’re just part of your database name in most situations. Now, Solution is not actually increasing the amount of prefixes allowed  as error gives hint but is below with square brackets:
ALTER SCHEMA dbo TRANSFER [user@company.co.uk].table

SQL Server Error Code and solution summary


SQL Server Error: 117
Severity: 15
Event Logged or not: No
Description:
The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d.

Solution is below with square brackets:

ALTER SCHEMA dbo TRANSFER [user@company.co.uk].table

Leave a Reply

Your email address will not be published. Required fields are marked *