Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > Demo Installation Problem during db creation View modes: 
User avatar
Member
Member
crsmith-epri - 12/12/2009 3:32:21 PM
   
Demo Installation Problem during db creation
I'm trying out the demo, but having installation problem. Assuming tech support isn't available on weekends, I thought I'd see if anyone here has a solution.

Setup:
XP Pro (x64)
VS 2005
.NET 2
SQL 2005 Developer Edition (x64)


During the installation of: Running query: proc_analytics_processlog.sql, I receive the following error message.

Thanks.



ERROR: An error occured: [DataConnection.ExecuteQuery]: Query: -- ============================================= -- Author: Name -- Create date: 25.7.2007 -- Description: Stores log records to DB -- ============================================= CREATE PROCEDURE [Proc_Analytics_ProcessLog] @SiteID int, @Codename nvarchar(50), @Culture nvarchar(10), @ObjectName nvarchar(450), @ObjectID int, @Hits int, @HourStart datetime, @HourEnd datetime, @DayStart datetime, @DayEnd datetime, @WeekStart datetime, @WeekEnd datetime, @MonthStart datetime, @MonthEnd datetime, @YearStart datetime, @YearEnd datetime AS BEGIN /* Declare the @statisticsID variable */ DECLARE @statisticsID int; SET @statisticsID = 0; SELECT @StatisticsID = StatisticsID FROM Analytics_Statistics WHERE (StatisticsSiteID = @SiteID) AND (StatisticsCode = @Codename) AND ((StatisticsObjectName = @ObjectName) OR (StatisticsObjectName IS NULL AND @ObjectName IS NULL)) AND ((StatisticsObjectID = @ObjectID) OR (StatisticsObjectID IS NULL OR @ObjectID IS NULL)) AND ((StatisticsObjectCulture = @Culture) OR (StatisticsObjectCulture IS NULL AND @Culture IS NULL)); /* If @statisticsID is 0 insert new record */ IF @statisticsID = 0 BEGIN INSERT INTO Analytics_Statistics (StatisticsSiteID, StatisticsCode, StatisticsObjectName, StatisticsObjectID, StatisticsObjectCulture) VALUES (@SiteID, @Codename, @ObjectName, @ObjectID, @Culture); /* Get StatisticsID */ SELECT @StatisticsID = StatisticsID FROM Analytics_Statistics WHERE (StatisticsSiteID = @SiteID) AND (StatisticsCode = @Codename) AND ((StatisticsObjectName = @ObjectName) OR (StatisticsObjectName IS NULL AND @ObjectName IS NULL)) AND ((StatisticsObjectID = @ObjectID) OR (StatisticsObjectID IS NULL OR @ObjectID IS NULL)) AND ((StatisticsObjectCulture = @Culture) OR (StatisticsObjectCulture IS NULL AND @Culture IS NULL)); END /* Declare @hitsID and @hitsCount variables */ DECLARE @hitsID int, @hitsCount int; SET @hitsCount = 0; SET @hitsID = 0; /* HOURS */ SELECT @hitsID = HitsID, @hitsCount = HitsCount FROM [Analytics_HourHits] WHERE HitsStatisticsID=@statisticsID AND HitsStartTime=@HourStart AND HitsEndTime=@HourEnd; IF @hitsID > 0 UPDATE [Analytics_HourHits] SET HitsCount=(@hitsCount+@Hits) WHERE HitsID=@hitsID; ELSE INSERT INTO [Analytics_HourHits] ([HitsStatisticsID],[HitsStartTime],[HitsEndTime],[HitsCount]) VALUES (@statisticsID,@HourStart,@HourEnd,@Hits); /* DAYS */ SET @hitsID = 0; SELECT @hitsID = HitsID, @hitsCount = HitsCount FROM [Analytics_DayHits] WHERE HitsStatisticsID=@statisticsID AND HitsStartTime=@DayStart AND HitsEndTime=@DayEnd; IF @hitsID > 0 UPDATE [Analytics_DayHits] SET HitsCount=(@hitsCount+@Hits) WHERE HitsID=@hitsID; ELSE INSERT INTO [Analytics_DayHits] ([HitsStatisticsID],[HitsStartTime],[HitsEndTime],[HitsCount]) VALUES (@statisticsID,@DayStart,@DayEnd,@Hits); /* WEEKS */ SET @hitsID = 0; SELECT @hitsID = HitsID, @hitsCount = HitsCount FROM [Analytics_WeekHits] WHERE HitsStatisticsID=@statisticsID AND HitsStartTime=@WeekStart AND HitsEndTime=@WeekEnd; IF @hitsID > 0 UPDATE [Analytics_WeekHits] SET HitsCount=(@hitsCount+@Hits) WHERE HitsID=@hitsID; ELSE INSERT INTO [Analytics_WeekHits] ([HitsStatisticsID],[HitsStartTime],[HitsEndTime],[HitsCount]) VALUES (@statisticsID,@WeekStart,@WeekEnd,@Hits); /* MONTHS */ SET @hitsID = 0; SELECT @hitsID = HitsID, @hitsCount = HitsCount FROM [Analytics_MonthHits] WHERE HitsStatisticsID=@statisticsID AND HitsStartTime=@MonthStart AND HitsEndTime=@MonthEnd; IF @hitsID > 0 UPDATE [Analytics_MonthHits] SET HitsCount=(@hitsCount+@Hits) WHERE HitsID=@hitsID; ELSE INSERT INTO [Analytics_MonthHits] ([HitsStatisticsID],[HitsStartTime],[HitsEndTime],[HitsCount]) VALUES (@statisticsID,@MonthStart,@MonthEnd,@Hits); /* YEARS */ SET @hitsID = 0; SELECT @hitsID = HitsID, @hitsCount = HitsCount FROM [Analytics_YearHits] WHERE HitsStatisticsID=@statisticsID AND HitsStartTime=@YearStart AND HitsEndTime=@YearEnd; IF @hitsID > 0 UPDATE [Analytics_YearHits] SET HitsCount=(@hitsCount+@Hits) WHERE HitsID=@hitsID; ELSE INSERT INTO [Analytics_YearHits] ([HitsStatisticsID],[HitsStartTime],[HitsEndTime],[HitsCount]) VALUES (@statisticsID,@YearStart,@YearEnd,@Hits); END : caused exception: Must declare the scalar variable "@StatisticsID". Must declare the scalar variable "@StatisticsID".

User avatar
Kentico Support
Kentico Support
kentico_radekm - 12/14/2009 9:06:42 AM
   
RE:Demo Installation Problem during db creation
Hello.

Could you please check that your SQL Server have case insensitive collation setted and IDENTIFIER_CASE parameter setted to MIXED?

If it isn't set to mixed, the wizard will stop in Step 3 when trying to create PROCEDURE [Proc_Analytics_ProcessLog], with the error:

Must declare the scalar variable "@StatisticsID". Must declare the scalar variable "@StatisticsID".

You can find more details about this issue here: http://aleemkhan.wordpress.com/2006/08/28/why-collation-affects-t-sql-syntax/

Best Regards,
Radek Macalik
Support Engineer