Wednesday, March 7, 2012
Cannot connect with ODBC using TCP/IP?
Our client app can log in and run queries, but our web app when trying to log in gets the message,
'SQL server does not exsist or access denied'
The system DSN's are both sql drivers and the configuration is name pipes. Our recomended specs use TCP/IP, but when I try to change it, it craps out on me. He's opened up his firewall completely to this new box and his old box, a Win2k machine can connect using TCP/IP. This machine is in a work group.
Any suggestions on what it might be? :confused:instead of dsn, try dsn-less:
http://www.connectionstrings.com/
Saturday, February 25, 2012
Cannot connect toMyserver\SQLEXPRESS
i installed Sql server 2005 express edition on an Windows XP professionel
sp2 system, which is alos the IIS server..
Of course i first installed .net Framework 2.0.
I installed it with an administrator account and used following options:
local system
services sql server / sql browser
windows authentification
enable user instance
add user to sql server adminsys role
Further i went to Sql server Configuration Manager and did:
protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled
Finaaly, i went to Sql server Surface Area and did: remote connections:
local and remote connections
using TCP/IP only (and later i also tried: using TCP/IP and named pipes)
My problem is:
--
when starting Sql server Management Studio express, everything seems ok: i
see the server name, authentification (windows), user name (the admin
account), but when clicking on "connect" button, after a while, i get the
error:
"Cannot connect to MYSERVER\SQLEXPRESS.
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: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified) (.Net SqlClient Data Provider)".
1) the optiion 'remote connections' is enabled (with tcp/ip)
2) i even don't use remote connections because sql server is installed on
the same server as the IIS server.
I really have no idea what's the problem and how to solve this. I
uninstalled everything twice (.net framework included) but still same error.
Thanks for help.
CasperIs SQL Server Management Express running on the same system as IIS/SQL
Server? If not, it won't connect.
Again, it makes sense to get the Developer Edition ($50 or less) as it does
not have these limitations.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Casper" <cas@.per.df> wrote in message
news:%237gT%23XJeHHA.4596@.TK2MSFTNGP05.phx.gbl...
> Hi,
> i installed Sql server 2005 express edition on an Windows XP professionel
> sp2 system, which is alos the IIS server..
> Of course i first installed .net Framework 2.0.
> I installed it with an administrator account and used following options:
> local system
> services sql server / sql browser
> windows authentification
> enable user instance
> add user to sql server adminsys role
> Further i went to Sql server Configuration Manager and did:
> protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled
> Finaaly, i went to Sql server Surface Area and did: remote connections:
> local and remote connections
> using TCP/IP only (and later i also tried: using TCP/IP and named pipes)
> My problem is:
> --
> when starting Sql server Management Studio express, everything seems ok: i
> see the server name, authentification (windows), user name (the admin
> account), but when clicking on "connect" button, after a while, i get the
> error:
> "Cannot connect to MYSERVER\SQLEXPRESS.
> 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: SQL Network Interfaces, error: 26 - Error Locating
> Server/Instance Specified) (.Net SqlClient Data Provider)".
> 1) the optiion 'remote connections' is enabled (with tcp/ip)
> 2) i even don't use remote connections because sql server is installed on
> the same server as the IIS server.
> I really have no idea what's the problem and how to solve this. I
> uninstalled everything twice (.net framework included) but still same
> error.
> Thanks for help.
> Casper
>
>|||Thanks for replying.
Yes, it's installed on the same server.
I reinstalled and now i can enter the Management Studio, but when i start an
asp.net application which uses a MDF file, when an aspx file tries to access
the MDF file, i get just the same error.
Even when doing debugging that page in VWD i get that error. This
application ran perfect on another machine.
What did i wrong during installation, where do i have to search? i'm very
confused.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
news:uunyo6SeHHA.5056@.TK2MSFTNGP02.phx.gbl...
> Is SQL Server Management Express running on the same system as IIS/SQL
> Server? If not, it won't connect.
> Again, it makes sense to get the Developer Edition ($50 or less) as it
> does not have these limitations.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "Casper" <cas@.per.df> wrote in message
> news:%237gT%23XJeHHA.4596@.TK2MSFTNGP05.phx.gbl...
>|||Let's see your ConnectionString.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Casper" <ca@.qdq.dfv> wrote in message
news:uMGFqKWeHHA.3632@.TK2MSFTNGP02.phx.gbl...
> Thanks for replying.
> Yes, it's installed on the same server.
> I reinstalled and now i can enter the Management Studio, but when i start
> an asp.net application which uses a MDF file, when an aspx file tries to
> access the MDF file, i get just the same error.
> Even when doing debugging that page in VWD i get that error. This
> application ran perfect on another machine.
> What did i wrong during installation, where do i have to search? i'm very
> confused.
>
> "William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
> news:uunyo6SeHHA.5056@.TK2MSFTNGP02.phx.gbl...
>|||William, i found it:
i reinstalled sqk server express, but it changed the instance name to
MYSERVER (instead of .\SQLEXPRESS). So the connection strings didn't work
and generated that error which has nothing to do woth remoting connections.
Thanks anyway
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
news:OFIzPAXeHHA.3648@.TK2MSFTNGP05.phx.gbl...
> Let's see your ConnectionString.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "Casper" <ca@.qdq.dfv> wrote in message
> news:uMGFqKWeHHA.3632@.TK2MSFTNGP02.phx.gbl...
>
Cannot connect toMyserver\SQLEXPRESS
i installed Sql server 2005 express edition on an windows xp professionel
sp2 system, which is alos the IIS server..
Of course i first installed .net Framework 2.0.
I installed it with an administrator account and used following options:
local system
services sql server / sql browser
windows authentification
enable user instance
add user to sql server adminsys role
Further i went to Sql server Configuration Manager and did:
protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled
Finaaly, i went to Sql server Surface Area and did: remote connections:
local and remote connections
using TCP/IP only (and later i also tried: using TCP/IP and named pipes)
My problem is:
when starting Sql server Management Studio express, everything seems ok: i
see the server name, authentification (windows), user name (the admin
account), but when clicking on "connect" button, after a while, i get the
error:
"Cannot connect to MYSERVER\SQLEXPRESS.
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: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified) (.Net SqlClient Data Provider)".
1) the optiion 'remote connections' is enabled (with tcp/ip)
2) i even don't use remote connections because sql server is installed on
the same server as the IIS server.
I really have no idea what's the problem and how to solve this. I
uninstalled everything twice (.net framework included) but still same error.
Thanks for help.
Casper
Is SQL Server Management Express running on the same system as IIS/SQL
Server? If not, it won't connect.
Again, it makes sense to get the Developer Edition ($50 or less) as it does
not have these limitations.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Casper" <cas@.per.df> wrote in message
news:%237gT%23XJeHHA.4596@.TK2MSFTNGP05.phx.gbl...
> Hi,
> i installed Sql server 2005 express edition on an windows xp professionel
> sp2 system, which is alos the IIS server..
> Of course i first installed .net Framework 2.0.
> I installed it with an administrator account and used following options:
> local system
> services sql server / sql browser
> windows authentification
> enable user instance
> add user to sql server adminsys role
> Further i went to Sql server Configuration Manager and did:
> protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled
> Finaaly, i went to Sql server Surface Area and did: remote connections:
> local and remote connections
> using TCP/IP only (and later i also tried: using TCP/IP and named pipes)
> My problem is:
> --
> when starting Sql server Management Studio express, everything seems ok: i
> see the server name, authentification (windows), user name (the admin
> account), but when clicking on "connect" button, after a while, i get the
> error:
> "Cannot connect to MYSERVER\SQLEXPRESS.
> 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: SQL Network Interfaces, error: 26 - Error Locating
> Server/Instance Specified) (.Net SqlClient Data Provider)".
> 1) the optiion 'remote connections' is enabled (with tcp/ip)
> 2) i even don't use remote connections because sql server is installed on
> the same server as the IIS server.
> I really have no idea what's the problem and how to solve this. I
> uninstalled everything twice (.net framework included) but still same
> error.
> Thanks for help.
> Casper
>
>
|||Thanks for replying.
Yes, it's installed on the same server.
I reinstalled and now i can enter the Management Studio, but when i start an
asp.net application which uses a MDF file, when an aspx file tries to access
the MDF file, i get just the same error.
Even when doing debugging that page in VWD i get that error. This
application ran perfect on another machine.
What did i wrong during installation, where do i have to search? i'm very
confused.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
news:uunyo6SeHHA.5056@.TK2MSFTNGP02.phx.gbl...
> Is SQL Server Management Express running on the same system as IIS/SQL
> Server? If not, it won't connect.
> Again, it makes sense to get the Developer Edition ($50 or less) as it
> does not have these limitations.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Casper" <cas@.per.df> wrote in message
> news:%237gT%23XJeHHA.4596@.TK2MSFTNGP05.phx.gbl...
>
|||Let's see your ConnectionString.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Casper" <ca@.qdq.dfv> wrote in message
news:uMGFqKWeHHA.3632@.TK2MSFTNGP02.phx.gbl...
> Thanks for replying.
> Yes, it's installed on the same server.
> I reinstalled and now i can enter the Management Studio, but when i start
> an asp.net application which uses a MDF file, when an aspx file tries to
> access the MDF file, i get just the same error.
> Even when doing debugging that page in VWD i get that error. This
> application ran perfect on another machine.
> What did i wrong during installation, where do i have to search? i'm very
> confused.
>
> "William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
> news:uunyo6SeHHA.5056@.TK2MSFTNGP02.phx.gbl...
>
|||William, i found it:
i reinstalled sqk server express, but it changed the instance name to
MYSERVER (instead of .\SQLEXPRESS). So the connection strings didn't work
and generated that error which has nothing to do woth remoting connections.
Thanks anyway
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> schreef in bericht
news:OFIzPAXeHHA.3648@.TK2MSFTNGP05.phx.gbl...
> Let's see your ConnectionString.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "Casper" <ca@.qdq.dfv> wrote in message
> news:uMGFqKWeHHA.3632@.TK2MSFTNGP02.phx.gbl...
>
Cannot connect to sql through asp app.
I can open the initial page but get this error when i try to look up a
customer or other db dependant actions.
Microsoft OLE DB Provider for SQL Server (0x80040e4d)
Login failed for user 'sa'
/ctservice/view_edit_service/getindex.asp, line 22
the code on line 21-22:
Set connEditService = Server.CreateObject("ADODB.Connection")
connEditService.Open conString
This started when i tried to change the sa password so that i could
access the db for a mail merge. I don't have the original sa password
and i don't know if i enabled it by accident. If so how do i remove it
or fix this error? thanks jho.
On Jan 13, 4:36Xpm, jho <jhogan0...@.yahoo.com> wrote:
> iis and sql on same box. asp lan app.
> I can open the initial page but get this error when i try to look up a
> customer or other db dependant actions.
> Microsoft OLE DB Provider for SQL Server (0x80040e4d)
> Login failed for user 'sa'
> /ctservice/view_edit_service/getindex.asp, line 22
> the code on line 21-22:
> Set connEditService = Server.CreateObject("ADODB.Connection")
> connEditService.Open conString
> This started when i tried to change the sa password so that i could
> access the db for a mail merge. I don't have the original sa password
> and i don't know if i enabled it by accident. If so how do i remove it
> or fix this error? thanks jho.
I found the password for sa after searching all of the pages in the
site for, you guessed it, password duh....
Cannot connect to sql through asp app.
I can open the initial page but get this error when i try to look up a
customer or other db dependant actions.
Microsoft OLE DB Provider for SQL Server (0x80040e4d)
Login failed for user 'sa'
/ctservice/view_edit_service/getindex.asp, line 22
the code on line 21-22:
Set connEditService = Server.CreateObject("ADODB.Connection")
connEditService.Open conString
This started when i tried to change the sa password so that i could
access the db for a mail merge. I don't have the original sa password
and i don't know if i enabled it by accident. If so how do i remove it
or fix this error? thanks jho.On Jan 13, 4:36=A0pm, jho <jhogan0...@.yahoo.com> wrote:
> iis and sql on same box. asp lan app.
> I can open the initial page but get this error when i try to look up a
> customer or other db dependant actions.
> Microsoft OLE DB Provider for SQL Server (0x80040e4d)
> Login failed for user 'sa'
> /ctservice/view_edit_service/getindex.asp, line 22
> the code on line 21-22:
> Set connEditService =3D Server.CreateObject("ADODB.Connection")
> connEditService.Open conString
> This started when i tried to change the sa password so that i could
> access the db for a mail merge. I don't have the original sa password
> and i don't know if i enabled it by accident. If so how do i remove it
> or fix this error? thanks jho.
I found the password for sa after searching all of the pages in the
site for, you guessed it, password duh....
Thursday, February 16, 2012
cannot connect to SQL database through IIS
I'm new...
I've installed Web Matrix, and MDSE. I've been successful in installing the Time Tracker Starter kit, I've connected to multiple databases (SQL and Access) within Web Matrix and I'm now trying to connect to my own SQL database...with limited success.
Scenario:
I've created a SQL database using MS Access (*.adp) access project for SQL. I've created a new ASPX with Web Matrix and placed a database table into my new ASPX by draggin-n-droppin the table from the DATA connections in Web Matrix. Everything goes smoothly...
When I view the page using the Web Matrix 'built-in' web server (i.e. http://localhost:8080/default.aspx), everything displays just fine...it appears that the script is connecting properly to the database and executing the query without any problem -- I can view my data within the page. However, when I view this page using IIS (i.e. http://localhost/default.aspx), I get:
System.Data.SqlClient.SqlException: Cannot open database requested in login 'myDB'. Login fails. Login failed for user 'MYCOMPUTER\ASPNET' and then a stack dump.
Same code...different web servers...different results.
I've checked as many SQL permissions as I could think of, but my experience with SQL is limited. I'm using Microsoft's FREE SQL tools, but I'm pretty certain that there should be a simple way to ensure that my ASPNET user account has appropriate permissions to access my SQL database through IIS.
any suggestions?As you can see the sql error is occuring as the ASPNET account on your machine doesn't have sql priveleges - to solve this you could either add the apsnet account to sql logins and give it sufficient permissions or impersonate and identity which has sufficient sql priveleges.
Hope that helps
Kashif|||I have the same problem .
Would you please tell me how to add the apsnet account to sql logins .|||You can either run the following stored procedure to add the aspnet account
sp_grantlogin @.loginamein your case @.login name would be "MachineName\ASPNET" or if you have SQL Enterprise Manager you can open the sql server you want to add the login to and then select security -> Logins -> NewLogin
Hope that helps
Kashif|||Thank you so much. However, I do have MSDE on my Windows XP machine.
and stil have the same problem.
your help will be appreciated.|||To installed MSDE on your system with SQL authentication support use this command:
Setup SAPWD=(Some password) SecurityMode=SQL
where setup is the executable of the setup of MSDE (download it over here with SP3 integrated:http://www.asp.net/msde/default.aspx?tabindex=0&tabid=1). Follow the instructions of the setup.
When you've done so, you can login to the MSDE database using this credentials:
uid=sa
pwd=(Some password)
Replace the (Some password) in the command line by the password you like.|||Thank you so much for your response however I already done that but it doesn't work:
This is my frist samle project for MSDE so would tell me the steps:
1. Create a project by MS Access and login='sa' password='passowrd'. that mean the SQL server is running and it's shown at my desck top.
2. write a small ample of aspx code by WebMatrix
3, it gives me the "Cannot open database requested in login 'adp1'. Login fails. Login failed for user 'sa'."
<%@. Page Language="C#" %>|||From the error it seems the password you are using for sa is incorrect, can you try running some sql scripts from command line using login sa and password password and see if you are able to run those.
<%@. import Namespace="System.Data" %>
<%@. import Namespace="System.Data.OleDb" %>
<%@. import Namespace="System.Data.SqlClient" %>
<script runat="server"
void Page_Load(object sender, EventArgs e) {// TODO: Update the ConnectionString and CommandText values for your application
string ConnectionString = "server=(local);database='adp1';uid='sa'; pwd='password'";
string CommandText = "select * from news";SqlConnection myConnection = new SqlConnection(ConnectionString);
SqlDataAdapter objCmd1 = new SqlDataAdapter( CommandText, myConnection);
DataSet ds1 = new DataSet();
objCmd1.Fill(ds1);//myDataList1.DataSource = ds1;
//MyDataList1.DataBind();
}</script>
<html>
<head>
</head>
<body style="FONT-FAMILY: arial">
<h2>Simple Data Report
</h2>
<hr size="1" />
<ASP:DataList id="MyDataList1" RepeatColumns="1" RepeatDirection="Horizontal" runat="server">
<ItemTemplate>
<table border="0" cellpadding="2" width="100%" height="68">
<tr valign="TOP">
<td width="20%" valign="top" rowspan="2" height="62">
Hello
</td>
<td width="80%" valign="top" height="7">
<font face="Verdana" size="2"> <%# DataBinder.Eval(Container.DataItem, "news_title") %> <font face="Verdana" size="1.5"><%# DataBinder.Eval(Container.DataItem, "news_date") %> </font> </font></td>
</tr>
<tr>
<td width="70%" valign="top" height="49">
<font face="Verdana" size="1.5"> <%# DataBinder.Eval(Container.DataItem, "news_description") %> </font>
</td>
</tr>
</table>
</ItemTemplate>
</ASP:DataList>
</body>
</html>
-Kashif|||thank you so muh, I am sorry but I been away for a short vacation.
This is my frist samle project for MSDE so would tell me the steps.
I do not have SQL Server..
Would you tell me how to check these command. ...
sat|||Open command prompt, switch to binn directory msde and run something like the following
osql -U sa id -P myPwd -S (.) -d Northwind -q "Select * from customers"if this fails to run then we know that you are either not setting the sa password right or the MSSQL service is not running on your machine. Also if you have a named instance of MSDE installed then you would use "-S ServerName\InstanceName"
Hope that helps
Kashif|||Thank you.
I have created MS Acces project called adp1. wehn I open the project it asks me for user "sa" and password. I have database tables "news". however when I write the following:
>osql -U sa -P password -S (.) -D adp1 -Q "Select * from news"
Error " Data Source name not found and no default driver"
>osql -U sa -P password -S localhost\adp1 -D adp1 -Q "Select * from news"
Error " Data Source name not found and no default driver"|||actullay, after I run the previous command I got this error on my
http://localhost/
403 Forbidden - The server denies the specified Uniform Resource Locator (URL). Contact the server administrator. (12202)
Internet Security and Acceleration Server.
any explations please..!!! thank you|||The error you have specified above just implies that there is no page defined. Can you look up the Default wesite's home directory and see the "Default document" tab.
-Kashif|||Hello all,
I am writing this message simply because I started this thread and I wanted to remark that with ALL your help, and with many hours of studying SQL server permissions, osql commands and syntax, SQL server port configuration and firewalls, I have resolved the problems I was having when I started this thread.
Thanks to all who provided excellent advice and tolerated my previous ignorances.
Regards.
Tuesday, February 14, 2012
Cannot connect to MYSERVER\SQLEXPRESS
Hi,
i installed Sql server 2005 express edition on an windows xp professionel sp2 system, which is also the IIS server..
Of course i first installed .net Framework 2.0.
I installed it with an administrator account and used following options:
local system
services sql server / sql browser
windows authentification
enable user instance
add user to sql server adminsys role
Further i went to Sql server Configuration Manager and did:
protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled
Finaaly, i went to Sql server Surface Area and did: remote connections:
local and remote connections
using TCP/IP only (and later i also tried: using TCP/IP and named pipes)
My problem is:
-----
when starting Sql server Management Studio express, everything seems ok: i see the server name, authentification (windows), user name (the admin
account), but when clicking on "connect" button, after a while, i get the error:
"Cannot connect to MYSERVER\SQLEXPRESS.
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: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified) (.Net SqlClient Data Provider)".
I don't understand because:
1) the optiion 'remote connections' is enabled (with tcp/ip)
2) i even don't use remote connections because sql server is installed on
the same server as the IIS server.
I really have no idea what's the problem and how to solve this. I uninstalled everything twice (.net framework included) but still same error.
Thanks for help.
Tartuffe
check to make sure the service is started.
Start --> Control Panel --> Administrative Tools --> Services
In the "Services" window, make sure the service is started. If it is started, try re-starting it.
|||Hi there!
I am also having a similar problem, but in my case management studio just does not detect any database engine instance (it is running and I checked it) and the drop-down list for servername is empty! I even tried rebuilding the OS and installed SQL server 2005 again, but in vain. Kindly post a solution if you arrive at it, so will I.
Regards
||| Hello vraval, try this:
[HOSTNAME]\SQLEXPRESS example: SEAN\SQLEXPRESS
to get the host name, open the sql server configuration manager --> "SQL Server 2005 Services" on the left --> right click and select "properties" on 'SQL Server (SQLEXPRESS) - in the right window. In the properties menu, select the 'service' tab and you can find the Host Name property here. Put the HOSTNAME, followed by \SQLEXPRESS -- HOSTNAME\SQLEXPRESS as the server name when logging in.
Hi Sean!
Many thanks for the reply and solving my problem. I am now able to connect to my database engine.
God knows why Microsoft People do not show these important directions.
Thanks and warm regards.
|||Hi all,
glad for you Vraval, but i still have that error after restarting the service (which was started anyway).
i tried with shared memory, with tcp/ip, without Zone alarm, with a time-out of 60 sec etc ... still same error.
What can i try more?
|||Hello tartuffe,
Check out the following links, if them do not help .. im out of ideas. Im sure you have searched and most likely have found these post also from the way it sounds, but here they are:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=271795&SiteID=1
http://aspnet.tribe.net/thread/628e81d8-6a77-4687-ac16-085d54a376f2
have you asked your question on the MSDN forums? if not, you should search and ask the question there also :) They are also informative and the forums have a wealth of information.|||Sean, i found it:
i reinstalled sqk server express, but it changed the instance name to
MYSERVER (instead of .\SQLEXPRESS). So the connection strings didn't work
and generated that error which has nothing to do woth remoting connections.
Thanks anyway