Re: Error trying to connect to local database - What is going on?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dude you have a messed up network.
If you have SQL 2000 but getting errors about SQL 2005 then most likely you
are connection to some other machine.

Try to specify IP address rather than a name.

George.


"Alan Silver" <alan-silver@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:5wmTUqDktPqGFwnK@xxxxxxxxxxxxxxxxxxxxxx
In article <A884F5F2-DB01-422A-913B-ECA80E08478E@xxxxxxxxxxxxx>, "Peter
Bromberg [C# MVP]" <pbromberg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes
SQL 2005 has a lot of surface area and other configurations (and
protocols)
that need to be enabled, it comes pretty locked down by default.

Thanks, but that's not the problem. As I said below, I'm not using SQL
Server 2005. That's one of the things that puzzles me. I'm using SQL
Server 2000, and both the server and web site are on the same machine, so
there's nothing remote happening anyway. It's all local.

Thanks for the reply. Any other ideas?

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com



"Alan Silver" wrote:

Hello,

Server configuration:
Windows 2003 Server SP2
SQL Server 2000 SP4
..NET v2.0.50727

just built up a new server using the same configuration as my current
one. I even used the same CDs and registration keys, so I'm certain that
the two machines are as similar as they can be.

I moved the web sites over to the new server, but left the SQL Server
databases on the old machine. I am now trying to move the databases over
as well, but have struck a weird problem that has me stumped.

On the old server, the web sites were using a connection string like...

Server=daisy;uid=User1;pwd=Password1;Network Library=dbmssocn;

....and this has been fine. The new server can happily connect to the
old
one and get data.

I copied a database over to the new server, then tried changing the
connection string to use the name of the new server, and got the
error...

"An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: TCP Provider, error: 0 - No connection could be
made because the target machine actively refused it.)"

I used Query Analyser to connect to the new server, using the user name
and password in the connection string, and it worked fine, so I know the
details are correct.

Now I don't understand why the connection was refused, given that the
two servers have the same OS, same SQL Server, etc. The connection
worked fine when it was the new server connecting to the old, so it
can't be anything to do with remote connections, as the new server has
IIS and SQL Server on the same machine.

I also don't understand what SQL Server 2005 has to do with it, as both
machines have SQL Server 2000 installed.

I tried using other connection strings as well, but nothing helped.
Amongst others, I tried...

Data Source=(local); User Id=User1; Password=Password1;

....but that gave me an error saying a Provider was needed. If I added a
Provider to it, it gave me an error saying that Provider wasn't a
recognised keyword!

I have spent pretty much the whole afternoon trying to fix this and am
completely stuck. I would really appreciate any help.

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)


--
Alan Silver
(anything added below this line is nothing to do with me)


.



Relevant Pages

  • Re: Connection issues between .Net framwok and SQl Express 2005
    ... You will no longer need the database MDF file name in the connection string. ... simply attach the ASPNETDB.mdf to SQL Server permenantly, ... as USER INSTANCE on existing SQL Server Express, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Performance of ODBC
    ... if you have a software firewall; forward 1433/1434 to your server ... I've now created my own server with SQL Server 2005 Express, ... glitch concerns the Upsizing Wizard. ... I originally set up my ODBC connection via ...
    (microsoft.public.access.adp.sqlserver)
  • RE: web parts and a database
    ... service's provider can not correctly establish ... connection to the underlying database. ... services(include membership, rolemanager, profile, personalization ...) ... Are you creating and developing the web project through HTTP/IIS server ...
    (microsoft.public.dotnet.framework.aspnet)
  • SQL 2005 Express and VS .Net 2003 wizard error More options
    ... Open the server explorer panel ... Go to the Provider tab and select SQL NAtive Client (DON'T use oledb ... Go back to the Connection tab and carry on setting up the connection ... I have installed Visual Studio 2005 Professional and then Visual Studio ...
    (microsoft.public.sqlserver)
  • Re: Timeout problem with SS2K, VS03
    ... I noticed calls in sql profiler: ... This is the server side debug stored procedure. ... a timeout issue that I cannot identify the source of. ... transaction is committed and the connection is closed cleanly and all ...
    (microsoft.public.dotnet.framework.adonet)