Hi. Paul is absolutely right, but the article linked is a bit outdated. In Sql 2005 and later (2008, 2008 R2, etc) you need to run the "ALTER USER" T-SQL command to re-associate the database user with his login, like this:
@Rodion - I should of looked at the SQL version before posting the link ;) I think you'll find that those SP's I pointed to are still part of SQL 2005/2008+ and are still a valid way of performing the task (http://msdn.microsoft.com/en-us/library/ms175475.aspx). It also has the advantage of creating the users if they don't exist but as you pointed out there are other ways of doing this also.
run existing umbraco files locally on my laptop
Hi Guys.. I am newbie in Umbraco, so any help would be highly appreciated.
The case is I have existing umbraco code along with its databases back up. Could you guide me how to run it locally on my computer?
Steps I have done :
- Restore the database back up to my SQL Server R2
- Installed umbraco application in my laptop and open those files in microsoft web matrix
- I have modified the connection string in web.config to connect to my databases but i dont think that was succeed..
and the error i got when running the sites is
When you do a DB restore onto a different server it doesn't restore user logins. This is called orphaned users. See this article for a fix:
http://www.fileformat.info/tip/microsoft/sql_orphan_user.htm
Cheers
Paul
Hi. Paul is absolutely right, but the article linked is a bit outdated. In Sql 2005 and later (2008, 2008 R2, etc) you need to run the "ALTER USER" T-SQL command to re-associate the database user with his login, like this:
@Rodion - I should of looked at the SQL version before posting the link ;) I think you'll find that those SP's I pointed to are still part of SQL 2005/2008+ and are still a valid way of performing the task (http://msdn.microsoft.com/en-us/library/ms175475.aspx). It also has the advantage of creating the users if they don't exist but as you pointed out there are other ways of doing this also.
Cheers
Paul
Thank you for the replies..
I have tried to do
EXEC sp_change_users_login 'Report'
and for some database they returned the orphaned user,, and I fixed it with this code
EXEC sp_change_users_login 'Auto_Fix', 'umbracoUser', NULL, '1234'
then i got this result
The number of orphaned users fixed by updating users was 0.
The number of orphaned users fixed by adding new logins and then updating users was 0.
Does somebody know what went wrong with my database?
does the user already exist on your server. If it does try:
EXEC sp_change_users_login 'Auto_Fix', 'umbracoUser'
otherwise I think it will be
EXEC sp_change_users_login 'Auto_Fix', 'umbracoUser', 'umbracoUser', '1234'
hi guys thanks for the replies..
i have tried all of them,, no success yet :(
can you log onto SQL management studio locally using the credentials you have set up?
Hi Paul...
Yup.. tried your suggestion but still having the same error.. anything I can provide in this forum to help the prosperous helper ? :)
- view the local database in SQL management studio. It has all the Umbraco tables? You must be logging on with something...
- change the connection string to user="sa" and use your local password (possibly blank) - just to get it working we can change later
- provide a screenshot of your managment studio showing the security section expanded...
is working on a reply...