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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrade V2.1.2 to V4.4.0 problemUpgrade V2.1.2 to V4.4.0 problem
Previous
 
Next
New Post
1/4/2007 10:18 AM
 

Hi all,

I'm french (nobody's perfect ), using DNN from its start for an extranet (around 22,000 registered users).
The current version of the site use DNN V2.1.2. We want to migrate to the latests 4.4.0 version.

So, in order to prepare the migration, I've tried to do it on my dev PC. I use VS 2005 and SQL200.
I've downloaded the starterkit package, and easily created an empty dnn4.4 web site.
Now, in order to migrate my database, I've modified my web.config, and maked it point to the V2.1.2 database.

When upgrading, several errors occurs (see list bellow, really sorry in advance for the long post).

Anyway, my web site seems to work fine. But when I try to connect with another account than host, I got an login error.
After severals tries, I've looked in the aspnet_Users and aspnet_Membership, and in both of them, there is only one record, the one corresponding to the host account.
And the weird thing is the Users table (DNN users) contains all my users (around 22,000).

So I can't say where I made a mistake, it all seems to be really easy to migrate with the starter kit.

As you can see bellow, some errors are caused by a collation problem. I've tried to change the database collation in Latin_CI_AS, it's worth (all upgrades failed).
I've listed all the log files for the failed upgrades. I add a header with the version, and I try to translate from french the error message.

Is there a way to migrate my web site easily?

Thanks in advance.

DA

===========================================
= 2.02.00 :                                                                             =
= Collation problem (but where ...),                                        =
= certainly in the                                                                     =
= dbo.aspnet_UsersInRoles_AddUsersToRoles                     =
= creation. So it explains the second error,                              =
= dbo.aspnet_UsersInRoles_AddUsersToRoles  not found.    =
===========================================

System.Data.SqlClient.SqlException: Impossible de résoudre le classement en conflit de l'opération equal to.
Impossible de résoudre le classement en conflit de l'opération equal to.
   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)


DECLARE @ver            int
DECLARE @version        nchar(100)
DECLARE @dot            int
DECLARE @hyphen         int
DECLARE @SqlToExec      nchar(4000)

SELECT @ver = 7
SELECT @version = @@Version
SELECT @hyphen  = CHARINDEX(N' - ', @version)
IF (NOT(@hyphen IS NULL) AND @hyphen > 0)
BEGIN
    SELECT @hyphen = @hyphen + 3
    SELECT @dot    = CHARINDEX(N'.', @version, @hyphen)
    IF (NOT(@dot IS NULL) AND @dot > @hyphen)
    BEGIN
        SELECT @version = SUBSTRING(@version, @hyphen, @dot - @hyphen)
        SELECT @ver     = CONVERT(int, @version)
    END
END

