Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John C Scott 473 posts 1183 karma points
    Oct 04, 2011 @ 11:08
    John C Scott
    0

    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:

    [SqlException (0x80131904): Invalid object name 'umbracoDomains'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58
       System.Data.SqlClient.SqlDataReader.get_MetaData() +118
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6369073
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6370642
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +228
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +262
       umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteReader(String commandText, SqlParameter[] parameters) +26
       umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +148
    
  • John C Scott 473 posts 1183 karma points
    Oct 04, 2011 @ 12:17
    John C Scott
    0

    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?

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Oct 04, 2011 @ 13:12
    Alex Skrypnyk
    101

    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):

    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
     

    Thanks, Alex

  • saly 1 post 21 karma points
    Apr 30, 2012 @ 08:16
    saly
    0

    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..

     

  • carbonrb 22 posts 71 karma points
    Jun 21, 2012 @ 23:56
    carbonrb
    2

    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

  • Justin Moore 41 posts 100 karma points
    May 11, 2013 @ 17:18
    Justin Moore
    0

    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.

  • AdrianLove 11 posts 33 karma points
    Jun 18, 2014 @ 03:31
    AdrianLove
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft