Articles

Technical Article

How to move SQL Server from one computer to another?

Moving SQL Server from one computer to another is not a very difficult thing to do, but it often stumps newbie DBAs. Of course, it needs careful planning to ensure that the SQL Server is moved completely and properly to the new machine, and with a minimal downtime and no data loss. This article introduces you to a couple of methods you can employ to move/migrate SQL Server from one computer to another.

2003-01-24

107 reads

SQLServerCentral Article

Worst Practice - Bad Comments

This one is pretty interesting, Andy discusses a few things he sees in comments that not only fail to add value, they end up costing extra time. There's room for discussion here, but definitely a discussion worth having - comments can make you or break you, here's a chance to think about what you think is important in commenting and pass that on to your development team.

4 (2)

You rated this post out of 5. Change rating

2003-01-23

10,950 reads

SQLServerCentral Article

How to Search for Date and Time Values

Because of the way date and time values are stored in SQL Server, searching for a particular date or time is not as straightforward as you might think it would be. This article describes how date/time values are stored, how the database design can simplify (or complicate) data retrieval, and how to query date/time data to get the right results every time.

5 (1)

You rated this post out of 5. Change rating

2003-01-21

35,532 reads

Technical Article

Auditing Your SQL Server Environment Part I

This article is the first of a series that I plan on writing and placing on my website to help other DBAs in auditing a new SQL Server environment. This article deals with determing which SQL Server logins have weak passwords, with the definition of weak being, no password, password the same as the login name or having a password of only one character.The stored procedure used for this article is embedded in the article and it has been submitted as a independent script named spAuditPasswords.

2003-01-21

66 reads

SQLServerCentral Article

Who Needs Change Management?

You have spent thousands of dollars on that cool technology; clustering, redundant controllers, redundant disks, redundant power supplies, redundant NIC cards, multiple network drops, fancy tape backup devices and the latest and greatest tape technology. You are all set. There is no way your going to have downtime. Right?

You rated this post out of 5. Change rating

2003-01-16

4,910 reads

SQLServerCentral Article

Another Disaster (Almost)

Andy had a semi-disaster similar to the one he wrote about last year. Interesting to see the kinds of problems that happen to other people. This article raises some interesting points that are outside the scope of basic disaster recovery, looking at how/when to move databases to a different server and how to reduce the server load dynamically.

You rated this post out of 5. Change rating

2003-01-14

7,052 reads

Blogs

Free webinar – Tackling the Gaps and Islands Problem with T-SQL Window Functions

By

I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...

Counting Groups with Window Functions: #SQLNewBlogger

By

I looked at row_number() in a previous post. Now I want to build on...

Read the latest Blogs

Forums

How to merge two tables with unlike fields

By landonh

How to merge two tables with unlike fields. I have two table with one...

Visual Studio 22 / SSIS Project / (Project) Connection problem

By WilburSmith

Hello, First of all, I find it odd/annoying that I can't exclude a Project...

How to determine if a DB is currently being used

By dax.latchford

Hi - I'm looking for advice regarding the best & quickest way to establish...

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