开发者

Create new, named instance of SQL Server 2008 R2

开发者 https://www.devze.com 2023-03-07 03:33 出处:网络
Either through bootstrapper or command line install, I need to be able to create a new named instance of SQL Server. I have tried running a command line install in C#, specifying the name of the insta

Either through bootstrapper or command line install, I need to be able to create a new named instance of SQL Server. I have tried running a command line install in C#, specifying the name of the instance to be installed, and I've tried modifying the package.xml file, updating the params to reflect the new instance. All of this to no luck at all.

I am using RobinDotNet's 2008 R2 bootstrapper to try to do the install. I know named instances are possible through the GUI but I can't seem to get it to work in code or through bootstrapper.

Is this开发者_运维百科 even possible? Am I missing some magical parameter in the command line? Any help is appreciated.


You're not very clear about when exactly you are installing SQL Server. Are you using it as a prerequisite for an installer, are you installing it from an application or you just want to run a command (for example from a BAT)?

Command line installation of SQL Server 2008 R2 can be done in 2 ways:

  1. By using command line arguments
  2. By using a configuration file

If you are using it as a prerequisite, simply modify package.xml to include the arguments you want. You can look at the "SqlExpress" package.xml for an example.

Otherwise, simply use command line arguments or a configuration file in the SQL Server installer command line.


What it came down to was two things:

  1. SqlExpressChk.exe packaged with the bootstrapper did not acknowledge the fact that the instance I was trying to install was different than that of the existing instance. Therefore, the install was being skipped.

  2. When using the command line, I had accidentally put spaces around the '=' for one of my params. I figured out I had an issue with my command line by letting the GUI run. Running the install in /q or /qs mode did not produce an exit code or an error. A stupid mistake on my part, but one that took a while to track down.

After fixing my command line args, everything worked as it was supposed to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号