SQL Server 2014 crash on Linked Server query - sql-server

I've been having a recurring issue when attempting to query large results from a linked server. I am using SQL Server 2014 and have a POSTGRESQL Server setup as a Linked Server. I have no problem querying against the Linked server on basic/small results or functions. But on the larger jobs the query will attempt to run for a few minutes and eventually the SQL Server will crash and SSMS will produce this error:
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)
Here is the version of SQL Server 2014 that I am currently on. I have found that there was a bug regarding this or at least something similar in Windows Server 2012 and had a hotfix but that doesn't apply to my build (Attempted to apply anyways). The OS being used is Windows Server 2016.
Microsoft SQL Server 2014 (SP1-GDR) (KB4019091) - 12.0.4237.0 (X64)
Jul 5 2017 22:03:42
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 14393: ) (Hypervisor)
Has anyone else had this issue? I have TCP/IP, Named Pipes, and Shared Memory enabled in my SQL Server Configuration Manager already and my Linked Server Provider currently has these options enabled: Dynamic parameter, Allow inprocess, Non transacted updated.
UPDATED INFORMATION:
I have checked through some additional potential causes including 32-bit registry key issues and local user issues. I am still encountering this same issue after these changes as well.
Date 8/28/2017 2:32:24 PM
Log Windows NT (Application)
Source Application Error
Category (100)
Event 1000
Computer DBM
Message
Faulting application name: sqlservr.exe, version: 2014.120.4237.0, time stamp: 0x595e7459
Faulting module name: ntdll.dll, version: 10.0.14393.1532, time stamp: 0x5965abad
Exception code: 0xc0000374
Fault offset: 0x00000000000f8363
Faulting process id: 0x13c0
Faulting application start time: 0x01d32034049e1344
Faulting application path: E:\Microsoft SQL Server\MSSQL12.ESCENTRAL\MSSQL\Binn\sqlservr.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 3489af8e-639f-4a54-ac3e-fda719cf75dc
Faulting package full name:
Faulting package-relative application ID:
This is the application error that I am seeing in my SQL Logs when the crash occurs

Related

MS SQL Server 2019 setup fails in Ubuntu 22.04?

