Home » SQL Server Error : 108, Severity: 15. The ORDER BY position number %ld is out

SQL Server Error : 108, Severity: 15. The ORDER BY position number %ld is out

  • by

SQL Server Error : 108 Details


SQL Server Error: 108
Severity: 15
Event Logged or not: No
Description:
The ORDER BY position number %ld is out of range of the number of items in the select list.
Severity 15 Description:
Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG are:
1. Value of error log file we would like to read. values are 0 = current, 1 = last one before current, 2 = second last before current etc…
2. Log file type:- 1 or NULL = error log, 2 = SQL Agent log
3. Search string 1:- String one you want to search for
4. Search string 2:- String two you want to search for to further refine the results
5. start time for Search
6. end time for search
7. Sort order for search results:- N’asc’ = ascending, N’desc’ = descending

By default, we have 6 Server Error Logs kept but we can increase the number of SQL Server Error Logs from the default value of six.

For other ways to read and find error log location please our artcile https://sqlserver-dba.co.uk/error-log/sql-server-identify-location-of-the-sql-server-error-log-file.html

Solution for Resolving the Error

A new install SQL2008 enterprise version encountered below error.
And then I found a Event:108 error show on application eventlog.
Description:
Report Server (MSSQLSERVER) cannot load the TERADATA extension.

Solution:

We can disable the extension in the Extension section.

or The <SemiticQuery> is  used to register the model query language for the Teradata data source. It needs to remark it.

 

SQL Server Error Code and solution summary


SQL Server Error: 108
Severity: 15
Event Logged or not: No
Description:
The ORDER BY position number %ld is out of range of the number of items in the select list.

We can disable the extension in the Extension section.

or The <SemiticQuery> is  used to register the model query language for the Teradata data source. It needs to remark it.

Leave a Reply

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