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.

learn more… | top users | synonyms (2)

11
votes
0answers
106 views

Service broker was backed up, now receiving, but doesn't seem to be processing

Having a problem with Event Notifications. On the machine/drive/database that the messages are sent to (receiver), the drive filled up when nobody was looking, so it's been backed up all day. Now ...
9
votes
0answers
204 views

Restore Database using GUI - Wrong file to restore

I'm just messing around with the graphic interface and studying the options of the "restore" task. One thing that I noticed is when I click on "generate script", the first line of the query is: ...
9
votes
0answers
107 views

SQL Deadlock on the same exclusively locked clustered Key (with NHibernate) on delete / insert

I have been working on this deadlock issue for quite a few days now and no matter what I do, it persists in one way or another. First, the general premise: We have Visits with VisitItems in a one to ...
8
votes
0answers
631 views

Did the Change Tracking internals change from SQL Server 2008 to 2012?

In trouble shooting an issue with synchronizing disconnected devices with a central database server, we are experiencing a problem after upgrading to SQL Server 2012 on the server. It appears that the ...
6
votes
0answers
108 views

DBCC Check DB issue

I have database of 99GB on this database when I am running DBCC Checkdb('IssueDB') It gives error as: Msg 8921, Level 16, State 1, Line 1 Check terminated. A failure was detected while ...
6
votes
0answers
85 views

How to reload a linked server?

I am using Microsoft SQL Server 2014 - Enterprise Edition, a problem occurs with the linked servers where it is necessary to restart the server or to stop the MSSQLSERVER services. When the server is ...
5
votes
0answers
66 views

How to solve blocking on tempdb

I am having tempdb contention (I guess, at least) on one of the servers (SQL Server 2008 R2). Both the blocker and the waiters (10 of them) has PAGELATCH_EX wait type on database tempdb and all ...
5
votes
0answers
58 views

Restored DB has data, DBCC CHECKDB is clean, but SELECT TOP 1 returns zero rows

Having restored a client's SQL 2014 EE DB onto our Developer Edition instance, without issue, then running a DBCC CHECKDB that found zero errors, and a clustered columnstore index alleging over 1Bn ...
5
votes
0answers
50 views

SQL Server Agent initiating self-termination

From past 1 month one of my server is facing issues with SQL Server Agent. It stops automatically with below error and happens randomly. Sql Agent Output file [097] Memory leak detected [204 ...
5
votes
0answers
108 views

Database msdb stuck in recovery

I encountered a problem while testing recovering backups (Veritas BackUp Exec 2015, just for you to know). Main Problem is: I couldnt restore the databases - looking on the target Server where I want ...
5
votes
0answers
122 views

Why should I “Avoid partitioning dimension tables” on SQL Server?

SQL Cat have a list of tips titled Top 10 Best Practices for Building a Large Scale Relational Data Warehouse. Under section 4 - Design dimension tables appropriately they state: Avoid ...
5
votes
0answers
104 views

Would Temporal Tables be included in the Standard Edition of SQL Server 2016?

The new version of SQL Server 2016 would support so called Temporal Tables. I can't find any documentation that would say whether this feature would be Enterprise-only or available in Standard ...
5
votes
0answers
1k views

What is the best way to create a database diagram for SQL Azure without having to install SQL Server?

I have a database on SQL Azure and want to create a database diagram for that, but don't want to have to install SQL server and copy the database etc. Is there any way that I can do it that anyone ...
4
votes
0answers
32 views

How to change default port for T-SQL Debugger

The default port for T-SQL Debugger is 135, it is possible to change this port ? In my company this port is on special list of banned ports, therefore we need to open that service on another port ...
4
votes
0answers
50 views

VLDB is stuck in recovery state. It's a permission issue, now what should I do?

SQL Server database which is very large (4TB) is stuck in recovery state. Reason: Data center had a planned downtime and we had to turn the physical machine off and when it turned on, as I read in ...
4
votes
0answers
65 views

Restore Database wizard won't open in SSMS 2014

On a dev machine running Window Server 2012 R2, I just upgraded SQL Server from 2012 to 2014. Using SQL Server Management Studio 2014, when I right-click a database and go to Tasks -> Restore -> ...
4
votes
0answers
78 views

Best Practices to reconfigure SQL Server for VMware

What I want to know is why would someone configure a server this way. 3 instances of SQL Server on the machine, 64GB RAM, no affinity mask settings and MAXDOP 0 with CostThreshold 5. I want to ...
4
votes
0answers
45 views

Reduce impact on SQL logs

Sharepoint and SQL Server issue as below When we change setting on SharePoint (Get-SPEnterpriseSearchServiceApplication).QueryLogSettings.CleanupDays = 30 we basically tell SharePoint to purge all ...
4
votes
0answers
99 views

Why does resource in AlwaysOn fail?

I have two SQL Servers (12.0.4100.1) and Availability Group (AG) configured on them. Sometimes some server hangs. It responds on ping, but RDP connection are not available, SQL Server doesn't respond ...
4
votes
0answers
152 views

Performance inner join vs left join involving parallelism

I have a query which takes about 8 hours to finish. Simplified, the query looks something like this: SELECT [Some attributes, inconsequential] FROM RBM.Financial_Events RFE INNER JOIN ...
4
votes
0answers
66 views

transaction replication causing too many deadlocks after adding a indexed view - what to monitor in order to avoid this?

I have created the following indexed view and its clustered index: This view was created on a subscriber database and all the tables used in the view are constantly being written to through the ...
4
votes
0answers
243 views

Interpreting sys.dm_os_sys_memory

I try to figure out a way(using only TSQL) to determine if and how much the PAGEFILE (I will capitalize this term if I refer to the windows page file from now on) is used (like pagefileusage% ...
4
votes
0answers
77 views

Take action from extended event?

I've seen it mentioned a few times that you can configure an event session to take an action when an event fires. Does anyone have any information on how to do this? I know that you can use the ...
4
votes
0answers
123 views

Find out why SQL Server released memory

I have a SQL Server 2008 R2 used for sharepoint and ssrs. The SQL Server hosts two instances. For a few minutes both instances were timing out, not responding. CPU slowly rose to 100%, 30% from ...
4
votes
0answers
63 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
139 views

SSRS URL Changes while navigating

I am trying to track down the root cause of this issue I keep seeing. We have SSRS running with a custom URL like https://reporting.companyname.com/reports. When I connect to that address I can ...
4
votes
0answers
84 views

Why is the lease locked for a some full sql backups to Azure Blob using Ola Hallengren backup scripts?

I'm using SQL Server 2012 and working on backing up to Azure Blob using Ola Hallengren backup scripts. Some backups are lease locked (ex. model) while others are not (ex. msdb). It's inconsistent, it ...
4
votes
0answers
226 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
147 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
566 views

SQL Server Replication :: Dedicated Distributor Hardware Requirements

Does anyone know any rules of thumb (or better) with regards to hardware requirements for a dedicated distributor server? i.e. Based on estimate metrics (e.g. number of subscribers, publishers, ...
4
votes
0answers
467 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
27 views

How to optimize this tricky SQL self-join?

I want to perform a complex self-join on a table. I know that this could in theory be done very efficiently (see below), but I have trouble getting SQL (on Microsoft SQL Server) to do so. My question ...
3
votes
0answers
36 views

How to deal with Users Needing to Enter Mixed Data Types in MS SQL Server

I have a form in a C# application that I can't change with a data table bound to a query. The user enters a mark for a student's task or 'A' for absent. However, the person who designed this had the ...
3
votes
0answers
27 views

How to PUSH data between a Local DB Server to Cloud DB Server?

I have an implementation doubt regarding replicating data between SQL Server 2014 database servers (Replicating data from Local Premises SQL Server to Cloud DB Server, which are not in same domain or ...
3
votes
0answers
48 views

SQL Server Incremental Backups Split

I am trying to recover a database where the incremental (log) backups are split between two methods (Carbonite/Zmanda and SQL .bak files). When I try to use the restore wizard I get the following ...
3
votes
0answers
75 views

Options to migrate large database from Sybase ASE to SQL Server with minimum downtime

The problem: Our server database contains 1TB of data. It runs on a Sybase ASE 15.7 server and shall be migrated to SQL Server 2014. The servers will be located in the same data center during ...
3
votes
0answers
80 views

How to fix SQL Server Management Studio 2014 IntelliSense when intermittent

Our remote SQL Server was recently upgraded to 2014. I installed SQL Server Management Studio 2014 on my Windows 10 client computer. At first, everything seemed to be going great, until I noticed ...
3
votes
0answers
35 views

NULL Agent Timing Out

Error: Replication-replication Distribution Subsystem: agent (null) scheduled for retry. Query timeout expired. Based on my research, this error appears when there is a lot of contention on ...
3
votes
0answers
44 views

How do I use freetexttable against multiple tables?

I have a database which (amongst other things) contains tables for support tickets. Each ticket has a short summary, as well as a description. Each ticket can have multiple notes, each of which has an ...
3
votes
0answers
63 views

Unable To Log In Through Windows Authentication

See this question for details of troubleshooting I've been stepping through (I did answer 2, which didn't work - it was a corrupt master file). In configuration manager, I changed to a Built-in ...
3
votes
0answers
51 views

Is execution plan cached “better” for stored procedures than for a non-dynamic query?

Reading different explanations about execution plan caching by Microsoft SQL Server, I'm confused about the benefits of using stored procedures instead of non-dynamic queries. By a non-dynamic query ...
3
votes
0answers
28 views

Incremental statistics with failover

We have two AlwaysOn availability replicas - secondary readable. We do have an incremental statistics on a large table. When a failover happens, SQL Server tries to update statistics on that table ...
3
votes
0answers
81 views

Unable to restore backup taken on one server onto another server

I am using SQL Server 2014 version 12.0.2000.8 on both systems. When I try to restore the backup taken from the first system onto the second system it says: No backup set selected to be restored ...
3
votes
0answers
24 views

Memory\Pool Nonpaged Bytes low but Memory\Pool Paged Bytes high

Can someone help identify how these values can indicate memory leak. In the system I am monitoring Memory\Pool Nonpaged Bytes are low (on average 100mb) but Memory\Pool Paged Bytes are high (on ...
3
votes
0answers
22 views

ObjID in Page Header

I am reading this article: Inside the Storage Engine: Anatomy of a page. I have a database MyDB, and there is a table MyTable in the database. I have the following questions: If I do as follows: ...
3
votes
0answers
83 views

Database corruption extends beyond nonclustered index issue in SQL Server

Background I have a server running SQL Server 2008 R2 on the matching MS OS. Over the last few months this server had a RAID drive failure on two separate occasions (which simply required hotswapping ...
3
votes
0answers
427 views

Slow inserts/updates into partitioned table with lot of partitions

I'm designing the partitioning for our new database, but we are facing performance issues in inserting or updating the partitioned table. For simplicity suppose we have one table T, which have an ...
3
votes
0answers
200 views

SQL Server 2014 SP1 stops responding

Recently I have upgraded my development machine to Windows 10 and SQL Server 2014 SP1 Express (12.0.4213). Then I noticed that my application sometimes crashes with a timeout exception. It is quite a ...
3
votes
0answers
66 views

Clustered index on a join table

Currently I have a table defined as follows, but I'm not sure what to cluster the table on: CREATE TABLE [Security].[UserGroups] ( [UserId] INT NOT NULL, [GroupId] INT NOT NULL, [IsAdmin] ...
3
votes
0answers
80 views

SQL Server MERGE statement efficiency

We are using the following query to merge new data between tables. -- Merge descriptions from Sync_CheckPointDescriptions table with temporary table #temp MERGE CheckPointDescriptions AS TARGET ...