20,597 questions with SQL Server-related tags

Sort by: Updated
3 answers

Databasemail.exe not working on Windows 2012, Running SQL2017

Hi, I have an SQL2017 server installed in my machine and I have admin access to it. I've configured databasemail in my instance. Ensured: > Remote login is enabled in the database > .NET 3.5 is installed on the server > We are able to send…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-25T07:21:29.63+00:00
DebayanBhattacharya-5228 1 Reputation point
commented 2020-09-30T08:23:41.577+00:00
AmeliaGu-MSFT 14,006 Reputation points Microsoft External Staff
4 answers

SQL Server licensing- how many licenses do I need????

Hello! I am working on a project that requires a new SQL Server with Enterprise Edition. We are looking to set up a new AWS dedicated host (r5d.16xlarge), which is listed as 64vCPU (which is 32 vCPU with HT). We have determined that we only need the…

SQL Server | Other
asked 2020-09-25T12:49:58.487+00:00
Bill Schultz 1 Reputation point
commented 2020-09-30T07:36:18.963+00:00
CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
2 answers

Can we enable tls 1.0 on MSSQL Server 2019 on database level? if yes then how?

Hi , i am running sql server 2019 on Linux box and trying to connect using a Windows server 2016 client, how can we enable TLS 1.0 for SQL Server 2019 on the Database/instance level. TIA.

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-25T19:32:25.8+00:00
Rafay Pervaiz 21 Reputation points
commented 2020-09-30T07:35:26.757+00:00
CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
3 answers One of the answers was accepted by the question author.

Data Deletion by Chunks using T-SQL SP

I am learning T-SQL Programming and I trying to purge 2000000 records by chunks of 20000. Below is the code I tried and I need some help to stop loop after deleting 300000 records. I am not sure where I am wrong. I want to even log this output to a…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-29T12:25:28.007+00:00
VijAz 161 Reputation points
commented 2020-09-30T07:01:15.31+00:00
VijAz 161 Reputation points
3 answers One of the answers was accepted by the question author.

Why do Sql Server Jobs Hang?

Hi all, I have done a search on the reasons why the sql jobs are in executing mode but never completes. What could be the reason. Is there a way to find out the reason from sql server Agent. Few of the jobs in our system always hangs after…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-29T13:17:53.42+00:00
Sreelatha 46 Reputation points
answered 2020-09-30T06:41:31.313+00:00
tibor_karaszi@hotmail.com 4,316 Reputation points
3 answers One of the answers was accepted by the question author.

Sql Jobs Stuck

Hi All, I have written a script to stop a Sql Server Job when it is stuck for x hours/min. Most of the live jobs gets stuck after business hours. So I am planning to create a test job and make it stuck so that I can test my script. What is the best…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-29T23:47:10.987+00:00
Sreelatha 46 Reputation points
answered 2020-09-30T06:35:55.88+00:00
tibor_karaszi@hotmail.com 4,316 Reputation points
2 answers One of the answers was accepted by the question author.

How To display differenet feature values on one row separated stick if it multiple difference ?

I work on SQL server 2012 I face issue : I can't get all different value Feature one one row result separated by sticky if it multiple difference if one different then no need stick. where c have value and x have value but both not equal each…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-30T01:49:12.6+00:00
ahmed salah 3,216 Reputation points
accepted 2020-09-30T06:33:25.387+00:00
ahmed salah 3,216 Reputation points
1 answer One of the answers was accepted by the question author.

While loop is too slow in sql to get last 3 weeks data.

Getting last 3 weeks data by using while loop but its too slow. Declare @beginDate int = 0; Declare @pendDate int = 1; Create Table #NOC(WeekDates date,PeopleID int,DatefBirth date,Age int,Operator varchar(8),Location varchar(250),SA1 bigint,NOC…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-30T01:08:59.257+00:00
RXR 121 Reputation points
commented 2020-09-30T04:17:11.047+00:00
RXR 121 Reputation points
1 answer

Database migration from MySQL to MSSQL for Sonarqube v6.7.7 using MYSQL Migrator tool

Hello Everyone, I am upgrading SonarQube 5.6.3 to 6.7.7. Sonarqube 6.7.7 supports MySQL database but want to migrate the data from MySQL to MS SQL and will use MS - SQL . i am using MYSQL Migartor tool to migrate the data. Sonarqube is running on…

SQL Server | Other
asked 2020-09-29T19:52:22.193+00:00
Ahmed, Kafeel 1 Reputation point
answered 2020-09-30T02:58:57.343+00:00
AmeliaGu-MSFT 14,006 Reputation points Microsoft External Staff
1 answer

SSRS Report Viewer(website) is not scrolling in ipad

Hi, I have an application which uses the ssrs embedded into the application using the <object> html tag. When we open the ssrs report url in the ipad directly scroll appears as expected but in the application the reports sectrion is not getting…

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,067 questions
asked 2020-09-29T13:21:31.65+00:00
Vemuri, Srilekha (Cognizant) 1 Reputation point
answered 2020-09-30T02:27:32.487+00:00
Joyzhao-MSFT 15,636 Reputation points
3 answers One of the answers was accepted by the question author.

