The service did not start due to logon failure.

Error: Getting the following error when trying to set a network account to run SQL Server service. The service did not start due to logon failure. Fix: Make sure the network account has “logon as a service” permission. Enable service log on permission for Run As accounts Go to Administrative Tools and select Local Security... » read more

Install StackOverflow Database Locally

https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ After you download it, extract the .7Zip files with 7Zip. (I use that for max compression to keep the downloads a little smaller.) The extract will have the database MDF, NDFs (additional data files), LDF, and a Readme.txt file. Don’t extract the files directly into your SQL Server’s database directories – instead, extract them somewhere... » read more

Unable to Drop/Delete Database from Server

Use the following to drop the database… If the above failed, do this… Stop the SQL Services. Kill the sqlserver.exe process on service if the services fail to stop. Manually delete the physical database files from the drives. Restart the SQL Services, then drop the database.

MMC could not create the snap-in for SQL Server Configuration Manager

Error: MMC could not create the snap-in for SQL Server Configuration Manager RegEdit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns{eeed5f7e-9cae-45e2-9dd6-c9f44246cc37} C:\Program Files\Microsoft SQL Server\160\Tools\Binn\SqlManager.dll file not found Fix: Microsoft Management Console (MMC) is a built-in feature in Windows operating system that lets you manage snap-in on the go. Snap-ins are basic component of a console. Sometimes, snap-ins may not work properly,... » read more

Rebuilding of indexes cause the transactional log file to grow

The index rebuild operation runs by default in a single long-running transaction, that prevents the Transaction Log space reuse while rebuilding a large index. Switching to the BULK_LOGGED recovery mode while doing an index rebuild operation will reduce the amount of transaction log generated. If you’re considering using the BULK_LOGGED recovery mode, beware that you... » read more

Hash Index

What is a ‘HASH INDEX’ in SQL? A Hash Index is a specific type of index that works best for equality comparisons. It uses a hash function to distribute rows evenly across a specified number of buckets. The hash function takes column values as input and returns a bucket number. When a query involving an... » read more

Recreating MSSQL Always On using SSMS AlwaysOn Wizard

Recreating Always On from an existing setup using SSMS AlwaysOn Wizard. Note: Delete all database and database files on secondary servers. Make sure all drive and folder mapping are the same as primary server. Use Local drive or NAS drive for AlwaysOn backup file location. Make sure existing database backup jobs has been disabled. Might... » read more

Restore Database from full, differential, and log backup files.

https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-a-differential-database-backup-sql-server?view=sql-server-ver16 RESTORE WITH NORECOVERY which leaves the database non-operational, and does not roll back the uncommitted transactions. Additional transaction logs can be restored. The database cannot be used until it is recovered. Examples (Transact-SQL) A. Restoring a differential database backup This example restores a database and differential database backup of the MyAdvWorks database. B. Restoring a database, differential... » read more