SQL Server 2005 How to change the installation path directory summary _mssql2005

Source: Internet
Author: User
Tags microsoft sql server mssql mssqlserver

This evening, a friend of mine was working overtime. About SQL Server 2005 change the installation path directory, told a friend, conveniently and on the Internet to find several other methods, the first method is the default, is a small series to tell friends.

Method 1.

During the installation process, install to select the components that you want to install, and then click Advanced. You'll see where to change the installation path.

Method 2. Change the default installation path for the registry:

The installation completes needs to station 500M about space

You can change the path installation, and here's how to change it:

Open the registry to find: "Heky_local_machine\software\microsoft\windows\currentversion" in the right window to find the "ProgramFilesDir" string, double-click the value by "C:\ ProgramFiles "Modify to" D:\ProgramFiles "OK after you exit the registration form

Method 3.

First: Do not modify the path, use the default installation, and finally confirm the installation will show the path of the Configurationfile.ini file, to this path to copy the installation configuration files to other paths, such as D:\, and then exit the installation

Second: Use Notepad to open this file, according to the actual need to replace the "C:\Program Files\Microsoft SQL Server" lookup with "D:\Program Files\Microsoft SQL Server" after saving

Finally: at the command line go to the installation directory, start the installation, if it is Vista, remember to run the command line with administrator privileges, enter the following instructions:

Setup.exe/action=install/configurationfile=d:\configurationfile.ini

Of course, we can also use the Advanced installation mode to choose to use the configuration file for installation, this is a graphical-

Method 4.

Do not use the Autorun installation after inserting the disc, use the command line to install the!CD into the root directory of the installation CD, enter the command:

Setup.exe/installshareddir= "D:\\Program Files\\Microsoft SQL server\\"/installsharedwowdir= "D:\\Program Files (x86) \\Microsoft SQL server\\ "

installation, where Installshareddir is the path to the x64 part installation, Installsharedwowdir to the x32 part installation path.

You can also change this:

To modify the registry by Xp_instance_regwrite

The database default path is saved in the registration table, we can modify the registry by Xp_instance_regwrite, we can try the following methods:

--1. Change data file implicitly store the path:
EXEC Xp_instance_regwrite
@rootkey = ' HKEY_LOCAL_MACHINE ',
@key = ' Software\microsoft\mssqlserver\mssqlserver ',
@value_name = ' Defaultdata ',
@type =REG_SZ,
@value = ' D:\MSSQL\Data '

--2. Change log file implicitly store the path:
EXEC Master.. Xp_instance_regwrite
@rootkey = ' HKEY_LOCAL_MACHINE ',
@key = ' Software\microsoft\mssqlserver\mssqlserver ',
@value_name = ' Defaultlog ',
@type =REG_SZ,
@value = ' D:\MSSQL\Data '

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.