Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > Error during DB set up View modes: 
User avatar
Member
Member
john.vandruten-thresholdinteractive - 6/23/2010 7:31:39 PM
   
Error during DB set up
Hi,
I targeted a remote machine for the SQL server during the initial set up of Kentico, i'm pretty sure that i entered the correct credentials and i get the follow error quoted below

Kentico Database Setup
Step 3 - Database Creation Log

Running query: cms_avatar.sql


ERROR: An error occurred: [DataConnection.ExecuteQuery]: Query: CREATE TABLE [CMS_Avatar] ( [AvatarID] int NOT NULL IDENTITY(1, 1), [AvatarName] nvarchar(200) NULL, [AvatarFileName] nvarchar(200) NOT NULL, [AvatarFileExtension] nvarchar(10) NOT NULL, [AvatarBinary] varbinary(max) NULL, [AvatarType] nvarchar(50) NOT NULL, [AvatarIsCustom] bit NOT NULL, [AvatarGUID] uniqueidentifier NOT NULL, [AvatarLastModified] datetime NOT NULL, [AvatarMimeType] nvarchar(100) NOT NULL, [AvatarFileSize] int NOT NULL, [AvatarImageHeight] int NULL, [AvatarImageWidth] int NULL, [DefaultMaleUserAvatar] bit NULL, [DefaultFemaleUserAvatar] bit NULL, [DefaultGroupAvatar] bit NULL, [DefaultUserAvatar] bit NULL ) ON [PRIMARY] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [PK_CMS_Avatar] PRIMARY KEY NONCLUSTERED ([AvatarID]) WITH FILLFACTOR=80 ON [PRIMARY] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultFemaleUserAvatar] DEFAULT ((0)) FOR [DefaultFemaleUserAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultGroupAvatar] DEFAULT ((0)) FOR [DefaultGroupAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultMaleUserAvatar] DEFAULT ((0)) FOR [DefaultMaleUserAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultUserAvatar] DEFAULT ((0)) FOR [DefaultUserAvatar] CREATE INDEX [IX_CMS_Avatar_AvatarGUID] ON [CMS_Avatar] ([AvatarGUID]) WITH ( FILLFACTOR = 80) ON [PRIMARY] CREATE CLUSTERED INDEX [IX_CMS_Avatar_AvatarName] ON [CMS_Avatar] ([AvatarName]) WITH ( FILLFACTOR = 80) ON [PRIMARY] CREATE INDEX [IX_CMS_Avatar_AvatarType_AvatarIsCustom] ON [CMS_Avatar] ([AvatarType], [AvatarIsCustom]) WITH ( FILLFACTOR = 80) ON [PRIMARY] : caused exception: Line 6: Incorrect syntax near 'max'. Line 47: Incorrect syntax near '('. Line 51: Incorrect syntax near '('. Line 55: Incorrect syntax near '('.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2010 1:22:39 AM
   
RE:Error during DB set up
Hi,

What are your DB server settings? Could you please set it to be case insensitive and also set its collation to Latin?

Best regards,
Juraj Ondrus

User avatar
Member
Member
alasdair.gow-cheyney - 6/24/2010 11:19:44 AM
   
RE:Error during DB set up
Hi, I'm having the exact same problem as above (same error message) on IIS 6 with SQL Server 2005 and .NET version 2.something. I created a new database with the suggested collation (SQL_Latin1_General_CP1_CI_AS) and tried it again (after giving the database user full control over the new database) and I still get the same error message.

(We also have two websites on the same server running older versions of Kentico, which broke after installing the new version, but I managed to fix that by fiddling with their web.config files)

User avatar
Member
Member
john.vandruten-thresholdinteractive - 6/24/2010 12:47:40 PM
   
RE:Error during DB set up
Collation was already set to SQL_Latin1_General_Cp1_CI_AS.

I'm on SQL Server 2005 and .NET 3.5 if that matters.

User avatar
Member
Member
alasdair.gow-cheyney - 6/25/2010 8:26:58 AM
   
RE:Error during DB set up
Argh. I have finally worked out what the problem is; the server's database system is a horrible mess, and apparently it's actually running server 2000, despite all appearances to the contrary. John, as I had the exact same error message as you it's quite possible your server is secretly running server 2000 just like mine; if you execute the command "SELECT LTRIM(RIGHT(LEFT(@@VERSION,38),9))" in the sqlcmd utility it will tell you the version you're running; if you see 8.x then it's 2000, 9.x is 2005, 10.x is 2008 (assuming you have access to command prompt on your server; if you don't know how to access the sqlcmd utility I can tell you)