IF (@ver > 7)
SELECT @SqlToExec = N'
CREATE PROCEDURE dbo.aspnet_UsersInRoles_AddUsersToRoles
 @ApplicationName  nvarchar(256),
 @UserNames    nvarchar(4000),
 @RoleNames    nvarchar(4000),
 @CurrentTimeUtc   datetime
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)
 DECLARE @TranStarted   bit
 SET @TranStarted = 0

 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @tbNames table(Name nvarchar(256) NOT NULL PRIMARY KEY)
 DECLARE @tbRoles table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @tbUsers table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @Num  int
 DECLARE @Pos  int
 DECLARE @NextPos int
 DECLARE @Name  nvarchar(256)

 SET @Num = 0
 SET @Pos = 1
 WHILE(@Pos <= LEN(@RoleNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N'','', @RoleNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@RoleNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbRoles
   SELECT RoleId
   FROM   dbo.aspnet_Roles ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId

 IF (@@ROWCOUNT <> @Num)
 BEGIN
  SELECT TOP 1 Name
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(2)
 END

 DELETE FROM @tbNames WHERE 1=1
 SET @Num = 0
 SET @Pos = 1

 WHILE(@Pos <= LEN(@UserNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N'','', @UserNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@UserNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbUsers
   SELECT UserId
   FROM   dbo.aspnet_Users ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

 IF (@@ROWCOUNT <> @Num)
 BEGIN
  DELETE FROM @tbNames
  WHERE LOWER(Name) IN (SELECT LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE au.UserId = u.UserId)

  INSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate)
    SELECT @AppId, NEWID(), Name, LOWER(Name), 0, @CurrentTimeUtc
    FROM   @tbNames

  INSERT INTO @tbUsers
    SELECT  UserId
    FROM dbo.aspnet_Users au, @tbNames t
    WHERE   LOWER(t.Name) = au.LoweredUserName AND au.ApplicationId = @AppId
 END

 IF (EXISTS (SELECT * FROM dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr WHERE tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId))
 BEGIN
  SELECT TOP 1 UserName, RoleName
  FROM   dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr, aspnet_Users u, aspnet_Roles r
  WHERE  u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId

  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(3)
 END

 INSERT INTO dbo.aspnet_UsersInRoles (UserId, RoleId)
 SELECT UserId, RoleId
 FROM @tbUsers, @tbRoles

 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END'
ELSE
SELECT @SqlToExec = N'
CREATE PROCEDURE dbo.aspnet_UsersInRoles_AddUsersToRoles
 @ApplicationName nvarchar(256),
 @UserNames   nvarchar(4000),
 @RoleNames   nvarchar(4000),
 @CurrentTimeUtc  datetime
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)

 DECLARE @TranStarted   bit
 SET @TranStarted = 0
 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @RoleId  uniqueidentifier
 DECLARE @UserId  uniqueidentifier
 DECLARE @UserName nvarchar(256)
 DECLARE @RoleName nvarchar(256)

 DECLARE @CurrentPosU int
 DECLARE @NextPosU  int
 DECLARE @CurrentPosR int
 DECLARE @NextPosR  int

 SELECT  @CurrentPosU = 1

 WHILE(@CurrentPosU <= LEN(@UserNames))
 BEGIN
  SELECT @NextPosU = CHARINDEX(N'','', @UserNames,  @CurrentPosU)
  IF (@NextPosU = 0 OR @NextPosU IS NULL)
   SELECT @NextPosU = LEN(@UserNames) + 1

  SELECT @UserName = SUBSTRING(@UserNames, @CurrentPosU, @NextPosU - @CurrentPosU)
  SELECT @CurrentPosU = @NextPosU+1

  SELECT @CurrentPosR = 1
  WHILE(@CurrentPosR <= LEN(@RoleNames))
  BEGIN
   SELECT @NextPosR = CHARINDEX(N'','', @RoleNames,  @CurrentPosR)
   IF (@NextPosR = 0 OR @NextPosR IS NULL)
    SELECT @NextPosR = LEN(@RoleNames) + 1
   SELECT @RoleName = SUBSTRING(@RoleNames, @CurrentPosR, @NextPosR - @CurrentPosR)
   SELECT @CurrentPosR = @NextPosR+1
   SELECT @RoleId = NULL
   SELECT @RoleId = RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @AppId
   IF (@RoleId IS NULL)
   BEGIN
    SELECT @RoleName
    IF( @TranStarted = 1 )
     ROLLBACK TRANSACTION
    RETURN(2)
   END

   SELECT @UserId = NULL
   SELECT @UserId = UserId FROM dbo.aspnet_Users WHERE LoweredUserName = LOWER(@UserName) AND ApplicationId = @AppId
   IF (@UserId IS NULL)
   BEGIN
    EXEC dbo.aspnet_Users_CreateUser @AppId, @UserName, 0, @CurrentTimeUtc, @UserId OUTPUT
   END

   IF (EXISTS(SELECT * FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId AND @RoleId = RoleId))
   BEGIN
    SELECT @UserName, @RoleName
    IF( @TranStarted = 1 )
     ROLLBACK TRANSACTION
    RETURN(3)
   END
   INSERT INTO dbo.aspnet_UsersInRoles (UserId, RoleId) VALUES(@UserId, @RoleId)
  END
 END
 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END'

EXEC sp_executesql @SqlToExec

IF (@ver > 7)
SELECT @SqlToExec = N'
CREATE PROCEDURE dbo.aspnet_UsersInRoles_RemoveUsersFromRoles
 @ApplicationName  nvarchar(256),
 @UserNames    nvarchar(4000),
 @RoleNames    nvarchar(4000)
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)


 DECLARE @TranStarted   bit
 SET @TranStarted = 0

 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @tbNames  table(Name nvarchar(256) NOT NULL PRIMARY KEY)
 DECLARE @tbRoles  table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @tbUsers  table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @Num   int
 DECLARE @Pos   int
 DECLARE @NextPos  int
 DECLARE @Name   nvarchar(256)
 DECLARE @CountAll int
 DECLARE @CountU   int
 DECLARE @CountR   int


 SET @Num = 0
 SET @Pos = 1
 WHILE(@Pos <= LEN(@RoleNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N'','', @RoleNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@RoleNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbRoles
   SELECT RoleId
   FROM   dbo.aspnet_Roles ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId
 SELECT @CountR = @@ROWCOUNT

 IF (@CountR <> @Num)
 BEGIN
  SELECT TOP 1 N'''', Name
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(2)
 END


 DELETE FROM @tbNames WHERE 1=1
 SET @Num = 0
 SET @Pos = 1


 WHILE(@Pos <= LEN(@UserNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N'','', @UserNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@UserNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbUsers
   SELECT UserId
   FROM   dbo.aspnet_Users ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

 SELECT @CountU = @@ROWCOUNT
 IF (@CountU <> @Num)
 BEGIN
  SELECT TOP 1 Name, N''''
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT au.LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE u.UserId = au.UserId)

  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(1)
 END

 SELECT  @CountAll = COUNT(*)
 FROM dbo.aspnet_UsersInRoles ur, @tbUsers u, @tbRoles r
 WHERE   ur.UserId = u.UserId AND ur.RoleId = r.RoleId

 IF (@CountAll <> @CountU * @CountR)
 BEGIN
  SELECT TOP 1 UserName, RoleName
  FROM   @tbUsers tu, @tbRoles tr, dbo.aspnet_Users u, dbo.aspnet_Roles r
  WHERE   u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND
      tu.UserId NOT IN (SELECT ur.UserId FROM dbo.aspnet_UsersInRoles ur WHERE ur.RoleId = tr.RoleId) AND
      tr.RoleId NOT IN (SELECT ur.RoleId FROM dbo.aspnet_UsersInRoles ur WHERE ur.UserId = tu.UserId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(3)
 END

 DELETE FROM dbo.aspnet_UsersInRoles
 WHERE UserId IN (SELECT UserId FROM @tbUsers)
   AND RoleId IN (SELECT RoleId FROM @tbRoles)
 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END
'
ELSE
SELECT @SqlToExec = N'
CREATE PROCEDURE dbo.aspnet_UsersInRoles_RemoveUsersFromRoles
 @ApplicationName  nvarchar(256),
 @UserNames    nvarchar(4000),
 @RoleNames    nvarchar(4000)
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)


 DECLARE @TranStarted   bit
 SET @TranStarted = 0

 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @RoleId  uniqueidentifier
 DECLARE @UserId  uniqueidentifier
 DECLARE @UserName nvarchar(256)
 DECLARE @RoleName nvarchar(256)

 DECLARE @CurrentPosU int
 DECLARE @NextPosU  int
 DECLARE @CurrentPosR int
 DECLARE @NextPosR  int

 SELECT  @CurrentPosU = 1

 WHILE(@CurrentPosU <= LEN(@UserNames))
 BEGIN
  SELECT @NextPosU = CHARINDEX(N'','', @UserNames,  @CurrentPosU)
  IF (@NextPosU = 0  OR @NextPosU IS NULL)
   SELECT @NextPosU = LEN(@UserNames)+1
  SELECT @UserName = SUBSTRING(@UserNames, @CurrentPosU, @NextPosU - @CurrentPosU)
  SELECT @CurrentPosU = @NextPosU+1

  SELECT @CurrentPosR = 1
  WHILE(@CurrentPosR <= LEN(@RoleNames))
  BEGIN
   SELECT @NextPosR = CHARINDEX(N'','', @RoleNames,  @CurrentPosR)
   IF (@NextPosR = 0 OR @NextPosR IS NULL)
    SELECT @NextPosR = LEN(@RoleNames)+1
   SELECT @RoleName = SUBSTRING(@RoleNames, @CurrentPosR, @NextPosR - @CurrentPosR)
   SELECT @CurrentPosR = @NextPosR+1

   SELECT @RoleId = NULL
   SELECT @RoleId = RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @AppId
   IF (@RoleId IS NULL)
   BEGIN
    SELECT N'''', @RoleName
    IF( @TranStarted = 1 )
     ROLLBACK TRANSACTION
    RETURN(2)
   END

   SELECT @UserId = NULL
   SELECT @UserId = UserId FROM dbo.aspnet_Users WHERE LoweredUserName = LOWER(@UserName) AND ApplicationId = @AppId
   IF (@UserId IS NULL)
   BEGIN
    SELECT @UserName, N''''
    IF( @TranStarted = 1 )
     ROLLBACK TRANSACTION
    RETURN(1)
   END

   IF (NOT(EXISTS(SELECT * FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId AND @RoleId = RoleId)))
   BEGIN
    SELECT @UserName, @RoleName
    IF( @TranStarted = 1 )
     ROLLBACK TRANSACTION
    RETURN(3)
   END
   DELETE FROM dbo.aspnet_UsersInRoles WHERE (UserId = @UserId AND RoleId = @RoleId)
  END
 END
 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END
'
EXEC sp_executesql @SqlToExec


System.Data.SqlClient.SqlException: 'dbo.aspnet_UsersInRoles_AddUsersToRoles' : nom d'objet incorrect.
'dbo.aspnet_UsersInRoles_RemoveUsersFromRoles' : nom d'objet incorrect.
   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)


--
--Stored Procedure rights for BasicAccess
--
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_IsUserInRole TO aspnet_Roles_BasicAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_GetRolesForUser TO aspnet_Roles_BasicAccess
GRANT EXECUTE ON dbo.aspnet_CheckSchemaVersion TO aspnet_Roles_BasicAccess
GRANT EXECUTE ON dbo.aspnet_RegisterSchemaVersion TO aspnet_Roles_BasicAccess
GRANT EXECUTE ON dbo.aspnet_UnRegisterSchemaVersion TO aspnet_Roles_BasicAccess

--
--Stored Procedure rights for ReportingAccess
--
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_IsUserInRole TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_GetRolesForUser TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_Roles_RoleExists TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_GetUsersInRoles TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_FindUsersInRole TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_Roles_GetAllRoles TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_CheckSchemaVersion TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_RegisterSchemaVersion TO aspnet_Roles_ReportingAccess
GRANT EXECUTE ON dbo.aspnet_UnRegisterSchemaVersion TO aspnet_Roles_ReportingAccess

--
--Additional stored procedure rights for FullAccess
--

GRANT EXECUTE ON dbo.aspnet_Roles_CreateRole TO aspnet_Roles_FullAccess
GRANT EXECUTE ON dbo.aspnet_Roles_DeleteRole TO aspnet_Roles_FullAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_AddUsersToRoles TO aspnet_Roles_FullAccess
GRANT EXECUTE ON dbo.aspnet_UsersInRoles_RemoveUsersFromRoles TO aspnet_Roles_FullAccess

--
--View rights
--
GRANT SELECT ON dbo.vw_aspnet_Applications TO aspnet_Roles_ReportingAccess
GRANT SELECT ON dbo.vw_aspnet_Users TO aspnet_Roles_ReportingAccess

GRANT SELECT ON dbo.vw_aspnet_Roles TO aspnet_Roles_ReportingAccess
GRANT SELECT ON dbo.vw_aspnet_UsersInRoles TO aspnet_Roles_ReportingAccess

 

===========================================
= 2.02.02 :                                                                             =
= Unable to insert NULL value in                                            =
= 'NewWindow'column, table                                                 =
= 'PortailScam.dbo.UrlTracking'                                             =
===========================================

System.Data.SqlClient.SqlException: Impossible d'insérer la valeur NULL dans la colonne 'NewWindow', table 'PortailScam.dbo.UrlTracking'. Cette colonne n'accepte pas les valeurs NULL. UPDATE a échoué.
L'instruction a été arrêtée.
   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)


