SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 SQL Server does not exist or access denied
 Forum Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Nim
Starting Member

2 Posts

Posted - 08/22/2004 :  05:50:25  Show Profile
Hi..
I'm a newbie at SQL and would appreciate anyone's help with this.

I've set up MS SQL 2000 on Win XP(Pro).When I log into the system using my account and try to access the sql server through my webpg, I get the following error - SQL Server does not exist or access denied. I have attached the details below.

My system is the server and I'm using IIS to run the webpg. MS SQL was installed with 'mixed' authentication and my account id was also added into Security/Login. And there are no probs connecting to the database in Enterprise Manager.Could there be any configuration problem?

warmest regards,
Nim

Details:
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:

Line 31: SqlCommand objCommand = new SqlCommand(strSQL,objConnection);
Line 32:
Line 33: objConnection.Open();
Line 34: dgNamelist.DataSource= objCommand.ExecuteReader();
Line 35: dgNamelist.DataBind();


Source File: D:\finalFYP\webroot\SQLServer_connection.aspx Line: 33

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ASP.SQLServer_connection_aspx.Page_Load(Object sender, EventArgs e) in D:\finalFYP\webroot\SQLServer_connection.aspx:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


timmy
Flowing Fount of Yak Knowledge

Australia
1242 Posts

Posted - 08/22/2004 :  07:12:06  Show Profile  Visit timmy's Homepage
Where's your connection string?
Go to Top of Page

Nim
Starting Member

2 Posts

Posted - 08/22/2004 :  07:37:28  Show Profile
Connection string -
String strConnection = "server=(local)\\NetSDK;database=Northwind; integrated security=true;";

I have a feeling that I haven't configured my server properly.

Should I use any service related to mssql under Administrative Tools/Services in any way?like how 'MSSQL$NetSDK' is for MSDE.
Go to Top of Page

adharjain
Starting Member

India
1 Posts

Posted - 08/27/2004 :  03:35:19  Show Profile  Visit adharjain's Homepage  Send adharjain a Yahoo! Message
Hi

Even i have similar kind of a problem. I am working in a company. I have two database servers(Quantum and VTripathi). If i use Quantum, I apply

"Server=quantum;Database=quantumagency2;User id=sa;Password=;"

and to use VTripathi

"server = VTripathi;user id = sa;password=Quantum; database = ASP_DEVOPS_QA"

but problem is, It works fine when i use vtripathi server but when i use Quantum as my server, i get the same error viz.


SQL Server does not exist or access denied.

