Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Cannot get a brand new install to work - Upgrade Error; Could not connect to databaseCannot get a brand new install to work - Upgrade Error; Could not connect to database
Previous
 
Next
New Post
2/22/2006 10:30 AM
 

Hi!  The good news is that there is only a finite number of possibilities...actually, they are a rather small finite number

I know that your connection string is not correct, so let's try to connect to your database first.

1) If possible open SQL Server Management Studio (SSMS).
2) You will see a "Connect To Server" dialog window.  Use the following values:
      a) Server Type: Database Engine
      b) Server Name: .\ThisIsWhatNeedsToBeYourSQLSrvInstance - Note that there is a DOT with a backslash "\" rather than a forward slash as you show above.  If your machine name shows you can use this in place of the "." DOT.  Either is fine...
      c) Authentication: Windows Authenticatioin
3) Once connected on the left you "should" see an "Object Explorer" pane that will allow to expand the Database leaf - Expand the Database leaf to view all the databases (Microsoft install some by default).
4) If you do NOT see your database, which you show to be test2, then repeat steps 2 & 3 until you find it.  You can also create a database called test2 at this point, but do not do so until you've first searched for it because the possible locations where it could be might include something like:
      a) .\SQLExpress (which is installed when installing some/most versions of Visual Studio 2005.
      b) .\MSSQLServer2005 - just an example...this is your SQL 2K5 instance, OR
      c) .\MSSQLServer2000 - just an example - this would be your SQL 2K instance "if" you have this installed.
5) "If" you find your test2 database located under (c) in Step 4, then you will want to create a new database, test2, for your SQL 2005 Server.  An obvious distinction between these two versions is that SQL 2000 will show "SQL Server 8.0.2039" in the Summary tab when selected, and SQL 2005 will show "SQL Server 9.0.1399".  Use the later if you do not find your test2 database under the Database leaf in the Object Explorer.

Now that we have verified "where" your database is check to see if there are any tables in this database.  If so delete it to simply start "clean".  Next expand the "Security" leaf that is off the registered SQL Server (same level as Database and NOT under the test2 database you created). Under Logins verify that there is a test2 uid.  If you find it delete it (I'll explain...), and then right click over Logins and select "New Login...".Add a Login Name of "test2" and click the SQL Server Authentication radio button.  Add the pwd of "test2" and confirm it's entry. Just below this uncheck "Enforce password expiration" and "User must change..." check boxes.  Click OK to create the new Login account.  (I had you delete this Login just to make sure that you password, test2, was correct.).

Right click on your new Login, test2, and select Properties (I know, I brought you right back to that previous windows...  ).  From the left select "User Mappings".  Locate the "test2" database and check the checkbox.  In the "User" column make sure "test2" is entered.  In the lower panel, "Database role membership for: test2" check db_owner and public (if not check already).  This gives this Login dbo rights, which are needed.

You are all set to try to load your site again.  Your connection string will be similar to the following:
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules -->
    <add key="SiteSqlServer" value="Server=.\ThisIsWhatNeedsToBeYourSQLSrvInstance ;Database=test2;uid=test2;pwd=test2;"/>

Delete or comment out the SQLExpress connect string, if it exists in your web.config.  Since I couldn't user screenshots this was a bit verbose, so I apologize.  I'm not going to call you clueless, but put your firewall back on.  What you are doing that is correct is "digging in".  Before you know it you will be helping others out with connection issues!!!  If you would like you can email me at itfriend@dls.net, but I prefer to keep all the dialog here so others might benefit.

Best of Luck! John

 
New Post
2/22/2006 10:55 AM
 

John,

 

Thanks very much.  Your detailed reply has helped me discover the problem which was, of course, caused by my inexperience with SQL.

 

I had created the test2 account as a local Windows account and not an SQL account.  The connection string, of course, was specifying use of an SQL account.  I had assumed that making the account listed in the SQL server logins would ‘integrate’ the account.

 

I now have a working DNN on which I can experiment.

 

Thanks again for your great help!

 
New Post
2/22/2006 12:19 PM
 
Great to hear and you are very welcome! John
 
New Post
2/24/2006 1:18 PM
 

Hi John,

Thank you for provided the very detailed information included in this string as it helped to solve my problem connecting to SQL Server. I was attempting to install DNN V3.2.2 on a Windows XP Pro platform with a SQL 2000 database.

Prior to reading your instructions I had not found a workable solution other than a post from a blog on dotnetjunkies.com suggesting using different connections string parameters and adding the ASPNET user account to the database. While this approach worked I recieved a response from a member of the DNN team advising against it and still had no alternative solution.

As it turns out the connection string you detailed above lead me to start the installation over but this time I included the ".\" before my SQL instance name and deleted and re-added the login to SQL Server. Finally, success!   Much appreciated.

 
New Post
2/28/2006 6:43 AM
 
I don`t know, if you get this finally running, but I guess you have an error in your connection string. YOu must use a backslash instead of an slash like

Server=127.0.0.1/MSSQLSERVER;Database=test2;uid= test2;pwd= test2;

to

Server=127.0.0.1\MSSQLSERVER;Database=test2;uid= test2;pwd= test2;


regards

mackensy



 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Cannot get a brand new install to work - Upgrade Error; Could not connect to databaseCannot get a brand new install to work - Upgrade Error; Could not connect to database


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out