update UrlTracking
set    NewWindow = ( select NewWindow from Links where UrlTracking.ModuleId = Links.ModuleId and UrlTracking.Url = Links.Url )

 

===========================================
= 3.02.03 :                                                                             =
= Conflict between Alter Table instruction                               =
= and COLUMN FOREIGN KEY 'FK_Files_Folders'          =
= constraint.                                                                           =
= table 'Folders', column 'FolderID'                                        =
===========================================

System.Data.SqlClient.SqlException: Conflit entre l'instruction ALTER TABLE et la contrainte COLUMN FOREIGN KEY 'FK_Files_Folders'. Le conflit est survenu dans la base de données 'PortailScam', table 'Folders', column 'FolderID'.
   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)


ALTER TABLE dbo.Files ADD CONSTRAINT
 FK_Files_Folders FOREIGN KEY
 (
 FolderID
 ) REFERENCES dbo.Folders
 (
 FolderID
 )

 

===========================================
= 3.03.01 :                                                                             =
= Same as previous one                                                          =
===========================================

System.Data.SqlClient.SqlException: Conflit entre l'instruction ALTER TABLE et la contrainte COLUMN FOREIGN KEY 'FK_Files_Folders'. Le conflit est survenu dans la base de données 'PortailScam', table 'Folders', column 'FolderID'.
   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)


