"SQL Server does not exist or access denied" error when trying to connect from a Windows Service

Hi!

I understand that this topic is one of the most discussed topics ever. However i could not find the relevant information after going through (almost) all the posts so far. Hence this post.

 
I am getting the 'SQL Server does not exist or access denied' error when I am trying to access SQL Server from a WINDOWS SERVICE. SQL Server and the Windows service are running on two different machines. (When they are on the same machine, it works). All the solutions I found so far are related to web apps. What should I do in the case of a windows service? My connection string uses SQL server authentication. (I tried with windows authentication. Its not working either.). Under what login does windows services run and how can I add it to valid SQL server logins?

0
spinal_17
4/10/2007 12:15:28 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

3 Replies
1060 Views

Similar Articles

[PageSpeed] 10

what version of sql server you are using SQL 2000 or SQL 2005. If sql 2005 have you enabled remote connection on sql server
Ashok Raja
www.iGold.in

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
0
AshokRaja
4/10/2007 12:38:57 PM
I am using SQL Server 2000. My Connection String is "Data Source=Proficio3;Initial Catalog=PRO-TMS_2.5;User ID=service_login;Password=service"
0
spinal_17
4/11/2007 4:24:50 AM

Hi,

Please try to check if the SQL Server you're connecting to is the default instance on that server. If not, you will need to add instance name after the server name like:

Data Source=Proficio3\SQLInstance


Sincerely,
Kevin Yu
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Mark as Not Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
Kevin
4/13/2007 8:59:08 AM
Reply:

Similar Artilces:

"SQL Server does not exist or access denied" Error
Hi guys, I just installed WebMatrix and MSDE (downloaded from www.asp.net), and I have set MSDE to use SQL authentication. I have granted user ASPNET read/write previlege and added it to the MSDE user's table. When I tried the following code, it gives me this error: "SQL Server does not exist or access denied." <%@ Page Language="C#" Debug="true" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.SqlClient" %> <script runat="server"> void Page_Load(object send...

"SQL Server does not exist or access denied" error #2
I'm trying to create to set up connection between my web application on the server and the database on another box and getting "SQL Server does not exist or access denied" error. Both the web server and the database machine are Windows 2003 Server, there's no firewall enabled, there's mixed authentication enabled on the sql server. The machines are not on the same domain so I'm using SQL Server authentication from web.config. Here's my connection string: <add key="ConnectionString" value="Server=sqlboxip;User id=sqlaccountname;Pwd=sqlpass;Initial catalog=dbname"> I've also...

Dreaded "SQL Server does not exist or access denied. " Error
I have built a web application that runs on my local web server against my local SQL server and my development server, but now I'm trying to get it to work on the live server and I'm not getting a connection.  Whenever I try to open the connection, I get a.  SQL Server does not exist or access denied. error. Here is my connection string... Public connString as string Dim SQLServer As String = "xxx.xx.xx.xxx" connString = "server=" & SQLServer & ";" _ & "database=DBName;Trusted_Connection=No;user id=xxxID;password=xxxPassword;" myConnection2 = New SqlClien...

"SQL Server does not exist or access denied" error message
Hello!   When I start my .aspx with ASP.NET Web Matrix Server, it work, but when i try to start it with IIS I get error message.   TIA, Misha What is your connection string to the database like? Are you using a trusted connection? Is IIS running under a different account than Web Matrix? SQL Server needs to know about which accounts are acceptable.   string ConnectionString = "server=SERVER;database=pubs;trusted_connection=true";SQL is on server PC, Web Matrix on Workstation....

Error>>"SQL Server does not exist or access denied"
I have re-installed Visual Studio and SQL Server and now i am getting this error for all applications i try to runError:" SQL Server does not exist or access denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the...

interesting case for "SQL Server does not exist or access denied." error
My connection string is : server=localhost;Database=INFOSEC;Integrated Security=true  It works for the login page, but it does not work for the registration page, and give the "SQL Server does not exist or access denied." error.  Any IDEA? You shouls check your connection string properly and make sure you are calling proper database for registration form.Otherwise can you give the code here.So i can findout the error....

