Appllication rehosting in kentico cms 6.0

Mak Hattalli asked on March 29, 2015 19:15

Hi ,

I have existing application in live entertainment , but now we are trying to move in another domain. I have created another database set up and kentico application but I am getting error . Please can help me. I am getting below error ERROR: An error occurred: [DataConnection.HandleError]: Query: CREATE TABLE [CMS_Avatar] ( [AvatarID] [int] IDENTITY(1, 1) NOT NULL, [AvatarName] nvarchar NULL, [AvatarFileName] nvarchar NOT NULL, [AvatarFileExtension] nvarchar NOT NULL, [AvatarBinary] varbinary NULL, [AvatarType] nvarchar NOT NULL, [AvatarIsCustom] [bit] NOT NULL, [AvatarGUID] [uniqueidentifier] NOT NULL, [AvatarLastModified] [datetime] NOT NULL, [AvatarMimeType] nvarchar 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: There is already an object named 'CMS_Avatar' in the database

Recent Answers


Virgil Carroll answered on March 30, 2015 04:26

So if I am understanding you right, you are trying to move an existing application to a new server. To start the process, you did a fresh install with a new database? Or did you try moving it and try to write over the existing database?

This error shows when either an existing database is used during the creation process which already has the the table in it OR something happened during the installation process that caused the installer to try and create the table 'CMS_Avatar' twice (much less likely).

0 votesVote for this answer Mark as a Correct answer

Mak Hattalli answered on March 30, 2015 05:01

Hi Virgil Carroll ,

Ya its right. we are using existing database. But now when I 'll browse the site it's going CMS database creation steps. How can I create CMS_avatar table. Please can you tell me in detail.

-- Thanks

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 30, 2015 05:54

If you are using an existing database you should not need to create any of the tables including CMS_avatar. Sounds like what you needed to do was create a Kentico install instance but select not to install the database, then attach your existing database to the install.

The most efficient way is to copy your entire Kentico web directory and database over to the new system and set-up as it was set-up on the old (you need to manually create the website in Internet Information Server). Therefore you will have everything the exact way it was

The other way, but less efficient, is to do a clean install of Kentico with a new, fresh database then restore the old database over the new. You would also need to move any added files to the old site into the new.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 31, 2015 00:50

Mak, what Virgil mentions is by far the easiest way to go about promoting a website. Question I have is what are you trying to accomplish? If you need to move to a new hosting environment, simply make a backup (bak) of the database. Then on your new server just create a new blank database and then restore the .bak over top of the newly created database. This will overwrite your new database with everything you need on your new server.

If you have a shared hosting environment, you will have your work cut out for you because most shared environments don't allow you to have direct access to restore .bak files. In that case, you might try to export your site from Kentico and import it into your new site. Good and the bad about this is if you have your initial site setup right, this should be a snap. If you don't, then it will make a lot of work.

0 votesVote for this answer Mark as a Correct answer

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