We are all techies and we love to use a dark theme in our IDEs. I get quite often a question about how to enable dark theme in SQL Server Management Studio during Comprehensive Database Performance Health Check. Let us see how we can change the theme and enable hidden themes in SQL Server Management Studio.
First of all – SQL Server Management Studio does not provide out of box support for the dark theme. You have to enable it by going to the configuration file of SSMS.
If you go to Menu >> Tools >> Options >> Environment >> General and see the color theme, you will notice that it will not have any option for the dark theme.
When the default theme is selected you will notice the output as displayed in the following image.
Now let us enable the dark theme. First go to C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE for SSMS 18+. Over here locate the file ssms.pkgundef. If you can’t find the file, you may just search that in your program files folder. Open the file and scroll all the way down to locate the very last line. Over here you will see command which removes the dark theme.
Now go to the line and add two // before the command of root key. Once you add the // entire line will be commented. Now save the file.
The next task is to relaunch SSMS. Once you restart SSMS go to Menu >> Tools >> Options >> Environment >> General and see the color theme, you will notice that it will have an option for the dark theme. Select this option and click on Save.
Next, you will see that your SSMS’s theme will be switched to the dark theme.
Once you change the theme, you will see quite a few many areas with the original default theme. This is because the dark theme is an experimental theme and it is not yet complete and that is why it is not included in the final release of the SSMS.
Reference:Â Pinal Dave (https://blog.sqlauthority.com)
50 Comments. Leave new
Good to know, thanks.
I wish they would just finish it already. I have been using this hack for 2 years.
I can’t agree with you anymore. I really wish they finish this one.
The Object Explorer and Results Pane are still white, but it’s a good start. Thanks for the tip!
Totally agree.
The dark theme was working perfectly in the preview version of SSMS 18 though…
Hi, for some reason I can´t save the file, why?
You need to run your text editing program as administrator.
Or you can copy this file to new folder, edit it in new folder, delete previous version and copy upgraded version to the programs folder..
I can’t seem to find the commented line in that file…..could they have removed it in the current version?
Try ctrl+f and search for “Dark”
Thank you so much for the hack! I never notice it in the office but when working from home I like to open window. Today it is bit cloudy and switching from VS (using dark mode) to SSMS made me blind.
Why don’t you use SQL Server Object Explorer within VS instead of using SSMS, it has most of the functionality you get on SSMS. :)
I cannot adequately describe my love for you enough. SQL was one of the few things left that I couldn’t get a dark theme on, and it was blinding in comparison. Now Excel remains one of the last holdouts.
It works, Tks!
Perfect hack. Thanks for the article
Yet again Pinal Dave comes through with a great archive of so many great things SQL Server.
At this point, I’m switching to Azure Data Studio for almost everything since I’ve been fighting this theme issue forever. I just need to get a little more comfortable with sqlcmd and the sql command line to get rid of SSMS entirely
Thanks for the hack, I love this!!
Cannot find ssms.pkgundef file in the aforementioned folder. Any idea?
Now found it from the latest download. However, after change, I don’t have right to save the file?
thanks i love dark theme
In my SSMS, change theme option is disabled.
And everything is black and white. I want default layout. Please help.
Thanks, it worked for me
It’s not a hack people. It’s an exploit. Gawl.
Thank you, it is extremely great hack!