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 ...ConnectionStrings question in SQL express 2005.ConnectionStrings question in SQL express 2005.
Previous
 
Next
New Post
3/20/2007 6:18 PM
 

I got some confusions about the connection string for SQL express 2005. This is the default connect string for SQL express 2005 in DNN. I have done some testing about the connectionstring setting and got some question about the result. I wish somebody can help me to clearify my confusion.

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

Please see the red words "User Instance = true".

I search the definition of User Instance in MSDN. I found this used for SQL express and AttachDBFilename only.

With "User Instance=True", the connectstring has AttachDBFilename will let SQL express create a new database instance to avoid interfering among each database process created by non-admin user. This look like said if I created two DNN installation in my server. It will create two SQLServer instance. The testing result seems this is right. I really found two SQL instance(two process) if I run two DNN installation. For the  User Instance case, did I think right?

Then I do some more testing. I found if I don't create a database called DotNetNuke and set related setting in the SQL express. The DNN installation will fail. The message said can't login into database specify in connection string. But I don't know why I need to create the Database named DotNetNuke. Because I don't find any informaion about the database name in the connection string. I suppose I should find "Database=DotNetNuke" in the connection string, but I don't . Does anybody know why?

Then I try another connection string.

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

This is the same as the default one except I remove the "User Instance=True;". This time, I can install DNN even I don't have database DotNetNuke in the SQL express. So I got confuse about the result. Why? Why the DNN install will become successful this time? Actually I think two connection should both work, but it doesn't.

Can somebody help me to clearify my confuse? 

One more question about the database, but doesn't related to DNN. How can I setting the database created by AttachDBFilename. I can't load the mdf in the Management studio express. Why I want to set the mdf file is because I found the transition log grow so quickly in my website but I can do nothing about it. I have a license of SQL Server 2005 developer version. Can I found some tools in it to reslove this issue. Of course management studio express is my first priority.

Thank you for spending so much time reading this question.

 
New Post
3/21/2007 1:25 AM
 

Penghh:

I wrote about SQL Express issues yesterday.  You can read it here: http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/118/threadid/116657/scope/posts/Default.aspx

Check out the links to the articles I included in my post, specially the first one.  But you are correct, if you run multiple applications (like DNN) using user instances this will create multiple processes and memory allocations that are not part of the default SQL Express instance.  In my opinion, if you are going to run SQL Express on a server I would not run it using user instances, instead, setup a database in the "Classic" SQL Server way. 

The second link on my previous post points to an article that tells you how to move a user instance file to the main instance and run it in the classic SQL way.  Note that this process is to move a file after you have run the DNN install process, therefore the database is populated with all the DNN tables, structures, and data.  You could also create a new blank database before running the DNN install process but in this case you have to modify the connection string before you attempt to run the DNN install.

Hope this helps.

Carlos

 

 
New Post
3/21/2007 2:52 PM
 

Thank you~~

This is very helpful to me.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...ConnectionStrings question in SQL express 2005.ConnectionStrings question in SQL express 2005.


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