473,854 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connecting Sql Server 2005 from ASP?

Hi
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connectio n error '800a0e7a'
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNC LI;Server=127.0 .0.1;Database=d bName;UID=UserN ame;PWD=UserPas sword;"

(Above string has fixed problem for few people- googled it, but not for
me.)
----------------------------------------------------------------

----------------------------------------------------------------
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

1) - "Provider=SQLOL EDB.1;Password= UserPassword;Pe rsist Security
Info=True;User ID=UserName;Ini tial Catalog=ABC;Dat a
Source=XXX.XX.X .XX,1433"
2) - "Provider=sqlol edb;Data Source=XXX.XX.X .XX,1433;Networ k
Library=DBMSSOC N;Initial Catalog=ABC;Use r
ID=UserName;Pas sword=UserPassw ord"
3) - "Provider=SQLOL EDB.1;Persist Security Info=True;User
ID=UserName;Ini tial Catalog=ABC;Dat a Source = ServerName\SQLI nstance"

----------------------------------------------------------------
I tried connecting to SQL Server 2005 through our system developed in
VB.Net 2003 and it works fine and here is the Connection String :

"Data Source=ServerNa me\SQLInstance; Initial Catalog=ABC;Per sist
Security Info=False;user id=UserName;pas sword=UserPassw ord"

I would really appreciate any help.

Mits

Jun 16 '06 #1
10 13697
(MV*******@goog lemail.com) writes:
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connectio n error '800a0e7a'
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNC LI;Server=127.0 .0.1;
Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.


Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jun 16 '06 #2
Hi Erland
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNC LI;Server=127.0 .0.1;Database=D BName;UID=UserN ame;PWD=UserPas sword;"

i get

Microsoft SQL Native Client error '80040e4d'

Login failed for user 'UserName'.

I have created this user and this user has proper permission to access
the database i need.
Is there any special permissions that need? This is driving me crazy.
Mits



You may also have to encure that the SQL Browser service is running.

Erland Sommarskog wrote:
(MV*******@goog lemail.com) writes:
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connectio n error '800a0e7a'
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNC LI;Server=127.0 .0.1;


Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.


Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Jun 17 '06 #3
The SQL 2005 password is case sensitive while 2000 wasn't, so code that
works on SQL 2000 for logging in may not work on 2005.

MV*******@googl email.com wrote:
Hi Erland
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNC LI;Server=127.0 .0.1;Database=D BName;UID=UserN ame;PWD=UserPas sword;"

i get

Microsoft SQL Native Client error '80040e4d'

Login failed for user 'UserName'.

I have created this user and this user has proper permission to access
the database i need.
Is there any special permissions that need? This is driving me crazy.
Mits



You may also have to encure that the SQL Browser service is running.

Erland Sommarskog wrote:
(MV*******@goog lemail.com) writes:
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connectio n error '800a0e7a'
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNC LI;Server=127.0 .0.1;


Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.


Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Jun 17 '06 #4
I know there is no issue with Password.
I just realised one thing i dont know if it matters..
Between our webserver there is a firewall, do we need to punch a hole
that will allow communication between our webserver and DB Server.


Mits

pb648174 wrote:
The SQL 2005 password is case sensitive while 2000 wasn't, so code that
works on SQL 2000 for logging in may not work on 2005.

MV*******@googl email.com wrote:
Hi Erland
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNC LI;Server=127.0 .0.1;Database=D BName;UID=UserN ame;PWD=UserPas sword;"

i get

Microsoft SQL Native Client error '80040e4d'

Login failed for user 'UserName'.

I have created this user and this user has proper permission to access
the database i need.
Is there any special permissions that need? This is driving me crazy.
Mits



You may also have to encure that the SQL Browser service is running.

Erland Sommarskog wrote:
(MV*******@goog lemail.com) writes:
> We are planning to move over to SQL Server 2005 in near future.
>
> At the moment Website is on a seperate server then the Database.
> OS for both the server is Window 2003 and currently our data is on SQL
> Server 2000(on which everything works fine).
>
>
> Part of the testing process we tried to connect our website on SQL 2005
> and it does not work at all.
>
> I get this
>
> ----------------------------------------------------------------
> ADODB.Connectio n error '800a0e7a'
> Provider cannot be found. It may not be properly installed.
>
> When i use following connection string
> "Provider=SQLNC LI;Server=127.0 .0.1;

Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.

> This is the message i get for all the following connectiong string
>
> Microsoft OLE DB Provider for SQL Server error '80004005'
>
> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
> access denied.

Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Jun 17 '06 #5
MV*******@googl email.com (MV*******@goog lemail.com) writes:
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNC LI;Server=127.0 .0.1;Database=D BName;UID=UserN ame;PWD=UserPas s
word;"
i get

Microsoft SQL Native Client error '80040e4d'
Login failed for user 'UserName'.


This is strange, because as I understood your original post, you were
connecting from a web server that was a on different machine from where
SQL Server is running.

However, in your connection string you have specified 127.0.0.1 which is
always the local machine. Still, you do make contact with an SQL Server
instance since you get that message.

Since I don't see your configuration, I'm left to guessworks, but there
are two obvious possibilities:
1) You have the username/password wrong.
2) You have an of SQL Server on the web server as well, but that's
not the one you intend to connect to.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jun 17 '06 #6
hi Erland

I am sorry if i confued you, you are right WebServer and DB Server are
2 different machines. I have replaced 127.0.0.1 with the IP of DB
server and now the error is