Kentico_jurajo, is there any way to make Kentico 5.5 work with Server 2000? If not, is there a free edition of an earlier version of Kentico that does?
(I've modified the SQL files so that they don't provide any syntax errors; however, a column length of "max" isn't supported by 2000, meaning that the maximum length I was able to set is the hardcoded 8060. The installation now fails as it tried to read in data from CMS_Class_0.sql (and presumably the other data files will produce the same problem) as it tries to create entries of length 9000, 12000, 14000 (etc). Unfortunately I can't see any way around this other than truncating the entries myself, but I'm sure this would break quite a lot of things... Do you have any suggestions?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/28/2010 8:36:25 AM
   
RE:Error during DB set up
Hi,

Thank you for the update and information.

We abandoned SQL 2000 because it was limiting us in the development of new features and other improvements. As you can see - 5.x versions are not able to be used on SQL 2000.

However, you can download an older version of Kentico from this direct link, where you will change the version number. In this examples it is for 4.1 version:

kentico.com/downloads/KenticoCMS_4_1.exe

Best regards,
Juraj Ondrus

User avatar
Member
Member
jmcwpk-gmail - 10/15/2011 12:57:19 PM
   
RE:Error during DB set up
hi i got the same error.

I use Win xp ,Sql 2008 R2 Express but got same error


ERROR: An error occurred: [DataConnection.ExecuteQuery]: Query: CREATE TABLE [CMS_Avatar] ( [AvatarID] [int] IDENTITY(1, 1) NOT NULL, [AvatarName] [nvarchar](200) NULL, [AvatarFileName] [nvarchar](200) NOT NULL, [AvatarFileExtension] [nvarchar](10) NOT NULL, [AvatarBinary] [varbinary](max) NULL, [AvatarType] [nvarchar](50) NOT NULL, [AvatarIsCustom] [bit] NOT NULL, [AvatarGUID] [uniqueidentifier] NOT NULL, [AvatarLastModified] [datetime] NOT NULL, [AvatarMimeType] [nvarchar](100) NOT NULL, [AvatarFileSize] [int] NOT NULL, [AvatarImageHeight] [int] NULL, [AvatarImageWidth] [int] NULL, [DefaultMaleUserAvatar] [bit] NULL, [DefaultFemaleUserAvatar] [bit] NULL, [DefaultGroupAvatar] [bit] NULL, [DefaultUserAvatar] [bit] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [PK_CMS_Avatar] PRIMARY KEY NONCLUSTERED ([AvatarID]) WITH FILLFACTOR=80 ON [PRIMARY] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultFemaleUserAvatar] DEFAULT ((0)) FOR [DefaultFemaleUserAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultGroupAvatar] DEFAULT ((0)) FOR [DefaultGroupAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultMaleUserAvatar] DEFAULT ((0)) FOR [DefaultMaleUserAvatar] ALTER TABLE [CMS_Avatar] ADD CONSTRAINT [DEFAULT_CMS_Avatar_DefaultUserAvatar] DEFAULT ((0)) FOR [DefaultUserAvatar] CREATE NONCLUSTERED INDEX [IX_CMS_Avatar_AvatarGUID] ON [CMS_Avatar] ([AvatarGUID]) WITH ( FILLFACTOR = 80) ON [PRIMARY] CREATE CLUSTERED INDEX [IX_CMS_Avatar_AvatarName] ON [CMS_Avatar] ([AvatarName]) WITH ( FILLFACTOR = 80) ON [PRIMARY] CREATE NONCLUSTERED INDEX [IX_CMS_Avatar_AvatarType_AvatarIsCustom] ON [CMS_Avatar] ([AvatarType], [AvatarIsCustom]) WITH ( FILLFACTOR = 80) ON [PRIMARY] : caused exception: CREATE TABLE permission denied in database 'tempdb'.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/18/2011 1:19:44 AM
   
RE:Error during DB set up
Hi,

If you will read the error message to the end you will see it is not the same :-)

Your error message
CREATE TABLE permission denied in database 'tempdb'.


Says that the user account you are using to connect to the DB server does not have appropriate permissions and create table permissions is required. Could you please grant the user account with appropriate permissions - the best a nd easiest way would be to assign to this account the DB owner/admin permissions.

Best regards,
Juraj Ondrus

User avatar
Member
Member
zuleyhakendir-hotmail - 12/7/2011 7:29:17 AM
   
RE:Error during DB set up
My installation stopped at the Database step, my system is windows 7 home basic, and
ms sql server 2008 r2... I checked "I want to install Kentico CMS on a remote server"

all the other object worked successfully.
the last row is (the installation stopped at this row):
proc_om_account_massdelete

