Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...error updating dnn 06.01.00 to 06.01.05 with FK_dnn60_AnonymousUsers_dnn60_Portalserror updating dnn 06.01.00 to 06.01.05 with FK_dnn60_AnonymousUsers_dnn60_Portals'
Previous
 
Next
New Post
4/20/2012 1:01 PM
 

hello, as the subject says i have an error trying to update my dnn, the line says something like 

00:00:01.921 -   Executing Script: 06.01.05.SqlDataProvider Error! (see 06.01.05.log.resources for more information)

i look at db and the FK_dnn602_AnonymousUsers_dnn602_Portals exist and the table dnn602_AnonymousUsers 

is empty.

it is a dnn installation with two portals, and the content of 06.01.05.log.resources is.. 

System.Data.SqlClient.SqlException (0x80131904): 'FK_dnn60_AnonymousUsers_dnn60_Portals' no es una restricción.  (there isn´t a restriction) No se puede quitar la restricción. Consulte los errores anteriores. (the restriction can´t be deleted , look for previus errors.)

Table Name: dnn60_AnonymousUsers Constraint:FK_dnn60_AnonymousUsers_dnn60_Portals
Table Name: dnn60_AnonymousUsers Constraint:FK_dnn60_AnonymousUsers_dnn60_Portals
   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)


/************************************************************/
/*****              SqlDataProvider                     *****/
/*****                                                  *****/
/*****                                                  *****/
/***** Note: To manually execute this script you must   *****/
/*****       perform a search and replace operation     *****/
/*****       for array. and dnn60_  *****/
/*****                                                  *****/
/************************************************************/






/************************************************************/
/*****              SqlDataProvider                     *****/
/************************************************************/


/** DNN-13280 - Clustered Primary Key for Portals **/


DECLARE @TableName nvarchar(128), @ConstraintName nvarchar(128), @UpdateRule nvarchar(128), @DeleteRule nvarchar(128) 
CREATE TABLE #constraints 

   TableName nvarchar(128), 
   ConstraintName nvarchar(128),
   UpdateRule nvarchar(128),    
   DeleteRule nvarchar(128)   

 
INSERT INTO #constraints  
SELECT
K_Table = FK.TABLE_NAME,
Constraint_Name = C.CONSTRAINT_NAME,
C.UPDATE_RULE,
C.DELETE_RULE
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME
INNER JOIN (
SELECT i1.TABLE_NAME, i2.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS i1
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE i2 ON i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME
WHERE i1.CONSTRAINT_TYPE = 'PRIMARY KEY'
) PT ON PT.TABLE_NAME = PK.TABLE_NAME
---- optional:
WHERE PK.TABLE_NAME IN ('dnn60_Portals')


DECLARE @SQLString nvarchar(500);
DECLARE remove_constraint_tables_cursor CURSOR FOR 
SELECT TableName, ConstraintName, UpdateRule, DeleteRule from #constraints


OPEN remove_constraint_tables_cursor
FETCH NEXT FROM remove_constraint_tables_cursor
INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
WHILE @@FETCH_STATUS = 0
BEGIN
 PRINT 'Table Name: ' + @TableName + ' Constraint:' +  @ConstraintName
 SET @SQLString = N'ALTER TABLE ' + @TableName + ' DROP CONSTRAINT ' + @ConstraintName
 EXEC sp_executesql @SQLString


 FETCH NEXT FROM remove_constraint_tables_cursor
 INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
END


CLOSE remove_constraint_tables_cursor
DEALLOCATE remove_constraint_tables_cursor


ALTER TABLE array.dnn60_Portals DROP CONSTRAINT PK_dnn60_Portals
ALTER TABLE array.dnn60_Portals ADD CONSTRAINT
 PK_dnn60_Portals PRIMARY KEY CLUSTERED 
 (
 PortalID
 )




DECLARE add_constraint_tables_cursor CURSOR FOR 
SELECT TableName, ConstraintName, UpdateRule, DeleteRule from #constraints


OPEN add_constraint_tables_cursor
FETCH NEXT FROM add_constraint_tables_cursor
INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
WHILE @@FETCH_STATUS = 0
BEGIN
 SET @SQLString = N'ALTER TABLE ' + @TableName + ' ADD CONSTRAINT ' + @ConstraintName
 + ' FOREIGN KEY (PortalID) REFERENCES array.dnn60_Portals (PortalID) ON UPDATE ' + @UpdateRule + ' ON DELETE ' + @DeleteRule
 PRINT @SQLString
 EXEC sp_executesql @SQLString
 FETCH NEXT FROM add_constraint_tables_cursor
 INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
