Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure a SQL Server Instance as (local)

Each member of our development team has a copy of our application's database running on a local version of SQL Server 2008 Enterprise with SP1. Everyone is able to access the database by specifying their server and instance name in their web.config file, but to best share the developer version of our web.config file, we have standardized on making connections strings generic by using integrated security and setting server property to (local). This strategy is working fine for the majority of our 64-bit Windows 7 machines but in few cases (local) isn't recognized. We have compared settings via the SQL Server Configuration Manager (namely ensuring that the named pipes protocol was enabled) and we've tried setting the "(local)" alias via SQL Server Client Network Utility, but we haven't any luck. What needs to be done in order to use (local) in our connections strings?

like image 491
Ben Griswold Avatar asked Jan 18 '11 17:01

Ben Griswold


People also ask

How do I create a SQL Server database locally?

To create a databaseIn Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance. Right-click Databases, and then select New Database. In New Database, enter a database name.

Can SQL database be local?

An instance of SQL Server Express LocalDB is an instance created by a user for their use. Any user on the computer can create a database using an instance of LocalDB, store files under their user profile, and run the process under their credentials. By default, access to the instance of LocalDB is limited to its owner.

How do I create a local instance?

Check and create a LocalDB instance To do that, locate SqllocalDB.exe and run the following command in a command prompt: You will see a list of available LocalDB instances on the server. This command creates an instance of LocalDB named DEVELOPMENT by using SQL Server 2017 binaries and starts the instance.


1 Answers

Trying changing the Pipe Name for your instance to "\.\pipe\sql\query".

You can find that setting by starting SQL Server Configuration Manager, and navigating to SQL Server Network Configuration > Protocols for (Instance Name) and right-clicking on Named Pipes and selecting Properties. If Named Pipes is not enabled, be sure to enable it before restarting the SQL Server service (see comment by @NoahHeldman).

When connecting to the default instance (that is, without an instance name), SQL Server uses the default port of 1433 and the default pipe name of "\.\pipe\sql\query". Changing it back to match should (hopefully) fix it.

like image 110
Geoff Maddox Avatar answered Sep 30 '22 10:09

Geoff Maddox