iLearnSQL

MCSA 2012, MCDBA, MCITP, MCP, MCTS(SQL Server 2005), MCTS (Database Development, 2008), ITIL v3
  • Tagline: Data knows everything ...

SQLServerCentral Article

Change the Instance Collation by Rebuilding Databases in SQL Server 2017

As a part of my DBA activities, I do a lot of SQL Server installations every week. Most of the time, I install the instance with the default collation. A collation is a configuration setting in SQL Server that determines how the database engine should read the data. SQL Server has huge list of collations […]

5 (2)

You rated this post out of 5. Change rating

2022-12-26 (first published: )

19,408 reads

SQLServerCentral Article

Application down after SQL Service logon account change

I was working on one of my clients server recently. This was during a normal maintenance monthly activity to reboot the database server every first weekend. I rebooted the machine, and as per the defined steps, I checked the SQL services after the reboot to ensure they were up. I verified all SQL Services and […]

5 (5)

You rated this post out of 5. Change rating

2020-10-05

4,352 reads

SQLServerCentral Article

SQL Server 2017 Installation Error with KB2919355

Recently I was installing SQL Server 2017 and I could not believe a simple installation took up my whole day. I was installing an instance on one newly built Windows 2012 R2 server. After clicking next a few times, I got an error: a rule failure, for KB2919355. I downloaded the KB2919355 as mentioned in […]

5 (1)

You rated this post out of 5. Change rating

2020-09-14

7,596 reads

SQLServerCentral Article

Using Recommendations for MAXDOP and Max Memory During Installation

Finally, two important SQL Server recommended settings have been introduced during the installation process. These are the settings that every DBA (should) change after every single installation. The settings are MaxDOP and Max Memory. This article looks at each of these settings and how they are presented during installation. MaxDOP When an instance of SQL […]

4 (4)

You rated this post out of 5. Change rating

2020-09-01

9,874 reads

Technical Article

Post SQL Server Installation steps with PowerShell

I bet, each DBA would change some settings after the SQL Server installation as per their company standard . I wrote this PowerShell script for one of my client who has below standards: Port should be 1433, static Disable SQL telemetry* & SQLWriter services Change recovery model to FUll for all databases except tempdb and […]

5 (2)

You rated this post out of 5. Change rating

2020-07-02 (first published: )

2,598 reads

Technical Article

How to register SPN for SQL service account

Check if the SPN is already registered: setspn -l domain\xxxxx If not, run below commands: setspn -A MSSQLSvc/abc.xx.companyname.com:1433 domain\xxxxx setspn -A MSSQLSvc/abc.xx.companyname.com domain\xxxxx setspn -A MSSQLSvc/abc:1433 domain\xxxxx setspn -A MSSQLSvc/ abc domain\xxxxx   Verify again, setspn -l domain\xxxxx

5 (1)

You rated this post out of 5. Change rating

2020-06-17 (first published: )

7,199 reads

Technical Article

SQL Service account status with PowerShell

One of my client has the requirement to have SQL Service account running with domain account and should not be with local account. You may receive SSPI error after changing it to domain account. In order to fix that issue check my previous blog "How to register SPN for SQL service account" Output:

5 (1)

You rated this post out of 5. Change rating

2020-06-17

1,031 reads

Blogs

Extending a SQL Server Failover Cluster Across Regions in  Google Cloud Platform (GCP)

By

I was the principal author of this SIOS whitepaper, which describes how to build...

Heading to 2024 PASS Summit

By

I am able to head back to Seattle for the PASS Summit this year....

Tell me the positives of your solution

By

I still have a tendency to talk about all the cons of a proposed...

Read the latest Blogs

Forums

The Cloud Security Problem

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Cloud Security Problem

Virtualizing AWS data by using Fabric Shortcuts: Data Engineering with Fabric

By John Miner

Comments posted to this topic are about the item Virtualizing AWS data by using...

Timescale Brings PostgreSQL into the GenAI Era with pgai Vectorizer

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Timescale Brings PostgreSQL into the...

Visit the forum

Question of the Day

The LAGging NULL

I have this data in a SQL Server 2022 table:

player         yearid team HR
Alex Rodriguez 2012   NYY  18
Alex Rodriguez 2013   NYY  7
Alex Rodriguez 2014   NYY  NULL
Alex Rodriguez 2015   NYY  12
Alex Rodriguez 2016   NYY  9
If I run this code, what are the results returned in the hrgrowth column?
SELECT
  player
, yearid
, hr
, hr - LAG (hr, 1, 0) IGNORE NULLS OVER (ORDER BY yearid) AS hrgrowth
FROM dbo.playerstats;

See possible answers