/* This sets all cache root folders to protected */
/*************************************************/

UPDATE Folders
 SET     IsProtected = 1
WHERE
 FolderPath = 'Cache/'

/* This tries to apply a foreign key on the files/folders tables */
/*****************************************************************/

IF NOT EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'FK_Files_Folders') AND OBJECTPROPERTY(id, N'IsForeignKey') = 1)
 BEGIN
  ALTER TABLE dbo.Files ADD CONSTRAINT
   FK_Files_Folders FOREIGN KEY
   (
   FolderID
   ) REFERENCES dbo.Folders
   (
   FolderID
   )
 END

 

===========================================
= 4.00.00 :                                                                             =
= Collation Problem in error #1 and #2                                   =
= Can't create 'aspnet_AnyDataInTables' in                            =
= error #3, it already exists                                                     =
===========================================

System.Data.SqlClient.SqlException: Impossible de résoudre le classement en conflit de l'opération equal to.
   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)


ALTER PROCEDURE dbo.aspnet_UsersInRoles_RemoveUsersFromRoles
 @ApplicationName  nvarchar(256),
 @UserNames    nvarchar(4000),
 @RoleNames    nvarchar(4000)
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)


 DECLARE @TranStarted   bit
 SET @TranStarted = 0

 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @tbNames  table(Name nvarchar(256) NOT NULL PRIMARY KEY)
 DECLARE @tbRoles  table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @tbUsers  table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @Num   int
 DECLARE @Pos   int
 DECLARE @NextPos  int
 DECLARE @Name   nvarchar(256)
 DECLARE @CountAll int
 DECLARE @CountU   int
 DECLARE @CountR   int


 SET @Num = 0
 SET @Pos = 1
 WHILE(@Pos <= LEN(@RoleNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N',', @RoleNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@RoleNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbRoles
   SELECT RoleId
   FROM   dbo.aspnet_Roles ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId
 SELECT @CountR = @@ROWCOUNT

 IF (@CountR <> @Num)
 BEGIN
  SELECT TOP 1 N'', Name
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(2)
 END


 DELETE FROM @tbNames WHERE 1=1
 SET @Num = 0
 SET @Pos = 1


 WHILE(@Pos <= LEN(@UserNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N',', @UserNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@UserNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbUsers
   SELECT UserId
   FROM   dbo.aspnet_Users ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

 SELECT @CountU = @@ROWCOUNT
 IF (@CountU <> @Num)
 BEGIN
  SELECT TOP 1 Name, N''
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT au.LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE u.UserId = au.UserId)

  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(1)
 END

 SELECT  @CountAll = COUNT(*)
 FROM dbo.aspnet_UsersInRoles ur, @tbUsers u, @tbRoles r
 WHERE   ur.UserId = u.UserId AND ur.RoleId = r.RoleId

 IF (@CountAll <> @CountU * @CountR)
 BEGIN
  SELECT TOP 1 UserName, RoleName
  FROM   @tbUsers tu, @tbRoles tr, dbo.aspnet_Users u, dbo.aspnet_Roles r
  WHERE   u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND
      tu.UserId NOT IN (SELECT ur.UserId FROM dbo.aspnet_UsersInRoles ur WHERE ur.RoleId = tr.RoleId) AND
      tr.RoleId NOT IN (SELECT ur.RoleId FROM dbo.aspnet_UsersInRoles ur WHERE ur.UserId = tu.UserId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(3)
 END

 DELETE FROM dbo.aspnet_UsersInRoles
 WHERE UserId IN (SELECT UserId FROM @tbUsers)
   AND RoleId IN (SELECT RoleId FROM @tbRoles)
 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       


System.Data.SqlClient.SqlException: Impossible de résoudre le classement en conflit de l'opération equal to.
   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)


ALTER PROCEDURE dbo.aspnet_UsersInRoles_AddUsersToRoles
 @ApplicationName  nvarchar(256),
 @UserNames    nvarchar(4000),
 @RoleNames    nvarchar(4000),
 @CurrentTimeUtc   datetime
AS
BEGIN
 DECLARE @AppId uniqueidentifier
 SELECT  @AppId = NULL
 SELECT  @AppId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
 IF (@AppId IS NULL)
  RETURN(2)
 DECLARE @TranStarted   bit
 SET @TranStarted = 0

 IF( @@TRANCOUNT = 0 )
 BEGIN
  BEGIN TRANSACTION
  SET @TranStarted = 1
 END

 DECLARE @tbNames table(Name nvarchar(256) NOT NULL PRIMARY KEY)
 DECLARE @tbRoles table(RoleId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @tbUsers table(UserId uniqueidentifier NOT NULL PRIMARY KEY)
 DECLARE @Num  int
 DECLARE @Pos  int
 DECLARE @NextPos int
 DECLARE @Name  nvarchar(256)

 SET @Num = 0
 SET @Pos = 1
 WHILE(@Pos <= LEN(@RoleNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N',', @RoleNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@RoleNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@RoleNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbRoles
   SELECT RoleId
   FROM   dbo.aspnet_Roles ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredRoleName AND ar.ApplicationId = @AppId

 IF (@@ROWCOUNT <> @Num)
 BEGIN
  SELECT TOP 1 Name
  FROM   @tbNames
  WHERE  LOWER(Name) NOT IN (SELECT ar.LoweredRoleName FROM dbo.aspnet_Roles ar,  @tbRoles r WHERE r.RoleId = ar.RoleId)
  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(2)
 END

 DELETE FROM @tbNames WHERE 1=1
 SET @Num = 0
 SET @Pos = 1

 WHILE(@Pos <= LEN(@UserNames))
 BEGIN
  SELECT @NextPos = CHARINDEX(N',', @UserNames,  @Pos)
  IF (@NextPos = 0 OR @NextPos IS NULL)
   SELECT @NextPos = LEN(@UserNames) + 1
  SELECT @Name = RTRIM(LTRIM(SUBSTRING(@UserNames, @Pos, @NextPos - @Pos)))
  SELECT @Pos = @NextPos+1

  INSERT INTO @tbNames VALUES (@Name)
  SET @Num = @Num + 1
 END

 INSERT INTO @tbUsers
   SELECT UserId
   FROM   dbo.aspnet_Users ar, @tbNames t
   WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @AppId

 IF (@@ROWCOUNT <> @Num)
 BEGIN
  DELETE FROM @tbNames
  WHERE LOWER(Name) IN (SELECT LoweredUserName FROM dbo.aspnet_Users au,  @tbUsers u WHERE au.UserId = u.UserId)

  INSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate)
    SELECT @AppId, NEWID(), Name, LOWER(Name), 0, @CurrentTimeUtc
    FROM   @tbNames

  INSERT INTO @tbUsers
    SELECT  UserId
    FROM dbo.aspnet_Users au, @tbNames t
    WHERE   LOWER(t.Name) = au.LoweredUserName AND au.ApplicationId = @AppId
 END

 IF (EXISTS (SELECT * FROM dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr WHERE tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId))
 BEGIN
  SELECT TOP 1 UserName, RoleName
  FROM   dbo.aspnet_UsersInRoles ur, @tbUsers tu, @tbRoles tr, aspnet_Users u, aspnet_Roles r
  WHERE  u.UserId = tu.UserId AND r.RoleId = tr.RoleId AND tu.UserId = ur.UserId AND tr.RoleId = ur.RoleId

  IF( @TranStarted = 1 )
   ROLLBACK TRANSACTION
  RETURN(3)
 END

 INSERT INTO dbo.aspnet_UsersInRoles (UserId, RoleId)
 SELECT UserId, RoleId
 FROM @tbUsers, @tbRoles

 IF( @TranStarted = 1 )
  COMMIT TRANSACTION
 RETURN(0)
END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    


System.Data.SqlClient.SqlException: Il existe déjà un objet nommé 'aspnet_AnyDataInTables' dans la base de données.
   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)


CREATE PROCEDURE [dbo].aspnet_AnyDataInTables
    @TablesToCheck int
AS
BEGIN
    -- Check Membership table if (@TablesToCheck & 1) is set
    IF ((@TablesToCheck & 1) <> 0 AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership))
        BEGIN
            SELECT N'aspnet_Membership'
            RETURN
        END
    END

    -- Check aspnet_Roles table if (@TablesToCheck & 2) is set
    IF ((@TablesToCheck & 2) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Roles') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 RoleId FROM dbo.aspnet_Roles))
        BEGIN
            SELECT N'aspnet_Roles'
            RETURN
        END
    END

    -- Check aspnet_Profile table if (@TablesToCheck & 4) is set
    IF ((@TablesToCheck & 4) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Profile))
        BEGIN
            SELECT N'aspnet_Profile'
            RETURN
        END
    END

    -- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 8) is set
    IF ((@TablesToCheck & 8) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_PersonalizationPerUser))
        BEGIN
            SELECT N'aspnet_PersonalizationPerUser'
            RETURN
        END
    END

    -- Check aspnet_PersonalizationPerUser table if (@TablesToCheck & 16) is set
    IF ((@TablesToCheck & 16) <> 0  AND
        (EXISTS (SELECT name FROM sysobjects WHERE (name = N'aspnet_WebEvent_LogEvent') AND (type = 'P'))) )
    BEGIN
        IF (EXISTS(SELECT TOP 1 * FROM dbo.aspnet_WebEvent_Events))
        BEGIN
            SELECT N'aspnet_WebEvent_Events'
            RETURN
        END
    END

    -- Check aspnet_Users table if (@TablesToCheck & 1,2,4 & 8) are all set
    IF ((@TablesToCheck & 1) <> 0 AND
        (@TablesToCheck & 2) <> 0 AND
        (@TablesToCheck & 4) <> 0 AND
        (@TablesToCheck & 8) <> 0 AND
        (@TablesToCheck & 32) <> 0 AND
        (@TablesToCheck & 128) <> 0 AND
        (@TablesToCheck & 256) <> 0 AND
        (@TablesToCheck & 512) <> 0 AND
        (@TablesToCheck & 1024) <> 0)
    BEGIN
        IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Users))
        BEGIN
            SELECT N'aspnet_Users'
            RETURN
        END
        IF (EXISTS(SELECT TOP 1 ApplicationId FROM dbo.aspnet_Applications))
        BEGIN
            SELECT N'aspnet_Applications'
            RETURN
        END
    END
