Error during local install of free version of 8.1

Eric Borisow asked on November 7, 2014 21:01

Hi everyone,

First post - please be gentle. :-)

I'm trying to install Kentico 8.1 on my local machine. I have a local instance of SQL Server 2008 on my machine and I tried creating the database there. Unfortunately, I got this error:

Installation failed.
Creation of DB objects failed.
DB objects creation failed. 
[DataConnection.HandleError]: 

Query: 
CREATE PROCEDURE [Proc_COM_Reports_DeleteSampleData]
    -- Add the parameters for the stored procedure here
    @siteId INT
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    DECLARE @OrderAddressIDs TABLE (ID int);
    DECLARE @CustomerIDs TABLE (CustomerID int, UserID int);

    INSERT INTO @CustomerIDs (CustomerID, UserID) (SELECT CustomerID, ISNULL(CustomerUserID, 0) FROM COM_Customer WHERE CustomerFirstName LIKE 'GENERATED%' AND ((CustomerSiteID = @siteId) OR (CustomerUserID IN (SELECT UserID FROM CMS_UserSite WHERE SiteID = @siteId))));
    INSERT INTO @OrderAddressIDs (ID) ((SELECT OrderBillingAddressID  FROM COM_Order WHERE OrderCustomerID  IN (SELECT CustomerID FROM @CustomerIDs) AND OrderSiteID = @siteId)
                     UNION (SELECT OrderShippingAddressID FROM COM_Order WHERE OrderCustomerID IN (SELECT CustomerID FROM @CustomerIDs) AND OrderSiteID = @siteId))
    DELETE FROM COM_Wishlist WHERE SiteID = @SiteID AND UserID IN (SELECT UserID FROM @CustomerIDs);
    DELETE FROM COM_OrderItem WHERE OrderItemOrderID IN (SELECT OrderID FROM COM_Order WHERE OrderCustomerID IN (SELECT CustomerID FROM @CustomerIDs) AND OrderSiteID = @siteId);
    DELETE FROM COM_OrderStatusUser WHERE OrderID IN (SELECT OrderID FROM COM_Order WHERE OrderCustomerID IN (SELECT CustomerID FROM @CustomerIDs) AND OrderSiteID = @siteId);
    --DELETE FROM COM_Order WHERE OrderNote = '- GENERATED -' AND OrderSiteID = @siteId;    

    DELETE FROM COM_Order WHERE OrderCustomerID IN (SELECT CustomerID FROM @CustomerIDs) AND OrderSiteID = @siteId;
    DELETE FROM COM_OrderAddress WHERE AddressID  IN (SELECT ID FROM @OrderAddressIDs);
    DELETE FROM COM_Address WHERE AddressCustomerID  IN (SELECT CustomerID FROM @CustomerIDs);

    DELETE FROM COM_CustomerCreditHistory WHERE EventCustomerID IN (SELECT CustomerID FROM @CustomerIDs) AND EventSiteID = @siteId;
    DELETE FROM COM_Customer WHERE CustomerID IN (SELECT CustomerID FROM @CustomerIDs);

    DELETE FROM CMS_UserSite WHERE UserID IN (SELECT UserID FROM @CustomerIDs) AND SiteID = @siteId;
    DELETE FROM CMS_User WHERE UserID IN (SELECT UserID FROM @CustomerIDs);
    DELETE FROM @OrderAddressIDs;   
    DELETE FROM @CustomerIDs;
--  INSERT INTO @IDs (ID) SELECT NewsletterID FROM Newsletter_SubscriberNewsletter WHERE SubscriberID IN (SELECT SubscriberID FROM Newsletter_Subscriber WHERE SubscriberFirstName LIKE 'GENERATED -%' AND SubscriberSiteID = @siteId);
    DELETE FROM Newsletter_SubscriberNewsletter WHERE SubscriberID IN (SELECT SubscriberID FROM Newsletter_Subscriber WHERE SubscriberFirstName LIKE 'GENERATED%' AND SubscriberSiteID = @siteId);
    DELETE FROM Newsletter_Subscriber WHERE SubscriberFirstName LIKE 'GENERATED%' AND SubscriberSiteID = @siteId;
END


Caused exception: 
Must declare the scalar variable "@SiteID".

   at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex)
   at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
   at CMS.DataEngine.AbstractDataConnection.CMS.DataEngine.IDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
   at CMS.DataEngine.SqlInstallationHelper.RunSQLQuery(String query, IDataConnection conn, String dbSchema)
   at CMS.DataEngine.SqlInstallationHelper.RunSQLScript(String fileName, IDataConnection conn, String dbSchema)

Does anyone have an idea of what I'm doing wrong?

Thanks, Eric

Correct Answer

Jakub Oravec answered on November 10, 2014 17:07

Hi Eric,

It seems like your SQL Server uses case sensitive collation. We recommend that you change the collation to SQL_Latin1_General_CP1_CI_AS which is case insensitive.

You can check your server collation using: SELECT SERVERPROPERTY('collation');

1 votesVote for this answer Unmark Correct answer

Recent Answers


Charles Matvchuk answered on November 7, 2014 22:50

Is it creating the database ? Does it create any tables then throw the exception ? Almost seems like a permission issue. Please confirm ?

0 votesVote for this answer Mark as a Correct answer

Eric Borisow answered on November 17, 2014 22:58

Sorry for taking so long to reply. I had the collation case-insensitive on the database, but not at the server level. Once I updated that, then the installation completed without any problem.

Thanks, Eric

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.