Check Database Integrity Purpose: • The DBCC CHECKDB performs an internal consistency check • very resource intensive • perform it
Continue readingCategory: SQL Server -DBA
SQL Server -DBA, SQL Server Services, who dropped or altered tables,procedures or databases in SQL Server, What in SQL Server
Restore Database with Recovery and No Recovery
–Restore Database With NORECOVERY & With Recovery USE [master] RESTORE DATABASE [Test] FROM DISK = N’C:FullBackupsBackupDatabase.bak’ WITH FILE = 1,
Continue readingHow to take full backup in SQL Server ?
Take full database backup using below query:- BACKUP DATABASE [Demo] TO DISK = N’C:fullbackupsDemo.bak’ WITH NOINIT, –<< No override NAME
Continue readingHow to Move User Database .mdf and .ldf Files to Another Location
Let us Consider we have two folders location1 and location2. We want to move database files from loc1ation1 to
Continue readingHow to detach the database in SQL Server ?
The following scripts will detach and then reattach the Test database Find the path of the database sp_helpdb Test
Continue readingHow to Move Tempdb ?
find the path of tempdb sp_helpdb tempdb name
Continue readingHow to Create a database with proper configuration ?
Create a database with proper configuration taking in the following consideration: pre size the data file and auto growth
Continue readingWhat is Virtual Log Files (VLF) in SQL Server ?How to Get VLF Count and Size in SQL Server?
The size and number of VLF added at the time of expanding the transaction log is based on this
Continue readingWhat impact happens when auto growth is expanding?
This can cause a performance issue, as this is a blocking operation. The transaction that that initiated the log growth
Continue readingChange recovery mode for databases in SQL Server
–Change the recovery mode for databases: USE master; GO — Set recovery model to SIMPLE ALTER DATABASE Test SET RECOVERY
Continue reading