Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sql express connection

Posted on 2010-08-24
20
Medium Priority
?
853 Views
Last Modified: 2012-06-27
Page Name = SQL Server Authentication mode



 I have not set any user name password for the DB but somehow I cannot connect via this software.see attachment

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


--------------
On Asp.Net pages I connect like this and it works fine.  
        connectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=SADB;Data Source=KENLAPTOP\\sqlexpress";

sqlconnect.jpg
0
Comment
Question by:goodk
  • 9
  • 7
  • 3
  • +1
20 Comments
 
LVL 17

Expert Comment

by:Chris Mangus
ID: 33516478
1.  Check your connection string.  You may have one too many slashes in your source.
2.  Is the application you're connecting with on the same server as SQLExpress?
3.  If not, have you configured SQL Server to allow remote connections?
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33517095
In the CMS web setup screen, you need
KENLAPTOP\sqlexpress
not
KENLAPTOP

Since no login/pass is provided, it will attempt to authenticate as the Identity of the App pool running the CMS web app.
0
 

Author Comment

by:goodk
ID: 33517877
ok, a little progress but
now I do not know how to connect to the database? when I tried to connect I get the following error,
The database 'SADB' doesn't exist!
I am confuse - ??
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33517897
[Since no login/pass is provided, it will attempt to authenticate as the Identity of the App pool running the CMS web app.]

What windows account is being used to run the App pool in IIS for the CMS app?
If this is ASP.Net, you need to check the ASP.net identity instead.

That windows account probably doesn't have access to the SADB database.
0
 

Author Comment

by:goodk
ID: 33517909
I am the only user on this computer with only one admin account
 
I also tried creating a database but had an error!!
My asp.net pages work just fine with the database.  Not sure what is going on?
0
 
LVL 36

Expert Comment

by:ste5an
ID: 33519148
Take a closer look at your ASP.NET connection string! The value  "Integrated Security=SSPI" says that you're using Windows Authentication, which goes with your statement that you don't have setup a username/password combination.

Thus, I guess, using Integrated Windows Authentication - the second radio button - should work.


mfG
--> stefan <--
0
 

Author Comment

by:goodk
ID: 33519732
An error occurred when creating database: [DataConnection.ExecuteQuery]: Query: CREATE DATABASE [KenticoCMS] COLLATE SQL_Latin1_General_CP1_CI_AS: caused exception: CREATE DATABASE permission denied in database 'master'.
Creating a new database KenticoCMS
 
How do I create a permission?



sqlconnectDB.jpg
0
 
LVL 36

Expert Comment

by:ste5an
ID: 33519904
This is a different question. Close this one,  allot the points. Make it a new one.


mfG
--> stefan <--

p.s.:

Download SSMSE and  create the database with it:

  http://msdn.microsoft.com/en-us/library/ms365247.aspx

For the permission problem see:

  http://msdn.microsoft.com/en-us/library/aa258257%28SQL.80%29.aspx

0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33519937
> "Integrated Security=SSPI" says that you're using Windows Authentication

Correct, but this "Windows user" is not you the person running the browser.

http://www.bluevisionsoftware.com/WebSite/TipsAndTricksDetails.aspx?Name=AspNetAccount

It may not have permissions to the database, much less create a new one.
0
 
LVL 36

Accepted Solution

by:
ste5an earned 2000 total points
ID: 33520475
> Correct, but this "Windows user" is not you the person running the browser.

You cannot tell this from the problem as described above. The server is running local as you can see from the URL containing localhost. The service may run under any account. In particular, you cannot tell if he is running impersonation or not:

  http://msdn.microsoft.com/en-us/library/aa292118%28VS.71%29.aspx

btw, this is the reason for creating the database manually using SSMSE.


mfg
--> stefan <--
0
 

Author Comment

by:goodk
ID: 33521837
Well, I also have a database which exist and I can connect to it via the string, using asp.net as discussed but I cannot connect to it with the above tool.
error
The database 'SADB' doesn't exist!
 

DBList.jpg
0
 
LVL 36

Expert Comment

by:ste5an
ID: 33521979
Simply right-click on the Databases node and create a new database called 'KenticoCMS'. Then select in your web configuration frontend the second radio button 'Use an existing database' and enter the name. This should do it.

Depending on the permission setup of this CMS you may need to add some permissions to this newly created database. But this should be better answered by the Kentico Software...


mfG
--> stefan <--
0
 

Author Comment

by:goodk
ID: 33523211
so why it is not finding SADB.  I already have that database. See the screenshot please. thanks
0
 

Author Comment

by:goodk
ID: 33530610
stefan, I have followed your instructions but it is still not connecting
Do I have to register the database or do something for it to be visible on the machine???
error message
The database 'KenticoCMS' doesn't exist!
0
 
LVL 36

Expert Comment

by:ste5an
ID: 33531528
So you have created a new database using SSMSE?

Then this sounds more like a wrong setup of ASP.NET and this CMS application. You have to find out which user account is used by the CMS install page and grant full access to this user for you newly created database.

Another possible solution may be: You're running more than one instance of a SQL Server and the CMS install uses such another instance.


mfG
--> stefan <--

0
 
LVL 36

Expert Comment

by:ste5an
ID: 33531568
btw, wer lesen kann ist klar im vorteil.

means: take a look at your screen shot. If the CMS application works in a normal way, then you must grant full access to the NETWORK SERVICE on your database.


mfG
--> stefan <--
0
 

Author Comment

by:goodk
ID: 33536290
I am sorry to ask this,
you mean go to control panel to grant permission to the database?
I am using Vista on a desktop.
0
 
LVL 36

Expert Comment

by:ste5an
ID: 33540545
No, you have to use SSMSE to grant the appropriate persmissions:

 http://technet.microsoft.com/en-us/library/ms178569.aspx


mfG
--> stefan <--
0
 

Author Comment

by:goodk
ID: 33564349
Sorry, it is still did not work. I went and granted all the permissions. Still no luck.
 
Do you want me to send the dump!! thanks
0
 

Author Closing Comment

by:goodk
ID: 34098933
not right, but I learn something.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What we learned in Webroot's webinar on multi-vector protection.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question