sql server configuration
-
Thursday, May 17, 2012 1:39 PM
I am using SQL SERVER 2008 R2 DEVLOPER EDIT. also I am using VISUAL STUDIO 2010 EXPRESS EDIT. I have specified INSTANCE AS MSSQLSERVER WHICH IS DEFAULT IN DEVLOPER EDITION. I have written an application program in VS 2010 BASIC. problem is I can not connect through VS BASIC 2010 EXP(ver)
i HAVE SPECIFIED connection string as
Server=.\MSSQLSERVER;database=MYDBNAME;Trusted_Connection=TRUE
If I changed Instance in sqlserver as SQLEXPRESS i CAN GET CONNECTED.
All Replies
-
Thursday, May 17, 2012 1:43 PM
For developer edition and if you have default instance connection string needed to be
Server=(local);database=MYDBNAME;Trusted_Connection=TRUE
>>If I changed Instance in sqlserver as SQLEXPRESS i CAN GET CONNECTED.
You are connecting to SQL express instance that is installed as part of VS 2010 express install.- Edited by Chirag Shah Thursday, May 17, 2012 1:44 PM
- Marked As Answer by elesh Thursday, May 17, 2012 2:40 PM
-
Thursday, May 17, 2012 1:43 PMAnswerer
Hello,
Open up a powershell window and execute the following. Please post the results.
Get-Service | Where-Object {$_.DisplayName -like “SQL Server (*)”}-Sean
Sean Gallardy, MCC | Blog
-
Thursday, May 17, 2012 2:28 PM
tHANKS.
i HAVE SQL AND VS BOTH INSTALLED ON MY LAPTOP. Itv look like that vs only allowed to connect to default instance SQLEXPRESS. EVEN IF I CHANGED in vs 2010 default instance name to mssqlserver does not vhelped
.
it only works when I changed instance name in sqlserver from MSSQLSERVER TO SQLEXPRESS.
IF IS IT POSSIBLE that vs2010 pro. edition allows to connect with default instancename (MSSQLSERVER)
MY CONNECTION STRING WORKS OK BECAUSE IT IS ON LOCAL MACHINE
SO U HAVE SUGGESTED THAT as server = local. so I assume that I donot need to specify instance name.
ELESH
-
Thursday, May 17, 2012 2:40 PM
Right as it is a default instance you do not need to specify instance name
You can connect to it using a period (since it local) e.g. Server=.
OR
Server=(local)
OR
Server=(localhost)
OR
<ComputerName>
SQL Express by default always installed as a named instance of SQLExpress so you can connect to it by specifying <computerName>\SQLExpress
- Edited by Chirag Shah Thursday, May 17, 2012 2:42 PM
-
Thursday, May 17, 2012 11:38 PM
Thank you
Now it is working
elesh

