The web site is a fresh download from codeplex and a blank database has been created with all appropriate credentials.
When the /install runs for the first time to create the database (there are no tables the database is totally empty except for a user with the correct permissions) then I get the YSOD error:
Server Error in '/' Application.
Invalid object name 'umbracoDomains'.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'umbracoDomains'.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
I've fixed this problem but I'd appreciate if any one could shed any light on it.
I ran a SQL trace to see what was going on in the database.
I'm not sure why but the /install just didn't seem to be happening and it was launching into trying to get data from non-existing tables.
So I downloaded the source from codeplex. Got the "total.sql" script from \umbraco\datalayer\SqlHelpers\SqlServer\Sql and ran this manually against the database. This create an empty database. This didn't give me an admin user to login with so I copied one from a known good database. This is all working now.
The two questions I am left with are:
1) Is that likely to cause me any problems?
2) What might have caused the install process not to run?
Run the following SQL statement and output to text and it will generate all of the ALTER statements need to change ownership of the object to DBO(Database Owner):
SELECT 'ALTER SCHEMA dbo TRANSFER ' + s.Name + '.' + p.Name
FROM sys.tables p INNER JOIN
sys.Schemas s on p.schema_id = s.schema_id
WHERE s.Name = 'EXISTING_OWNER_USERNAME'
What you should find is that you are presented with a list of alter statements similar to those below which if you execute will change owner of all tables owned by the owner you specified in the first step and assign ownership to DBO:
ALTER SCHEMA dbo TRANSFER oldowner.cmsContent
ALTER SCHEMA dbo TRANSFER oldowner.cmsContentType
ALTER SCHEMA dbo TRANSFER oldowner.cmsContentTypeAllowedContentType
ALTER SCHEMA dbo TRANSFER oldowner.cmsContentVersion
ALTER SCHEMA dbo TRANSFER oldowner.cmsContentXml
ALTER SCHEMA dbo TRANSFER oldowner.cmsDataType
ALTER SCHEMA dbo TRANSFER oldowner.cmsDataTypePreValues
ALTER SCHEMA dbo TRANSFER oldowner.cmsDictionary
ALTER SCHEMA dbo TRANSFER oldowner.cmsDocument
ALTER SCHEMA dbo TRANSFER oldowner.cmsDocumentType
ALTER SCHEMA dbo TRANSFER oldowner.cmsLanguageText
ALTER SCHEMA dbo TRANSFER oldowner.cmsMacro
ALTER SCHEMA dbo TRANSFER oldowner.cmsMacroProperty
ALTER SCHEMA dbo TRANSFER oldowner.cmsMacroPropertyType
ALTER SCHEMA dbo TRANSFER oldowner.cmsMember
ALTER SCHEMA dbo TRANSFER oldowner.cmsMember2MemberGroup
ALTER SCHEMA dbo TRANSFER oldowner.cmsMemberType
ALTER SCHEMA dbo TRANSFER oldowner.cmsPropertyData
ALTER SCHEMA dbo TRANSFER oldowner.cmsPropertyType
ALTER SCHEMA dbo TRANSFER oldowner.cmsStylesheet
ALTER SCHEMA dbo TRANSFER oldowner.cmsStylesheetProperty
ALTER SCHEMA dbo TRANSFER oldowner.cmsTab
ALTER SCHEMA dbo TRANSFER oldowner.cmsTagRelationship
ALTER SCHEMA dbo TRANSFER oldowner.cmsTags
ALTER SCHEMA dbo TRANSFER oldowner.cmsTemplate
ALTER SCHEMA dbo TRANSFER oldowner.umbracoApp
ALTER SCHEMA dbo TRANSFER oldowner.umbracoAppTree
ALTER SCHEMA dbo TRANSFER oldowner.umbracoDomains
ALTER SCHEMA dbo TRANSFER oldowner.umbracoLanguage
ALTER SCHEMA dbo TRANSFER oldowner.umbracoLog
ALTER SCHEMA dbo TRANSFER oldowner.umbracoNode
ALTER SCHEMA dbo TRANSFER oldowner.umbracoRelation
ALTER SCHEMA dbo TRANSFER oldowner.umbracoRelationType
ALTER SCHEMA dbo TRANSFER oldowner.umbracoStatEntry
ALTER SCHEMA dbo TRANSFER oldowner.umbracoStatSession
ALTER SCHEMA dbo TRANSFER oldowner.umbracoStylesheet
ALTER SCHEMA dbo TRANSFER oldowner.umbracoStylesheetProperty
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUser
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUser2app
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUser2NodeNotify
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUser2NodePermission
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUser2userGroup
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUserGroup
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUserLogins
ALTER SCHEMA dbo TRANSFER oldowner.umbracoUserType
ALTER SCHEMA dbo TRANSFER oldowner.cmsContentTypes
ALTER SCHEMA dbo TRANSFER oldowner.umbracoContent
ALTER SCHEMA dbo TRANSFER oldowner.umbracoContentAll
Can you explain more detail I faced this error for 2 weeks and I could not move forward or upload my webiste. My website is working well in my computer as localhost but when I uploaded it to ixwebhosting I faced this error.
From what I can gather, when the Umbraco database is created, a new schema is created and all tables are created under this schema (eg. . rather than dbo.).
If you are using an existing database (eg. if you are copying a site), the credentials used to access the site are often changed, meaning the Umbraco data access layer may be trying to find oldUser.tables rather than newUser.tables.
I have found that changing the schema to dbo resolves this problem and can be achieved (as long as only the Umbraco tables for you website are contained in the database) with the following SQL script (this is a shorthand alternative to Alex's post above):
exec sp_MSforeachtable 'ALTER SCHEMA dbo TRANSFER ?'
For more details, I have recently written an article on copying an Umbraco Website found at the following URL:
You also get this error if you have no database in your connection string. I was doing some careless copy and pasting in my web.config recently and got this.
Invalid object name 'umbracoDomains'.
Getting an error trying to install a new instance of 4.71 with a SQL 2005 database.
It has been suggested on this page http://stackoverflow.com/questions/4736918/invalid-object-name-umbracodomains that this could be due to having a non case-insensitive collation. The collation I have is the standard Latin1_general_CI_AS where CI is case insensitive.
The web site is a fresh download from codeplex and a blank database has been created with all appropriate credentials.
When the /install runs for the first time to create the database (there are no tables the database is totally empty except for a user with the correct permissions) then I get the YSOD error:
Server Error in '/' Application.
Invalid object name 'umbracoDomains'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'umbracoDomains'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
I've fixed this problem but I'd appreciate if any one could shed any light on it.
I ran a SQL trace to see what was going on in the database.
I'm not sure why but the /install just didn't seem to be happening and it was launching into trying to get data from non-existing tables.
So I downloaded the source from codeplex. Got the "total.sql" script from \umbraco\datalayer\SqlHelpers\SqlServer\Sql and ran this manually against the database. This create an empty database. This didn't give me an admin user to login with so I copied one from a known good database. This is all working now.
The two questions I am left with are:
1) Is that likely to cause me any problems?
2) What might have caused the install process not to run?
Hi John,
Couple days ago, I had this problem.
The Solution:
Run the following SQL statement and output to text and it will generate all of the ALTER statements need to change ownership of the object to DBO(Database Owner):
What you should find is that you are presented with a list of alter statements similar to those below which if you execute will change owner of all tables owned by the owner you specified in the first step and assign ownership to DBO:
Thanks, Alex
Hi Alex,
Can you explain more detail I faced this error for 2 weeks and I could not move forward or upload my webiste. My website is working well in my computer as localhost but when I uploaded it to ixwebhosting I faced this error.
Please help me I am waiting for your kind reply..
Hi Sally,
From what I can gather, when the Umbraco database is created, a new schema is created and all tables are created under this schema (eg. . rather than dbo.).
If you are using an existing database (eg. if you are copying a site), the credentials used to access the site are often changed, meaning the Umbraco data access layer may be trying to find oldUser.tables rather than newUser.tables.
I have found that changing the schema to dbo resolves this problem and can be achieved (as long as only the Umbraco tables for you website are contained in the database) with the following SQL script (this is a shorthand alternative to Alex's post above):
exec sp_MSforeachtable 'ALTER SCHEMA dbo TRANSFER ?'
For more details, I have recently written an article on copying an Umbraco Website found at the following URL:
http://www.carbonsoft.co.uk/articles/2012/06/copying-an-umbraco-instance.aspx
I hope this helps,
Richard
You also get this error if you have no database in your connection string. I was doing some careless copy and pasting in my web.config recently and got this.
You could also get this error if you're a dork like I am and forgot to resore the database (even if the webconfig is correct)
Derp!
is working on a reply...