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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DNN logins donDNN logins don't work after moving DB to new host
Previous
 
Next
New Post
9/23/2007 10:51 PM
 

I had this problem, and discovered my DB on my new server had orphaned users (see aarsys reply, it looks to be along the lines of what you need to do).  But for more, check out:

http://support.microsoft.com/kb/314546

http://technet.microsoft.com/en-us/library/ms175475.aspx

I'm sure you'll have it sorted in no time - I had no probs "de" orphaning the users, and away it went! :)  Good luck.

Duncan.

 
New Post
9/23/2007 11:46 PM
 

Hi psiegers,

I often update my dev site, from my live site, including it's DB, to keep a copy in Dev as close as possible to the live version.  When I do a db restore, I do a full restore using the sql db from the live site.  I know this isn't perhaps the normal way of doing it, but I don't know how to keep the two sites synchronized, so I was forced to find a solution for continuously needing to fix the db logins.  This is what I found.

The db logins are not necessarily the same, even though they may be named the same in your connection strings in the web.config file.  For example, if your login is "mysite" and your db is "mysite_db" one one host, and you move to another host, even with the exact same connection strings, it may not work and allow you a login. So, this sql statement "fixes" that issue automatically.  This is executed in the db in the query window.  So if you can connect to your db, with any sql software that will allow you to run a query, it should work.  SQLExpress works for me when I do this.

<code>

EXEC sp_change_users_login 'Auto_Fix', 'yourdbname', NULL, 'yourlogin'
GO

</code>

So, if you know the db name, the login name, and the strings are correct in web.config, connect to your db via an sql manager of some kind, run this query and you should be fine.

Clay

 
New Post
9/24/2007 11:01 AM
 

Hi Clay, ok so you're keeping the dev site actualized from the live site, while I the other way around. I guess you have your own reasons, but I do this because working remotely costs lots of extra (internet) time, while working locally speeds up the internet response at least by a factor 10, there are times much more.

Anyways, about the logins, yes I know now they are not the same even if their name is the same. I don't know then why until now it always has worked for me... the admin panel shows me the sql logins are correctly assigned after a restore, and I can also manage the DB remotely using the same sql login (from Sql Server 2005 Management Studio Express). I guess hosting environments do differ in their DB constraints, so I may have been lucky until now.

Thanx for the script anyway, it could help me when doing a restore on a different host. One Q though: If the login(s) do not work then there's no way you can even connect to the DB remotely... so how to run the query then?

 
New Post
9/24/2007 11:06 AM
 

Hi Duncan, thanx for the information - I'll have a closer look into orphaned users to determine if my problem is related with that.

Updated: I found out that I had one orphaned user; I had this login created on my local DB to be able to use it on a new host, but since that host didn't work out, we created a new package on the same host and it turned out that both DBs now live on the same SQL box, with different names but both had the same sql login defined. So I removed the login where I don't need it (my develop DB) and dropped and recreated the same login in the new client DB, and that problem is now solved. Once again thanx Duncan - I can now move on to port the dev site to the new one.

 
New Post
9/24/2007 11:35 AM
 

psiegers wrote

Hi Duncan, thanx for the information - I'll have a closer look into orphaned users to determine if my problem is related with that.

You can check for orphaned users (hopefully you've had a look at those pages), byt running:

USE <database_name>;
GO; 
sp_change_users_login @Action='Report';
GO;

And it says...

The output lists the users and corresponding security identifiers (SID) in the current database that are not linked to any SQL Server login.

Do let us know how you get on.  Duncan.

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DNN logins donDNN logins don't work after moving DB to new host


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