END


CLOSE add_constraint_tables_cursor
DEALLOCATE add_constraint_tables_cursor




System.Data.SqlClient.SqlException (0x80131904): 'FK_dnn60_UserRoles_dnn60_Roles' no es una restricción.
No se puede quitar la restricción. Consulte los errores anteriores.
Table Name: dnn60_UserRoles Constraint:FK_dnn60_UserRoles_dnn60_Roles
Table Name: dnn60_UserRoles Constraint:FK_dnn60_UserRoles_dnn60_Roles
   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)








/** DNN-13278 - Clustered Primary Key for Roles  **/
DECLARE @TableName nvarchar(128), @ConstraintName nvarchar(128), @UpdateRule nvarchar(128), @DeleteRule nvarchar(128) 
CREATE TABLE #constraints 

   TableName nvarchar(128), 
   ConstraintName nvarchar(128),
   UpdateRule nvarchar(128),    
   DeleteRule nvarchar(128)   

 
INSERT INTO #constraints  
SELECT
K_Table = FK.TABLE_NAME,
Constraint_Name = C.CONSTRAINT_NAME,
C.UPDATE_RULE,
C.DELETE_RULE
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME
INNER JOIN (
SELECT i1.TABLE_NAME, i2.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS i1
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE i2 ON i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME
WHERE i1.CONSTRAINT_TYPE = 'PRIMARY KEY'
) PT ON PT.TABLE_NAME = PK.TABLE_NAME
---- optional:
WHERE PK.TABLE_NAME IN ('dnn60_Roles')


DECLARE @SQLString nvarchar(500);
DECLARE remove_constraint_tables_cursor CURSOR FOR 
SELECT TableName, ConstraintName, UpdateRule, DeleteRule from #constraints


OPEN remove_constraint_tables_cursor
FETCH NEXT FROM remove_constraint_tables_cursor
INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
WHILE @@FETCH_STATUS = 0
BEGIN
 PRINT 'Table Name: ' + @TableName + ' Constraint:' +  @ConstraintName
 SET @SQLString = N'ALTER TABLE ' + @TableName + ' DROP CONSTRAINT ' + @ConstraintName
 EXEC sp_executesql @SQLString


 FETCH NEXT FROM remove_constraint_tables_cursor
 INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
END


CLOSE remove_constraint_tables_cursor
DEALLOCATE remove_constraint_tables_cursor


ALTER TABLE array.dnn60_Roles DROP CONSTRAINT PK_dnn60_Roles
ALTER TABLE array.dnn60_Roles ADD CONSTRAINT
 PK_dnn60_Roles PRIMARY KEY CLUSTERED 
 (
 RoleID
 )




DECLARE add_constraint_tables_cursor CURSOR FOR 
SELECT TableName, ConstraintName, UpdateRule, DeleteRule from #constraints


OPEN add_constraint_tables_cursor
FETCH NEXT FROM add_constraint_tables_cursor
INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
WHILE @@FETCH_STATUS = 0
BEGIN
 SET @SQLString = N'ALTER TABLE ' + @TableName + ' ADD CONSTRAINT ' + @ConstraintName
 + ' FOREIGN KEY (RoleID) REFERENCES array.dnn60_Roles (RoleID) ON UPDATE ' + @UpdateRule + ' ON DELETE ' + @DeleteRule
 PRINT @SQLString
 EXEC sp_executesql @SQLString
 FETCH NEXT FROM add_constraint_tables_cursor
 INTO @TableName, @ConstraintName, @UpdateRule, @DeleteRule
END


CLOSE add_constraint_tables_cursor
DEALLOCATE add_constraint_tables_cursor

********* end of log file

i search for others with this errors but not found  related to FK_dnn60_AnonymousUsers_dnn60_Portals 

so if someone can show me the way it would be great. 

thanks.







 
New Post
4/21/2012 12:48 AM
 

Hi,

Please read my response here.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
4/25/2012 3:01 PM
 
 
New Post
4/25/2012 3:34 PM
 

hello 

well i tried again from 6.1.0 but this time, instead deleting the 06.01.05.SqlDataProvider file, i emptied the file.
so the update process ends without errors, now the question is, how can i be sure my dnn installation is ok?

is the process correct?


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...error updating dnn 06.01.00 to 06.01.05 with FK_dnn60_AnonymousUsers_dnn60_Portalserror updating dnn 06.01.00 to 06.01.05 with FK_dnn60_AnonymousUsers_dnn60_Portals'


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out