+1-888-365-2779
Try Now
More in this section

Forums / Deployment / 3.7 SP3 -> SP4 - SQL Error

3.7 SP3 -> SP4 - SQL Error

11 posts, 0 answered
  1. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    Hi,

    I updated my sitefinity install to SP4 a few weeks ago, and it has been working well on my Dev and Pre-Prod environments...

    Im now trying to release this new version in Production, with some custom changes I've made...

    But i'm getting this error:

    Server Error in '/' Application.

    Cannot find the object "sf_CmsWebControl" because it does not exist or you do not have permissions.

    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: Cannot find the object "sf_CmsWebControl" because it does not exist or you do not have permissions.

    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): Cannot find the object "sf_CmsWebControl" because it does not exist or you do not have permissions.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
       System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +192
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +317
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecSchemaChange(String change) +84
       Nolics.ORMapper.Base.OdbDataProvider.Upgrade() +88
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +396
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.Cms.CmsWorkflowService..ctor() +32
       Telerik.Cms.CmsWorkflowService..cctor() +21
    
    [TypeInitializationException: The type initializer for 'Telerik.Cms.CmsWorkflowService' threw an exception.]
       Telerik.Cms.CmsWorkflowService.Initialize() +0
       Telerik.Cms.CmsManager.OnInitialized() +5
       Telerik.ManagerBase`1.Initialize() +505
       Telerik.ManagerBase`1..ctor(String providerName) +21
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +44
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    


    As I said, it was working in dev and pre-prod environments, there's a few configurations that changed, another database, but since the database was working with the previous version, I dont understand what is going on. The rights for the user are probably less permissive, is it trying to create, modify or drop a table, or something like that ?

    Any input is welcome...

    Thank you,

    Olivier
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hi Olivier,

    The following table - sf_CmsWebControl does not exist in your database ( it has been removed manually or you have not migrated it) or the database user does not have permissions over it.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    Ok, thanks, but it's the error message ;)

    The table exists, my db user had the necessary rights for it in my previous release of sitefinity. And im not changing the database, just the website...

    Which rights are needed ?

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hi Olivier,

    You have to be db_reader and db_writer

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    Hi, is it possible that the table sf_CmsWebControl changed with the last patch ? I have 1 more column on my pre-prod server...

    The extra column is [IsCategorized]...
  6. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    And also, my prod db user has grant select, insert, update, delete and execute...

    But not alter... Which is normal...

    The pre-prod/dev db user was db_owner.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hello Olivier,

    This is the table script - you do not have this table in your database or the user does not have permissions over it and this is what the error suggests.

    SET ANSI_NULLS ON
    GO
     
    SET QUOTED_IDENTIFIER ON
    GO
     
    CREATE TABLE [dbo].[sf_CmsWebControl](
        [Name] [nvarchar](50) NULL,
        [ID] [uniqueidentifier] NOT NULL,
        [IsCategorized] [bit] NULL,
     CONSTRAINT [PK_sf_CmsWebControl] PRIMARY KEY CLUSTERED
    (
        [ID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]
     
    GO
     
    ALTER TABLE [dbo].[sf_CmsWebControl] ADD  DEFAULT (newid()) FOR [ID]
    GO


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    Ok, thanks, but you only answer partially to my question...

    Do you know if the table structure changed with the latest Service Pack or recently ?

    Is Sitefinity supposed to be able to alter tables ?

    I'm asking because I dont have full rights on production servers, I have to ask a DBA to alter, create or delete tables... And it's the same for the Sitefinity database user...

    So, when there's an official patch to Sitefinity, do you automatically alter tables ?

    Thanks

    Olivier
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hello Olivier,

    Yes this column is added since Sitefintiy SP4. It looks like you have not upgraded the project properly or it has been upgraded partially. This column IsCategorized should be added the the table. You can create it manually. We added the column to this table to fix an issue with renaming category from backend UI.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Olivier
    Olivier avatar
    57 posts
    Registered:
    09 Jul 2010
    14 Oct 2010
    Link to this post
    Thank you for the feedback.

    I upgraded to SP4 with the standard patch, a zip containing some files... I didnt want to reinstall because we have a lot of custom developments. Sitefinity seems to update the database by itself since the new column is in my dev database, where Sitefinity has all the rights needed to alter tables...

    Are there others tables that were modified or created ? I have less tables in production...

    Do you have a complete update script that I could run myself ?

    Or if i give the db user the rights it need to create/alter tables, temporarily, will it work ?

    Thanks,

    Olivier
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Oct 2010
    Link to this post
    Hi Olivier,

    Upgrade the database on your local server where you can work in full trust and then restore a backup to the production or just restore your staging database if there are no changes to the content. We use datalayer that makes all queries and creates the tables and this is why we do not have upgrade scripts.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
11 posts, 0 answered