I tried to install the MS SQL Server 2019 and 2017 on the the latest Pop OS based on Ubuntu 22.04 but the setup fails every time with output:
⥂ sudo /opt/mssql/bin/mssql-conf setup 10:04:52 PM
[sudo] password for s:
Choose an edition of SQL Server:
1) Evaluation (free, no production use rights, 180-day limit)
2) Developer (free, no production use rights)
3) Express (free)
4) Web (PAID)
5) Standard (PAID)
6) Enterprise (PAID) - CPU Core utilization restricted to 20 physical/40 hyperthreaded
7) Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum
8) I bought a license through a retail sales channel and have a product key to enter.
Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409
Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.
Enter your edition(1-8): 6
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=2104294&clcid=0x409
The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
The passwords do not match. Please try again.
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...
This program has encountered a fatal error and cannot continue running at Sat May 7 22:05:17 2022
The following diagnostic information is available:
Reason: 0x00000001
Signal: SIGSEGV - Segmentation fault (11)
Stack:
IP Function
---------------- --------------------------------------
0000564990454abc <unknown>
0000564990454502 <unknown>
000056499046e786 <unknown>
00005649903f086b <unknown>
00007f1bf840c520 __sigaction+0x50
0000000000000000 <unknown>
0000564990410dce <unknown>
00005649903ecb14 <unknown>
00005649903ec939 <unknown>
Process: 18822 - sqlservr
Thread: 18958 (application thread 0x23c)
Instance Id: d7e2cfde-2371-4427-8e6d-09b10beb04a1
Crash Id: 8f231e6e-9afb-4cf7-90d9-5357ebb2e4cf
Build stamp: 55e9595a94b6d3e7b784228f4a5253e5367473986e2ebc475dd669476db8fd11
Distribution: Pop!_OS 22.04 LTS
Processors: 8
Total Memory: 16618315776 bytes
Timestamp: Sat May 7 22:05:17 2022
Capturing a dump of 18822
Successfully captured dump: /var/opt/mssql/log/core.sqlservr.5_7_2022_22_5_17.18822
Executing: /opt/mssql/bin/handle-crash.sh with parameters
handle-crash.sh
/opt/mssql/bin/sqlservr
18822
/opt/mssql/bin
/var/opt/mssql/log/
d7e2cfde-2371-4427-8e6d-09b10beb04a1
8f231e6e-9afb-4cf7-90d9-5357ebb2e4cf
/var/opt/mssql/log/core.sqlservr.5_7_2022_22_5_17.18822
Pop!_OS 22.04 LTS
Capturing core dump and information to /var/opt/mssql/log...
dmesg: read kernel buffer failed: Operation not permitted
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal' can see all messages.
Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal' can see all messages.
Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.
/usr/bin/tail: cannot open '/var/log/syslog' for reading: Permission denied
Sat May 7 10:05:19 PM +06 2022 Capturing program information
Dump already generated: /var/opt/mssql/log/core.sqlservr.5_7_2022_22_5_17.18822, moving to /var/opt/mssql/log/core.sqlservr.18822.temp/core.sqlservr.18822.gdmp
Moving logs to /var/opt/mssql/log/core.sqlservr.18822.temp/log/paldumper-debug.log
Sat May 7 10:05:20 PM +06 2022 Capturing program binaries
Sat May 7 10:05:24 PM +06 2022 Compressing the dump files
Core dump and information are being compressed in the background. When
complete, they can be found in the following location:
/var/opt/mssql/log/core.sqlservr.05_07_2022_22_05_18.18822.tbz2
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.
Both versions worked previously in 21.04 and earlier (according to my testing). Am I doing something wrong or does MS SQL Server is yet to roll out support for 22.04?
As many people pointed out MS SQL Server is yet not supported for Ubuntu 22.04 LTS. source (thanks #Larnu for pointing it out)
However, I used a docker container to run MS SQL Server 2017 in Ubuntu 22.07. You can also run 2019 version I presume. Just download the 2019 image instead.
Guide here: Quickstart: Run SQL Server container images with Docker

SQL Server 2019 service won't start

I just downloaded and installed SQL Server 2019 on my Windows 10 machine. But I was not able to connect to it via SSMS.
I went to the services and saw that "SQL Server (MSSQLSERVER)" service is not started. When I start the service it shows message
The SQL Server mssqlserver service on local computer started and stopped
I checked for event log and there is an error:
SQL Server is terminating a system or background task Logwriter Task due to errors in starting up the task (setup state 8).
In SQL ErrorLog I can see following lines that I think are relevant.
Error: 17312, Severity: 16, State: 1.
2019-11-04 01:12:49.11 spid2s SQL Server is terminating a system or background task AzureLeaseRenewalTask due to errors in starting up the task (setup state 8).
2019-11-04 01:12:49.11 spid1s CImageHelper::Init () Version-specific dbghelp.dll is not used
2019-11-04 01:12:49.11 spid2s Error: 28709, Severity: 16, State: 19.
2019-11-04 01:12:49.11 spid2s Dispatcher was unable to create new thread.
2019-11-04 01:12:49.13 spid1s ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\LOG\SQLDump0007.txt
2019-11-04 01:12:49.13 spid1s SqlDumpExceptionHandler: Process 1 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

SQL Server 2016 SSIS package fails with "Unexpected Termination"

I have an Integration Services project deployed to SQL Server 2016.
In this project I am extracting data from an old Oracle database using Oracle provider for OLEDB.
the extract package basically truncates a table in the destination (SQL Server 2016) database, and then uses a data flow task to extract a table of about 300,000 rows and about 80 columns (basically just creating a copy on the SQL Server).
when running the package using Visual studio we never ran into any problem. but when running the package from SSISDB, about half the times, the package fails with an "unexpected error". nothing appears in the SSIS log.
Looking into the events log finds the following error:
Faulting application name: ISServerExec.exe, version: 13.0.4457.0, time stamp: 0x5a0384d1
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18666, time stamp: 0x58f32841
Exception code: 0xc0000005
Fault offset: 0x00015608
Faulting process id: 0x37e8
Faulting application start time: 0x01d36de21b43d295
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\ISServerExec.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 71f91df2-d9d5-11e7-80d7-005056a12e2d
Faulting package full name:
Faulting package-relative application ID:
I have found notes of this problem in SQL Server 2012 with a hotfix by Microsoft, but none for SQL Server 2016.
Things I have tried:
update sql server 2016 to the latest version
change the sql server agent user to a local admin.
change the buffer size and rows
change the max concurrent executions from -1 to 1 (I don't run more than 1 package at a time here)
I also noticed that the failure sometimes happens after about 40 seconds (which is also the time it takes it to run successfully) and sometimes it lingers for about 8-10 minutes, even though the error is logged about 40 seconds from when it started.
Thanks for any help.
Update
I think it was a performance issue. when I reduced the number of rows loaded from 330K to 20K it worked 100% of the time.
So I Changed it to load incrementally (for a single package I didn't think it's a good idea to add RAM).
Thank you all.

DBVisualizer Fails to Connect

I am trying to Connect to Sybase Database (on VM Server) using Sybase SQL Anywhere (JConnect) Driver but everytime it fails with following error:
Product: DbVisualizer Free 9.1.2
Build: #2072 (2013/10/28 18:25)
Java VM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.6.0_21
Java Vendor: Sun Microsystems Inc.
OS Name: Windows 7
OS Arch: amd64
OS Version: 6.1
An error occurred while establishing the connection:
Long Message:
JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
Details:
   Type: java.sql.SQLException
   SQL State: JZ00L
1) Nested Exception:
Long Message:
SQL Anywhere Error -102: Database server connection limit exceeded
Details:
   Type: java.sql.SQLWarning
   Error Code: 1601
   SQL State: 01W03
2) Nested Exception:
Long Message:
SQL Anywhere Error -102: Database server connection limit exceeded
Details:
   Type: java.sql.SQLWarning
   Error Code: 1601
   SQL State: 01W03
