SQL Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

I've installed nopCommerce using the Microsoft Web Platform installer. When I run the setup the following SQL error is returned:

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).

I've done nothing but select the default options here so any help would be very much appreciated. I've tired a few various fixes suggested on blog posts but I'm new to SQL server, and none of them have worked.

I'd really like to have a good look at nopCommerce to compare with other carts, but the install is not the easiest to say the least.

Thanks for your help,
Paul.
13 years ago
Is your installation running on a host or on your local machine?

You need to tell the installer the network adress of your SQL server, if your site is hosted then your host will be able to tell you that information, otherwise you need to enter the details for the server on your own machine :)
13 years ago
Thanks for the reply. It's on my local machine - where do I need to enter those details?
13 years ago
Forgive me if I post something that seems really obvious :)

You must have IIS up and running with ASP.NET 4 correctly configured and the site listed as an application.

You must also have SQL Server (or the Express version) running on your machine.

When you first browse to the site, probably using http://localhost/ or however you have it configured for a URL, it will detect that it isn't set-up yet and will run through the configuration process which is probably where you are getting the error?

This process will ask you several simple questions and that is where you enter the relevant information including the address of the SQL server - here you should enter it in the format <MACHINENAME>\<SERVERNAME> eg. thispc\SQLExpress

hope that helps!
13 years ago
I was missing the \SQLExpress tag on the server name. I now have a permissions error when attempting to create a database:

An error occured when creating database: CREATE DATABASE permission denied in database 'master'.

I've Google'd this but I'm not sure I have the full SQL Server software installed. I only added what MS Web Platform has prompted me to. I have SQL Sever 2008 R2 which has Import / Export, Config Manager, Error and Usage and Install Center within there.

I've never used SQL Server and can't see much within those options to configure a database at all.

Some pointers would be appreciated.

Thanks.
13 years ago
pjbursnall wrote:
I was missing the \SQLExpress tag on the server name. I now have a permissions error when attempting to create a database:

An error occured when creating database: CREATE DATABASE permission denied in database 'master'.

I've Google'd this but I'm not sure I have the full SQL Server software installed. I only added what MS Web Platform has prompted me to. I have SQL Sever 2008 R2 which has Import / Export, Config Manager, Error and Usage and Install Center within there.

I've never used SQL Server and can't see much within those options to configure a database at all.

Some pointers would be appreciated.

Thanks.


All you need to do now is create a user with permissions to create a database. Do you have SQL Server Management Studio installed? You can do it through there...

Here is somewhere to start:

http://msdn.microsoft.com/en-us/library/aa337562.aspx
13 years ago
SylverFyre wrote:
Forgive me if I post something that seems really obvious :)

You must have IIS up and running with ASP.NET 4 correctly configured and the site listed as an application.

You must also have SQL Server (or the Express version) running on your machine.


Microsoft's Web Platform Installer does all that for you if you install it correctly - there are a lot of options though, and it is easy to not check one thing that messes it all up.
13 years ago
Web Platform did not install Server Management Studio which I now have installed. Unfortunately I now have the original error when trying to connect to the server. I've tried <pcname> and <pcname\sqlexpress> and neither work. My patience with this is starting to where thin! I've setup trials of 4 other ecommerce carts in the time it's taken me to get this far with nopCommerce!

Thanks for your help.
13 years ago
Try (local) or localhost...
13 years ago
Also, it is possible to install SQL Server on your computer without installing the database engine... I've done it. This will allow you to connect via Management Studio to remote SQL Server instances but not to your own computer - since there is no engine there. You MAY not have installed the engine when you did the install, for whatever reason. It might be a good idea to re-download SQL Express and re-install it.

This is the 32-bit edition:
https://www.microsoft.com/betaexperience/pd/SQLEXPDBMT32/enus/

Because SQL Server checks for so many things before install and has so many options to install at install time, it is easy to fail to install essential parts that you need, I've done this on several occasions causing me to have to re-install.

You need to make sure that the pre-install checks are all green and that the features that you need are checked and installed when you install a full-blown SQL Server. Not sure about Express... it may just be click and go.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.