No, you should not get errors when you run the SQL. It was built with a cursor so that it would avoid referrential integrity constraints. You should not have any of the queries in the loop returning more than one result either.
You may have missing constraints on your aspnet_ tables.
I wouldn't try to force it back to upgrade from Beta (3.0.12).
It would be better to do a fresh install on a different DB and compare the tables to see that all the constraints are the same.
You can also look at the sql scripts in the providers/dataprovider/sqldataprovider folder
This error (for us) was the result of having more than one user account with the same username. You can verify this by running the first script mentioned in this thread. If any of the records returned have identical usernames, that's your issue.
For us, this happened when registering "test" as a user, having it seemingly fail, trying again, etc. The result was numerous partial records with identical names.
Go thru the redundant records, manually renaming them (i.e., for multiple "username" accounts, rename them as: username1, username2, username3, etc.) and then run the script fix again.
I installed DNN 3.1.0 a couple of days ago and had a similar problem. I had created three parent portals and kept getting the "Site not Available" error when trying to update anything on the portal settings. I found some information on users being messed
up and tried going into the "users" tab as host. That's when I got the "User Accounts is currently unavailable".
I found this thread and ran John's scripts to get rid of the bad users and it now works great!
Thanks a ton. That explains a LOT. I will try to manually repopulate the table. I'll let you know if this works in case anyone else runs in to the problem.
John,
I went to another DNN instance I had on the same server only to discover that the Users table there is ALSO missing its Email column. So my suspicion is that one of the third party modules I installed somewhere along the way (on each of these instances) played
a role in making the column vanish.
I plan to manually copy the email data from the ASPNET_membership table to the Users column, but I need the following info:
What is the exact name/characteristics (datatype/width) of the email column in the Users table?
What's the foreign key that links the User table to ASPNET_membership, since the userID in Users is an INT and the userID in aspnet_membership looks like a guid?
THANKS! I've been going a bit buggy trying to track this down (no pun intended).
There are no Foriegn Keys to the aspnet_ tables, they are kept in sync through a "lazy load" mechanism in code.
They are joined by Username.
Here's the script from the 3.0.13 Sql provider :
ALTER TABLE {databaseOwner}{objectQualifier}Users ADD
Email nvarchar(256) NULL
GO
UPDATE {databaseOwner}{objectQualifier}Users
SET Email = dbo.aspnet_Membership.Email
FROM dbo.aspnet_Membership
INNER JOIN dbo.aspnet_Users on dbo.aspnet_Membership.UserId = dbo.aspnet_Users.UserId
WHERE {databaseOwner}{objectQualifier}Users.Username = dbo.aspnet_Users.Username
GO
This behaviour seems to be reproducable by creating a fresh install of DNN, creating a new superuser account and then deleting the default host account.
J7Mitch
Star
13145 Points
2632 Posts
Re: User Accounts is currently unavailable
Jun 20, 2005 07:39 PM|LINK
You may have missing constraints on your aspnet_ tables.
CybrEnergy
Member
381 Points
94 Posts
Re: User Accounts is currently unavailable
Jun 20, 2005 08:07 PM|LINK
Is there a way that I can fix these? Should (or could) I try to force the install process to run again somehow?
J7Mitch
Star
13145 Points
2632 Posts
Re: User Accounts is currently unavailable
Jun 20, 2005 09:36 PM|LINK
It would be better to do a fresh install on a different DB and compare the tables to see that all the constraints are the same.
You can also look at the sql scripts in the providers/dataprovider/sqldataprovider folder
jgravelle
Participant
950 Points
190 Posts
Re: User Accounts is currently unavailable
Jun 22, 2005 11:46 AM|LINK
This error (for us) was the result of having more than one user account with the same username. You can verify this by running the first script mentioned in this thread. If any of the records returned have identical usernames, that's your issue.
For us, this happened when registering "test" as a user, having it seemingly fail, trying again, etc. The result was numerous partial records with identical names.
Go thru the redundant records, manually renaming them (i.e., for multiple "username" accounts, rename them as: username1, username2, username3, etc.) and then run the script fix again.
-jjg
frycdf
Member
115 Points
23 Posts
Re: User Accounts is currently unavailable
Jun 22, 2005 08:35 PM|LINK
I installed DNN 3.1.0 a couple of days ago and had a similar problem. I had created three parent portals and kept getting the "Site not Available" error when trying to update anything on the portal settings. I found some information on users being messed up and tried going into the "users" tab as host. That's when I got the "User Accounts is currently unavailable".
I found this thread and ran John's scripts to get rid of the bad users and it now works great!
Thanks!
ayazoglu
Member
120 Points
24 Posts
Re: User Accounts is currently unavailable
Jun 22, 2005 10:43 PM|LINK
i installed DNN 3.1.0 had a similar problem. I had created three parent portals and kept getting the "Site not Available" error ...
DotNetNuke Upgrade Error
The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] )
[MESSAGE]
how can you solve this problem?
dgerding
Member
55 Points
11 Posts
Re: User Accounts is currently unavailable
Jun 28, 2005 08:26 PM|LINK
Dave Gerding
dgerding
Member
55 Points
11 Posts
Re: User Accounts is currently unavailable
Jun 28, 2005 08:34 PM|LINK
I went to another DNN instance I had on the same server only to discover that the Users table there is ALSO missing its Email column. So my suspicion is that one of the third party modules I installed somewhere along the way (on each of these instances) played a role in making the column vanish.
I plan to manually copy the email data from the ASPNET_membership table to the Users column, but I need the following info:
- What is the exact name/characteristics (datatype/width) of the email column in the Users table?
- What's the foreign key that links the User table to ASPNET_membership, since the userID in Users is an INT and the userID in aspnet_membership looks like a guid?
THANKS! I've been going a bit buggy trying to track this down (no pun intended).Dave Gerding
J7Mitch
Star
13145 Points
2632 Posts
Re: User Accounts is currently unavailable
Jun 29, 2005 02:27 AM|LINK
[Email] [nvarchar] (256) NULL
There are no Foriegn Keys to the aspnet_ tables, they are kept in sync through a "lazy load" mechanism in code.
They are joined by Username.
Here's the script from the 3.0.13 Sql provider :
ALTER TABLE {databaseOwner}{objectQualifier}Users ADD
Email nvarchar(256) NULL
GO
UPDATE {databaseOwner}{objectQualifier}Users
SET Email = dbo.aspnet_Membership.Email
FROM dbo.aspnet_Membership
INNER JOIN dbo.aspnet_Users on dbo.aspnet_Membership.UserId = dbo.aspnet_Users.UserId
WHERE {databaseOwner}{objectQualifier}Users.Username = dbo.aspnet_Users.Username
GO
shazelton
Member
137 Points
24 Posts
Re: User Accounts is currently unavailable
Jul 07, 2005 10:46 AM|LINK
This was using a clean install of version 030013.
Fixed by using the above SQL scripts