SQL Server does not exist or access denied.

E

Ed

Still thinking about switching to a Windows machine for my hosting
service I thought I'd try to make things work locally on my XP Pro
machine using IIS. I was going to try some of the examples in the book
Building Web Services and .NET Applications by Wall and Lader. Didn't
get past first base since the provided .bat file for building the
samples (downloaded from Osborne) failed. This simple console examples
shows the problem:


E:\WebAppSamples\WallLader\Data>osql -H goliathxp -U ed -P sioux -S
MSSQL$VSdotNET
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).

I did a Google on this error and was overwhelmed by the hits. Tips at
a Microsoft site suggested many possible causes, including the server
not being able to connect with port 1443. Somewhere else I read to try
telnet to the port:

E:\WebAppSamples\WallLader\Data>telnet 1433
Connecting To 1433...Could not open connection to the host, on port
23: Connect failed

The question is then what to do about this. If it doesn't work at the
command line I'm sure it can't work in a VB program.

Any suggestions?

TIA

Ed
 
A

Armin Zingler

Ed said:
Still thinking about switching to a Windows machine for my hosting
service I thought I'd try to make things work locally on my XP Pro
machine using IIS. I was going to try some of the examples in the book
Building Web Services and .NET Applications by Wall and Lader. Didn't
get past first base since the provided .bat file for building the
samples (downloaded from Osborne) failed. This simple console examples
shows the problem:


E:\WebAppSamples\WallLader\Data>osql -H goliathxp -U ed -P sioux -S
MSSQL$VSdotNET
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).

Try

osql -E ed -S goliathxp\MSSQL$VSdotNET


Dumb question first: The server is running? Look for the process ID of the
server process in task manager (or in SQL server configuration manager).
Then, in the command line, type:

netstat -noa

Look for a line that ends with the process ID of the server process. Do you
find it? What's in the "local address" column?
I did a Google on this error and was overwhelmed by the hits. Tips at
a Microsoft site suggested many possible causes, including the server
not being able to connect with port 1443. Somewhere else I read to try
telnet to the port:

E:\WebAppSamples\WallLader\Data>telnet 1433
Connecting To 1433...Could not open connection to the host, on port
23: Connect failed

1433 is the host, not the port. Try the values you got from netstat (without
the ":"), like "telnet 192.168.1.1 2169".
The question is then what to do about this. If it doesn't work at the
command line I'm sure it can't work in a VB program.

Any suggestions?

Try with deactivated firewall (if possible).


Armin
 
E

Ed Sowell

Armin,
Yes, I can see sqlsvr.exe in Task manager and MSSQL$VSdotNET in Services.
The Pid of sqlsvr.exe is 1652.

netstat -noa shows a bunch of local local processes, but I don't see 1652.

The command args you suggest gave me the same error.

Is the firewall an issue here, in viewof the fact that it's all local?

Thanks

Ed


Armin Zingler said:
Ed said:
Still thinking about switching to a Windows machine for my hosting
service I thought I'd try to make things work locally on my XP Pro
machine using IIS. I was going to try some of the examples in the book
Building Web Services and .NET Applications by Wall and Lader. Didn't
get past first base since the provided .bat file for building the
samples (downloaded from Osborne) failed. This simple console examples
shows the problem:


E:\WebAppSamples\WallLader\Data>osql -H goliathxp -U ed -P sioux -S
MSSQL$VSdotNET
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).

Try

osql -E ed -S goliathxp\MSSQL$VSdotNET


Dumb question first: The server is running? Look for the process ID of the
server process in task manager (or in SQL server configuration manager).
Then, in the command line, type:

netstat -noa

Look for a line that ends with the process ID of the server process. Do
you find it? What's in the "local address" column?
I did a Google on this error and was overwhelmed by the hits. Tips at
a Microsoft site suggested many possible causes, including the server
not being able to connect with port 1443. Somewhere else I read to try
telnet to the port:

E:\WebAppSamples\WallLader\Data>telnet 1433
Connecting To 1433...Could not open connection to the host, on port
23: Connect failed

