Alias to SQLEXPRESS
Solution 1:
Follow these steps to add an alias:
- Open SQL Server Configuration Manager
- Expand SQL Native Client Configuration
- Right-click Aliases and select
New Alias...
- On the New Alias window:
- Enter
.\SQLEXPRESS
for the Alias Name. - Select the appropriate protocol (e.g., Named Pipes)
- Enter
.
for the server name (that's equivalent tolocalhost
).
- Enter
- Click on OK to make the change.
Changing the HOSTS file to include a setting for SQLEXPRESS will only redirect DNS lookups for a machine called SQLEXPRESS to the specified IP address. That will not cause .\SQLEXPRESS
to resolve to the localhost SQL instance.