Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i could not open my sql server 2008(local database).

When i click on connect->database engine -> user name -> password ->connect

It throws an error as
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)"

can any one please help me to resolve this issue.

Thanks in advance.
Posted

Basically, it is saying "I can't find any SQL server where you told me"

So, try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
The dialogs should allow you to browse to the specific instance you want and then you can enter your name and password. (I find it a little easier than the SSMS version)
 
Share this answer
 
Comments
[no name] 1-Apr-14 7:11am    
In the server explorer of VS it doesn't listing my server name.
whats surprising is till morning it was worked quite but dont know suddenly what happens?
And FYI i also unable to open database in sql server 2008 also
OriginalGriff 1-Apr-14 7:36am    
That kinda answers your question really , doesn't it: someone turned the server off, or unplugged it's LAN connection.

I assume this is a LAN server, rather than on your own PC?
If it's on your development PC, then it's probably the service has not started for some reason - easily fixed.
[no name] 1-Apr-14 7:13am    
i have 1 doubt is there any relation ship between administrator password and sql server because morning i changed my admin password.
[no name] 1-Apr-14 7:39am    
My problem is in my service there is no sqlexpress to start it....i don't know suddenly what happens because till morning it works fine so i assume that once i changed my pc admin password it got hide
OriginalGriff 1-Apr-14 7:54am    
Try this:
Click the Start button, and type "local services"
You should get a Control Panel applet of that name - start it.
In the "Extended" tab of the right hand pane, scroll down to SQL Server
Check that SQL SERVER(yourinstancename), SQL Server Agent, and SQL Server Browser are all started.
If not, right the click the instance and try starting it.
SQL
it says your server name is incorrect.

try this :
1) click servername combo box.
2) browse for more.
3) expand the database engine from browse for servers window.
4) choose your server name
5) hit on connect
 
Share this answer
 
Comments
[no name] 1-Apr-14 7:13am    
I checked every thing....i have 1 doubt is there any relation ship between administrator password and sql server because morning i changed my admin password.
Hi thanks for all who showed interest on my question.

I reinstalled sql server 2008.now it was working fine.Don't know what causes the issue in sql server but finally i re-installed.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900