YAFLogo

damianm
  • damianm
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
4 years ago
Hi Everyone ,

I have just installed latest version and attached old database and during db upgrade to latest version i get following error:

Server Error in '/YetAnotherForum.NET' Application.

FILE:

mssql/upgrade/tables.sql

ERROR:

ALTER FULLTEXT INDEX statement cannot be used inside a user transaction.

Cannot alter or drop column 'Message' because it is enabled for Full-Text Search.

STATEMENT:

if exists (select top 1 1 from sys.columns where object_id = object_id('[dbo].[yaf_Message]') and name = 'Message' and system_type_id = 99

and exists(select * from sys.sysfulltextcatalogs where name = N'YafSearch'))

begin

alter fulltext index on [dbo].[yaf_Message] drop ([Message])

alter table [dbo].[yaf_Message] alter column [Message] nvarchar(max)

end

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.Exception: FILE:

mssql/upgrade/tables.sql

ERROR:

ALTER FULLTEXT INDEX statement cannot be used inside a user transaction.

Cannot alter or drop column 'Message' because it is enabled for Full-Text Search.

STATEMENT:

if exists (select top 1 1 from sys.columns where object_id = object_id('[dbo].[yaf_Message]') and name = 'Message' and system_type_id = 99

and exists(select * from sys.sysfulltextcatalogs where name = N'YafSearch'))

begin

alter fulltext index on [dbo].[yaf_Message] drop ([Message])

alter table [dbo].[yaf_Message] alter column [Message] nvarchar(max)

end

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:

[Exception: FILE:

mssql/upgrade/tables.sql

ERROR:

ALTER FULLTEXT INDEX statement cannot be used inside a user transaction.

Cannot alter or drop column 'Message' because it is enabled for Full-Text Search.

STATEMENT:

if exists (select top 1 1 from sys.columns where object_id = object_id('[dbo].[yaf_Message]') and name = 'Message' and system_type_id = 99

and exists(select * from sys.sysfulltextcatalogs where name = N'YafSearch'))

begin

alter fulltext index on [dbo].[yaf_Message] drop ([Message])

alter table [dbo].[yaf_Message] alter column [Message] nvarchar(max)

end]

YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) +1382

YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) +172

YAF.Types.Extensions.EnumerableExtensions.ForEach(IEnumerable`1 list, Action`1 action) +232

YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) +145

YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1545

System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +134

System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +491

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1665

Anyone else experience this issue?

Regards

Damian

Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
4 years ago
Yes sorry that cannot work. Please go to Admin > Database > Run SQL Query and run...

if exists (select top 1 1 from sys.columns where object_id = object_id('[{databaseOwner}].[{objectQualifier}Message]') and name = 'Message' and system_type_id = 99 
   and exists(select * from sys.sysfulltextcatalogs where name = N'YafSearch'))
begin
   alter fulltext index on [dbo].[yaf_Message] drop ([Message])
   alter table [{databaseOwner}].[{objectQualifier}Message] alter column [Message] nvarchar(max)
end

then you should be able to run the upgrade script.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
4 years ago
This issue has been fixed in YAF 2.2.4.8