Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-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
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
0 votes
0 answers
32 views

How To Grant A Specific Login Under Acitve Directory Group To View Server State In SQL Server [duplicate]

I want to grant only a login who is under an active directory user group to view server state in sql server. How can i do it?
DBA's user avatar
  • 1
5 votes
3 answers
1k views

General Question on sp_recompile

For couple of scenarios, not many a times but few we have seen doing sp_recompile on a stored proc improving the performance. Being a DBA i understand few of caveats involved when doing sp_recompile ...
BeginnerDBA's user avatar
  • 2,210
0 votes
1 answer
72 views

Understanding the load running on my SQL server

We have a project this year to move lot of physical SQL Servers, starting with medium critical servers onto Virtual machines. Generally on physical boxes we have a large count of logical processors, ...
Newbie-DBA's user avatar
0 votes
2 answers
668 views

What Is The Best Way To Clone A Database From Production To Development Environment? [closed]

We use SQL Server at our company as DBMS. I have a scheduled job working monthly. The job restores every databases on production server to development server at the end of the month but there is ...
user avatar
0 votes
1 answer
68 views

Getting VLF info with least privileged to run across multiple servers of different version

Per our monitoring scripts i am thinking to add monitor the status of VLF for each database across different SQL servers in our organization: We have mix of servers from 2012 to 2019: I've found a ...
BeginnerDBA's user avatar
  • 2,210
0 votes
2 answers
522 views

How to find Sum of dynamically generated time attribute in sql server 2012

I have a table with two columns (TASKID and Dateadded). I am trying to find difference between timings and would like to calculate the sum of the diff (time) attribute. select taskid,dateAdded,CAST((...
Nalo Nenu's user avatar
1 vote
1 answer
1k views

Two FOREIGN KEY constraints with SET NULL targeting the same PRIMARY table

I feel like I'm missing something obvious here... I have a situation with a primary table (let's call it People) and a secondary table (let's call it Groups) with two different roles that people ...
Neil Laslett's user avatar
0 votes
1 answer
255 views

Incorrect GrantedQueryMemory(KB) Value in SSMS Dashboard report

Just checking by to see if someone else has witnessed the same and tried a fix or has been fixed: Issue: I ran below query on stackoverflow2013 database select ParentId as [Post Link], count(...
Newbie-DBA's user avatar
3 votes
1 answer
158 views

Migrating a SQL Server 2014 AG to a new 2017 AG

Our current production server runs on SQL Server 2014 AlwaysOn AG. We are planning to upgrade it to SQL Server 2017 AlwaysOn. Due to the configuration issues with the present cluster, we can not use ...
user1716729's user avatar
43 votes
2 answers
3k views

Why does changing the declared join column order introduce a sort?

I have two tables with identically named, typed, and indexed key columns. One of the them has a unique clustered index, the other one has a non-unique. The test setup Setup script, including some ...
Daniel Hutmacher's user avatar
6 votes
1 answer
1k views

What Other Information Is Stored in The Page Header

A SQL Server database page is defined as to be 8192 bytes in size. There is some header information which is said to be 96 bytes in size. And if you have ever tried to create a table with more than ...
John K. N.'s user avatar
  • 18.3k
1 vote
1 answer
2k views

SQL Server Autonomous transaction logging

Our developer who is familiar with Oracle, has asked for the SQL Server equivalent of autonomous transaction logging. We run SQL Server 2014 and 2017. After extensive searching, nothing really seems ...
Jonathan's user avatar
  • 189
0 votes
0 answers
452 views

Add foreign key constraint for denormalized columns in detail tables?

When a detail table contains denormalized data, should denormalized columns be included in foreign key relationships between the master table and detail table? Here's more details: We have a master/...
Justin Grant's user avatar