Restore-SqlDb to restore a SQL Database improved with Powershell
Learn how to automate a database restore using PowerShell restore-sqldb.
Learn how to automate a database restore using PowerShell restore-sqldb.
SQL Server Management Studio (SSMS) is now the primary tool that we all use to manage SQL Server. Whenever I open up SSMS I always go through the same steps to connect to a server and open certain query files. Are there any shortcuts or alternative ways

In this tip we look at different queries you can use to get status information about all of your SQL Server database backups.
Learn about SQL Server uniqueidentifier and identity values to generate a unique value for for you SQL Server tables.

Unlock the potential of SQL cursors with our comprehensive guide. Get insights on usage and an example for better understanding.
Database backups hold primary importance among daily DBA tasks. This task is typically automated through maintenance plans, scheduled SQL Server Agent Jobs or third party tools. With the importance of backups it is necessary to regularly analyze the perf
SQL Server 2005 has given us a lot of options on implementing high availability and disaster recovery. More than the technologies themselves, it is important to come up with the proper procedures as we manage different disaster recovery scenarios. How do

In SQL Server 2005 by default users of a database that are only in the public role cannot see the definitions of an object while using sp_help, sp_helptext or the object_definition function. Sometimes this is helpful to allow developers or other non-adm
Recently I had to restore a copy of a production database to a test server in order for some, well, testing. I had warned the Application Analyst Team for months that we were going to be in a space crunch because while the production database had been gr
Learn how to temporarily disable a SQL Server trigger in this tip.
After attaching or restoring a SQL Server database, orphaned users may emerge. Read this tip for help fixing them.
I saw your recent tip on Calculating Mathematical Values in SQL Server and have some related issues as I try to round values in my application. My users and me have a difference of opinion on some of the calculations in our reporting applications. All o
In this article we look at how to get estimates for space savings when using data compression.
In the latest installment of the MSSQLTips interview question series we are going to cover questions on T-SQL functions. The questions are categorized as either easy, moderate or difficult with the question available to read, but the answers are hidden t
On a recent trip out west we were informed via radio that there were a series of earthquakes occurring off the coast of Vancouver Island. We happened to be sailing directly over the location of these earthquakes and never noticed anything, although the s
I have a report that lists all databases for which a full database backup has not been applied in the previous 24 hours from the time the report is run. When I originally created the report I had a manageable number of databases to support and I was the
In this article we look at how to use transactions when working with an SSIS package to better control how and when data is updated.
There are several ways of automating the SQL Server restore process and creating a script, but this approach shows a way this can be done by just reading the contents of a directory for the backup files that exist.
When you install SQL Server the path for the installation is generally something such as the following: C: Program Files Microsoft SQL Server MSSQL.2 MSSQL. In this directory there are also folders for your DATA files and also your BACKUP files. Unless sp
As we are looking through the new features in SQL Server 2008 we found a potentially interesting one called Data Compression which we can use to reduce the size of tables, indexes or a subset of their partitions. Can you give us a detailed explanation of
SQL Server Books Online (BOL) suggests that in order to clean up old partitions from a partition table, you should either issue a DELETE or SWITCH command. BOL also suggests that while SWITCHING partitions, you should set up a NON PARTITIONED TABLE in the
In the Granting permission with the EXECUTE AS command in SQL Server 2005 tip, you have seen how you can grant granular permissions using the EXECUTE AS clause. Context switching within a programmable object such as a stored procedure or function is impor

In this article we look at the DBCC PAGE command to look at what data is stored in a specific page in a SQL Server database along with examples.
Microsoft products such as Windows Server Update Services (WSUS) 3.0 and Windows Sharepoint Services (WSS) 3.0 ship with SQL Server 2005 Embedded Edition. Now called the Windows Internal Database, more and more system administrators charged with managing