473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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)
Jul 26 '07 #1
5 2487
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.
-- 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)
Jul 26 '07 #2
In article <A8**********************************@microsoft.co m>, "Peter
Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrite s
>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)
Jul 26 '07 #3
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" <al*********@nospam.thanx.invalidwrote in message
news:5w**************@nospamthankyou.spam...
In article <A8**********************************@microsoft.co m>, "Peter
Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrite s
>>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)

Jul 26 '07 #4
In article <eB**************@TK2MSFTNGP05.phx.gbl>, George Ter-Saakov
<gt****@cardone.comwrites
>Dude you have a messed up network.
Don't think so. The network seems fine, and everything else works. Read
on...
>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.
Nope, didn't make any difference. I can specify the machine name or the
IP address and the same problem occurs.

Since first posting I have had some success, but this has confused me
even more!

I copied the databases over from the old server to the new one, and
changed the connection strings in the web sites on the new server. All
but two of the sites are now working. The weird thing is that one of
these two databases is exactly the same in structure as three others
that work. So, I have four databases on the same server, all with the
exact same structure, with connection strings that are identical, other
than the user name and password details, but only three of them work.

I am completely stumped. Any further suggestions are welcome. TIA
>George.
"Alan Silver" <al*********@nospam.thanx.invalidwrote in message
news:5w**************@nospamthankyou.spam...
>In article <A8**********************************@microsoft.co m>, "Peter
Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrite s
>>>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)

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 26 '07 #5
In article <QC**************@nospamthankyou.spam>, Alan Silver
<al*********@nospam.thanx.invalidwrites

OK, to follow up my own post, I have the problem a little more clear
now. I have transferred most of the databases over, and have had
success. I still have two that are causing problems. I am certain that
it is not database connectivity per se that is the problem, as most of
the databases are working fine.

This server runs some e-commerce sites that use common code, so those
databases have a common structure. Three of these databases went over to
the new server without problem. All I did was change the name of the
server in the connection string. The fourth is causing problems.

The original connection string that was used was of the form...

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

....which worked fine. When I changed the name of the server to the new
one, I 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 then tried the following connection string...

Data Source=daisy;Initial Catalog=DB1;User Id=User1;Password=Password1;

....which worked fine connecting to the old server. When I changed the
connection string to point to the new server, I got an error saying that
an OLE DB provider had not been specified. An example of
"Provider=SQLOLEDB" was given in the error message.

As I am using SQL Server, I copied this into the connection string, and
then got the error message...

Keyword not supported: 'provider'.

These last two error messages seem to contradict each other.

So, I'm stuck on this database. As I said, three others with exactly the
same structure worked fine, this one doesn't.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 26 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: gc | last post by:
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this before. I'm teaching myself PHP/MySQL and trying to setup a guestbook. I'm running latest versions of Apache, PHP and...
1
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0...
4
by: Ralf Gross | last post by:
Hi, I installed DB2 V8.1 with fixpak 10, created a new database and can connect to the database. $ db2 connect to mkstest Database Connection Information Database server =...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
1
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5...
7
by: John Blair | last post by:
Hi, I am trying to get the datacache1 sample working on my PC. I have downloaded the MSDE 2000 sample SQL Server database and the pubs sample database and installed it. I can view the contents...
2
by: arsisthesis | last post by:
Hi all, I have a curious problem with the ERROR 1044 and 1045: -system: OS X 10.4.3 (bash shell) -bash schell prompt: /~ kssun$ -I have set passwd to 'kssun' -I set path:...
3
by: Ted | last post by:
In WSAT, I get the following error when trying to set up my provider: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site...
9
by: Martin | last post by:
Using ODBC in a PHP script, I'm trying to read an MS Access MDB file that resides on another computer on my LAN. I'm getting the error: Warning: odbc_connect() : SQL error: The Microsoft Jet...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.