CodeCloudy

Azure | .Net | JQuery | Javascript | Umbraco

Umbraco admin login doesn’t work after migrating Live to Local

on October 2, 2017

Umbraco admin login doesn’t work after migrating Live to Local

Since, The schema is different, can’t login. simply change it for the user.

 

But, in 3rd party hosted remote sql servers where you have less control over, it’s difficult to do this change.

now the user is trying to login using the schema dbo, but the database migrated is having a custom schema. due to this the login can’t access any tables of the database. so, it will continuously give the error invalid object.

in that case, below script is a life saver :

REPLACE BELOW OLDSCHEMA with your old schema.

SELECT ‘ALTER SCHEMA dbo TRANSFER ‘ + s.Name + ‘.’ + o.Name
FROM sys.Objects o
INNER JOIN sys.Schemas s on o.schema_id = s.schema_id
WHERE s.Name = ‘OLDSCHEMA’
And (o.Type = ‘U’ Or o.Type = ‘P’ Or o.Type = ‘V’)

 

you will get below result. and copy and paste in a sql query and execute. Now, all should be good.

ALTER SCHEMA dbo TRANSFER socialse_care.cmsTagRelationship
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTaskType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTask
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoNode
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentType2ContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentTypeAllowedContentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTemplate
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContent
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser2NodeNotify
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentVersion
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDocument
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoServer
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoAccess
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDocumentType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDataType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoAccessRule
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDataTypePreValues
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoCacheInstruction
ALTER SCHEMA dbo TRANSFER socialse_care.cmsDictionary
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoExternalLogin
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLanguage
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoMigration
ALTER SCHEMA dbo TRANSFER socialse_care.cmsLanguageText
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRedirectUrl
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoDomains
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLock
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoLog
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMacro
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMacroProperty
ALTER SCHEMA dbo TRANSFER socialse_care.UCUserSettings
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMemberType
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMember
ALTER SCHEMA dbo TRANSFER socialse_care.cmsMember2MemberGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsContentXml
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPreviewXml
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyTypeGroup
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUser2UserGroup
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup2App
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserGroup2NodePermission
ALTER SCHEMA dbo TRANSFER socialse_care.cmsPropertyData
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoUserStartNode
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRelationType
ALTER SCHEMA dbo TRANSFER socialse_care.umbracoRelation
ALTER SCHEMA dbo TRANSFER socialse_care.cmsTags

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: