This article has a T-SQL function to detect the SQL Agent job state.
In general XML documents or fragments are held in strings as text markup. In SQL Server, XML variables and columns are instead tokenised to allow rapid access to the data within. This is fine, but can cause some odd problems, such as ' entitization'. What do you do if you need to preserve the formatting? As usual Rob Sheldon comes to our aid.
The TSQL aggregate function SUM() gives a number based on the addition of the values of multiple rows to each other. Do the same thing but with multiplication instead of addition.
The biggest security threat always seems to come from insiders and today Steve Jones talks about the need to monitor your environment.
It seems inevitable that many customers will end up paying more to get the same features they have today, under the new SQL Server licencing model, unless they respond to Microsoft's creativity with some of their own.
The challenge is to find the Episode and Sequence based on interval.
One of the more popular counters used by DBAs to monitor SQL Server performance, the Buffer Cache Hit Ratio, is useless as a predictor of imminent performance problems. Worse, it can be misleading. Jonathan Kehayias demonstrates this convincingly with some simple tests.
This article takes a closer look at SQL Server getdate() and sysdatetime() functions.
By HeyMo0sh
As someone who works in DevOps, I’m always focused on creating systems that are...
By Brian Kelley
I am guilty as charged. The quote was in reference to how people argue...
By Steve Jones
Learn how to tie a bowline knot. Practice in the dark. With one hand....
Comments posted to this topic are about the item Restoring On Top II
Comments posted to this topic are about the item SQL Art 2: St Patrick’s...
Comments posted to this topic are about the item Breaking Down Your Work
I have a database, DNRTest, that has a number of tables and other objects in it. The other day, I was trying to mock up a test and ran this code on the same server:
-- run yesterday CREATE DATABASE DNRTest2 GO USE DNRTest2 GO CREATE TABLE NewTable (id INT) GOToday, I realize that I need a copy of DNRTest for another mockup, and I run this:
-- run today USE Master BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak' GO RESTORE DATABASE DNRTest2 FROM DISK = 'dnrtest.bak' WITH REPLACEWhat happens? See possible answers