Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Attaching to SQL Server Management StudioAttaching to SQL Server Management Studio
Previous
 
Next
New Post
4/12/2013 11:30 PM
 

Hi All;

My DNN install is only a (pre) development machine at home (Windows 7) with a very small sample data set. It will never be a production system.  I am developing a social networking site for a non-profit organization as a volunteer; the actual production site will be a Windows server installation with full SQL Server 2008.  Most all of my volunteer hours on this project are at home because of the restrictive facilities at the non-profit.  I develop the site content at home, and then take what I've done  and install it on the non-profit's more robust infrastructure. 

With combination of  DNN 6.2.5 (Framework), SQL EXPRESS 2008 (DB), IIS 7.5, and Win 7 (Professional) as the host, I have not been able to create an empty database in SQL Server Express 2008 apriori and have the DNN install wizard find it. All I get are SQL errors, no matter what combinations I try. The only way I have managed to get through the install is to have the mdf file created in the App_Data directory.  It is a good install, and I can log in and develop the site, but everything breaks when I attach the DNN DB to SQL Server Management Studio.   Others have managed to get around the issue, but I am looking for those magical connection strings for the web.config file specifically for this set of components.  That is, if it is in the realm of possibilities.

The link that was given was for Windows Server, DNN 7, and creating the database ahead of time. This did not work for my situation. 

Regards, Rigel



 
New Post
4/12/2013 11:57 PM
 

Its all about permission locks and the way sql management studio opens and holds a lock on the mdf file - basically there are issues having sql management studio open and a running dnn instance when a mdf file is involved.  There are the same sort of issues if you are using visual studio.

With regard to not being able to get a connection to a sql managed database - it normally comes down to one of two simple settings in the database manager.

If this is a development only environment the quickest route is to just use the system administration account for MS SQL using sql authentication - it just works.

Open MS SQL manager - connect to the server - NOT to your mdf.

Right click on the connected server and select properties.
Click the security tab and change to SQL Server and Windows authentication.
Click on the connections tab and select Allow remote connections to Server
Hit OK to apply these settings.

Right click on the connected server -  and select Restart Server

Open the Security Folder under the connected server.
Open the Users Folder.
Right click on the 'sa' user and select properties.
On the General tab choose a password.
On the Status tab select - Grant permission to connect to the database engine and Grant permission to log in.

Hit ok - and then log out of the database engine.

Now login to the database again - this time using the sa account and the password - instead of using the integrated security.

You sql server is now setup with all the settings needed for DNN to connect to a database hosted by the database engine using SQL Authentication.

Westa

 
New Post
4/13/2013 1:05 PM
 
Hi Westa;

WOOO-EE!! THANK YOU!!!! THANK YOU!!!! THANK YOU!!!! THANK YOU!!!!  (not enough!) 
The default site came up and I logged in as host with the previously reset password, added an admin user, and executed a simple SQL. )
All my SQL Server settings were exactly as you described.  I didn't need to change anything except using the "sa" account and its pw in the connection strings. A defined SQL Server account with database owner privileges on the DNN database did not work. I had tried many different settings and combinations in the connection string, and this is what I ended up with
Let me know if I should change anything. (such as Integrated Security....)  I used a UDL file to test the connection before editing web.config..

<connectionStrings>
<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|MyWebSite.mdf;Database=MyWebSite;User ID=sa;Password=XXXXX" 
providerName="System.Data.SqlClient" />
  </connectionStrings>
  
<appSettings>
    <!-- Connection String for SQL Server 2005/2008 Express - kept for backwards compatability - legacy modules   -->
    <add key="SiteSqlServer" value="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|MyWebSite.mdf;Database=MyWebSite;User ID=sa;Password=XXXXX" />

I had been developing the site on an aged XP laptop with SQL Server 2005, but it was out of power, and I needed to install SQL Service Reporting Services to write the reports (Yet another tool to learn...) I had been using Access to do the reports, connecting via ODBC to the DNN database, but this solution was not acceptable to the IT manager. He wanted SSRS with the reports served from SharePoint on their Intranet. The reports are not for the general community, but for the staff in the organization.

I neededto upgrade to a more current infrastructure anyway, so bought a new core i3 machine with 6 GB memory and Windows 7 (x64) professional, and had installed SQL Server 2008 with SSRS and other tools.  I had tested the configuration with a sample database and its reports. 

Now that I have all the base components operational, my next challenge is to migrate the DNN site from my old development system to this new one...I'll check around for advice on the least painful way to do this. I'm using a number of modules - ActiveForums, Events, etc.  But this was a major step in the right direction!!!

My heartfelt wishes for you and all those you love,
Rigel

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Attaching to SQL Server Management StudioAttaching to SQL Server Management Studio


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