TCP Provider: An existing connection was forcibly closed by the remote
host.

Configuration of Servers are as follows

Webserver
OS Windows 2003

Database Server
OS Windows 2003
DB SQL Server 2005 with Service Pack1

Mits

Erland Sommarskog wrote:
MV*******@googl email.com (MV*******@goog lemail.com) writes:
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNC LI;Server=127.0 .0.1;Database=D BName;UID=UserN ame;PWD=UserPas s
word;"

i get

Microsoft SQL Native Client error '80040e4d'
Login failed for user 'UserName'.


This is strange, because as I understood your original post, you were
connecting from a web server that was a on different machine from where
SQL Server is running.

However, in your connection string you have specified 127.0.0.1 which is
always the local machine. Still, you do make contact with an SQL Server
instance since you get that message.

Since I don't see your configuration, I'm left to guessworks, but there
are two obvious possibilities:
1) You have the username/password wrong.
2) You have an of SQL Server on the web server as well, but that's
not the one you intend to connect to.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Jun 19 '06 #7
MV*******@googl email.com (MV*******@goog lemail.com) writes:
I am sorry if i confued you, you are right WebServer and DB Server are
2 different machines. I have replaced 127.0.0.1 with the IP of DB
server and now the error is

TCP Provider: An existing connection was forcibly closed by the remote
host.

Configuration of Servers are as follows

Webserver
OS Windows 2003

Database Server
OS Windows 2003
DB SQL Server 2005 with Service Pack1

Have you configured SQL 2005 to accept remote connections? The Developer
and Express Editions of SQL 2005 accepts by default local connection only.

Use the Surface Area Configuration tool to check and change this.

Also make sure that the SQL Server Browser service is running.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jun 19 '06 #8
In SAC I have enabled Local and Remote Connection and also SQL Browser
service is running and is also Active.

Mits

Erland Sommarskog wrote:
MV*******@googl email.com (MV*******@goog lemail.com) writes:
I am sorry if i confued you, you are right WebServer and DB Server are
2 different machines. I have replaced 127.0.0.1 with the IP of DB
server and now the error is

TCP Provider: An existing connection was forcibly closed by the remote
host.

Configuration of Servers are as follows

Webserver
OS Windows 2003

Database Server
OS Windows 2003
DB SQL Server 2005 with Service Pack1

Have you configured SQL 2005 to accept remote connections? The Developer
and Express Editions of SQL 2005 accepts by default local connection only.

Use the Surface Area Configuration tool to check and change this.

Also make sure that the SQL Server Browser service is running.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Jun 19 '06 #9
MV*******@googl email.com (MV*******@goog lemail.com) writes:
In SAC I have enabled Local and Remote Connection and also SQL Browser
service is running and is also Active.


And you did restart SQL Server after enabling remote connections?
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jun 19 '06 #10

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

Similar topics

12
2805
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
3
3006
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to installing SQL Server 2005, my apps were working and is connecting flawlessly to a database on the SQL Server 2000. Now, whenever I connect to the same database with the 2005 version installed, I keep on getting this error:
2
9017
by: hfk0 | last post by:
Hello, I'm a newbie here and was wondering anyone could help me with this. I have a simple ASP.NET 2 web application running perfectly fine with IIS and SQLServerExpress installed locally on my WinXP as a testing server (I created the app in Visual Studio.NET 2005). When deploying this app on the production server (running Win2000 Server, IIS and SQLServerExpress 2005), I'm getting the following
6
7788
by: Todd Brewer | last post by:
Windows Server 2000 ASP.NET 2.0 SQL Server 2000 (on a physically seperate server) I moved an ASP.NET 2.0 application from a development server to production, and am getting the following error: System.Data.SqlClient.SqlException: 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
2
4132
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from my sqldataobject on my page) <add name="ConStr" connectionString="Data Source=localhost;Initial Catalog=myCompany;Integrated Security=True" providerName="System.Data.SqlClient" /> the strange part is that its trying to connect to a SQL express...
8
4374
by: =?Utf-8?B?U3JpcmFtIE1hbGxhanlvc3VsYQ==?= | last post by:
Hi, I am not sure whether this is the correct newsgroup where I need to post my question. Let me know where I need to post for a quick response. I get the following error when I try to connect to SQL 2005 from my ASP.Net 2.0 application. System.Web.Services.Protocols.SoapException: Server was unable to process request. ---System.Data.SqlClient.SqlException: An error has occurred while
2
4969
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express Edition" via the link on: http://msdn2.microsoft.com/en-us/express/bb410792.aspx
3
5754
by: Me LK | last post by:
I did a search but could not find an aswer that worked so here it goes. I just did an upgrade from 2003 to vs 2005 express. I am using a remote sql server 2000. I specifically upgrade to make use of the login control. Everything upgraded fine and the site is working on my local machine. It seems that my site is trying to connect to a local database. I need it to attach to a remote database. I added a connection string to
0
2012
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ((string)(this.GetPropertyValue("Address1")));
0
4624
by: mina | last post by:
My application which is written in vb.net 2005 uses sql server 2005 express as a database, this application is multi-user. So i am used 3 xp machine to install my application i can say machine1,machine2 ,machine3 on which i have install my application. On machine1 i also install SQL Server 2005 express. Then run mu application from machine1 which is locally its work fine. But i am facing problem when i am trying to connect from the...
0
9901
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10672
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9510
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7909
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7077
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5937
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4150
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.