Share

Query to Attach database in SQL Server

Open SSMS ( SQL SERVER MANAGEMENT STUDIO ) ==> Right click on the instance ==> New Query and paste the below code to find the Auto Shrink status


USE [master]
GO
CREATE DATABASE [Database Name] ON
( FILENAME = 'path\database.mdf'),
( FILENAME = 'path\database.ldf')
FOR ATTACH
GO

Share

Fixing a database with a high VLF count

Fixing a database with a high VLF count is a simple process: 1. Check the current size of the transaction log. 2. Backup the transacti...