Posted by: johnk - Tuesday, 6 August 2013 08:57:52 |
---|
I downloaded the latest version 2.0 RC 1 from codeplex. When I ran /forum/install/default.aspx, after clicking on Next on "Upgrade Database" page, I got the error below. I am using Microsoft Azure (which has a slightly different version of SQL server called Azure SQL which is built on top of SQL Server 2012). [code] Server Error in '/' Application. FILE: mssql/tables.sql ERROR: Deprecated feature 'DROP INDEX with two-part name' is not supported in this version of SQL Server. STATEMENT: -- convert uniqueidentifier to nvarchar(64) if exists (select top 1 1 from syscolumns where id=object_id('[dbo].[yaf_User]') and name='ProviderUserKey' and xtype='36') begin -- drop the provider user key index if it exists... if exists(select 1 from dbo.sysindexes where name=N'IX_yaf_User_ProviderUserKey' and id=object_id(N'[dbo].[yaf_User]')) begin DROP INDEX [dbo].[yaf_User].[IX_yaf_User_ProviderUserKey] end -- alter the column ALTER TABLE [dbo].[yaf_User] ALTER COLUMN ProviderUserKey nvarchar(64) 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/tables.sql ERROR: Deprecated feature 'DROP INDEX with two-part name' is not supported in this version of SQL Server. STATEMENT: -- convert uniqueidentifier to nvarchar(64) if exists (select top 1 1 from syscolumns where id=object_id('[dbo].[yaf_User]') and name='ProviderUserKey' and xtype='36') begin -- drop the provider user key index if it exists... if exists(select 1 from dbo.sysindexes where name=N'IX_yaf_User_ProviderUserKey' and id=object_id(N'[dbo].[yaf_User]')) begin DROP INDEX [dbo].[yaf_User].[IX_yaf_User_ProviderUserKey] end -- alter the column ALTER TABLE [dbo].[yaf_User] ALTER COLUMN ProviderUserKey nvarchar(64) 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/tables.sql ERROR: Deprecated feature 'DROP INDEX with two-part name' is not supported in this version of SQL Server. STATEMENT: -- convert uniqueidentifier to nvarchar(64) if exists (select top 1 1 from syscolumns where id=object_id('[dbo].[yaf_User]') and name='ProviderUserKey' and xtype='36') begin -- drop the provider user key index if it exists... if exists(select 1 from dbo.sysindexes where name=N'IX_yaf_User_ProviderUserKey' and id=object_id(N'[dbo].[yaf_User]')) begin DROP INDEX [dbo].[yaf_User].[IX_yaf_User_ProviderUserKey] end -- alter the column ALTER TABLE [dbo].[yaf_User] ALTER COLUMN ProviderUserKey nvarchar(64) end] YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Classes\YAF.Classes.Data\mssql\LegacyDb.cs:6295 YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Core\Services\InstallUpgradeService.cs:347 YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Core\Services\InstallUpgradeService.cs:256 YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1353 System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +111 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +401 System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +16 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +159 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033 [/code] |
Posted by: bbobb - Tuesday, 6 August 2013 09:15:18 |
---|
Azure implementation was discussed here and was a manual, use search. |
Posted by: johnk - Tuesday, 6 August 2013 10:00:37 |
---|
I just did a search for "azure" and the last post was 10 months ago. Any idea what search term I should use? |
Posted by: tha_watcha - Tuesday, 6 August 2013 10:03:33 |
---|
[quote=johnk;60466]I just did a search for "azure" and the last post was 10 months ago. Any idea what search term I should use?[/quote] Try the documentation https://yafnet.codeplex.com/wikipage?title=Install%20YAF%20with%20Windows%20SQL%20Azure&referringTitle=Documentation |
Posted by: johnk - Tuesday, 6 August 2013 10:33:07 |
---|
Thanks tha_watcha. I already did that few months back and it was working fine till Beta 2. Only when I upgraded to RC1, I suddenly got that error message. It looks similar to: http://www.dnnsoftware.com/forums/forumid/56/postid/459277/scope/posts I also found this documentation on technet which says they are going to depreciate the "Drop Index" function http://technet.microsoft.com/en-us/library/ms143729.aspx |
Posted by: bbobb - Tuesday, 6 August 2013 12:55:03 |
---|
You could explain it before. We use 2005 version anyway so all the indexes drops in YAF should be rewritten to something like DROP INDEX [IX_yaf_User_ProviderUserKey] ON [dbo].[yaf_User]. |
Posted by: johnk - Wednesday, 7 August 2013 08:19:03 |
---|
[quote=bbobb;60469]You could explain it before. We use 2005 version anyway so all the indexes drops in YAF should be rewritten to something like DROP INDEX [IX_yaf_User_ProviderUserKey] ON [dbo].[yaf_User].[/quote] Sorry, I should have also mentioned that I was upgrading the code. Currently in production, the site has YAF 2.0 RC1 code. DB has 2.0 Beta 2 code. In addition when I ran the /install/default.aspx file, it failed DURING the upgrade process (error message above). I am guessing this mean the site/DB is in unstable state. Is it possible for you to modify the "drop index" fix and post it to codeplex? Thank you :) |
Posted by: johnk - Thursday, 8 August 2013 08:02:28 |
---|
Server Error in '/' Application. FILE: mssql/tables.sql ERROR: Invalid object name 'dbo.sysindexes'. STATEMENT: -- drop the old contrained just in case if exists (select top 1 1 from dbo.sysindexes where id=object_id('[dbo].[yaf_ActiveAccess]') and name='IX_yaf_ActiveAccess') alter table [dbo].[yaf_ActiveAccess] drop constraint IX_yaf_ActiveAccess 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/tables.sql ERROR: Invalid object name 'dbo.sysindexes'. STATEMENT: -- drop the old contrained just in case if exists (select top 1 1 from dbo.sysindexes where id=object_id('[dbo].[yaf_ActiveAccess]') and name='IX_yaf_ActiveAccess') alter table [dbo].[yaf_ActiveAccess] drop constraint IX_yaf_ActiveAccess 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/tables.sql ERROR: Invalid object name 'dbo.sysindexes'. STATEMENT: -- drop the old contrained just in case if exists (select top 1 1 from dbo.sysindexes where id=object_id('[dbo].[yaf_ActiveAccess]') and name='IX_yaf_ActiveAccess') alter table [dbo].[yaf_ActiveAccess] drop constraint IX_yaf_ActiveAccess] YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Classes\YAF.Classes.Data\mssql\LegacyDb.cs:6295 YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Core\Services\InstallUpgradeService.cs:347 YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Core\Services\InstallUpgradeService.cs:256 YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1353 System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +111 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +401 System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +16 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +159 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033 |
Posted by: bbobb - Thursday, 8 August 2013 09:03:43 |
---|
dbo.sysindexes should be changed for sys.indexes ON [PRIMARY] should be removed Tecnically this is not a YAF problem, but the conversion soft problem. We use T-SQL 2000 syntaxis because YAF supported it until recently, now it moved to 2005 and higher and some things should be rewritten. I currently don't have time to transform all this, but maybe someone has. |
Posted by: johnk - Thursday, 8 August 2013 09:22:39 |
---|
Do you mean the text "dbo.sysindexes" should be changed to "sys.indexes"? Also I could not find any text containing "on [PRIMARY]" or "[PRIMARY]". I searched the entire solution. Anything else I can do? |
Posted by: bbobb - Thursday, 8 August 2013 10:15:17 |
---|
When sys.indexes replace id = for object_id = if there's a (status & 2048) <> 0 in sys.indexes select check replace it for is_primary_key = 1 THat's all with indexes. I not guarantee that after you finish with them you will not bump into something else. So ask if somethin' bad happens, i will check the forum more often :wink: |
Posted by: squirrel - Thursday, 8 August 2013 22:56:35 |
---|
I'm not as advanced with SQL as you are, but if I can help somewhere, just let me know, bbobb -- |
Posted by: johnk - Friday, 9 August 2013 02:15:02 |
---|
I actually did not understand the post above by bbobb. Since you are the SQL DB expert, I would have to wait for you (or squirrel) to fix the bug. :) Tha_watcha: Could you add a note in azure documentation that currently users CANNOT upgrade (or downgrade) the forum. Trying to manually upgrade the forum could make the DB unstable (unless they know what they are doing). Thanks squirrel for offering to help in fixing this bug :) |
Posted by: bbobb - Friday, 9 August 2013 09:00:03 |
---|
I've changed the scripts, please try it. [quote=squirrel;60481]I'm not as advanced with SQL as you are, but if I can help somewhere, just let me know, bbobb -- [/quote] Thanx. |
Posted by: bbobb - Friday, 9 August 2013 11:47:31 |
---|
It can't garantee a smooth upgrade, but at least we would know what to do next. |
Posted by: johnk - Friday, 9 August 2013 21:50:49 |
---|
[quote=bbobb;60483]I've changed the scripts, please try it. [/quote] http://yafnet.codeplex.com/SourceControl/changeset/dd4b33b38719 Oh, wow...I would not have been able to figure out making so many changes. [quote=bbobb;60486]It can't garantee a smooth upgrade, but at least we would know what to do next.[/quote] Thanks for the warning. I would make a copy of prod DB and test these changes on the new copy. Azure does not make it easy to import/export data. They force you to create a azure storage account (probbaly pay extra for that), export it as a blog file with BACPAC extension. I did find a way to do it through either powershell script or DOS command line. It also involves modifying azure firewall rules. Microsoft does not make it easy. It may take me few hours to do all this and then do more testing to make sure all functionality are working fine. I will report success or error message(s) as soon as I can. |
Posted by: johnk - Saturday, 10 August 2013 05:52:33 |
---|
Server Error in '/' Application. Column 'DeleteReason' does not belong to table . 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.ArgumentException: Column 'DeleteReason' does not belong to table . Source Error: Line 282: } Line 283: Line 284: if (this.MessageFlags.IsDeleted) Line 285: { Line 286: if (this.DataRow.Table.Columns.Contains("IsModeratorChanged" )) Source File: d:\yafnet_ba903e9138b2\yafsrc\YAF.Controls\MessagePostData.cs Line: 284 Stack Trace: [ArgumentException: Column 'DeleteReason' does not belong to table .] System.Data.DataRow.GetDataColumn(String columnName) +5254087 System.Data.DataRow.get_Item(String columnName) +13 YAF.Controls.MessagePostData.RenderMessage(HtmlTextWriter writer) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Controls\MessagePostData.cs:284 YAF.Controls.MessagePost.Render(HtmlTextWriter writer) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Controls\MessagePost.cs:275 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 YAF.Core.ForumPage.Render(HtmlTextWriter writer) in d:\yafnet_ba903e9138b2\yafsrc\YAF.Core\BasePages\ForumPage.cs:554 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 YAF.Forum.Render(HtmlTextWriter writer) +278 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +216 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8 System.Web.UI.Page.Render(HtmlTextWriter writer) +29 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044 |
Posted by: bbobb - Saturday, 10 August 2013 07:45:07 |
---|
I see. This is really a bug. First message in a topic gets the wrong end of the stick. I deleted second post in a topic and reproduced it. But it's not related to SQL scripts. |
Posted by: johnk - Saturday, 10 August 2013 09:37:24 |
---|
I am glad you were able to duplicate it. The weird thing about this bug is that if I create a new topic, I can delete it successfully. But if I try to delete an older topic created by someone else, it gives an error message. However if I try to delete an older topic created by me, it works fine. |