SQL Server SYSADMIN account and DBO Role

Hello, My understanding is that when a SQL DB is created the SYSADMIN role is assigned the DBO role. My question is, if SYSADMIN has DBO formally removed and is assigned another role later, like db_datareader, does it still retain DBO level permissions…

SQL Server | Other
asked 2020-09-18T21:18:26.87+00:00
Ed Hall 41 Reputation points
accepted 2020-09-29T21:36:40.477+00:00
Ed Hall 41 Reputation points
4 answers

Create a login which can create new logis & roles and can grant access to user on any database on that instance

Hi All, I want to create a login which can create new logins & roles and can grant/revoke access to user on any database on that instance without providing "sysadmin" access. I have tried to provide user with "securityadmin"…

SQL Server | Other
asked 2020-09-23T13:36:14.953+00:00
Devendra Yadav 1 Reputation point
commented 2020-09-29T21:34:04.027+00:00
Erland Sommarskog 122.4K Reputation points MVP Volunteer Moderator
2 answers One of the answers was accepted by the question author.

Multicast to two different Flat File Destinations results in Error

So I have a need to output the results of a SQL Server Stored Procedure to two different Flat File Destinations and we are using a Multicast in order to try and do so. When we run the SSIS Package, we get... "The process cannot access the file…

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,705 questions
asked 2020-09-29T15:31:15.517+00:00
Bobby P 231 Reputation points
accepted 2020-09-29T21:06:37.903+00:00
Bobby P 231 Reputation points
1 answer One of the answers was accepted by the question author.

SQLServer SQLGeometry GeomFromGml not loading valid GML due to gml:ring interpreted as gml:LinearRing

Dear all, I am working on a project in which i parse large amounts of GML data into Geometries in an SQL2019 Database. I use the GeomFromGml function for this. I have the following XML : <gml:Polygon…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-21T18:59:52.607+00:00
michel van der breggen 96 Reputation points
accepted 2020-09-29T17:00:35.433+00:00
michel van der breggen 96 Reputation points
4 answers One of the answers was accepted by the question author.

Retrieve multiple status into one row based on multiple conditions SQL 2008

I need to retrieve multiple statuses into one row based on the closest status before + previous day if the day of the week in(Tuesday, Wednesday, Thursday, Friday, and Saturday), if the query runs on Monday it should include the closest status before +…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-28T19:24:54.687+00:00
JC_BI 21 Reputation points
commented 2020-09-29T15:19:29.9+00:00
Guoxiong 8,206 Reputation points
2 answers

Can't open SQL Server Management Studio 18 - "MRU Package did not load correctly" and "Cannot create the window"

This issue is driving me crazy. I can't open SQL Server Management Studio (SSMS) 18. When I try to open it I get the follow things: Starts fine with the small window that says "Microsoft SQL Server Management Studio v18.6"... But then I…

Azure SQL Database
SQL Server | Other
asked 2020-09-20T03:48:48.1+00:00
Kurka 1 Reputation point
commented 2020-09-29T12:28:18.93+00:00
Anurag Sharma 17,636 Reputation points
2 answers

Floating IP with SQL Always On

Hi, me setting up an environment where I have: I was reading that I can create virtual machines on azure and use them for SQL Always On in conjunction with load balancer. Doubts arose: When I create a LISTENER in SQL Always On, every…

SQL Server | Other
asked 2020-09-13T19:11:02.113+00:00
Salves 501 Reputation points
answered 2020-09-29T12:20:53.5+00:00
Shashank Singh 6,251 Reputation points
7 answers One of the answers was accepted by the question author.

SQL Server 2017 -- How to properly resize TEMPDB after it has AUTOGROWN

HI All, I would like some advice on how to properly resize TEMPDB after a run-away query caused tempdb to autogrow. Fortunately we caught it before we ran out of diskspace, but not before we came dangerously close to running out. Our setup: We…

Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-28T16:46:58.08+00:00
DJAdan 671 Reputation points
answered 2020-09-29T11:54:07.103+00:00
DJAdan 671 Reputation points
1 answer

Always-on Dashboard: last_commited_time

May I know on Always-on Dashboard: last_commited_time, is it always the same between primary , sync/async replica ? given that sync replica is synced state and async is syncing state.

SQL Server | Other
asked 2020-09-25T07:18:32.9+00:00
sakuraime 2,346 Reputation points
commented 2020-09-29T08:43:15.443+00:00
CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
2 answers

How to convert this query to 52 weeks rolling based data.

I have CTE which is quite manual so everytime I have to change week number and days thing in this query. With CTE_Deprivation_Live20 As ( Select m.PeopleID ,DateDiff(yy,P.DateOfBirth,GetDate()) as Age, m.LocationName,m.ActiveStart,m.ActiveEnd, …

Azure SQL Database
Developer technologies | Transact-SQL
SQL Server | Other
asked 2020-09-28T02:51:48.833+00:00
RXR 121 Reputation points
commented 2020-09-29T08:23:32.11+00:00
EchoLiu-MSFT 14,621 Reputation points