|
|
|
|
I have about 42 portals that I am upgrading from last Friday. The upgrade entails upgrading the portals from DNN version 4.00.02 to version 4.3.5. I am about 1/4 of the way through now. Other than some known bugs that are in the forums and Gemini, everything is going pretty well. However, I just was upgrading one and ran into an error. During the upgrade scripts, there was an error while upgrading v. 4.00.04. This was new. There were no errors any other time. It told me to check the upgrade logs for 4.00.04. Here is what the upgrade log told me:
System.Data.SqlClient.SqlException: String or binary data would be truncated. The statement has been terminated. 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)
/* Transfer Profile */ /*********************/
If (SELECT dbo.fn_GetVersion(3,2,3)) = 0 BEGIN --Create Temp Table CREATE TABLE dbo.FlatProfile ( [UserID] [int] , [PortalID] [int], [Username] [nvarchar] (256) NULL , [FirstName] [nvarchar] (256) NULL , [LastName] [nvarchar] (256) NULL , [Street] [nvarchar] (256) NULL , [Unit] [nvarchar] (128) NULL , [City] [nvarchar] (256) NULL , [Country] [nvarchar] (256) NULL , [Region] [nvarchar] (256) NULL , [PostalCode] [nvarchar] (128) NULL , [Telephone] [nvarchar] (128) NULL , [Cell] [nvarchar] (128) NULL , [Fax] [nvarchar] (128) NULL , [Website] [nvarchar] (256) NULL , [IM] [nvarchar] (256) NULL, [PreferredLocale] [nvarchar] (128) NULL , [TimeZone] [nvarchar] (256) NULL, [LastUpdatedDate] [datetime]
)
--Extract from Profile Blob to Temp Table INSERT INTO FlatProfile SELECT users.userid, userportals.portalid, users.username, users.firstname, users.lastname, dbo.GetProfileElement('Street',PropertyNames,PropertyValuesString) Street, dbo.GetProfileElement('Unit',PropertyNames,PropertyValuesString) Unit, dbo.GetProfileElement('City',PropertyNames,PropertyValuesString) City, dbo.GetProfileElement('Country',PropertyNames,PropertyValuesString) Country, dbo.GetProfileElement('Region',PropertyNames,PropertyValuesString) Region, dbo.GetProfileElement('PostalCode',PropertyNames,PropertyValuesString) PostalCode, dbo.GetProfileElement('Telephone',PropertyNames,PropertyValuesString) Telephone, dbo.GetProfileElement('Cell',PropertyNames,PropertyValuesString) Cell, dbo.GetProfileElement('Fax',PropertyNames,PropertyValuesString) Fax, dbo.GetProfileElement('Website',PropertyNames,PropertyValuesString) Website, dbo.GetProfileElement('IM',PropertyNames,PropertyValuesString) IM, dbo.GetProfileElement('PreferredLocale',PropertyNames,PropertyValuesString) PreferredLocale, dbo.GetProfileElement('TimeZone',PropertyNames,PropertyValuesString) TimeZone, aspnet_profile.LastUpdatedDate
FROM Users inner join userportals on users.userid = userportals.userid inner join aspnet_users on users.username = aspnet_users.username inner join aspnet_profile on aspnet_profile.userid = aspnet_users.userid where userportals.portalid = PortalID
--Move to UserProfile Table EXECUTE TransferUsersFromFlatProfile N'FirstName' EXECUTE TransferUsersFromFlatProfile N'LastName' EXECUTE TransferUsersFromFlatProfile N'Unit' EXECUTE TransferUsersFromFlatProfile N'Street' EXECUTE TransferUsersFromFlatProfile N'City' EXECUTE TransferUsersFromFlatProfile N'Region' EXECUTE TransferUsersFromFlatProfile N'PostalCode' EXECUTE TransferUsersFromFlatProfile N'Country' EXECUTE TransferUsersFromFlatProfile N'Telephone' EXECUTE TransferUsersFromFlatProfile N'Fax' EXECUTE TransferUsersFromFlatProfile N'Cell' EXECUTE TransferUsersFromFlatProfile N'Website' EXECUTE TransferUsersFromFlatProfile N'IM' EXECUTE TransferUsersFromFlatProfile N'TimeZone' EXECUTE TransferUsersFromFlatProfile N'PreferredLocale'
--Drop temp objects DROP TABLE dbo.FlatProfile DROP PROCEDURE dbo.TransferUsersFromFlatProfile END
Is there anything I should do to follow up on this??? In getting to the Upgrade Log, everything appeared to be functioning propery.
Since the upgrade log appears to be upgrading the profile tables, I attempted to view and update a profile. It worked. I didn't get any errors.
|
|
|
|
| |
|
|
|
I found the section of the SQL DataProvider upgrade script that threw the error. It is pasted below. I do not yet have enough experience with the Membership or Profile provider to determine on my own if there is something I need to worry about with this upgrade step failing. Can anyone assist me?
/* Transfer Profile */ /*********************/
If (SELECT {databaseOwner}{objectQualifier}fn_GetVersion(3,2,3)) = 0 BEGIN --Create Temp Table CREATE TABLE {databaseOwner}{objectQualifier}FlatProfile ( [UserID] [int] , [PortalID] [int], [Username] [nvarchar] (256) NULL , [FirstName] [nvarchar] (256) NULL , [LastName] [nvarchar] (256) NULL , [Street] [nvarchar] (256) NULL , [Unit] [nvarchar] (128) NULL , [City] [nvarchar] (256) NULL , [Country] [nvarchar] (256) NULL , [Region] [nvarchar] (256) NULL , [PostalCode] [nvarchar] (128) NULL , [Telephone] [nvarchar] (128) NULL , [Cell] [nvarchar] (128) NULL , [Fax] [nvarchar] (128) NULL , [Website] [nvarchar] (256) NULL , [IM] [nvarchar] (256) NULL, [PreferredLocale] [nvarchar] (128) NULL , [TimeZone] [nvarchar] (256) NULL, [LastUpdatedDate] [datetime] )
--Extract from Profile Blob to Temp Table INSERT INTO {objectQualifier}FlatProfile SELECT {objectQualifier}users.userid, {objectQualifier}userportals.portalid, {objectQualifier}users.username, {objectQualifier}users.firstname, {objectQualifier}users.lastname, {databaseOwner}{objectQualifier}GetProfileElement('Street',PropertyNames,PropertyValuesString) Street, {databaseOwner}{objectQualifier}GetProfileElement('Unit',PropertyNames,PropertyValuesString) Unit, {databaseOwner}{objectQualifier}GetProfileElement('City',PropertyNames,PropertyValuesString) City, {databaseOwner}{objectQualifier}GetProfileElement('Country',PropertyNames,PropertyValuesString) Country, {databaseOwner}{objectQualifier}GetProfileElement('Region',PropertyNames,PropertyValuesString) Region, {databaseOwner}{objectQualifier}GetProfileElement('PostalCode',PropertyNames,PropertyValuesString) PostalCode, {databaseOwner}{objectQualifier}GetProfileElement('Telephone',PropertyNames,PropertyValuesString) Telephone, {databaseOwner}{objectQualifier}GetProfileElement('Cell',PropertyNames,PropertyValuesString) Cell, {databaseOwner}{objectQualifier}GetProfileElement('Fax',PropertyNames,PropertyValuesString) Fax, {databaseOwner}{objectQualifier}GetProfileElement('Website',PropertyNames,PropertyValuesString) Website, {databaseOwner}{objectQualifier}GetProfileElement('IM',PropertyNames,PropertyValuesString) IM, {databaseOwner}{objectQualifier}GetProfileElement('PreferredLocale',PropertyNames,PropertyValuesString) PreferredLocale, {databaseOwner}{objectQualifier}GetProfileElement('TimeZone',PropertyNames,PropertyValuesString) TimeZone, aspnet_profile.LastUpdatedDate
FROM {objectQualifier}Users inner join {objectQualifier}userportals on {objectQualifier}users.userid = {objectQualifier}userportals.userid inner join aspnet_users on {objectQualifier}users.username = aspnet_users.username inner join aspnet_profile on aspnet_profile.userid = aspnet_users.userid where {objectQualifier}userportals.portalid = PortalID
--Move to UserProfile Table EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'FirstName' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'LastName' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Unit' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Street' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'City' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Region' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'PostalCode' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Country' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Telephone' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Fax' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Cell' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'Website' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'IM' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'TimeZone' EXECUTE {objectQualifier}TransferUsersFromFlatProfile N'PreferredLocale'
--Drop temp objects DROP TABLE {databaseOwner}{objectQualifier}FlatProfile DROP PROCEDURE {databaseOwner}{objectQualifier}TransferUsersFromFlatProfile END
GO
|
|
|
|
| |
|
| |
| |