Line 18: lstrConn = System.Configuration.ConfigurationSettings.AppSettings.Get("ConnStr");
Line 19: connObj = new SqlConnection(lstrConn);
Line 20: connObj.Open();
Line 21: /*try
Line 22: {

Stack Trace

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
EbxDv05.ConnDB..ctor() in c:\inetpub\wwwroot\ebxdv05\conndb.cs:20
EbxDv03.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ebxdv05\webform1.aspx.cs:70
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Please mail me the solution ... adharjain@hotmail.com
Go to Top of Page

mr_mist
Grunnio

United Kingdom
1870 Posts

Posted - 08/27/2004 :  05:12:58  Show Profile  Visit mr_mist's Homepage
Tried adding the IIS service account to your SQL logins?

-------
Moo. :)
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  18:19:58  Show Profile
I also have the same problem.
All last week plus the better part of this morning, my application could open the database with no errors. Now after restarting my machine, I keep getting a server error that SQL Server does not exist.
Pasted below is the error page. Please help...

Server Error in '/ISHelpDeskv1' Application.
--------------------------------------------------------------------------------

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:


Line 153:
Line 154: 'Fill the dataset
Line 155: SqlDataAdapter1.Fill(DsProjects1)
Line 156:
Line 157: 'Update the datagrid


Source File: c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb Line: 155

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
ISHelpDeskv1.Summary.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ISHelpDeskv1\Summary.aspx.vb:155
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/07/2004 :  18:22:57  Show Profile  Visit tkizer's Homepage
Do you have a firewall in between the web server and the database server? If so, have you punched a hole in the firewall for the port that SQL Server is using? If so, then are you referring to this port in your connection string? If not, did you create an alias on the web server? An alias can be created using Client Network Utility if you have SQL Client Tools installed on the web server or you can manually add a string value to the registry. I've posted how to do this several times in the forums, so just search for it.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  18:30:05  Show Profile
Hi Tara
The SQL Server database is local to my machine, so the firewall should not be an issue since that's on the network.
I will search on creating an alias on the web server and let you know if I was successful.
Thanks much

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/07/2004 :  18:31:16  Show Profile  Visit tkizer's Homepage
Is the web server local to your machine too? If so, is the MSSQLSERVER service even started?

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  18:36:24  Show Profile
Yes, the web server is local...(I believe) I am the only person who has Visual Studio .NET running in this place, so everything is local.
SQL Server is set to Auto Start on logon in my machine.


If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/07/2004 :  18:37:42  Show Profile  Visit tkizer's Homepage
Just because it is auto start doesn't mean that it is started right now. It could have stopped. Please check the services applet in Admin Tools in Control Panel to verify. The name that you have specified in the connection string, can you ping it?

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  19:09:57  Show Profile
I checked...MSSQLSERVER is started, but ASP.NET is not, and I cannot start the service, I get error message: Error: 0x8007277a.
Could this be a part of the problem?

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/07/2004 :  19:14:40  Show Profile  Visit tkizer's Homepage
Are you able to connect to SQL Server using Entperise Manager or Query Analyzer?

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  19:23:52  Show Profile
Yes ... I can do both...

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/07/2004 :  19:27:12  Show Profile  Visit tkizer's Homepage
Please post the connection string then.

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/07/2004 :  19:38:16  Show Profile
What's your email so that I could do screenshots and email you everything? I also noticed that everytime I restart my app, when I check the server the explorer, the connection to the db is broken and needs to be refreshed. Although this doesn't fix the problem either...so frustrating!!

If you can't make it good, make it look good!
Go to Top of Page

jen
Flowing Fount of Yak Knowledge

Sweden
4110 Posts

Posted - 09/07/2004 :  23:37:13  Show Profile  Send jen a Yahoo! Message
try a simple module first of establishing a connection from you app to the server.

if it's still a 'server does not exist error' then you may want to check your connection string, something might be missing.

try adding 'security context=sspi' in your conn string

hope this might helps...
Go to Top of Page

Pace
Constraint Violating Yak Guru

United Kingdom
262 Posts

Posted - 09/08/2004 :  06:54:15  Show Profile
If you have named your machine then "local" will not work... It will be "machinename" instead of local...
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/08/2004 :  13:21:17  Show Profile
Hey Tara
Here's the conn string:
workstation id="VNASIBI-3RJ2051";packet size=4096;integrated security=SSPI;data source="VNASIBI-3RJ2051";persist security info=False;initial catalog=NewProjects

I created a new SQl DB (newprojects) and a new ASP app, and I'm still getting this error message

If you can't make it good, make it look good!
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36594 Posts

Posted - 09/08/2004 :  13:39:08  Show Profile  Visit tkizer's Homepage
So is this the name of your machine: VNASIBI-3RJ2051? Is that the name that you are using when you connect to SQL Server via Query Analyzer or Enterprise Manager? Is NewProjects the name of the database?

Tara
Go to Top of Page

vnasibi
Starting Member

USA
17 Posts

Posted - 09/08/2004 :  14:07:05  Show Profile
Hi
Yes, my machine name is VNASIBI-3RJ2051.
In my Enterprise Manager, I get two options, Local and production. Same as Query Analyzer. However, on the network, others see my system name. I also tried to open the webpage on another network machine by typing http://VNASIBI-3RJ2051/NewProjects/Webform1.aspx, I got an error message that it cannot be accessed remotely because of "I think" network security

If you can't make it good, make it look good!
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000