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

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Migration of ASPNET dbo databases Migration of ASPNET dbo databases
Previous
 
Next
New Post
8/6/2013 11:09 AM
 

Yes, I've actually tried that but I get this error (I have the "SiteSqlServer" and my other conn string both pointing to my .NET Membership Users database, though I guess only one would suffice if I understand correctly) when installing:

0:05 Minutes   |   23% ERROR occured - System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'vw_Users' in the database. at System.Data.SqlClient.SqlConnection. (SqlException exception...

And so the stack trace goes on.

Just to make sure I have this correct: Set "InstallMemberRole" to "False", set the "AspNetSqlMembershipProvider" to use my .NET Users database, and set the "SqlDataProvider" to use my .NET Users database. Then browse to the DNN site and run the install. For the Database Configuration before the install, I also entered my Users database.

I believe I have found a way to use my Users database and have DNN use it's own database. I just need to populate the "Users", "UserRoles", and "UserPortals" tables in the DNN database with relevant info from my Users database. I made a simple script to insert the necessary rows in the DNN db for a single user from my Users db and it worked perfectly. Of course the "Authorised" bit must be "True" in "UserPortals" table as well. Any new users that register should work fine, as I mentioned in my original post.

I'd rather not have to mess with SQL, but that is my only option so far, if I want to accomplish my goal.

Thanks much for the help! Any thoughts?

 
New Post
8/7/2013 2:53 PM
 

that's not quite correct - you don't need to adjust the AspNetSqlMembershipProvider value as it's already set to SiteSqlServer - just ensure that both SiteSqlServer connections are pointing to the same database (the function is intended to install DNN into an existing database - we have never tested/supported using one database for DNN and another for the membership database)

I'd always recommend avoiding doing direct SQL access as you can miss a dependant object or/and break referential integrity, but sometimes I guess you have to - when that happens I recommend starting sql profiler and recording what happens when the action occurs e.g. start up profiler (pause it initially), log into your site, go to admin->user accounts and click to add a user and before saving them start the profiler and then inspect what data is written - that said I believe you've identified the relevant tables.


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/7/2013 4:05 PM
 

Hmmm, yes that is unfortunately what I am trying to do (use a separate database for DNN-related data and one for User data - password/username/profile/role/etc). I do realize that the DNN database does have User tables, though, I just wanted the "primary" db to be my Users db.

Yes sir, understood. I'm ambivalent on using a SQL stored procedure to (initially) transfer my Users to the DNN database's Users tables, but after testing it today it seems to work very well. It is guaranteed that new users will register and be added to my Users db, so I've created a trigger on the aspnet_Users table (yeah, not a huge fan of triggers) to insert relevant data into the DNN Users tables. So far so good. I'm ignoring Profile values/data for the time being but from what I understand, I would just need to do some parsing and conversions between the aspnet_Profile table in my Users db and the UserProfile table in the DNN db. Also, thanks for the tip re: SQL Profiler. I will double-check my work with it.

I really appreciate the help and quick responses Cathal :-)

 
New Post
8/9/2013 5:45 AM
 
no problem, glad you got a solution that worked for you. I would recommend though that you have scripts to drop the triggers before doing any upgrades (as many upgrades will touch those core tables and potentially fail due to the triggers), and then to add them back in after the upgrade.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Migration of ASPNET dbo databases Migration of ASPNET dbo databases


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