How to create an alias for a named SQL Server instance

Solution 1:

Alias name: foobar (the name you would like to use)

Server name: the actual name of your computer or the IP address (not localhost or 127.0.0.1)

Protocol: TCP/IP

Port: the default one (1433)

Make sure TCP/IP protocoll is enabled (disabled by default)

Change your connection string to use your new alias (Data Source=foobar)

Solution 2:

You are right, what you need to do is defining a new alias in the Native Client configuration.

  • Alias name: the alias you want to create
  • Server name: the actual server name
  • Protocol: TCP/IP
  • Port: the default one (1433)

Try this:

  • Alias name: localhost\foobar
  • Server name: localhost\developer_2005
  • Protocol: TCP/IP
  • Port: 1433