In this blog post, let’s learn about the error message “117 – The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.
SQL Server Error Message
117 – The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d.
Reason for the Error
The SQL Server error message 117 – “The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d” occurs when a SQL Server object’s name exceeds the maximum number of allowed prefixes.
In SQL Server, the name of an object is made up of one or more identifiers, each separated by a period (.) symbol. The maximum number of identifiers allowed in an object’s name is three, which means that the object name can contain up to two periods.
For example, in the object name “database.schema.table,” there are three identifiers separated by two periods. If there were more than two periods in the object name, such as “database.schema.subschema.table,” this would cause the error message 117 to be raised.
Solution
To fix this error, you can try the following solutions:
- Shorten the object name: To fix the error, you can try shortening the name of the object so that it contains fewer prefixes.
- Use a different naming convention: If shortening the object name is not possible or desirable, you can try using a different naming convention that avoids using more than the maximum number of allowed prefixes.