Skip to main content

Questions tagged [sql-server-2017]

SQL Server 2017 (major build version 14.00.xxxx). Please also tag sql-server.

Filter by
Sorted by
Tagged with
0 votes
0 answers
594 views

SSRS Delete Users Via TSQL

We want to remove SSRS users via TSQL rather than manually deleting their permissons via the reporting services admin page. Testing on SQL 2017 dev edition We have a script that does run and does ...
Stockburn's user avatar
  • 431
5 votes
2 answers
413 views

Random Error 824 - All Environments

We have been experiencing seemingly random error 824 on our DEV/QA/PROD SQL 2017 Enterprise servers. The servers run nearly identical code ingesting identical daily files via an ETL process into our ...
Dave C's user avatar
  • 153
0 votes
1 answer
331 views

SQL Agent Job fails after upgrade to SQL 2017

I have upgraded a database to SQL 2017. A SQL Agent Job that previously ran now fails with this error: Unable to start execution of step 1 (reason: JobOwner DOMAIN\USERNAME doesn't have permissions ...
JosephStyons's user avatar
3 votes
2 answers
2k views

Logical reads and LOB logical reads

I have a query app scanning a whole table with a text field. The query is doing this many reads: Scan count 1, logical reads 170586, physical reads 3, read-ahead reads 174716, lob logical reads ...
Mattia Nocerino's user avatar
1 vote
1 answer
1k views

Cannot connect to linked server using name in hosts file

I am trying to set up a linked server in SQL Server 2017 using the local Windows hosts file on the server where the linked server is being set up. The reason for this is to allow me to hard-code the ...
ktakmn's user avatar
  • 25
0 votes
1 answer
1k views

Grant permissions only if an object exists, but without mentioning the object twice

We have a number of database build scripts that grant permissions to specific objects (sprocs, functions, etc) only to specific roles. We have recently moved to an automated deployment model that has ...
Myles's user avatar
  • 101
0 votes
1 answer
1k views

Filtering a recursive CTE as view

i'm using MSSQL Server 2017 and have a CTE used in a view to get the root element of a hirarchical tree linked to one specific element. If the CTE is used directly and the base elements are allready ...
Findnix's user avatar
8 votes
1 answer
660 views

What can I add to an Extended Event to return correct row_counts?

I'm running an Extended Event session in SQL Server 2017 that's only recording module_end events for a specific database. The reason for this trace is two-fold: I'm wanting to see the frequency (or ...
Siyual's user avatar
  • 181
3 votes
2 answers
408 views

Different application databases in the same instance of SQL Server

I have 3 servers each with a SQL Server 2017 instance, and 3 different applications that connect to each sql server instance, basically: Application 1 -> Instance 1 (SQL Server 2017) Application 2 -...
arodp's user avatar
  • 29
1 vote
0 answers
1k views

A transport-level error has occurred when receiving results from the server. An existing connection was forcibly closed by the remote host

We have an application in Azure which connects to SQL Server on-premise over hybrid connection Every 4-5 requests from 1000 would fail with error 10054: A transport-level error has occurred when ...
Aleksey Vitsko's user avatar
2 votes
0 answers
168 views

Sys.dm_os_performance_counters DMV row counts

We have noticed an odd issue on two servers in a 3 node SQL Server 2017 cluster running Always On Availability Groups. When checking the DMV sys.dm_os_performance_counters the row counts are totally ...
Stockburn's user avatar
  • 431
3 votes
1 answer
245 views

Curbing Wasteful Memory Grants - MSSQL 2017

I'm running an on-premise SQL Server 2017 Enterprise at the latest patch/CU level supporting vendor software, which will become important later on. Server Stats: Virtual Machine (Memory is Pinned) ...
John Eisbrener's user avatar
2 votes
0 answers
381 views

Service Broker performance issues after upgrading from 2012 to 2017 - tons of LCK_M_IX

Last night we upgraded a SQL Server 2012 server to SQL Server 2017 + CU 29. This is one of a matched set - we send the same message to both and each processes it. No, this is not AlwaysOn; we're ...
mbourgon's user avatar
  • 433
0 votes
1 answer
208 views

Finding and locally deleting deleted records in a million-record table

I'm trying to incrementally load data from a remote server to a local one (using SSIS and linked server). Remote table has 1.7 million of records, increasing every hour. So far, I have been able to ...
Mohammad Javahery's user avatar
0 votes
1 answer
80 views

Replace %S with Feature Value on Feature String Based on Feature Name and Partid

I need to write a select statement that will replace a %S string in the FeatureString column with the actual values stored in the same table for a given PartID. With the following example data: +------...
ahmed barbary's user avatar
7 votes
1 answer
3k views

Memory Requirements for SQL Server

We have a machine with 256 GB RAM. Max server memory for the SQL Server is set to 180 GB. Out of 180 GB, SQL Server typically uses: Database Cache memory - ~ 140-150 GB Plan Cache - ~ 10 GB Stolen ...
Aleksey Vitsko's user avatar
0 votes
1 answer
219 views

SQL join unexpected result

I have the following table: item running resourceid 017510 C1 43 338877 C4 44 451233 C1 45 771225 C4 41 011212 C4 47 313366 C3 34 771226 C4 48 990000 C4 46 for each "running" I ...
Enirdas's user avatar
  • 11
3 votes
2 answers
2k views

Storage space used for NULL values

According to below links, NULL values take some storage space: https://stackoverflow.com/questions/3731172/how-much-size-null-value-takes-in-sql-server https://www.sqlservercentral.com/forums/topic/...
Aleksey Vitsko's user avatar
1 vote
1 answer
1k views

Check auto-numa is enabled

I run query select cpu_count, hyperthread_ratio, softnuma_configuration, softnuma_configuration_desc from sys.dm_os_sys_info and got results, where said, that numa is off: cpu_count ...
Novitskiy Denis's user avatar
0 votes
0 answers
2k views

An error occurred during service master key initialization (sql error log)

I have migrated sql server 2017 to new hardware. The sql error log shows following error log whenever the sql server service is restarted. An error occurred during service master key initialization I ...
variable's user avatar
  • 3,499
0 votes
1 answer
74 views

How to test whether current sql engine service account can decrypt the SMK?

Is it true that when the sql service account is changed via the config manager then the new account can decrypt the SMK. However if the change was made via the services.msc, then the new account doesn'...
variable's user avatar
  • 3,499
-2 votes
1 answer
3k views

Row_number to not increment if values on three columns are the same from the row before

Suppose I have a dataset that looks like the screenshot below and I need to add a count column for the rows based off the orderid, DocumentNo_, and CurrPackageTrackingNo with the following logic: ...
Keith Rivera's user avatar
0 votes
2 answers
73 views

SQLCONNECTIONPOOL growing very huge

One of my db server SQLCONNECTIONPOOL growing very huge,it consumed 55GB , out of 65Gb (sql MAX) memory) Environment: Microsoft SQL Server 2017 (RTM-CU25) Standard Edition How can i reduce the ...
Kiran Narlapati's user avatar
-4 votes
1 answer
235 views