upgrade error:"CONNECTIVITY ERROR:DB-Library: "SQL Server connection timed out."
PLEASE HELP OH WISE SYBASE GURUS! upgrading 11.9.2 to 12.0. unloaded software. rebooted server. selected "upgrade server" in Configure Sybase Servers window. typed in sa password. got "CONNECTIVITY ERROR: DB-Library: "SQL Server connection timed out." -- Chuck Boyce chuck_boyce@operamail.com http://www.geocities.com/chuck_boyce_jr/ Yahoo Messenger ID: chuck_boyce_jr http://messenger.yahoo.com AOL Instant Messenger ID: sg95m476 http://www.aol.com/aim/ ICQ Messenger ID: 41449031 http://www.icq.com ...

Data Access Problem "Sql Server does not exist or Access Denied"
I have a computer connected on Lan. The database exist in a different computer so I use the server = "DifferentComputer" to access the database. The username and password are hardcoded in the dataconfiguration file of the Enterprise Library. Now when I access the database if throws the exception: "Sql Server does not exisit or Access denied" I can see the database on the different computer in my Enterprise Manager and I can execute stored procedures on it with no problem. Does anyone has any idea that what is going on and why is this throwing exceptions. HighOnCodingWann...

"SQL Server does not exist or access denied"
Hi everyone! I receive error "SQL Server does not exist or access denied" when I try to run a web application from my notebook. (when I'm working at home) The weird thing is that it occurs sporadically. Sometimes the connection works just fine. Other times it fails. When I run the application on my workstation at the office everything works perfectly. Here's the stack trace: [SqlException: SQL Server does not exist or access denied.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484 System.Data.SqlClient.SqlConnectionPoolMana...

"SQL Server does not exist or access denied", again...
I'm have that darn problem... Here is our setup: Remote clustered SQL Server 2000 running on a Windows Server 2003 Enterprise Edition box. Local IIS 5.1 web server (my development box) running on Windows XP Tablet Edition. I'm using Visual Studio.Net 2003 and using ASP.Net 1.1.4322. I have an ASP.Net application that hits the remote SQL Server.  When I'm on my development box and viewing my ASP.Net project locally via IE, the application retrieves values from the remote SQL Server with no problems.  If I get onto another machine, launch IE, and then hit my developmen...

"Sql server does not exist or access denied" #2
Hello, I am walking step y step with this tour: http://www.asp.net/webmatrix/tour/section2/createnewdb.aspx But when I came to this step: http://www.asp.net/webmatrix/tour/section2/image/22_EnterDbName.jpg I got the fallowing error message: Could not create the database. Sql server does not exist or access denied ConnectionOpen (Connect()). I just installed: http://www.asp.net/msde/default.aspx?tabindex=0&tabid=1 Your help is greatly appreciated. that error is based on the connection string. where's the sql server/msde, and are you using the right login...

randomly getting "SQL Server does not exist or access denied"
Randomly getting  "SQL Server does not exist or access denied" error from my server.  All sites on my server lose connection to the MSSQL database on a windows 2005 server.  Anyone know? There is truly no pattern, it just randomly loses access to the SQL server which is on the localhost.  It's often different pages being browsed when it decides to crash.  Sometimes it's a couple hours between crashes and sometimes just a few minutes. I've heard that I should check the log files, but I'm really not even sure what to check.  Any suggestio...

Getting "When connecting to SQL Server 2005 Error" using MS SQL 2000?
I'm new to using VS2005 and this is my first project connecting to our MS SQL 2000. App worked fine on my dev PC, connection to the same MS SQL Server. Published the web site to the web server (same server running MS SQL Server) and getting the below error. Is this a permission setup problem on SQL Server or does it really think it's connecting with a MS SQL 2005 database? 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 remot...

"SQL Server does not exist or access denied." after installing XP SP2
Hi! I just installed Windows XP Service Pack 2 on my pc and I cannot make my asp.net applications access any database any more. I tried starting the application up from the debugger in vs.net, but I got the same behaviour: I can open the login page but as soon as the application tries to connect to SQLServer I get the "SQL Server does not exist or access denied." error message. I'm trying to connect with trusted_connection. Can you guys help me out? Try this Microsoft KB article: http://support.microsoft.com/default.aspx?kbid=839269Darrell Norton, MVPDarrell Nort...

Web resources about - "SQL Server does not exist or access denied" error when trying to connect from a Windows Service - asp.net.sql-datasource

Resources last updated: 12/22/2015 5:48:06 AM