SQL Server Error : 1003 Details
SQL Server Error: 1003
Severity: 15
Event Logged or not: No
Description:
Line %d: %ls clause allowed only for %ls.
Severity 15 Description:
Indicates syntax errors in the Transact-SQL command.
Table of Contents
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
as activity monitor.
Solution
Server Error [1003]: Failed to acquire access to database
When trying to setup an MS-SQL ODBC Connection on AIX – System 11.1.1.3 install.
We get this error when we try to connect through a .bqy
Server Error [1003]: Failed to acquire access to database.
SQL API: [SQLGet TypeInfor], SLQ RETURN: [-1], SQL STATE: [10103], SQL
NATIVE ERROR: [102], SQL MESSAGE: [[DataDirect][ODBC SQL Server Driver]
[SQL Server]Incorrect syntax near ‘002100021000210002110021100211’.]
The odbc.ini file contains connections for DB2, Oracle and MS-SQL. Only MS-SQL returns this error. I took the .odbc.ini entry from a V8.3.1 install that has been working fine for years.
I modified the V8 entry to look for the ARmsss.so 5.2 driver on System 11.1.1.3 install.
Under /ODBC/example – we used the ./example utility to connect to two SQL databases – we can connect and run sql statements against both db’s
We can connect on my desktop against both db’s – we used System 11 Studio to re-create the oces and post new copies on the server. (Original oces were migrated from v8)
In the DAS – we were trying to use ODBC/SQLServer.
Now we have switched to ODBC/ODBC and we get the same error.
On a windows server with System 11.1.1.3 – I was able to connect with the same setup without an error.
SQL Server Error Code and solution summary
SQL Server Error: 1003
Severity: 15
Event Logged or not: No
Description:
Line %d: %ls clause allowed only for %ls.