Posted by SQL Enthusiast
Article by our editor
Sometimes it’s necessary to move the files associated with a database (.mdf, .ldf and .ndf) to a different drive or folder. Fortunately this is fairly easy to achieve, although it does require all users to be disconnected from the database. Here are two ways of doing this using either ALTER DATABASE or the sp_detach_db and sp_attach_db system stored procedures.
Comments (1) • Read full article »
SQL Server provides a lot of information in the Data Management Views (DMVs). This script shows how to identify indexes which are never actually used, by using DMVs such as dm_db_index_usage_stats and dm_db_index_operational_stats.
More SQL questions »
© 2010 - 2017. All Rights Reserved. Design by