So, you want rename a table, or a column name? It’s a simple command, but it’s one of those commands I don’t use often and therefore forget how to write it every time I need to use it. Maybe you’re like me and can’t remember how it should be written too. Keep reading… To do… Continue reading How to Rename a Table Name or a Column Name
Supporting and maintaining a very large database can come with it’s challenges. One of them being the backup and restore strategy. The backup sizes are huge and the duration of the full backup is very long, often too long. A common approach to improving that is to split the database into multiple files and filegroups… Continue reading Partial Database Backups and Restores with Read-Only Filegroups
If you have a SQL Server failover clustered instance, often you’ll want to know which server is acting as the active node. This is easy since you can just check in Windows Cluster Failover Manager which node is the current owner. But what if you have multiple clusters and you want to check them all?… Continue reading Quick Way to Check Which is the Active Node in a Failover Clustered Instance
Earlier this week I came across an interesting situation where a tail log backup of some databases were taken before a migration – meaning a final transaction log backup was taken and the database was set into RESTORING state. The interesting part came where we recovered the same database on the same server (not restored… Continue reading Recovering a Database in Restoring State Leaves Broker Disabled
If you find that you’re installing SQL Server Management Studio (SSMS) often or on many servers, you might find that installing it silently, a.k.a. unattended, is more suitable than installing it through the usual method using the install wizard. First, you can download the latest SSMS installer from Microsoft’s SSMS download page, or from this… Continue reading How to Silently Install SQL Server Management Studio
When you build and configure a new SQL Server, one of the many things you should be doing is testing how it performs before it goes live. If you don’t do that, then you probably should have a hard think about doing so. It’s important the performance of the new server is tested to ensure… Continue reading Performance Testing a New SQL Server
When configuring a new SQL Server instance, you probably want to configure Database Mail. As with all your post install configuration changes, it’s better to do it using a script to save yourself a whole heap of time while ensuring all your SQL Server instances are standardised and consistent. Unfortunately it’s not as easy to… Continue reading Configure Database Mail and Test it – All using T-SQL
Sometimes you’ll need to move the TempDB files to a different drive or folder. It’s a pretty simple operation and I’ll provide a script for you to use. Typically to move the TempDB files, you would do it in 3 stages: Set the new location in SQL Server, by running a command in SSMS Restart… Continue reading How to Move TempDB to a different Drive or Folder
In my last post about moving database files, I touched on the point when you detach and then attach a database, you lose some of the database settings. This is a real gotcha that many people don’t realise…until they’ve done it and wonder why things become broken. The database settings that get changed when you… Continue reading Detaching then Attaching a Database Loses the Database Settings
From time to time, the database data files (like *.mdf and *.ndf), or transaction log files (like *.ldf) need to be moved or renamed, in some way or another. Sometimes, to a different drive or volume. Sometimes, to a different folder on the same drive. Sometimes, the files need to be renamed too. For some… Continue reading Moving Database Files, It Ain’t That Hard
Something went wrong. Please refresh the page and/or try again.
Follow My Blog
Get new content delivered directly to your inbox.