END

 

===========================================
= 4.03.01 :                                                                             =
= Same error as in 3.02.03                                                     =
===========================================

System.Data.SqlClient.SqlException: Conflit entre l'instruction ALTER TABLE et la contrainte COLUMN FOREIGN KEY 'FK_Files_Folders'. Le conflit est survenu dans la base de données 'PortailScam', table 'Folders', column 'FolderID'.
   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)


/* This tries to apply a foreign key on the files/folders tables */
/*****************************************************************/

IF NOT EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'FK_Files_Folders') AND OBJECTPROPERTY(id, N'IsForeignKey') = 1)
 BEGIN
  ALTER TABLE dbo.Files ADD CONSTRAINT
   FK_Files_Folders FOREIGN KEY
   (
   FolderID
   ) REFERENCES dbo.Folders
   (
   FolderID
   )
 END

 
New Post
1/4/2007 2:28 PM
 
please refer to the installation manual, how to perform an upgrade and, if difficulties persist, I would try to upgrade in steps using DNN 3.0.13 and interim version.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/4/2007 4:46 PM
 
3.0.13 doesn't seem to be available anymore on sourceforge, earliest dnn 3 version is 3.1

Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Upgrade V2.1.2 to V4.4.0 problemUpgrade V2.1.2 to V4.4.0 problem


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