Copied to clipboard

Flag this post as spam?

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


This forum does not allow new topics to be created, please use the v2 forum from now on.

  • Hamish 95 posts 153 karma points
    May 07, 2010 @ 04:58
    Hamish
    0

    I'm getting an "Invalid object name 'infocaster301'" server error

     

    When I try to "Save & Publish" a page name change in the content tree, I get the following error after installing the package. It appears that it does save it but is just unable to publish the change.

    Server Error in '/' Application.
    Invalid object name 'infocaster301'.
    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 'infocaster301'.

    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 'infocaster301'.]
       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.ExecuteScalar() +139
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +56
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +83
       umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelpers\SqlServer\SqlServerHelper.cs:51
       umbraco.DataLayer.SqlHelper`1.ExecuteScalar(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:194

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteScalar]
       umbraco.DataLayer.SqlHelper`1.ExecuteScalar(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:198
       InfoCaster.Umbraco._301UrlTracker.Base301URLTracker.AddUrlMapping(Document doc, String url, Mapping301Type type, Boolean isChild) +245
       InfoCaster.Umbraco._301UrlTracker.Base301URLTracker.Document_BeforePublish(Document doc, PublishEventArgs e) +182
       umbraco.cms.businesslogic.web.Document.FireBeforePublish(PublishEventArgs e) +27
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +72
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +177
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +46
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 07, 2010 @ 14:42
    Stefan Kip
    0

    Seems like the SQL Table for the 301 URL Tracker has not been created with the installation. Can you provide me with more information about your set-up? (like OS, SQL version, .NET version, Umbraco version, shared hosting?)

  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 07, 2010 @ 14:43
    Stefan Kip
    0

    BTW, for now you can fix it yourself by running the following query:

    CREATE TABLE infocaster301(
     NodeID int NOT NULL,
     OldUrl nvarchar(400) NOT NULL,
     IsCustom bit NOT NULL,
     Message nvarchar(400) NULL,
     Inserted datetime NOT NULL,
     CONSTRAINT PK_infocaster301 PRIMARY KEY CLUSTERED
    (
     NodeID ASC,
     OldUrl ASC
    ) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Custom  DEFAULT ((0)) FOR IsCustom
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Inserted  DEFAULT (getdate()) FOR Inserted 
  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 07, 2010 @ 14:44
    Stefan Kip
    0

    Aight, that didn't go very well, next attempt:

     CREATE TABLE infocaster301(
     NodeID int NOT NULL,
     OldUrl nvarchar(400) NOT NULL,
     IsCustom bit NOT NULL,
     Message nvarchar(400) NULL,
     Inserted datetime NOT NULL,
     CONSTRAINT PK_infocaster301 PRIMARY KEY CLUSTERED
    (
     NodeID ASC,
     OldUrl ASC
    ) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Custom  DEFAULT ((0)) FOR IsCustom
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Inserted  DEFAULT (getdate()) FOR Inserted
  • Hamish 95 posts 153 karma points
    May 10, 2010 @ 05:07
    Hamish
    0

    We are using:

    • windows 2003 server
    • Sql 2000
    • .net 3.5
    • umbraco 4.0.3

    Tried implementing the table above but Sql 2000 reports a syntax error

  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 10, 2010 @ 16:21
    Stefan Kip
    0

    So that's what went wrong, looks like Sql 2000 doesn't support something in the query.

    Do you have any more detailed information about the syntax error?

  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 12, 2010 @ 20:39
    Stefan Kip
    1

    I think I found what caused the SQL Server 2000 problems.

    I added a new package, especially for SQL Server 2000: http://our.umbraco.org/FileDownload?id=835

    Please mark this as answer if it solves your problems :-)

  • Hamish 95 posts 153 karma points
    May 12, 2010 @ 23:11
    Hamish
    0

    Thanks for the update. Just one question regarding the SQL Server 2000 installation, would there be any issues with the installed package if we upgrade the server to SQL 2008 at a later date?

  • Stefan Kip 1606 posts 4098 karma points c-trib
    May 13, 2010 @ 00:37
    Stefan Kip
    0

    Nope, there won't be any issues...

    I created the table and then created a script with Sql 2008 to generate the table.
    So to find out what was wrong with Sql 2000, I generated the script again but for Sql 2000 and there was one difference; on the primary key definition.

    I just removed some Sql crap (maybe I could remove it from the main package, so there's one package for all Sql versions):

    2008:
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    2000:
    ) ON [PRIMARY]

    If I'd use the 2000 syntax for all Sql versions, I don't think anything will break... But to be sure I made two versions. I will look into this tomorrow and decide if I'm going to supply only the 2000 version (compatible with 2005 and 2008) or still two different versions.

    Btw, you didn't mention if it's working now... So, does it? :-D

  • Hamish 95 posts 153 karma points
    May 15, 2010 @ 09:52
    Hamish
    0

    Yeah - the update for SQL 2000 works perfectly. Awesome work - been wanting something like this for ages...

  • Gijs 38 posts 133 karma points
    Apr 27, 2013 @ 23:34
    Gijs
    0

    I had the same problem when installing on SQL Azure.

    I used the statement above, but without the "ON [PRIMARY]" since that's not allowed on Azure.

    My question is, (since this is a 2010 thread) did the data model change with the 1.5.2 version?

  • Gijs 38 posts 133 karma points
    Apr 27, 2013 @ 23:41
    Gijs
    0

    Hmm, apart from the IsRegex bit.

    I found that out myself. ;)

  • Peter Duncanson 430 posts 1358 karma points c-trib
    May 17, 2013 @ 20:26
    Peter Duncanson
    0

    Yep if you are trying to get 301 Url Tracker package running on SQL Azure then you will need to run this script:

    DROP TABLE infocaster301
     CREATE TABLE infocaster301(
     NodeID int NOT NULL,
     OldUrl nvarchar(400) NOT NULL,
     IsCustom bit NOT NULL,
     IsRegex bit NOT NULL,
     Message nvarchar(400) NULL,
     Inserted datetime NOT NULL,
     CONSTRAINT PK_infocaster301 PRIMARY KEY CLUSTERED 
    (
     NodeID ASC,
     OldUrl ASC
    ) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
    )
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Custom  DEFAULT ((0)) FOR IsCustom
    ALTER TABLE infocaster301 ADD CONSTRAINT DF_infocaster301_Custom DEFAULT ((0)) FOR IsRegex
    ALTER TABLE infocaster301 ADD  CONSTRAINT DF_infocaster301_Inserted  DEFAULT (getdate()) FOR Inserted

    To run a query you can use the in Browser manager which should be available in the Dashboard as a link, pretty clever.

    Would be nice to add this to the package itself if it could sniff it out some how? ;)

    Pete

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies