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-2016]

SQL Server 2016 (major build version 13.00.xxxx). Please also tag sql-server.

2
votes
2answers
44 views

do we really need file share witness

We have always on configured. Total number of nodes in the cluster is 3(odd). All are in same subnet. Also we do have file share witness. Everything is working fine for now. My question is do we ...
0
votes
1answer
27 views

Database Restoration Issue Msg 3156, Level 16, State 6

Recently while restoring a database with memory optimized filegroup I start facing an issue with below error message:- Msg 3156, Level 16, State 3, Line 2 File 'XYZ' cannot be restored to 'D:\...
1
vote
1answer
29 views

xp_delete_file - error message when no files for deleting

I have a job that deletes transaction log backups older than 3 days. if for some reason there are no files to delete, it comes out with the following error message: Msg 22049, Sev 16, State 1: ...
1
vote
1answer
55 views

SQL Server Backup failing for just 1 DB (“The system cannot find the path specified.”)

For the last few mornings, I have had a backup of our ReportServerTempDB fail. We are not using SSRS on this server yet, but will in the next month, so the DB is the default 8mb .mdf and 8mb .ldf (i.e....
1
vote
2answers
40 views

Load balancing Availability groups with SQL Server Standard

So I have the current scenario, and it looks to be working fantastically, but I just want to get some input on the configuration. Is it smart? Are there any issues I am not thinking of? We have SQL ...
0
votes
0answers
38 views

Cannot set up replication between two servers

I am trying to subscribe a 2016 (sp2, cu1) server to another 2017 server. I am getting the following error message: For merge publications, the version of the Subscriber must not exceed the version ...
5
votes
0answers
48 views

SHRINKFILE Failure - Why does increasing file size resolve it?

I am running some SHRINKFILE operations to clean up a bunch of tiny, unnecessary files in a filegroup. For one of the shrinks, the command below results in an error: DBCC SHRINKFILE (N'myfile' , ...
2
votes
2answers
29 views

Storage pool configuration for SQL Server

We are in the middle of building a new SQL Server 2017 always-on cluster in Azure VM. The data disk layout of VM are as follows TempDb : 2 Azure Disk Read Cache TempDBLog : 1 ...
0
votes
1answer
33 views

Using SQL Server Reporting Services for monitoring database performance

I'd like to know whether it is a good idea to use SSRS for db monitoring or not? I want to check different parameters of a db such as Deadlock, page splits, and page reads/sec to improve db ...
1
vote
0answers
18 views

ODBC from Win10 32bit client only connects using IP address, but not using hostname

I'm experiencing a pretty strange problem. We're using a MS SQL based quality assurance software. The database is hosted on a MS SQL 2016 Std. server running on a Windows Server 2012 R2 VM. Our ...
2
votes
1answer
68 views

Availability Group cluster memory issue after network issues. How to dump HADR Log Block Msg Pool?

We have a four node Availability Group, two nodes in one site, two nodes off site in another data center. I have noticed after every WAN issue where the WAN connection is flapping, and the off site ...
0
votes
0answers
47 views

Stored procedure or Table Function doesn't return value when parsing XML

Script to create table and function at the bottom of the post: We have lately ran into problem that sometimes our stored procedures or Multi-statement table value that include sql statement parsing ...
3
votes
1answer
106 views

Execution Plan is different when Constant Variable is Null

I am working on a scenario in which I am providing a variable a value. When I pass Null value, the Query Engine didn't scan the Join tables. As per Logical Query Processing, first FROM Clause Executes,...
-1
votes
0answers
29 views

MS SQL Server Migration 2008 -> 2016 [duplicate]

Gurus - I was recently asked to perform an analysis of what will it take the company to migrate/upgrade On-Prem MS SQL Sever 2008 to 2016. I googled around, but did not find much regarding this. Can ...
0
votes
2answers
62 views

How to create a synonym for a column in SQL Server?

The following is not working. I want to create a synonym on a column in SQL Server 2017. How would I go about doing this? CREATE SYNONYM dbo.[ProductTest] for [dbo].[Product].[ProductId] GO select ...
0
votes
1answer
29 views

Permissions on SQL Server Sequences

The AD Group to which I belong has db_owner permissions on database LandingZone. The application I am debugging, that is running under my ID, is doing a SELECT NEXT VALUE FOR ThisSchema.ThatSequence. ...
-2
votes
1answer
27 views

Database Backup to URL fails with Device I/O Error [closed]

I'm using Ola's Maintenance Solution to backup my databases to a URL. Most of my databases backup just fine but I have one 2 TB database that continues to fail with a device I/O error. Has anyone ...
0
votes
1answer
38 views

SQL 2016 Changing Page Verify Impact

Recently inherited a new SQL server and after some Blitz (Thanks Brent and team) checks have noticed that some of the DB's are set to Torn_Page or None for the page verify option. I want to change ...
0
votes
0answers
18 views

Odd Profiler Trace Replay Error

I am working on migrating a client from a really old SQL Server 2005 database server to a SQL Server 2016 install. Everything appears to be fine for database import, validation, testing...etc. I've ...
1
vote
1answer
20 views

Error on CDC enabled Table

I am trying to create an SP on a CDC enabled database. SP contain an update statement for CDC enabled table using UPDATETEXT command but CREATE PROCEDURE statement has generated an ERROR Message. "...
0
votes
1answer
49 views

Query with CASE expressions on a Logger Devices database

select t.DATETIME, max(t.Depth) Depth, max(t.Temperature) Temperature from( SELECT CAST(readingDTTM AS DATETIME) DATETIME, case Sensor when 'Depth' then lValue end ...
2
votes
2answers
47 views

SQL Server Replication with Historical Tables

Is it possible to replicate a SQL Server database and for the replica to have temporal/historical tables? Details: I have a production system, running SQL Server 2014. I want to have a replica ...
1
vote
1answer
44 views

how to find out the log backups that I need to restore in order to bring log shipping from standby to online?

I have log shipping set up from server1 to server2. on server1 transaction logs backups are taken every 15 min to a network share folder. these transaction log backups are then copied (afte 1 hour) ...
1
vote
2answers
45 views

Missing step in backup (DR) plan

Unfortunately, I am assuming like most folks in this role, the title DBA came by default rather than design. I am trying to manage our farm of 5 SQL Server 2016 servers, each having a warm stand-by ...
0
votes
2answers
48 views

Delete queries blocks other concurrent transactions

DELETE queries in my production SQL server are causing deadlocks. I know that DELETE is causing this because i checked the Extended Events and checked the deadlock XML and found out that this DELETE ...
0
votes
0answers
22 views

Maintenance plan changing from ALL USER DBs to SELECT DBs automatically

We came across an odd bug in Maintenance Plans on SSMS 2016 and 2017 for SQL Server versions 2012 and 2016 (at least). The setup is unusual, but I couldn't find anything about this or any similar ...
2
votes
2answers
109 views

Why SQL Server Service Account connects to the DAC?

We started getting Alerts: Could not connect because the maximum number of '1' dedicated administrator connections already exists. Before a new connection can be made, the existing dedicated ...
4
votes
3answers
155 views

No Primary Key in some sql server tables

I have downloaded WorldWideImporters Database as a standard db (Microsoft Sample Database for SQL Server). In this db, some of the tables don't have primary keys but clustered indexes can be seen. Can ...
0
votes
2answers
32 views

Full Migration 2008R2 -> 2016

We currently have Windows Server 2008 with MS/SQL 2008R2: the default instance and two named instances. We are spinning up a Windows 2016 Server onto which we will install MS/SQL Server 2016 Standard ...
0
votes
0answers
29 views

Read Deadlock XML - Intra-query Parallelism

I encountered several deadlocks in my application over the last 2 months and i checked the Extended Events to find the details. I tried to understand the dealock XML and i came across this great ...
0
votes
2answers
31 views

Is there any Cross-platform SQL editors that allow joins from different databases?

Initially tried dbeaver but after configuring it, I realized that you can't perform joins from different data bases. Also tried TeamSQL which apparently does what I need but looks to be designed ...
1
vote
0answers
23 views

Availability Group and Transfer SQL Server Objects SSIS task

We have two db instances on Always On Availability Group. And I need to transfer data from selection of tables to the primary DB. I have created SQL Agent Job for SSIS Transfer SQL Server Objects ...
0
votes
1answer
29 views

Migrating SQL server 2008 to 2016 [duplicate]

Is there any check list for how to do migration from SQL Server 2008 to SQL server 2016 ? I am building a new server for the 2016 want to move all the DBs from the old server 2008 to the 2016 any ...
0
votes
0answers
20 views

how to backup, remove and then restore a filegroup of a partitioned table

Continuation of the question "Archiving SQL Server data on disk to be pottentially restored". I'm still looking for a way to archive data per month which can easily be restored... I'm in the ...
0
votes
0answers
16 views

Service Broker - A previously existing connection with the same peer was detected during connection handshake.

There are good questions about service broker here, here and here. In none of those questions I see the following error message: Service Broker login attempt by user 'MYCOMPANY_USA\sqlservice.' ...
3
votes
2answers
61 views

function to check whether the current server is involved in an availability group and if so, whether it is the primary

I used to have 2 servers on an availability group, but there was a problem with one of them servers involved,while patching, and to make a long story short I removed all the databases from the ...
4
votes
2answers
80 views

Help with wait type CHECK_TABLES_THREAD_BARRIER

I have a 2016 SQL Server freshly built - 13.0.5149.0 - OS 2016 (Microsoft Windows NT 6.3 (14393)). The environment is VMWare. No SQL Server HA configuration. It has a problem where CheckDB "stops" ...
0
votes
1answer
40 views

AlwaysOn Availability Groups on Secondary Replica

We have a Primary Server A with a Database. It has AlwaysOn ReadOnly Asynchronous which moves data to Server B. Out of curiosity, is it possible to place Server B on AlwaysOn and move it to another ...
1
vote
0answers
66 views

speed up referenced table order by and pagination

assuming I have the following tables CREATE TABLE Item ( ID INT PRIMARY KEY IDENTITY(1, 1), Name VARCHAR(50) NOT NULL ) CREATE INDEX UX_Item_Name ON Item(Name) CREATE TABLE OnSale ( ID ...
0
votes
1answer
61 views

Merge replication - Could not remove directory

We are facing an issue with our replication server. We are currently setting up a new environment to replace the old replication server and we keep getting the following error. Server XXX\YYY, Level ...
0
votes
1answer
37 views

DatabaseIntegrityCheck fails intermittently

Have been running the Ola Hallengren scripts on our new SQL Server 2016 Enterprise server for about 6 weeks or so now. The database Integrity script only works intermittently on some instances. ...
7
votes
4answers
969 views

Best practices to maximize portability in SQL Server 2016

When it comes to developing the prototype of a solution, often the technologies has not been decided yet and might not be the same that will be used in the finished product. In this scenarios I tend ...
5
votes
1answer
308 views

Unfamiliar syntax - Query with Parameters in Braces at the beggining

I have run sp_WhoIsActive on one of our servers using the following syntax: sp_whoisactive @get_plans = 1, @show_sleeping_spids = 0, @get_outer_command = 1, @get_locks = 1 and found a spid with the ...
0
votes
0answers
60 views

Microsoft SQL page level restore, no valid backup. Confirming process

We have a database in production that is coming up with issues after running DBCC CHECKDB. This particular DB was moved from a development environment to production. During this time, for some reason ...
0
votes
1answer
21 views

SSIS Fault Tolerant Data Connection

I feel like a may be standing too close to this one. I've inherited an SSIS package that has two data connection objects. On OLE DB connection (to perform work) and an ADO.NET connection (to a ...
0
votes
1answer
48 views

Database Size Increase After Index Rebuild.How to get back down?

I executed an Index Rebuild for a large table in database because it was 85% fragmented. After the Index Rebuild finished the database file size has grown from 19 GB to 27 GB. Rebuild option: (...
1
vote
1answer
39 views

Redo lag on AG readable secondaries: is there a way to overcome it?

I have a quite busy (1000+ batch requests per second, 350+ workers on average) system built on sql server 2016. It's an availability group with 3 synchronous replicas. I'd like to redirect read ...
6
votes
4answers
196 views

Finding the Min value for a subgroup, filtering out preceding Min values within the same parent group

How do I get the minimum value for a group (Acc, TranType), but filtering out any minimum values used in preceding rows for the Acc group. Preceding rows would be defined as Acc asc, TranType asc. ...
2
votes
1answer
112 views

Microsoft Optimal method for columns into 1 word: XML Raw or Concat

What is fastest, performance method to make columns into one word? Does Microsoft have recommendation, or is there performance Big-O studies on FOR XML RAW vs Concat? Company has multiple tables with ...
0
votes
2answers
21 views

How to have SQL Server's SQL Agent pick up a new Powershell module

I have a Powershell module that I've written and uploaded to my SQL Server at C:\Program Files\WindowsPowerShell\Modules.I have a SQL Agent job with a powershell step that calls the module. This all ...