Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to set the server name?

Author  Topic 

drh3010
Starting Member

18 Posts

Posted - 2007-09-14 : 12:16:57
When launching the Server Management Studio a "Connect to Server" dialog appears and you must choose a server name. The server name for my database is simply COMPUTERNAME. I want it to be COMPUTERNAME\COMPANYNAME.

Our clients do not have a database administrator. We need to silently install SQL Server and automatically create the database using a script. This works fine except I don't know how to set the server name. Anyone know how to set it programmically?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-14 : 12:20:22
in this case you have to install the sql server as a named instance.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

drh3010
Starting Member

18 Posts

Posted - 2007-09-14 : 13:11:23
Here's the silent install command I use...

SQLEXPR32.exe -q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=COMPANYNAME SQLAUTOSTART=1

I took out the /qn so I could see the UI and while installing I get this (ever so informative) error message: "Microsoft SQL Server 2005 Setup was unable to install on your computer."

Which is odd because it installs on test machines, it just doesn't add the instance name.

EDIT: The testers lied. SQL Server does not install on the test machines. It looks like my problem isn't what I thought.
Go to Top of Page
   

- Advertisement -