views:

126

answers:

1

Hello,

I am making silent installation for SQL Server Express 2005 using the following command

SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD="****" ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SDK

I need to know is there a parameter or a command line utility to configure the service to listen to port 7005 (see picture)

http://www.databasejournal.com/img/2007/01/mak_CLT_image002.jpg

  • Also I need to create an alias using command line

Thanks

+1  A: 

I'm currently trying to mess with this, here's what I've found:

  1. To make Sql server listen on TCP at all, you need to configure it to do so. You can use sac.exe to load a configuration from a file. Go to a working sql server configured with TCP/IP enabled (and whatever else) and run "sac.exe out settings.txt". Now, on a computer you wish to enable tcp on, run "sac.exe in settings.txt" and then restart the service. sac.exe is in the "%programfiles%\Microsoft SQL Server\90\Shared" directory

  2. To configure to a specific port, you'll have to edit the registry values. This will show you the keys to edit http://support.microsoft.com/kb/823938 however to script this, you'll need to use the "REG ADD" command in a .bat file and give the appropriate value to the appropriate key. FOr me, it's HKLM\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib\Tcp\IPAll\TcpPort and set it to the port number (default for sql is 1433) and then set HKLM\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib\Tcp\IPAll\TcpDynamicPorts to empty.

  3. Restart the SQL Server Agent (Net Stop "Sql Server (SQLEXPRESS)" Net start "Sql Server (SQLEXPRESS)" on my machine)

Hope this helps you or someone else searching for this information (like me)

Jeff Tucker