Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 856
  • Last Modified:

sql express connection

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
goodk
Asked:
goodk
  • 9
  • 7
  • 3
  • +1
1 Solution
 
Chris MangusDatabase AdministratorCommented:
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
 
cyberkiwiCommented:
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
 
goodkAuthor Commented:
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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
cyberkiwiCommented:
[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
 
goodkAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
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
 
goodkAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
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
 
cyberkiwiCommented:
> "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
 
ste5anSenior DeveloperCommented:
> 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
 
goodkAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
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
 
goodkAuthor Commented:
so why it is not finding SADB.  I already have that database. See the screenshot please. thanks
0
 
goodkAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
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
 
ste5anSenior DeveloperCommented:
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
 
goodkAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
No, you have to use SSMSE to grant the appropriate persmissions:

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


mfG
--> stefan <--
0
 
goodkAuthor Commented:
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
 
goodkAuthor Commented:
not right, but I learn something.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 9
  • 7
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now