How to Avoid Using C drive for Database Create in SQL Server - SQL Server DBA Tutorial

In this video you will learn how to avoid using C drive as SQL Server Database data or/and log files. It also explains what are the drawbacks of using C:\ drive as SQL Server database data drive or log drive. You will learn how to look at SQL Server database settings and how to change default database data and log file location. Video explains step by step process of changing SQL Server Database settings along with pre-requisites of these changes to be in effect.

Script used in the video To avoid C drive for database create in SQL Server

USE [master]
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultData', REG_SZ, N'D:\Data'
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultLog', REG_SZ, N'L:\Data'
GO


Avoid Using C drive for Database Create in SQL Server - DBA Tutorial

2 comments:

  1. article, and more importantly, your personal experienceMindfully using our emotions as data about our inner state and knowing when it’s better to de-escalate by taking a time out are great tools. Appreciate you reading and sharing your story, since I can certainly relate and I think others can too

    kodi.software

    ReplyDelete
  2. Attract Group's staff augmentation service is a game-changer for businesses looking to scale rapidly without the long-term commitment of hiring full-time employees. Their approach not only provides immediate access to skilled professionals but also allows companies to maintain flexibility and control over their projects. The expertise offered is remarkable, ensuring that teams are well-integrated and aligned with business goals. It's an efficient solution for navigating talent shortages in today's competitive landscape.

    ReplyDelete