I am trying to upgrade a client's 4.9.5 installation to 5.6.3. My first step is to upgrade to 5.4.4.
I get errors starting with the 5.0.0 SQL data provider. Some of this is reproduced below. Now, there are indications that someone tried to upgrade the site to 5.0.0 and failed, but somehow got this running as 4.9.5. I say this because there is a 5.0.0 entry in the Version table. Yet, the site really is running 4.9.5. Is it possible that my problems are due to some 5.0.0 stuff being in the database?
Anyway, when I try to do the upgrade, this is the way it starts:
Upgrading DotNetNuke
Current Assembly Version: 05.04.04
Current Database Version: 04.09.05
Upgrade Status Report
00:00:00.281 - Upgrading to Version: 05.04.04
00:00:00.531 - Executing Script: 05.00.00.SqlDataProvider Error! (see 05.00.00.log.resources for more information)
00:00:05.828 - Executing Script: 05.00.01.SqlDataProvider Success
00:00:06.343 - Executing Script: 05.01.00.SqlDataProvider Error! (see 05.01.00.log.resources for more information)
00:00:09.468 - Executing Script: 05.01.01.SqlDataProvider Error! (see 05.01.01.log.resources for more information)
00:00:09.578 - Executing Script: 05.01.02.SqlDataProvider Success
00:00:09.578 - Executing Script: 05.01.03.SqlDataProvider Error! (see 05.01.03.log.resources for more information)
00:00:09.656 - Executing Script: 05.01.04.SqlDataProvider Success
00:00:09.671 - Executing Script: 05.02.00.SqlDataProvider Error! (see 05.02.00.log.resources for more information)
00:00:10.406 - Executing Script: 05.02.01.SqlDataProvider Error! (see 05.02.01.log.resources for more information)
00:00:10.531 - Executing Script: 05.02.02.SqlDataProvider Success
Looking at 05.00.00.log.resources shows this ...
System.Data.SqlClient.SqlException (0x80131904): Could not drop object 'dbo.Packages' because it is referenced by a FOREIGN KEY constraint.
Error: The new name 'Packages' is already in use as a OBJECT name and would cause a duplicate that is not permitted.
Table 'Packages' already has a primary key defined on it.
Could not create constraint. See previous errors.
at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
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)
/***********************************************************/
/* End Update Admin Modules to conform to Module Standards */
/***********************************************************/
/* Update Packages */
/*******************/
CREATE TABLE dbo.Tmp_Packages
(
PackageID int NOT NULL IDENTITY (1, 1),
PortalID int NULL,
Name nvarchar(50) NOT NULL,
FriendlyName nvarchar(250) NOT NULL,
[Description] nvarchar(2000) NULL,
PackageType nvarchar(50) 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
)
ALTER TABLE dbo.Tmp_Packages ADD CONSTRAINT DF_Packages_IsSystemPackage DEFAULT 0 FOR IsSystemPackage
SET IDENTITY_INSERT dbo.Tmp_Packages ON
IF EXISTS(SELECT * FROM dbo.Packages)
EXEC('INSERT INTO dbo.Tmp_Packages (PackageID, Name, FriendlyName, Description, PackageType, Version, License, Manifest)
SELECT PackageID, Name, FriendlyName, Description, PackageType, Version, License, Manifest FROM dbo.Packages WITH (HOLDLOCK TABLOCKX)')
SET IDENTITY_INSERT dbo.Tmp_Packages OFF
ALTER TABLE dbo.Assemblies DROP CONSTRAINT FK_PackageAssemblies_PackageAssemblies
DROP TABLE dbo.Packages
EXECUTE sp_rename N'dbo.Tmp_Packages', N'Packages', 'OBJECT'
ALTER TABLE dbo.Packages ADD CONSTRAINT PK_Packages PRIMARY KEY CLUSTERED ( PackageID )
CREATE UNIQUE NONCLUSTERED INDEX IX_Packages ON Packages ( [Owner], Name, PackageType, PortalID )
ALTER TABLE dbo.Assemblies ADD CONSTRAINT FK_PackageAssemblies_PackageAssemblies FOREIGN KEY ( PackageID ) REFERENCES dbo.Packages ( PackageID ) ON UPDATE NO ACTION ON DELETE NO ACTION
System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'PortalID'.
Invalid column name 'ReleaseNotes'.
Invalid column name 'Owner'.
Invalid column name 'Organization'.
Invalid column name 'Url'.
Invalid column name 'Email'.
Invalid column name 'IsSystemPackage'.
at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
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)
CREATE PROCEDURE dbo.[AddPackage]
@PortalID int,
@Name nvarchar(50),
@FriendlyName nvarchar(250),
@Description nvarchar(2000),
@PackageType nvarchar(50),
@Version nvarchar(50),
@License ntext,
@Manifest ntext,
@Owner nvarchar(100),
@Organization nvarchar(100),
@Url nvarchar(250),
@Email nvarchar(100),
@ReleaseNotes ntext,
@IsSystemPackage bit
AS
INSERT INTO dbo.Packages
(
PortalID,
[Name],
FriendlyName,
[Description],
PackageType,
Version,
License,
Manifest,
ReleaseNotes,
[Owner],
Organization,
Url,
Email,
IsSystemPackage
)
VALUES (
@PortalID,
@Name,
@FriendlyName,
@Description,
@PackageType,
@Version,
@License,
@Manifest,
@ReleaseNotes,
@Owner,
@Organization,
@Url,
@Email,
@IsSystemPackage
)
SELECT SCOPE_IDENTITY()
System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'PortalID'.
Invalid column name 'Owner'.
Invalid column name 'Organization'.
Invalid column name 'Url'.
Invalid column name 'Email'.
Invalid column name 'ReleaseNotes'.
Invalid column name 'IsSystemPackage'.
at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
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)
... and there's more.
All of this seems to be related to "Packages"
So ... if anyone has any suggestions as to how to approach this, I'd really appreciate hearing from you!
Thanks for reading.
Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services
(http://patapscorg.com)
|