Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can´t connect to SQL SERVER 2005

Status
Not open for further replies.

marceloxx669

Technical User
Jan 6, 2002
8
CL
Hi, i´m new to SQL SERVER, I've been using Oracle and MySql without problems so far.
I'm having problems to connect to SQL SERVER on my local machine.
I tried osql -L but returned SERVERS:----NONE----
In Visual Studio can´t find SQL SERVER
Sometimes I got this error:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
And sometimes something about enabling remote connections in SQL SERVER , but the server is in the local machine.
what´s suppose to be the name of my server? localhost?
what am I doing wrong, ?
I have no problems to connect to Oracle and mysql with Visual Studio.
Thanks in advance
 
First, check to make sure that the SQL Server service is started.

Click Start -> Run
Type Services.msc
click ok

if SQL Server is installed, you will see a service named: SQL Server

Make sure it is started, and that it is set to automatic.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
If that doesn't help, then look here for more ideas. faq962-5481

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Hi, thnks helping. The service is started and is automatic.
What else may I check?

thanks again
 
Tried everything in the FAQS to no avail. Any ideas?

thanks in advance
 
update!

I can connect via command line using SQLCMD, but nothing from Visual Studio or SQL Manager.
thanks
 
If you installed SQL Server 2005 as a named instance you will need to refer to the instance in your connection string as [computername]\[named instance]

If you left is as the default instance it will simply be the name of your machine.

To check this for sure go to all programs and find SQL Server 2005 in the list. The configuration tools and open configuration manager. you will see the services and name of the instance.

SQL Server 2005 also by default disables just about everything. Remote connections to name one. You will need to open surface area configuration (same location as above) to enable remote connections. Also under protocols back in configuration manager make sure named pipes and TCP/IP is enabled.

If you still have problems post back all the information I just mentioned so we have more details. i.e. name of you server and if these configurations are done

[sub]____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done[/sub]
 
also, when you say sql manager you mean SQL Server Management Studio right? Not Enterprise Manager

[sub]____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done[/sub]
 
Hi, thanks.
I´ve checked all the settings you mention above and enabled everything , remote connections, protocols etc.. The name of the server is JULIAN and the instance name is SQLEXPRESS.
I can connect in command line using
Code:
SQLCMD -S.\SQLEXPRESS
but if I type
Code:
SQLCMD -SJULIAN\SQLEXPRESS -E
I got this message saying that remote connections are disabled etc.. and can´t connect.
When I say SQL Manager I mean the "EMS SQL Manager for SQL SERVER" software, when I try to connect with it to SQL SERVER I got this message
Code:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
Same thing happens with Visual Studio, when I get to that authentification window where you put the server name, etc
if I click the dropdown list to choose the server name nothing shows up, whatever I type as server name (I,ve tried localhost, JULIAN,JULIAN/SQLEXPRESS)all I get is the above error message or an error about enabling remote connections, they are enabled though.
Hope you can help me

thanks
 
It´s working
servername:(local)\SQLEXPRESS did the trick
thanks for all the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top