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 ...Converting a Windows Authentication to SQL Server AuthenticationConverting a Windows Authentication to SQL Server Authentication
Previous
 
Next
New Post
12/18/2007 3:59 PM
 

I am working on a large DNN project for a university where they did the original install of DNN and now I am building out content. Actually I am a sub on this project. So I have several weeks worth of content done and the IT department at the university was not sure how to setup backups for the SQL Server Express database. They gave me remote desktop access to the server and I had planned to just install a script that I use on my servers to do backups of my databases. This was my first access to the server.

So I opened up SQL Server Management Studio and did not see any databases, other than the System dbs. Then I looked at the web.config to see what the db name was in the connection string. This is what I saw.

<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />

This was a little foreign to me as all of my DNN installs use a standard SQL connection string with SQL Server authentication. My assumption is that this is a windows authentication setup.

I did some research and saw a post about not being able to see databases setup this way in SQL Server Management Studio. There was a work around mentioned, but I could not get it to work. I spoke with the IT people that setup the DNN instance. This was their first DNN install a couple of months ago. All they could offer was that they followed the instructions. I noticed that the database name was database and that it was located in the DNN app_data folder on another drive (F:). Is this where DNN puts the database? I use DotNetPanel for all my DNN installs now and it has an auto installer. So I am not that familiar with how the manual DNN install works now.

So here was my thought. I copied the database.mdf and database.ldf files over to another SQL Server express I have on another server and attached it there. For some reason I was not able to get it to attach correctly on the university's server. From there I created a database backup (.bak) file.

Then on the university server I created a new database with a SQL Server authenticated user. I was able to force a RESTORE from the .bak file to this new one and now I have a DNN database that is correctly attached to the university SQL Server and has a SQL Server authenticated user login.

My intention was to then change the connection string to more of a standard SQL Server authenticated string like

<add name="SiteSqlServer" connectionString="Server=iarsvr04\SQLExpress;Database=databasename;uid=userid;pwd=password;" providerName="System.Data.SqlClient" />

I also tried (local) on the server, but that did not work.

I am getting errors alluding to the server not accepting remote connections, etc.

So I would appreciate any explanation as to how the DNN install was originally setup and why it would not show up in SQL Server Management Studio. Then I would like to know if my approach of restoring the db to a new db and then changing the connection string is viable. If it is, then what should I check with regards to remote connections?

Thanks for any help you can provide.


Forerunner Communications, LLC
DotNetNuke Integration Specialists

 
New Post
12/19/2007 10:46 AM
 

Cliff,

The initial installation that they completed used the "Dynamic attachment" method to attach the database.  I personally do NOT recommend ever using this method as it becomes a true nightmare to work with, at least in my experiences.

As for the failed connections now that you have the database moved over correctly.  I would first triple check that the SQL Server instance is named correctly.  If you still have an error, could you post the error message?


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
12/21/2007 8:45 PM
 

The guys at PowerDNN helped me out on this.

I agree that the dynamic attachment introduces lots of limitations. I got into this after the fact and was not provided access to the server until after putting in several weeks of data through the DNN interface. Then they needed some help on the database backups and that is when I found this was their very first DNN install and that they had used the non-preferred method during the setup.

Mitchel you were right in that the instance needed to be named correctly. Originally I had tried a full name like iarserver/SQLExpress  but it would not work. So I just tried (local) and that did not work.

There was also an issue with the fact that I did not assign the user to the schemas. I think I read somewhere that that was not required. Ultimately they set the connection string server to (local)/SQLExpress, but I think my original setup (iarserver/SQLExpress ) would have worked if I had had the schema thing setup correctly.

Anyway, we are cooking with gas now and I have tons of content to move over to have the site almost ready by 31 Dec. A great way to spend Christmas break.

Cliff


Forerunner Communications, LLC
DotNetNuke Integration Specialists

 
New Post
12/22/2007 1:11 AM
 

Add this one to the list of reason why you should never use SQL Express :)


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Converting a Windows Authentication to SQL Server AuthenticationConverting a Windows Authentication to SQL Server Authentication


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