0

I have a situation that I've never seen. OSQL crashed in a scheduled job which has always worked. Windows event viewer shows an exception code: 0xc0000005. the version of OSQL.exe also showing in the same Windows Event Viewer error message is 2011.110.2100.60. --> this corresponds to the SQL Server 2012 RTM.

When running @@version of the SQL Server it states that I have SP2 installed.

Is this normal? do I need to upgrade OSQL to SP2? If so, how to upgrade OSQL to SP2?

OSQL Windows Event Viewer output:

    Faulting application name: OSQL.EXE, version: 2011.110.2100.60, time stamp: 0x4f35eaf3
Faulting module name: ntdll.dll, version: 6.3.9600.18696, time stamp: 0x59153753
Exception code: 0xc0000005
Fault offset: 0x00000000000546fb
Faulting process id: 0x1bdc
Faulting application start time: 0x01d31d465269cf58
Faulting application path: \\SFSMSSQL\c$\Program Files\Microsoft SQL Server\110\Tools\Binn\OSQL.EXE
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 5bb47a06-895c-11e7-80eb-005056b410f0
Faulting package full name: 
Faulting package-relative application ID: 

@@Version output:

Microsoft SQL Server 2012 - 11.0.5058.0 (X64) 
                May 14 2014 18:34:29 
                Copyright (c) Microsoft Corporation
                Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

Added Note: I am aware that we should be using SQLCMD instead OSQL which will soon be depricated... it is in our road map. .

My research hasn't been fruitful.

Thank you

  • after executing 'select @@version;' . Could you mention the output in your question, for better understanding. – Md Haidar Ali Khan Aug 28 '17 at 12:52
  • @Md Haidar Ali Khan, I have added the outputs of Windows event viewer and @@version. – JohnG Aug 28 '17 at 12:57
  • Wow osql, that's a name I've not heard in a very long time. I didn't realize that it still shipped. That being said, it's deprecated, you should move to sqlcmd instead docs.microsoft.com/en-us/sql/tools/osql-utility – Nic Aug 28 '17 at 12:59
  • @Nic It's in our plans... Since it's a software that's been around for over 25 years it's not as simple as we would like it to be. – JohnG Aug 28 '17 at 13:02
0

Faulting application path: \SFSMSSQL\c$\Program Files\Microsoft SQL Server\110\Tools\Binn\OSQL.EXE

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

You appear to be running osql.exe from another server via the c$ share. If so, the local ntdll.dll is probably a different version to the osql.exe on the remote server.

Change the path

\\SFSMSSQL\c$\Program Files\Microsoft SQL Server\110\Tools\Binn\OSQL.EXE

to something like:

C:\Program Files\Microsoft SQL Server\110\Tools\Binn\OSQL.EXE
  • Didn't notice that, I will try that. – JohnG Aug 29 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.