Surprising part is my other colleagues tries to connect from their machine then its allowing but for some reason from my machine its not allowing. One more thing I observed is if I try again after 2-3 days it works fine without any changes in configuration.
I have also verified following stuff:
DB Server is running fine
Restarted my machine many times
Restarted DB Visualizer
DB Visualizer Version: 9.1.2 (Freeware)
Thanks in advance.

Not able to connect any remote database server after installing Visual studio 2012

I have a machine which has VS2010 and sql server 2005, 2008 installed.
I were able to connect every remote database server from my application prior to installing VS2012. After installing VS2012 I am getting "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." on code where i have database call.
If i try to connect local database it connects fine.
Also what i tried is connect via server explorer in Visual studio 2010. It connects to local source successfully.
But when i try to connect to remote source it crashes VS2010 and Get following error in Event viewer
Faulting application name: devenv.exe, version: 10.0.40219.1, time stamp: 0x4d5f2a73
Faulting module name: netconfig.dll, version: 1.0.0.5, time stamp: 0x50a60f11
Exception code: 0xc0000005
Fault offset: 0x0000fdac
Faulting process id: 0xb40
Faulting application start time: 0x01ceae0dd4041a18
Faulting application path: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
Faulting module path: C:\WINDOWS\system32\drivers\imonagent\netconfig.dll
Report Id: 5fec2d1f-1a01-11e3-bf8e-4c001050978f
I have read following post and downloaded utility but it also not indicates any error in my machine
http://social.msdn.microsoft.com/Forums/vstudio/en-US/81e1b380-afe1-46ad-9c91-a588e0a5aa4b/how-to-reenable-remote-sql-server-connections-after-installing-visual-studio-2012
Please help me what to do with this problem
Problem not only occurs while i am debugging but also if somebody trying to view hosted site in my machine which has some remote database server connection
Have a luck via running following command (netsh Winsock reset) from command prompt mentioned in
social.msdn.microsoft.com/Forums/vstudio/en-US/2d11b6f9-3ada-4682-b643-c721a97af4ba/cant-connect-to-database-after-installing-vs-11-pro-beta

Resources