Moving TempDB Files in SQL Server
It’s a solid best practise to have TempDB files stored in separate drive, away from your C: drive. This is because TempDB can grow very large, very quickly (within minutes);
It’s a solid best practise to have TempDB files stored in separate drive, away from your C: drive. This is because TempDB can grow very large, very quickly (within minutes);
The Import Flat File feature within SQL Server Management Studio (SSMS) was introduced in December 2017 (14.0.17213.0). This is a streamlined version of the Import Data feature and it minimises the user intervention during a file import.
If you’ve lost a database log file and you’re in critical need of the data, well… that would never happen ( ͡° ͜ʖ ͡°) Nevertheless, this is might be a handy random fact to know, that you can attach a data (.mdf) file without the associated log (.ldf) file in SQL Server.
In this post I’m going to show what the WITH FILE = X option does when backing-up or restoring a SQL Server database.
There are many reasons why you’d need to delete old data from a table within a database, some of which include;
SQL Server Management Studio (SSMS) is the tool that most SQL Server user queries are run from. It has an option that allows you to change the colour of your query banner, which is useful if you want visually mark a server that you work with every day.
This post contains a script that will help count rows within multiple CSV files using PowerShell. If you have a directory containing CSV files, this demo will walk you through how to count the rows of all CSV files within a folder.
This post contains a guide on how to export data from a SQL Server database using SSMS. SSMS, SQL Server Management Studio, is the standard application that most people use to run queries for a Microsoft SQL Server Database.
There are many ways to check the size of a table in SQL Server. The way you will do it will likely depend on what your task at hand is.
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.