Solved

SQL Server does not exist or access denied

Posted on 2006-11-13
24
178 Views
Last Modified: 2012-05-05
I am stumped on this problem. I cannot get my application to connect to the local SQL Server.  

The application was written in VB6 and I am using mixed mode. I also have the MS firewall turned off. I am using the ADO and it works fine on my old developer computer but not the new one. I cannot even connect to the SQL Server on my old developer computer from the new computer. It is got to be something on the new computer, maybe I forget to install something. EM and ODBC connects to the SQL Server just fine on the new computer using the mixed mode.

What am I missing?





0
Comment
Question by:lunchbyte
  • 12
  • 10
  • +1
24 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 17931769
Post your connetion string here
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17931778
Sorry, I know it sounds like an 'Is it plugged in' question, but I always like to check the basics first.
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931793
Driver={SQL Server};Server=Dianelapm90,1433;Database=nkdata;Uid=nk_user;Pwd=XXXX;

0
 
LVL 29

Expert Comment

by:Nightman
ID: 17931844
Version of MDAC?
Any other software (such as Zone Alarm)?
Can you ping the other server?
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931849
Driver={SQL Server};Server=172.0.0.1,1433;Database=nkdata;Uid=nk_user;Pwd=XXXX;

did not work as well
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931865
I mean 127.0.0.1 did not work as well.
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931893
how do you ping a port? I can ping the localhost and the other computer just fine.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17931901
SQL Server version?
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931924
8.00.194
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17931928
can you telnet onto the port?
start-->run-->cmd
telnet Dianelapm90 1433
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17931951
it says could not open connection to the host, on port 1433. connect failed.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17932337
Sorry - had to step away. If that is the case, SQL Server is not running on port 1433 - check that you have enabled TCP on the server and that named pipes is enabled (right click in EM, properties, Network Configuration).

To confirm whether it is actually access denied, you could run a SQL Profiler trace and view the attempted connections. If you see traffic in the trace in profiler, then you know that at least the connection is getting to SQL Server and then being rejected.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 5

Author Comment

by:lunchbyte
ID: 17932436
Both TCP and named pipes are enabled. Nothing shows up on profile when I try to connect using the VB6 application. The port is set to 1433.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17932554
So it's being blocked before it connects to SQL, or can't find the server. Are you sure of the SQL instance name? Definitely Dianelapm90and not Dianelapm90\INSTANCENAME
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17932563
OK, I got it to work by doing this.

Driver={SQL Server};Server=DIANELAPM90;Database=nkdata;Uid=nk_user;Pwd=XXXX;


,1433 was removed from the connection string. Any idea why? I got the firewall turned off.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17932581
Is your SQL Server installed with a binary or case sensitive collation setting?
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17932607
I am not aware of that but under General tab I see "SQL_Latin1_General_CPS_CI_AS" for Server collation:

0
 
LVL 11

Assisted Solution

by:Dany Balian
Dany Balian earned 50 total points
ID: 17932615
first of all, are you sure that u installed sql server as a default instance?? or a new instance?

if it's the default instance, and still u cannot connect to it, then this reminds me of a problem that occured once on my windows xp professional sp2 machine...
i searched everywhere for a solution, and found nothing..

i dont know if this is an option in your case...
but i uninstalled sql server and reinstalled it, and everything worked perfectly...

p.s. the computer is able to connect to a remove sql server successfully but not to the local... and reinstalling (repairing) sql server did not solve the problem!!

hope this helps,

cheers,

dan
0
 
LVL 29

Accepted Solution

by:
Nightman earned 400 total points
ID: 17932666
The collation is general, not case sensitive. Perhaps you are not actually running on TCP, or perhaps it is being blocked. Most likely, removing the 1433 allowed it to connect on Named Pipes.

Suggest you check the SQL Server logs to see if there were any errors trying to listen on that port. You could also run TCP View from www.sysinternals.com to see what is running on which port on the PC.
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17932825
Using TCP View, 1433 is not on the list.
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17932831
mrdany - I am using the default instance. I will try to uninstall and reinstall as last resort.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17932860
If 1433 is not in the list, then SQL Server is not actually listening on that port. Restart SQL Server, and then look at the SQL Server logs (from EM) - you will see the TCP Port it is listening on (or trying to, and any error) in there after startup.
0
 
LVL 5

Author Comment

by:lunchbyte
ID: 17932944
Fixed. I installed SP3 for SQL Server and rebooted the computer and now I can connect.
0
 
LVL 12

Assisted Solution

by:jkaios
jkaios earned 50 total points
ID: 17933969
By the way, the latest version of SQL 2000 is SP4 and can be downloaded from Microsoft.com
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Run code from text file in vb 1 32
Copy a row 12 52
VB6 - Convert HH:MM into Decimal 8 35
How to Add / Edit Windows Menu 4 24
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now