Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sql-server]

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag like sql-server-2016 if that is relevant to the question.

12
votes
0answers
857 views

SQL Server 2016 vs 2012 insert performance

I have two SQL Server instances on the same server: Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Standard Edition (64-bit) Microsoft SQL Server 2016 (SP1-CU5) (KB4040714) - 13.0.4451.0 (X64) ...
6
votes
0answers
203 views

Cardinality estimation on tables with large cardinality variance between keys

Context I have stumbled on an issue in SQL Azure where the Sort-operator is spilling over into TempDB due to poor row estimates. We are querying a master table that is joined with a number of detail ...
6
votes
0answers
155 views

Blocking caused by Query Store. Unable to clear or disable

I recently updated our 2016 SQL Server to SP2 and the most recent CU (KB4458621) released in August 2018. Just in the last day or so, I noticed that I have some blocking going on. I can't kill the ...
5
votes
0answers
96 views

Reinitialize Table Values in SQL SSDT Unit Testing

I am creating SQL Server Unit Tests. We are testing various stored procedures. In Unit testing principles, it is good practice to setup a small database table, populate values, and tear down (...
5
votes
0answers
125 views

Using the Schema Generation Wizard to regenerate a previously-generated schema

Lately, I've been trying to clean up a group of projects that my company received from an outside contractor. Among them is an SSAS cube, with an associated data warehouse. The contractors generated ...
5
votes
0answers
156 views

SQL Server Profiler: why the RPC Starting event does use an different decimal separator from SP Starting?

Trying to diagnose an problem, I've ran into that inconsistency. In SQL Server Profiler, the RPC Starting event uses the regional settings to write real numbers (example: in Portuguese(Brazil) 14.5 ...
5
votes
0answers
770 views

SQLPackage : Import or Export SQL Azure BACPAC without users

I know how to use SQLpackage.exe. I can export from SQL Azure and create a bacpac. I can also Import to SQL Server via SQLPackage.exe. I want to export or import without the users in the database. ...
5
votes
0answers
262 views

CHANGE_TRACKING_CURRENT_VERSION() incorrect on database in standby

We are using a change tracking solution to export increments for BI purposes for years now. But it was running directly on the production database. To lower the load on the system we wanted it to run ...
4
votes
0answers
66 views

dm_os_memory_cache_clock_hands understanding

As I mentioned in this question I'm trying to understand the working of clock hands. Simply put clock hands move when there is memory pressure so that cache entries can be removed or the cost can be ...
4
votes
0answers
81 views

SQL Server High Hash Match and Sort

I have an SQL statement that is taking about 40 seconds to run and the only thing I see is an high hash match and sort. I have added indexs to the temp table but still taking an long time to complete. ...
4
votes
0answers
117 views

Online index rebuild higher fragmentation on intermediate level

I need to rebuild some big indexes and I'm doing some tests with the various options (sort_in_tempdb, maxdop, online) of the ALTER INDEX statement on an test index with 4 levels and 800000 pages on ...
4
votes
0answers
910 views

Safely drop master key

I've restored a database in my Dev environment (SQL version 14.0.1000.169) and I'm using the wizard to create a "Availability Groups", when I try to select the database, I get a pop up "This database ...
4
votes
0answers
69 views

Deadlock in REDO thread , 1 replica went OK other didn't?

I have a 3 node cluster and the 2 secondaries initially went into SUSPECT mode due to a deadlock. I tried to resume both and only one caught up while the other is continuously deadlocking. I have to ...
4
votes
0answers
240 views

Should Full Text Filter Daemon Service be a cluster resource?

Our newly installed and configures Sql Server Always On Availability Failover Cluster with Sql 2016 Enterprise Edition with four instances and six nodes. It includes the DB Engine Service and the ...
4
votes
0answers
796 views

SSMS Cannot show the editor for this task (Notify Operator Task)

I'm getting an error message whenever I double click on a Notify Operator Task in our Maintenance Plans in SSMS, which says "Cannot show the editor for this task." Property IsMailHost is not ...
4
votes
0answers
887 views

DB snapshot goes into SUSPECT mode (SQL 2014 on WIN2K8R2)

I was hoping someone here might have encountered this sort of issue and if so what did you do to fix it? Here's some details: DB server: SQL 2014 Enterprise (12.0.4100.1) OS: Windows 2008R2 ...
4
votes
0answers
816 views

Upgrading SQL Server from 2008 to 2012 doesn't respect existing install / instance paths

Basic Information : Running Microsoft Windows Server 2008 with MS SQL Server 2008 (version 10.0.5869), trying to upgrade to SQL Server 2012. Currently working in a cloned VM of our production server (...
4
votes
0answers
110 views

Can SQL Server use a spatial index and another index at the same time and be efficient?

Let's say we have a table that contains two terrain datasets defined by TerrainModelID like below: CREATE TABLE [dbo].[DigitalTerrain]( [DigitalTerrainID] [uniqueidentifier] NOT NULL, [...
4
votes
0answers
3k views

MS SQL Server 2012 Failover Cluster connection issue

I was about to give up with this but I'll give it a go here if anyone can help. I've set up a fail-over cluster SQL Server with 2 SQL nodes, Domain controller and file witness. All seems to work fine,...
4
votes
0answers
4k views

SQL Server intermittent error 40 Could not open a connection to SQL Server or The network path was not found

I am getting intermittent errors as per the below stack trace. I am using C# Entity Framework with SQL Server 2012 enterprise running on a separate server computer. I can connect and query the DB ...
4
votes
0answers
252 views

merge replication too big

I have multiple handhelds which sync their data via merge replication. From time to time, new core data is imported on the server-database. For various reasons I keep the old data in the databse and ...
4
votes
0answers
2k views

Preferred Methods of Indexing MS SQL Server Audit Data to Splunk

What is your preferred method for indexing MS SQL Server for Splunk? I am collecting audit data in various environments by various means (profiler, app logs, and extended events) but I hope to ...
4
votes
0answers
296 views

Conflict handling, SQL Server 2008 R2 Peer to Peer

I have a Peer to Peer replication topology set up between two SQL Server 2008 R2 servers. I was doing some testing on fault tolerance and conflict handling. I have conflict detection enabled, and ...
4
votes
0answers
626 views

SQL Server 2005 Replication

I am in the process of creating Replication between 2 Remote Servers, server 1 is the Distributor and Publisher and server 2 is the Subscription. server 1 windows 2003 server 192.168.10.1 connected ...
4
votes
0answers
188 views

How to Audit for Access with Cross Database Ownership Chaining

I've just joined the data team of a new company and we have a large SQL Server environment (100+ instances) and cross database ownership chaining is on by what I gather is a necessity. I'm looking for ...
4
votes
0answers
118 views

Merge Replication Optimization

I am running Merge Replication on Microsoft SQL Server 2012 through web sync. Is there a way to recognize when regenerating a new snapshot and applying it would be more efficient than running a merge?...
4
votes
0answers
537 views

SQL Server 2008 replication scenario

First of all sorry about my english, and most importantly, my database ignorance, I'll do my best ;) Until now, the scenario that I have is as follows: In a server under our LAN, we have a database ...
3
votes
0answers
79 views

What's a pathological case where a bitmap filter would not allow the PROBE(Field, IN-ROW) semijoin reduction optimization?

I recently learned a performance optimization in SQL Server I did not know about ("Bitmap Filter On (Clustered) Non-Nullable Column Hash Semi-join Reduction via Scan + Probe IN-ROW" - a real mouthful),...
3
votes
0answers
46 views

Need help with SQL Server 2014 and disaster recovery

I am tasked with building a highly available SQL Server 2014 Enterprise environment for our new policy admin system. This database will eventually grow to 1TB +. Background Our normal method of ...
3
votes
0answers
45 views

Moving to version 2016 from 2008 and Breaking Change Alert from Upgrade Advisor

DBMS: SQL Server Upgrading from version 2008 to 2016. I have this part of the code that is being flagged by the Upgrade adviser as Breaking Change. Error: uses a constant expression which are ...
3
votes
0answers
102 views

Stored Procedure triggered by Service Broker can't access another database in SQLServer 2017

I make an extensive use of SQL Server Service Broker to trigger/parallelize data science tasks (data imports with SSIS or direct queries to another database on the same server, then data management ...
3
votes
0answers
141 views

Snapshot isolation transaction failed in database 'tempdb'

Upgraded from SQL Server 2008 R2 to SQL Server 2017. In SS 2008 R2 the application would occasionally get this error: “Snapshot isolation transaction failed in database 'tempdb' because the ...
3
votes
0answers
34 views

FILESTREAM database options cannot be set on system databases such as 'model'

Summary of Question My question is for SQL Server 2017 is there a way you can re-attach the model database (without rebuilding master or restoring master) if it has been dropped given that both of ...
3
votes
0answers
44 views

ASCII only connection to SQL Server

Let's imagine I have a legacy application that I would like to connect to a modern SQL Server. This legacy application only understands ASCII, but the SQL Server contains Unicode data in nvarchar ...
3
votes
0answers
109 views

Restore from Azure blob storage failing after backup overwrite

I'm attempting to backup a database (full backup, in simple recovery) to Azure storage, replacing a bak file that already exists, then restoring the new backup. Doing a regular backup and restore ...
3
votes
0answers
115 views

Optimize query without rewriting it - vendor app

Here is a query that uses a lot of CPU on my SQL Server (8 cores): DELETE TOP(1) rd FROM (SELECT TOP 99.9999 PERCENT * FROM APM_IisBb_Request_Details ORDER BY RequestDate ASC) rd JOIN ...
3
votes
0answers
78 views

In-Memory OLTP Non-Durable

I created In-Memory OLTP Non-Durable Tables in 4 different SQL servers.Lately one of the server performance has degraded and I see lot of processes (Almost 200-300) running with command XTP ...
3
votes
0answers
117 views

Msg 22830 level 16 on sp_cdc_enable_db_internal - could not update metadata that indicates database is enabled for Change Data Capture

I'm attempting to create an MCVE for this recent question. SQL Server is returning an error when attempting to update the system tables in master to indicate CDC is enabled for my test database. ...
3
votes
0answers
51 views

database restore with filestream on Windows Server 2016 renames data file

I have a database in SQL Server 2008 R2 sp2 that has filestream enabled. Restore of the database on a Win10 machine works as it should. However, on Windows Server 2016, the data directory (file) for ...
3
votes
0answers
424 views

Developer Edition install error code -2068119551

As stated above I am attempting to install SQL Server 2017 Developer Edition and coming up with the following error: Exit Code (Decimal): -2068119551 Error Description: Attempted to perform an ...
3
votes
0answers
69 views

Connecting SQL Server 2012 to MySQL

I have 2 devices, a server computer installed with SQL Server 2012, and a raspberry pi with MySQL installed. I have data in MySQL tables. How can I connect SQL Server 2012 to MySQL so I can save that ...
3
votes
0answers
36 views

Query plan shows high negative value and the server slows down

My SQL Server 2016 had been presenting problems certain days, all process since the morning begins to run slowly than normally. Sometimes updating statistics works, sometimes not and had to reboot ...
3
votes
0answers
836 views

Getting: Possible index corruption detected. Run DBCC CHECKDB

When I connect to the database and run a command on some catalogs, I get Msg 9100, Level 23 1> SELECT * FROM sys.databases; 2> GO Msg 9100, Level 23, State 2, Server x230, Line 1 Possible index ...
3
votes
0answers
477 views

A row read and locked with UPDLOCK, ROWLOCK, READPAST is not subsequently available

For many years we had a simple queue system, where a regularly executed loop would select and lock a next available row and call a stored procedure to actually process it, which, in turn would also ...
3
votes
0answers
107 views

User defined stored procedure - where's the execution plan?

SQL Server 2016, Enterprise Edition in Windows Is there anyway to display the execution plan of a stored procedure created in C# with Visual Studio Data Tools? This is a question that someone with ...
3
votes
0answers
271 views

SQL 2016 Clustered Install - SlipStream - Updates not Shown

Attempting to install SQL 2016 with the latest SP and CU. Running the following (from the directory with the Install exe): setup.exe /Action= InstallFailoverCluster /UpdateEnabled=TRUE /UpdateSource=...
3
votes
0answers
467 views

Always On DTC Support on new database?

Is it possible in SQL Server 2016 Enterprise to add a new database to an Always On availability group and have it enabled for DTC support without recreating the AG? Our Availability Group is already ...
3
votes
0answers
103 views

Data Synchronization from Remote MS SQL Server

I have a client server on which my user has limited permissions (i.e. SELECT only for example). I need to select some data from that server and insert into my local database. This has to be a ...
3
votes
0answers
148 views

Table design pattern that can support partitioning, clustered columnstore index, and spatial data?

I am designing a spatial database schema for SQL Server 2016 with a table that is going to hold a large amount of rows (50+ billions, increasing by 50+ millions per day). Requirements: Spatial ...
3
votes
0answers
562 views

There is insufficient system memory in resource pool 'default'

I'm running SQL Server 2016 and I'm getting this error: There is insufficient system memory in resource pool 'default' ...when running batch queries with millions of rows. I decreased the batch ...