and the error is:
ERROR: An error occurred: [DataConnection.ExecuteQuery]: Query: CREATE PROCEDURE [Proc_OM_Account_MassDelete] @where nvarchar(max), @deleteSubsidiaries bit AS BEGIN SET NOCOUNT ON; -- Variables DECLARE @DeletedAccounts TABLE ( AccountID int NOT NULL, AccountSiteID int NULL ); DECLARE @DeletedMergedAccounts TABLE ( AccountID int NOT NULL ); DECLARE @SubsidiaryAccounts TABLE ( AccountiD int NOT NULL, AccountSiteID int NULL ); DECLARE @MergedSubsidiaryAccounts TABLE ( AccountiD int NOT NULL ); DECLARE @currentAccountID int; DECLARE @currentAccountSiteID int; DECLARE @currentDeletedAccountID int; DECLARE @currentSubsidiaryAccountID int; DECLARE @currentSubsidiaryAccountSiteID int; DECLARE @currentMergedSubsidiaryAccountID int; DECLARE @sqlQuery NVARCHAR(MAX); -- Get TOP 1000 of deleted accounts SET @sqlQuery = 'SELECT TOP 1000 AccountID, AccountSiteID FROM OM_Account WHERE ' + @where; INSERT INTO @DeletedAccounts EXEC(@sqlQuery); -- Process first batch of records WHILE ((SELECT Count(*) FROM @DeletedAccounts) > 0) BEGIN -- Loop through records WHILE ((SELECT Count(*) FROM @DeletedAccounts) > 0) BEGIN SELECT TOP 1 @currentAccountID = AccountID, @currentAccountSiteID = AccountSiteID FROM @DeletedAccounts; -- Get merged accounts IF @currentAccountSiteID > 0 INSERT INTO @DeletedMergedAccounts SELECT AccountID FROM Func_OM_Account_GetChildren(@currentAccountID, 1) ELSE INSERT INTO @DeletedMergedAccounts SELECT AccountID FROM Func_OM_Account_GetChildren_Global(@currentAccountID, 1) -- Delete merged and parent records WHILE ((SELECT Count(*) FROM @DeletedMergedAccounts) > 0) BEGIN SELECT TOP 1 @currentDeletedAccountID = AccountID FROM @DeletedMergedAccounts; -- Delete Subsidiary accounts IF @deleteSubsidiaries > 0 BEGIN INSERT INTO @SubsidiaryAccounts SELECT AccountID, AccountSiteID FROM OM_Account WHERE AccountSubsidiaryOfID = @currentDeletedAccountID; WHILE ((SELECT Count(*) FROM @SubsidiaryAccounts) > 0) BEGIN SELECT TOP 1 @currentSubsidiaryAccountID = AccountID, @currentSubsidiaryAccountSiteID = AccountSiteID FROM @SubsidiaryAccounts; -- Get merged accounts into subsidiary accounts IF @currentSubsidiaryAccountSiteID > 0 INSERT INTO @MergedSubsidiaryAccounts SELECT AccountID FROM Func_OM_Account_GetChildren(@currentSubsidiaryAccountID, 1) ELSE INSERT INTO @MergedSubsidiaryAccounts SELECT AccountID FROM Func_OM_Account_GetChildren_Global(@currentSubsidiaryAccountID, 1) -- Delete merged subsidiary accounts WHILE ((SELECT Count(*) FROM @MergedSubsidiaryAccounts) > 0) BEGIN SELECT TOP 1 @currentMergedSubsidiaryAccountID = AccountID FROM @MergedSubsidiaryAccounts; -- Remove contacts from contact groups which are added via the account SET @where = 'AccountID = ' + CAST(@currentMergedSubsidiaryAccountID AS nvarchar(50)); EXEC Proc_OM_ContactGroupMember_RemoveContactsFromAccount @where -- Remove dependency EXEC Proc_OM_Account_RemoveDependencies @currentMergedSubsidiaryAccountID -- Delete record DELETE FROM OM_Account WHERE AccountID = @currentMergedSubsidiaryAccountID; DELETE FROM @MergedSubsidiaryAccounts WHERE AccountID = @currentMergedSubsidiaryAccountID; END DELETE FROM @SubsidiaryAccounts WHERE AccountID = @currentSubsidiaryAccountID; END END -- Remove contacts from contact groups which are added via the account SET @where = 'AccountID = ' + CAST(@currentDeletedAccountID AS nvarchar(50)); EXEC Proc_OM_ContactGroupMember_RemoveContactsFromAccount @where -- Remove dependency EXEC Proc_OM_Account_RemoveDependencies @currentDeletedAccountID -- Delete record DELETE FROM OM_Account WHERE AccountID = @currentDeletedAccountID; DELETE FROM @DeletedMergedAccounts WHERE AccountID = @currentDeletedAccountID; END DELETE FROM @DeletedAccounts WHERE AccountID = @currentAccountID; END -- Get next batch of a INSERT INTO @DeletedAccounts EXEC(@sqlQuery); END END : caused exception: Invalid column name 'AccountID'. Invalid column name 'AccountID'. Invalid column name 'AccountID'. Invalid column name 'AccountID'.

Thanks for your help

User avatar
Member
Member
zuleyhakendir-hotmail - 12/7/2011 7:51:27 AM
   
RE:Error during DB set up
Sorry wrong thread, it must be under Version 6.x

User avatar
Kentico Support
Kentico Support
kentico_radekm - 12/17/2011 1:57:51 PM
   
RE:Error during DB set up
Hello.

It seems there can be an issue with Turkish culture.

Could you please try to change "AccountiD int NOT NULL" na "AccountID int NOT NULL" in ~/App_Data\Install\SQL\Proc_OM_Account_MassDelete.sql file? It should be twice in this file. Thank you.

Best Regards,
Radek Macalik