After moving a database to a new server (via backup and restore utilities built into Microsoft SQL Server) I wanted to take the copy on the old server offline to ensure when testing the move I was only accessing the new database but due to my limited (but growing) knowledge I had no idea how to take
Tag: sql server
SQL Server Case Sensitive Collations and DMVs
(K. Brian Kelley) We recently instituted a new database and it has a case-sensitive collation due to the application requirements. We have several monitoring scripts that check the health of our SQL Servers and their databases by querying particular dynamic management views (DMVs) and they were work
View SQL Server log files offline in SQL Server 2012
(Sandesh Segu) Viewing the SQL server log files when the SQL server instance is offline or not accessible is something that every DBA would always wish to have as this helps in better troubleshooting.
Extending sp_WhoIsActive With context_info
(Jesse Taber) If you work with SQL Server you should be familiar with Adam Machanic’s fantastic sp_WhoIsActive stored procedure. This procedure provides high levels of detail about all commands that are currently being executed on a SQL Server instance. I’ve found it immensely helpful for troublesho
SQL SERVER – Return Specific Row to at the Bottom of the Resultset – T-SQL Script – Part 2
(Pinal Dave) “How do I return a few of my resultset rows at the bottom of the entire resultset?”
Managing Slowly Changing Dimension with Slow Changing Transformation in SSIS
(Arshad Ali) As a data warehouse expert or as an ETL developer you will often come across scenarios in which you need to maintain and manage slowly changing dimensions. There are multiple ways to implement that in SQL Server and the easiest of those is using Slowly Changing Dimension Transformation
Introduction to SQL Server Filtered Indexes
(Seth Delconte) SQL Server filtered indexes can save space and improve performance if they are used properly. Under what circumstances can they be used? When are they most effective, and what sort of performance gain or space-saving is likely? How does a filtered index affect the choice of executio
SQL Server Login Management using LOGINPROPERTY function
(Svetlana Golovko) One of the Support Analysts asked me if it is possible to send him notifications 5 days before a user’s password expires for a SQL Server Standard login. He wants to be proactive and help users reset their passwords before they expired. The application uses SQL Server authenticati
Elemental MDX: MDX Time Series Functions: PeriodsToDate() and OpeningPeriod(), Pt. 2
Elemental MDX: MDX Time Series Functions: PeriodsToDate() and OpeningPeriod(), Pt. 2 by William E. Pearson, III In this, the second of a three-part article focusing upon the PeriodsToDate() and OpeningPeriod() time series functions, we will continue to expose member and set functions that we can use to perform analysis within the context of time. As we discussed in Part 1,...
How do I tell what stored procedure from inside the stored procedure?
(Kenneth Fisher) I’ve occasionally had the problem of trying to put “smart” logging messages into a process. You know the ones, you’re trying to set up logging for a process and you really want to create a somewhat generic piece of code that you can throw into each stored procedure.