I need help with fixing this query please!

I need to figure out what is wrong with this query. I get this error when running the query: "Msg 8169, Level 16, State 2, Line 1 Conversion failed when converting from a character string to ...
Anna D's user avatar
  • 1
0 votes
1 answer
2k views

error [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified when import excel data to sql server

I work on SQL server 2017 I need to import data from excel 2016 to sql server 2017 I using python script to do that I create odbc and success test with name Testserver path G:\ImportExportExcel have ...
user3223372's user avatar
2 votes
1 answer
577 views

Avoiding Hash match to improve CPU usage for a specific query

We are trying to resolve or figure out change in plan for one of the top sql queries by CPU. This query we have found (it's a vendor-based product) which unfortunately I do not have access to extract ...
Newbie-DBA's user avatar
2 votes
2 answers
313 views

Issues with differential backup on random days

We are having a very weird issue with our backups related to differential backup for one of VLDB around 10 TB. We run once a full backup every Monday and differential on remaining days. We do on ...
Newbie-DBA's user avatar
0 votes
1 answer
257 views

How do you manage your data retention Table cleanup routine

How do you manage table clean up when you have multiple tables that have different retention policies and FK Parent-Child relationships? Originally I had a table that had different delete statements (...
user1910240's user avatar
3 votes
1 answer
4k views

SQL Server-- Calculating Optimal Number of CPU Cores

We're soon going to rebuild the SQL Server running our production ERP. Our SAN Admin issued me the following challenge: Assume I could give you as many Intel Xeon Gold 6240 CPU @ 2.6 GHz cores as you ...
Eluros's user avatar
  • 75
4 votes
0 answers
129 views

Planning for application upgrade which connects to SQL server database

I am looking for some advise/guidance on how to achieve this with minimum downtime and possibly avoid any errors or failure during production change- Background- We have SQL database servers ...
Newbie-DBA's user avatar
-1 votes
1 answer
121 views

Should my company upgrade from Enterprise 2017 to sql server 2019? [closed]

Our production server is currently running SQL Enterprise 2017. We're paying for software assurance which means we can upgrade at any time. Should we be looking at SQL 2019?
Serdia's user avatar
  • 707
0 votes
0 answers
139 views

Maintenance plan run date wrong

Win server 2019 & SQL Server 2017 On Jan 28th, 2022, I setup 3 maintenance plans to backup 3 databases from 3:00AM – 3:40AM. The last one finishes at 3:45AM. For a few weeks I confirmed that I am ...
Lansend's user avatar
-3 votes
1 answer
90 views

How to write select statment that get data based on partid from last date to current date with filling gapes?

I work on sql server 2012 i face issue i can't make select statment get Partid from last month until current month march (3) . based on last date exist per partid and on same time if there are any ...
ahmed elbarbary's user avatar
-2 votes
1 answer
819 views

when update large table it take too much time to update

I work on sql server 2019 when update table Z2DataCore.parts.SourcingNotMappedParts i found slow and long time when update estimated execution plan actual execution plan Update statement takes 26.5 ...
ahmed elbarbary's user avatar
2 votes
2 answers
51 views

when make select to top 5 of rows from table it take too much time?

I work on sql server 2019 i face issue when make select top 5 rows it take too much time . Number of Rows on Table Z2DataCore.parts.SourcingNotMappedParts 70 milion rows . when run statment select ...
ahmed elbarbary's user avatar
-1 votes
1 answer
36 views

How to get partnumber that have at least have one source type Website and at least one stockid equal 1 Based on PartNumber?

I work on sql server 2017 i face issue i can't get partnumber that have at least source type website and at least have stockid equal 1 per partnumber so with another meaning i need to get part numers ...
ahmed elbarbary's user avatar
1 vote
0 answers
155 views

Archiving Historical Data

Right now on Production, for deleting historical data, used a script which is manually run in SSMS. Script deletes batches of 100 rows from Table1 where [Date] between [Start] and [End] in a looped ...
Aleksey Vitsko's user avatar
2 votes
0 answers
278 views

Error communicating between BxlServer and client

have been trying to upgrade SQL server 2017 to run Python 3.7. We have installed CU28 and the product version is 14.0.3430.2 which includes the C:\Program Files\Microsoft SQL Server\MSSQL14....
Ben Watson's user avatar
0 votes
1 answer
166 views

SQL Server query consolidating each database file data in to one row

I have this Dataset base of this query below SELECT DB_NAME() AS dbname , size/128 AS 'Total Size in MB', size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB', ...
Keith Rivera's user avatar
7 votes
1 answer
1k views

Why is statistics update slower on a clustered columnstore than on a rowstore?

I've moved several large tables (each with >10^9 rows and a couple of dozens columns) from clustered rowstore to clustered columnstore indexes on a SQL Server 2014 instance and noticed that ...
Andrej Kuklin's user avatar
2 votes
1 answer
970 views

Unable to Install SQL 2017 CU 28

I am in the process of upgrading our SQL 2017 servers to the current CU. I have ran across two systems that won't allow me to apply the update. In the SQL installer, I see below text when I click on ...
dmcook's user avatar
  • 21
0 votes
0 answers
70 views

Product Version for Analysis Services and Report Server using T SQL

How can I find the product version for both analysis services and report server using Transact-SQL? I'm trying to put together a query that will get me the details of each SQL instance with their ...
Drewbert's user avatar
  • 131
2 votes
0 answers
124 views

What would make an append-only table remain in the buffer cache in SQL Server

We have a table that is pretty much append-only. It's not overly huge (~4M rows, ~1.4GB data) It's the largest object in the buffer cache, consuming ~1.4GB of data. The SQL Server is busy, but appears ...
David Ames's user avatar
0 votes
0 answers
54 views

Why are both log file being written at the same time

I have a strange situation and I would like to get someone else taught. I have a database that have 2 log files (I know, it should not and I plan of fixing it soon). Now for what I know, log file are ...
Dominique Boucher's user avatar
2 votes
0 answers
30 views

Controlling permissions for app team while assigning them ALTER ANY AG access

There is a need where we our DEV team needs to make index changes and run other index maintenance jobs on the primary replica. We have seen that while this happens, there is a blocking chain created ...
Newbie-DBA's user avatar
0 votes
1 answer
879 views

Is it possible to add a column to a partition in a partitioned table?

I have a large partitioned table of 16 billion plus records. I am currently updating one of the columns to NULL using the partition number. The process is cumbersome in that it takes a lot of time to ...
Crispin 's user avatar
11 votes
1 answer
4k views

Non-yielding scheduler error in large memory server if the lock pages in memory option is disabled

We are seeing a lot of Non-yielding scheduler errors on a SQL Server VM. Reading this link on Microsoft Docs, it's recommended we enable Lock Pages in Memory. I do not have much experience with Lock ...
Brendan McCaffrey's user avatar
0 votes
0 answers
101 views

Adding new column to clustered column store indexed table

I designing clustered column store indexed fact tables. Later on many new columns might be added to these currently ~90 columns tables. How adding new nullable column is affected by the size (number ...
Avi's user avatar
  • 265
2 votes
1 answer
6k views

must be enable as a Publisher

I installed SQL Server 2017 on Centos 7 and used MSSM GUI for database replication configuration. when the distribution configuration process was successful until the end but when creating a publisher,...
badok's user avatar
  • 21
2 votes
1 answer
870 views

Retention not working on temporal table or very slow?

I have a table with retention set to 25 months (from today is 2019-12-19) but when I query the validfrom/validTo dates directly in the history table, I see records with ValidTo dates before that. We ...
Gabe's user avatar
  • 1,336

1 2
3
4 5
21