Backing Up a SQL Server Database
Backing up a database is something I’ve always found easier done within a query window. There’s not much to it; BACKUP DATABASE [DATABASENAME] TO DISK = N'e:\directory\databasename_backupdate.bak'
Backing up a database is something I’ve always found easier done within a query window. There’s not much to it; BACKUP DATABASE [DATABASENAME] TO DISK = N'e:\directory\databasename_backupdate.bak'
This is a simple guide to restoring a full backup file in SQL Server, providing an overview of a few options that are available during the process.
This script will delete rows within a table that are out-with the specified retention period. This can be useful if you’re running deletes on large tables, and particularly if;
There’s often a need to quickly copy/paste a database query output into an Excel sheet, rather than exporting as a .csv file.
As a DBA, I’ve found Stack Exchange Data Explorer to be a really useful tool for exploring and analyzing the data from the Stack Exchange network of websites.
While looking at an old script today, one that kills SPIDs on a SQL Server database… I had an instant urge to try kill a system SPIDs, just to see what would happen.
What’s the plan when you don’t know how to fix a production issue? You can prepare this situation by reading and keeping up to date.
This is a follow-on post of sp_who, sp_who2 & sp_whoisactive and is a run-through of logging SQL Server activity to a table, using the sp_whoisactive stored procedure.
Sp_whatnow? sp_who, sp_who2 and sp_whoisactive are stored procedures that allow you to view current users, sessions, and processes within a SQL Server instance.
This post contains a script to get database and log file growth events on a SQL Server instance. I often find a need to use this script to check what databases have been growing on unmonitored SQL Servers.
The title is just words thrown together. I’m glad you noticed. This post is the start of a “Study Blog” category, which is more or less a scribble pad for when I’m watching a video or reading stuff.
This is a tip on how to show line numbers in the SQL Server Management Studio (SSMS) query window. This is useful when you receive an error message with reference to a line in your code, although it’s not a necessity to have it enabled as you’ll see in the demo below.