Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the default installation path of SQL Server Management Studio

Can I change the default installation path when installing SQL Server Management Studio that is C:?

My C: drive is full as it has system applications and I want to install SQL Server Management Studio in D: drive. Is this possible?

like image 362
CodingLife Avatar asked Apr 19 '17 08:04

CodingLife


People also ask

How do I change the location of SQL Server installation?

If we opted for the default installation of SQL Server, we could still change the default location using SSMS; connect to the database instance and go to server properties and in the 'Database setting' page, and modify the locations. In SQL Server on Linux, we cannot change the default file locations with this method.

How do I change my default database location?

View or change the default locations for database filesIn Object Explorer, right-click on your server and click Properties. In the left panel on that Properties page, click the Database settings tab. In Database default locations, view the current default locations for new data files and new log files.

How do I change the installation path in SQL Server 2012?

You can also specify a custom directory for shared components by using the field at the bottom of the Feature Selection page. The default installation path is C:\Program Files\Microsoft SQL Server\110\. Click a radio button to select the type of instance where you want to install SQL.


1 Answers

There is no direct approach (At last now) to change the default SQL Server Management Studio installation path but you can use Symbolic Links:

What are Symbolic Links?

From The Complete Guide to Creating Symbolic Links (aka Symlinks) on Windows :

Symbolic links are basically advanced shortcuts. Create a symbolic link to an individual file or folder, and that link will appear to be the same as the file or folder to Windows even though it’s just a link pointing at the file or folder.

Windows 10 users

Windows 10 users must first enable Developer Mode from

Settings > Update & Security > For Developers.

How To

  1. Open Command Prompt or Windows PowerShell with Run as Administrator and paste this command before installing SQL Server Management Studio
mkdir "D:\Program Files\Microsoft SQL Server"
mkdir "D:\Program Files (x86)\Microsoft SQL Server"

mklink /J "C:\Program Files\Microsoft SQL Server" "D:\Program Files\Microsoft SQL Server"
mklink /J "C:\Program Files (x86)\Microsoft SQL Server" "D:\Program Files (x86)\Microsoft SQL Server"
  1. Now install SQL Server Management Studio (SSMS).

There may be some other file and folder in drive C like AppData\Local\Microsoft\Microsoft SQL Server but they aren't bigger than 1GB.

What if already installed SSMS?

Close all instance of SSMS and rename these folders to anything you wish:

C:\Program Files\Microsoft SQL Server
C:\Program Files (x86)\Microsoft SQL Server

Follow How To steps and move the contents of the folders (cut/paste) to the new location

D:\Program Files\Microsoft SQL Server
D:\Program Files (x86)\Microsoft SQL Server
like image 200
Pejman Nikram Avatar answered Oct 04 '22 11:10

Pejman Nikram