Copied to clipboard

Flag this post as spam?

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


  • Stan 2 posts 22 karma points
    Mar 29, 2010 @ 17:29
    Stan
    0

    Error on Migration: Invalid object name 'umbracoUser'

    Hi there,

    I am having some issues with a migration of an Umbraco based website. Basically we are moving over from a Windows 2003, IIS 6 with MS SQL 2005 to a Windows 2008, IIS7 and MS SQL 2008.

    I have taken a ZIP copy of the website structure and have backed up the database to .bak file and uploaded the file structure from the old install to the new install. Then I have created a new database (unfortuantly I could not keep the same name for the database) and then performed a restore on top of the clean database.

    I have then updated the web config to point to the correct SQL Server, and updated the logon details.

    When I try to open up the site I am getting the following:

    Server Error in '/' Application.



    Invalid object name 'umbracoUser'.





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



    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 'umbracoUser'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1951450
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849003
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2394
    System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
    System.Data.SqlClient.SqlDataReader.get_MetaData() +83
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) +77
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +102
    umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteReader(String commandText, SqlParameter[] parameters) +37
    umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +68

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader]
    umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +126
    umbraco.BusinessLogic.User.setupUser(Int32 ID) +132
    umbraco.BusinessLogic.User..ctor(Int32 ID) +101
    umbraco.BusinessLogic.User.GetUser(Int32 id) +89
    umbraco.content.LoadContentFromDatabase() +82
    umbraco.content.LoadContent() +89
    umbraco.content.get_XmlContentInternal() +81
    umbraco.content.get_XmlContent() +76
    umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e) +887
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    System.Web.UI.Page.OnPreInit(EventArgs e) +8699646
    System.Web.UI.Page.PerformPreInit() +31
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282








    Version Information: Microsoft .NET Framework
    Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927



    span.tracecontent b { color:white } span.tracecontent { background-color:white; color:black;font: 10pt verdana, arial; } span.tracecontent table { clear:left; font: 10pt verdana, arial; cellspacing:0; cellpadding:0; margin-bottom:25} span.tracecontent tr.subhead { background-color:#cccccc;} span.tracecontent th { padding:0,3,0,3 } span.tracecontent th.alt { background-color:black; color:white; padding:3,3,2,3; } span.tracecontent td { color: black; padding:0,3,0,3; text-align: left } span.tracecontent td.err { color: red; } span.tracecontent tr.alt { background-color:#eeeeee } span.tracecontent h1 { font: 24pt verdana, arial; margin:0,0,0,0} span.tracecontent h2 { font: 18pt verdana, arial; margin:0,0,0,0} span.tracecontent h3 { font: 12pt verdana, arial; margin:0,0,0,0} span.tracecontent th a { color:darkblue; font: 8pt verdana, arial; } span.tracecontent a { color:darkblue;text-decoration:none } span.tracecontent a:hover { color:darkblue;text-decoration:underline; } span.tracecontent div.outer { width:90%; margin:15,15,15,15} span.tracecontent table.viewmenu td { background-color:#006699; color:white; padding:0,5,0,5; } span.tracecontent table.viewmenu td.end { padding:0,0,0,0; } span.tracecontent table.viewmenu a {color:white; font: 8pt verdana, arial; } span.tracecontent table.viewmenu a:hover {color:white; font: 8pt verdana, arial; } span.tracecontent a.tinylink {color:darkblue; background-color:black; font: 8pt verdana, arial;text-decoration:underline;} span.tracecontent a.link {color:darkblue; text-decoration:underline;} span.tracecontent div.buffer {padding-top:7; padding-bottom:17;} span.tracecontent .small { font: 8pt verdana, arial } span.tracecontent table td { padding-right:20 } span.tracecontent table td.nopad { padding-right:5 }

    Request Details

    Session Id: auel2a551o3bzseq1bxwt345 Request Type: GET
    Time of Request: 29/03/2010 16:27:25 Status Code: 500
    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)

    Trace Information

    CategoryMessageFrom First(s)From Last(s)
    registerIapplications + Adding application 'umbraco.presentation.nodeFactory.UmbracoSiteMapProviderAccessUpdate
    registerIapplications + Adding application 'Umlaut.Umb.Blog.BlogDateFolder 0.000846755663080084 0.000847
    aspx.page Begin PreInit 0.0926106530299242 0.091764
    umbracoInit handling request 0.0971997837714011 0.004589
    Unhandled Execution Error
    Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader
      at umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters)
      at umbraco.BusinessLogic.User.setupUser(Int32 ID)
      at umbraco.BusinessLogic.User..ctor(Int32 ID)
      at umbraco.BusinessLogic.User.GetUser(Int32 id)
      at umbraco.content.LoadContentFromDatabase()
      at umbraco.content.LoadContent()
      at umbraco.content.get_XmlContentInternal()
      at umbraco.content.get_XmlContent()
      at umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e)
      at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
      at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
      at System.EventHandler.Invoke(Object sender, EventArgs e)
      at System.Web.UI.Page.OnPreInit(EventArgs e)
      at System.Web.UI.Page.PerformPreInit()
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    0.183414931227293 0.086215

    Control Tree

    Control UniqueIDTypeRender Size Bytes (including children)ViewState Size Bytes (excluding children)ControlState Size Bytes (excluding children)
    __Page ASP.default_aspx 0 0 0

    Session State

    Session KeyTypeValue

    Application State

    Application KeyTypeValue
    umbracoUrl System.String www.coffeevolution.co.uk:80/umbraco
    umbracoNeedConfiguration System.Boolean False

    Request Cookies Collection

    NameValueSize

    Response Cookies Collection

    NameValueSize
    ASP.NET_SessionId auel2a551o3bzseq1bxwt345 42

    Headers Collection

    NameValue
    Connection Keep-Alive
    Keep-Alive 115
    Via 1.1 ISA
    Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Accept-Language en-gb,en;q=0.5
    Host www.coffeevolution.co.uk
    User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729)
    X-REWRITE-URL /default.aspx

    Response Headers Collection

    NameValue
    X-AspNet-Version 2.0.50727
    Cache-Control private
    Content-Type text/html

    Form Collection

    NameValue

    Querystring Collection

    NameValue

    Server Variables

    NameValue
    ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_KEEP_ALIVE:115 HTTP_VIA:1.1 ISA HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_ACCEPT_LANGUAGE:en-gb,en;q=0.5 HTTP_HOST:www.coffeevolution.co.uk HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) HTTP_X_REWRITE_URL:/default.aspx
    ALL_RAW Connection: Keep-Alive Keep-Alive: 115 Via: 1.1 ISA Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Language: en-gb,en;q=0.5 Host: www.coffeevolution.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) X-REWRITE-URL: /default.aspx
    APPL_MD_PATH /LM/W3SVC/340/ROOT
    APPL_PHYSICAL_PATH C:\HostingSpaces\C001\coffeevolution.co.uk\wwwroot\
    AUTH_TYPE  
    AUTH_USER  
    AUTH_PASSWORD  
    LOGON_USER  
    REMOTE_USER  
    CERT_COOKIE  
    CERT_FLAGS  
    CERT_ISSUER  
    CERT_KEYSIZE  
    CERT_SECRETKEYSIZE  
    CERT_SERIALNUMBER  
    CERT_SERVER_ISSUER  
    CERT_SERVER_SUBJECT  
    CERT_SUBJECT  
    CONTENT_LENGTH 0
    CONTENT_TYPE  
    GATEWAY_INTERFACE CGI/1.1
    HTTPS off
    HTTPS_KEYSIZE  
    HTTPS_SECRETKEYSIZE  
    HTTPS_SERVER_ISSUER  
    HTTPS_SERVER_SUBJECT  
    INSTANCE_ID 340
    INSTANCE_META_PATH /LM/W3SVC/340
    LOCAL_ADDR 95.215.224.166
    PATH_INFO /default.aspx
    PATH_TRANSLATED C:\HostingSpaces\C001\coffeevolution.co.uk\wwwroot\default.aspx
    QUERY_STRING  
    REMOTE_ADDR 94.194.32.43
    REMOTE_HOST 94.194.32.43
    REMOTE_PORT 60429
    REQUEST_METHOD GET
    SCRIPT_NAME /default.aspx
    SERVER_NAME www.coffeevolution.co.uk
    SERVER_PORT 80
    SERVER_PORT_SECURE 0
    SERVER_PROTOCOL HTTP/1.1
    SERVER_SOFTWARE Microsoft-IIS/7.5
    URL /default.aspx
    HTTP_CONNECTION Keep-Alive
    HTTP_KEEP_ALIVE 115
    HTTP_VIA 1.1 ISA
    HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
    HTTP_ACCEPT_LANGUAGE en-gb,en;q=0.5
    HTTP_HOST www.coffeevolution.co.uk
    HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729)
    HTTP_X_REWRITE_URL /default.aspx

    Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

    If someone could help me out I would be very grateful, if I go to /install I get the logon screen appear but when I enter my details I get the same screen again.

     

    Many thanks.

     

    Stan Ferguson-Smith

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 29, 2010 @ 23:42
    Jan Skovgaard
    0

    Hi Stan

    How did you do the database backup and how did you do the restore?

    If I'm not mistaken there can be some issues when restoring a backup from MSSQL 2005 to 2008...

    /Jan

  • Jay Hamlin 7 posts 27 karma points
    Apr 01, 2010 @ 18:49
    Jay Hamlin
    0

    I am getting the same error on a new install. Windows XP, MS SQL 2008 Express.
    Found mixed answers elsewhere on the web. No luck.
    Any help would be appreciated.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 01, 2010 @ 21:39
    Jan Skovgaard
    0

    Is the umbracoUser mapped to the correct database?

    /Jan

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Apr 01, 2010 @ 21:46
    Peter Dijksterhuis
    0

    Looks like there's a problem with the database. umbracoUser is a table in the umbraco-database. (and often being mistaken with the user that connects to the DB).

    Check if your connection-string is correct and then check if the table actually exists in your DB.

    HTH,

    Peter

  • Tommy Poulsen 514 posts 708 karma points
    Apr 01, 2010 @ 21:47
    Tommy Poulsen
    0

    ... and check if your tables are created using the right db owner (dbo)

    >Tommy

  • Jay Hamlin 7 posts 27 karma points
    Apr 02, 2010 @ 01:57
    Jay Hamlin
    0

    To get past this I finally deleted all and did a fresh install from WPI. 

    It looks like  'umbracoUser' was created in the db by the package,

    once I used that name in step 2/5 (probably the step that builds web.config) all worked well.

    Jay

     

  • Jay Hamlin 7 posts 27 karma points
    Apr 03, 2010 @ 03:20
    Jay Hamlin
    0

    Disregard the part of my last post about 'umbracoUser' created by the package. I'm on my fifth install now - all is working well and I've been able to use any name I wanted.
    Jay

  • Stan 2 posts 22 karma points
    Apr 08, 2010 @ 18:20
    Stan
    0

    Hi there,

    We did the back-up and restore using SQL Backup to a .BAK File.

    One thing that has changed is the database name has changed from CMS_TEST to C001_ce would this be causing the issues?

  • Athar 9 posts 29 karma points
    Apr 17, 2010 @ 22:32
    Athar
    0

    I have download and installed the umbraco and getting the same error. well ofcourse there is umbrac_user us table in the database but I am not sure how do I get the database file.in the web.config file I have updated the connection string but there is no database in the so how its able to read this table? 

    anyhow could help me how do I installed the umbraco database on my sqlserver 08 ?

    regards

  • Anil Reddy 17 posts 37 karma points
    Apr 22, 2010 @ 12:16
    Anil Reddy
    0

    I am going thru the same problem, trying to install my live site to my local, importing database was sucessful now when i try accessing my site on localhost i get this error "Umbraco invalid object name UMBRACOUSER"

    Has anyone found solution to this??

  • javier 59 posts 79 karma points
    Aug 25, 2010 @ 21:22
    javier
    0

     Same problem for me. I use MySql. The solution for me was rename all the tables to upper case. Hope this helps.

  • Amir Khan 1282 posts 2739 karma points
    Oct 20, 2010 @ 01:52
    Amir Khan
    0

    Was this resolved for SQL Server? I'm having the same problem.

  • Richard Walters 14 posts 51 karma points
    Nov 28, 2010 @ 19:58
    Richard Walters
    5

    This one was driving me crazy, as well, but I believe I have found the solution (or at least I know I did in my case).

    The problem is that depending on how Umbraco was installed on the remote server and/or how the db admin tool on that server assigns db users, you may find that the SQL Server 'owner' of your Umbraco tables is something other than "dbo". For instance, if you've created a db log-in called "acme", you may find that on looking at your Umbraco db you see that the table look like this:

    acme.cmsContent
    acme.cmsContentType
    acme.cmsContentTypeAllowedContentType
    acme.cmsContentVersion
    etc.…

    Depending on which schemas are associated with the login you're using to give Umbraco access to this database, these objects may turn out to be effectively 'invisible' to the Umbraco application… and therefore the "invalid object name" error. (I.e., the object name is perfectly valid, just not under the schema you're currently working with.)

    There are at least a couple of different approaches to resolving this, but to avoid surprises later, I decided to reset the owner of the tables to "dbo". To do so, I first ran this handy little snippet against the Umbraco db:

    SELECT 'ALTER SCHEMA dbo TRANSFER ' + SCHEMA_NAME(schema_id) + '.' + name
    FROM sys.tables
    WHERE schema_id != SCHEMA_ID('dbo');

    Which gives you a result set containing one row for each table in your database whose owner is not "dbo". Each row consists of a SQL statement which will reassign that table to the "dbo" schema:

    ALTER SCHEMA dbo TRANSFER acme.cmsContent
    ALTER SCHEMA dbo TRANSFER acme.cmsContentType
    ALTER SCHEMA dbo TRANSFER acme.cmsContentTypeAllowedContentType
    ALTER SCHEMA dbo TRANSFER acme.cmsContentVersion
    etc.…

    Copy this result, paste it into a new SQL query, run it, and voila…! your tables are once again visible to the Umbraco application.

    (Please do remember to back your database up before running any administrative scripts on it!)

  • Lachlann 344 posts 626 karma points
    Jun 07, 2012 @ 21:28
    Lachlann
    0

    Thanks richard,

     

    This worked for me!!

     

    L

  • carbonrb 22 posts 71 karma points
    Jun 22, 2012 @ 00:25
    carbonrb
    0

    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 one line shorthand alternative to Richard Walter's post above):

    exec sp_MSforeachtable 'ALTER SCHEMA dbo TRANSFER ?'

     

    As Richard says, please backup the DB prior to running the above.

     

    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

  • Ovidiu 2 posts 22 karma points
    Aug 05, 2012 @ 16:40
    Ovidiu
    0

    Thanks Richard,

    Saved my day when copying the database for a new Azure install.

     

    Ovidiu

Please Sign in or register to post replies

Write your reply to:

Draft