1433 is the host, not the port. Try the values you got from netstat
(without the ":"), like "telnet 192.168.1.1 2169".
The question is then what to do about this. If it doesn't work at the
command line I'm sure it can't work in a VB program.

Any suggestions?

Try with deactivated firewall (if possible).


Armin
 
A

Armin Zingler

Ed said:
Armin,
Yes, I can see sqlsvr.exe in Task manager and MSSQL$VSdotNET in
Services. The Pid of sqlsvr.exe is 1652.

netstat -noa shows a bunch of local local processes, but I don't see
1652.
The command args you suggest gave me the same error.

Is the firewall an issue here, in viewof the fact that it's all local?

If you don't allow the server to act as a server, yes, it still is.

"Configuring the Windows Firewall to Allow SQL Server Access"
http://msdn.microsoft.com/en-us/library/cc646023.aspx

However, do you intend to access the server via TCP/IP? This protocol is not
enabled by default (with the Express version). Therefore the server is not
listening at any port. You can change it in the SQL server configuration
manager (-> SQL server network configuration). Press F1 after
double-clicking the TCP/IP entry. It will give some useful hints. There are
also other helpful topics, for example about the role of the SQL server
browser service.

Also: "Connecting to the SQL Server Database Engine"
http://msdn.microsoft.com/en-us/library/ms190944.aspx



Armin
 
E

Ed

Armin,

I have no need to use SQL from another computer, and I'm pretty sure I
didning select any options otherwise. I now believe the TCP/IP & port
business was a red herring, just one of the things that is known to
cause the error I'm getting.

Here is the ERROR log from the C:\Program Files\Microsoft SQL
Server\MSSQL$VSdotNET\LOG directory:

2009-04-24 07:40:46.32 server Microsoft SQL Server 2000 - 8.00.384
(Intel X86)
May 23 2001 00:02:52
Copyright (c) 1988-2000 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 3)

2009-04-24 07:40:46.37 server Copyright (C) 1988-2000 Microsoft
Corporation.
2009-04-24 07:40:46.37 server All rights reserved.
2009-04-24 07:40:46.37 server Server Process ID is 1684.
2009-04-24 07:40:46.37 server Logging SQL Server messages in file
'C:\Program Files\Microsoft SQL Server\MSSQL$VSdotNET\LOG\ERRORLOG'.
2009-04-24 07:40:46.51 server SQL Server is starting at priority
class 'normal'(1 CPU detected).
2009-04-24 07:40:48.45 server SQL Server configured for thread mode
processing.
2009-04-24 07:40:48.50 server Using dynamic lock allocation. [500]
Lock Blocks, [1000] Lock Owner Blocks.
2009-04-24 07:40:49.15 spid3 Starting up database 'master'.
2009-04-24 07:40:51.67 spid3 0 transactions rolled back in
database 'master' (1).
2009-04-24 07:40:51.67 spid3 Recovery is checkpointing database
'master' (1)
2009-04-24 07:40:51.78 server Using 'SSNETLIB.DLL' version
'8.0.382'.
2009-04-24 07:40:51.79 spid5 Starting up database 'model'.
2009-04-24 07:40:51.84 spid3 Server name is 'GOLIATHXP\VSDOTNET'.
2009-04-24 07:40:51.84 spid3 Skipping startup of clean database id
4
2009-04-24 07:40:52.00 server SQL server listening on Shared
Memory, Named Pipes.
2009-04-24 07:40:52.02 spid5 Clearing tempdb database.
2009-04-24 07:40:52.57 spid5 Starting up database 'tempdb'.
2009-04-24 07:40:52.66 spid3 Recovery complete.
2009-04-24 07:40:53.62 server SQL Server is ready for client
connections

It looks like I've got a very old version, which may me the reason i
can't find any way to change the SQL server configuration.

Should I install the recent version of Express? I do have an old
version of VS .NET, so maybn that is why I have (& should have?) and
old version of the server.

Thanks for your help.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top