Hi,
Just upgraded a 5.01.00 instance to a 5.01.01 and got a single SqlDataProvider Error. The associated log file (05.01.01.log) reads as below. Having checked my website there don't appear to be any problems and upgrade otherwise seems to have worked, but obviousy would prefer if the install hadn't errored.
Any assistance would be apreciated.
Cheers, Chris.
Log file follows:
System.Data.SqlClient.SqlException: Constraint 'DF_Packages_IsSystemPackage' does not belong to table 'Packages'.
Could not drop constraint. See previous errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
/* Fix bug in drop index in 5.0 script - replay failed part of script */
/**********************************************************************/
ALTER TABLE parkrun.Packages DROP CONSTRAINT DF_Packages_IsSystemPackage
CREATE TABLE parkrun.Tmp_Packages
(
PackageID int NOT NULL IDENTITY (1, 1),
PortalID int NULL,
Name nvarchar(128) NOT NULL,
FriendlyName nvarchar(250) NOT NULL,
[Description] nvarchar(2000) NULL,
PackageType nvarchar(100) NOT NULL,
[Version] nvarchar(50) NOT NULL,
License ntext NULL,
Manifest ntext NULL,
[Owner] nvarchar(100) NULL,
Organization nvarchar(100) NULL,
Url nvarchar(250) NULL,
Email nvarchar(100) NULL,
ReleaseNotes ntext NULL,
IsSystemPackage bit NOT NULL,
CreatedByUserID int NULL,
CreatedOnDate datetime NULL,
LastModifiedByUserID int NULL,
LastModifiedOnDate datetime NULL
)
ALTER TABLE parkrun.Tmp_Packages ADD CONSTRAINT DF_Packages_IsSystemPackage DEFAULT ((0)) FOR IsSystemPackage
SET IDENTITY_INSERT parkrun.Tmp_Packages ON
IF EXISTS(SELECT * FROM parkrun.Packages)
EXEC('INSERT INTO parkrun.Tmp_Packages (PackageID, PortalID, Name, FriendlyName, Description, PackageType, Version, License, Manifest, Owner, Organization, Url, Email, ReleaseNotes, IsSystemPackage, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate)
SELECT PackageID, PortalID, Name, FriendlyName, Description, PackageType, Version, License, Manifest, Owner, Organization, Url, Email, ReleaseNotes, IsSystemPackage, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate FROM parkrun.Packages WITH (HOLDLOCK TABLOCKX)')
SET IDENTITY_INSERT parkrun.Tmp_Packages OFF
ALTER TABLE parkrun.Assemblies DROP CONSTRAINT FK_PackageAssemblies_PackageAssemblies
ALTER TABLE parkrun.DesktopModules DROP CONSTRAINT FK_DesktopModules_Packages
ALTER TABLE parkrun.LanguagePacks DROP CONSTRAINT FK_LanguagePacks_Packages
DROP TABLE parkrun.Packages
EXECUTE sp_rename N'parkrun.Tmp_Packages', N'Packages', 'OBJECT'
ALTER TABLE parkrun.Packages ADD CONSTRAINT PK_Packages PRIMARY KEY CLUSTERED ( PackageID )
CREATE UNIQUE NONCLUSTERED INDEX IX_Packages ON parkrun.Packages ( Owner, Name, PortalID )
ALTER TABLE parkrun.LanguagePacks ADD CONSTRAINT FK_LanguagePacks_Packages FOREIGN KEY ( PackageID ) REFERENCES parkrun.Packages ( PackageID ) ON UPDATE NO ACTION ON DELETE CASCADE
ALTER TABLE parkrun.DesktopModules WITH NOCHECK ADD CONSTRAINT FK_DesktopModules_Packages FOREIGN KEY ( PackageID ) REFERENCES parkrun.Packages ( PackageID ) ON UPDATE CASCADE ON DELETE CASCADE
ALTER TABLE parkrun.Assemblies ADD CONSTRAINT FK_PackageAssemblies_PackageAssemblies FOREIGN KEY ( PackageID ) REFERENCES parkrun.Packages ( PackageID ) ON UPDATE NO ACTION ON DELETE CASCADE