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...Upgrade FailureUpgrade Failure
Previous
 
Next
New Post
7/26/2011 12:08 AM
 
Help!

I upgraded from 5.6.0 to 6.00.00, and hit the following error. Where do I look for "06.00.00.log.resources" for more information? Can anyone help me!

Upgrading DotNetNuke

Current Assembly Version: 06.00.00

Current Database Version: 05.06.00



Upgrade Status Report

00:00:00.062 - Upgrading to Version: 06.00.00
00:00:00.500 -   Executing Script: 05.06.01.SqlDataProvider Success
00:00:01.453 -   Executing Script: 05.06.02.SqlDataProvider Success
00:00:00.062 -   Executing Script: 05.06.03.SqlDataProvider Success
00:00:00.281 -   Executing Script: 06.00.00.SqlDataProvider Error! (see 06.00.00.log.resources for more information)
00:00:14.140 -   Executing Application Upgrades: 05.06.01 Success
00:00:14.140 -   Executing Application Upgrades: 05.06.02 Success
00:00:00.437 -   Executing Application Upgrades: 05.06.03 Success
00:00:00.437 -   Executing Application Upgrades: 06.00.00 Success
00:00:02.328 -   Cleaning Up Files: 05.06.01 Success
00:00:02.328 -   Cleaning Up Files: 05.06.02 Success
00:00:02.328 -   Cleaning Up Files: 05.06.03 Success
00:00:02.328 -   Cleaning Up Files: 06.00.00 Success
00:00:02.328 -   Updating Config Files: 05.06.01 Success
00:00:02.328 -   Updating Config Files: 05.06.02 Success
00:00:02.328 -   Updating Config Files: 05.06.03 Success
00:00:02.328 -   Updating Config Files: 06.00.00 Success
00:00:02.328 - Performing General Upgrades
00:00:02.390 - Installing Optional Modules:
00:00:02.390 -   Installing Package File DDRMenu_01.99.05_Install:

 


Server Error in '/' Application.

Sequence contains more than one element

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Sequence contains more than one element

Source Error: 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace: 

[InvalidOperationException: Sequence contains more than one element] System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +733812 lambda_method(ExecutionScope ) +129 System.Linq.EnumerableExecutor`1.Execute() +175 System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +114 System.Linq.Queryable.SingleOrDefault(IQueryable`1 source) +269 DotNetNuke.Entities.Content.Taxonomy.TermController.GetTermsByVocabulary(String vocabularyName) +320 DotNetNuke.Entities.Modules.DesktopModuleInfo.set_Category(String value) +72 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) +92 System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) +25 DotNetNuke.Common.Utilities.CBO.InitializeObject(Object objObject) +154 DotNetNuke.Common.Utilities.CBO.CreateObject(Type objType, Boolean initialise) +40 DotNetNuke.Common.Utilities.CBO.CreateObject(Boolean initialise) +57 DotNetNuke.Common.Utilities.CBO.DeserializeObject(XmlReader reader) +57 DotNetNuke.Common.Utilities.CBO.DeserializeObject(TextReader reader) +67 DotNetNuke.Services.Installer.Installers.ModuleInstaller.ReadManifest(XPathNavigator manifestNav) +95 DotNetNuke.Services.Installer.Installers.InstallerFactory.GetInstaller(XPathNavigator manifestNav, PackageInfo package) +216 DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadComponents(XPathNavigator manifestNav) +384 DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadManifest(XPathNavigator manifestNav) +3613 DotNetNuke.Services.Installer.Installers.PackageInstaller..ctor(String packageManifest, InstallerInfo info) +196 DotNetNuke.Services.Installer.Installer.ProcessPackages(XPathNavigator rootNav) +300 DotNetNuke.Services.Installer.Installer.ReadManifest(Stream stream) +351 DotNetNuke.Services.Installer.Installer.ReadManifest(Boolean deleteTemp) +102 DotNetNuke.Services.Installer.Installer..ctor(Stream inputStream, String physicalSitePath, Boolean loadManifest, Boolean deleteTemp) +104 DotNetNuke.Services.Upgrade.Upgrade.InstallPackage(String file, String packageType, Boolean writeFeedback) +234 DotNetNuke.Services.Upgrade.Upgrade.InstallPackages(String packageType, Boolean writeFeedback) +247 DotNetNuke.Services.Install.Install.UpgradeApplication() +920 DotNetNuke.Services.Install.Install.OnLoad(EventArgs e) +275 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 


Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

I would like to show where
 
New Post
7/26/2011 12:23 AM
 
Here is 06.00.00.log.resources with errors in it.

I will admit, I am completely lost as to what to do now!

Kevin

System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_FolderMappings'. Cannot insert duplicate key in object 'dbo.FolderMappings'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/* Insert Default Portal Folder Mappings */
/*****************************************/

IF (SELECT COUNT(PortalID) FROM dbo.[Portals]) > 0 BEGIN
 DECLARE @PortalID int
 
 DECLARE portal_cursor CURSOR FOR
 SELECT PortalID FROM dbo.[Portals]

 OPEN portal_cursor

 FETCH NEXT FROM portal_cursor INTO @PortalID

 WHILE @@FETCH_STATUS = 0
 BEGIN
  IF NOT EXISTS(SELECT FolderMappingID FROM dbo.[FolderMappings] WHERE PortalID = @PortalID AND MappingName = 'Standard')
  BEGIN
   INSERT INTO dbo.[FolderMappings] (PortalID, MappingName, FolderProviderType, Priority)
   VALUES (@PortalID, 'Standard', 'StandardFolderProvider', 1)
  END

  IF NOT EXISTS(SELECT FolderMappingID FROM dbo.[FolderMappings] WHERE PortalID = @PortalID AND MappingName = 'Secure')
  BEGIN
   INSERT INTO dbo.[FolderMappings] (PortalID, MappingName, FolderProviderType, Priority)
   VALUES (@PortalID, 'Secure', 'SecureFolderProvider', 2)
  END

  IF NOT EXISTS(SELECT FolderMappingID FROM dbo.[FolderMappings] WHERE PortalID = @PortalID AND MappingName = 'Database')
  BEGIN
   INSERT INTO dbo.[FolderMappings] (PortalID, MappingName, FolderProviderType, Priority)
   VALUES (@PortalID, 'Database', 'DatabaseFolderProvider', 3)
  END

  FETCH NEXT FROM portal_cursor INTO @PortalID
 END
 
 CLOSE portal_cursor
 DEALLOCATE portal_cursor
END

System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'FolderMappingID' in table 'dbo.Folders' is specified more than once.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/* Add FolderMappingID column to Folders table and fill it with right values */
/*****************************************************************************/

ALTER TABLE dbo.[Folders] ADD [FolderMappingID] int NULL

System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name 'IconFile' in table 'dbo.Packages' is specified more than once.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/* Add IconFile Column to Packages  */
/************************************/
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME='Packages' AND COLUMN_NAME='IconFile')
 BEGIN
  -- Add new Column
  ALTER TABLE dbo.Packages
   ADD IconFile nvarchar(100) NULL
 END

System.Data.SqlClient.SqlException: There is already an object named 'AddPackage' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[AddPackage]
 @PortalID   int,
 @Name       nvarchar(128),
 @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,
 @CreatedByUserID int,
 @FolderName   nvarchar(127),
 @IconFile   nvarchar(100)
AS
 INSERT INTO dbo.Packages
 (
  PortalID,
  [Name],
  FriendlyName,
  [Description],
  PackageType,
  Version,
  License,
  Manifest,
  ReleaseNotes,
  [Owner],
  Organization,
  Url,
  Email,
  IsSystemPackage,
  [CreatedByUserID],
  [CreatedOnDate],
  [LastModifiedByUserID],
  [LastModifiedOnDate],
  FolderName,
  IconFile
 )
 VALUES (
  @PortalID,
  @Name,
  @FriendlyName,
  @Description,
  @PackageType,
  @Version,
  @License,
  @Manifest,
  @ReleaseNotes,
  @Owner,
  @Organization,
  @Url,
  @Email,
  @IsSystemPackage,
  @CreatedByUserID,
  getdate(),
  @CreatedByUserID,
  getdate(),
  @FolderName,
  @IconFile
 )
 SELECT SCOPE_IDENTITY()

System.Data.SqlClient.SqlException: Cannot drop the procedure 'dbo.GetModuleDefinition', because it does not exist or you do not have permission.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/* Drop GetModuleDefinition */
/****************************/

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.[GetModuleDefinition]') AND type in (N'P', N'PC'))
 DROP PROCEDURE dbo.[GetModuleDefinition]

System.Data.SqlClient.SqlException: There is already an object named 'GetEventLog' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[GetEventLog]
 @PortalID int,
 @LogTypeKey nvarchar(35),
 @PageSize int,
 @PageIndex int
AS
begin
 -- Set the page bounds
 DECLARE @PageLowerBound INT
  , @PageUpperBound INT
  , @RowsToReturn int
  , @TotalRecords int

 exec dbo.CalculatePagingInformation @PageIndex, @PageSize, @RowsToReturn output, @PageLowerBound output, @PageUpperBound output

 begin with [eLog] as (
  select row_number() over (order by E.LogCreateDate desc) as rowid, e.*
  from dbo.EventLog e
  where (e.LogPortalID = @PortalID or @PortalID IS NULL)
   AND (e.LogTypeKey Like @LogTypeKey or @LogTypeKey IS NULL)
 )
  select * from [eLog]
  where rowid > @PageLowerBound and rowid < @PageUpperBound
  order by rowid
 end

 select count(*) AS TotalRecords
 from dbo.EventLog e
 where (e.LogPortalID = @PortalID or @PortalID IS NULL)
  AND (e.LogTypeKey Like @LogTypeKey or @LogTypeKey IS NULL)

END



System.Data.SqlClient.SqlException: There is already an object named 'GetFolders' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[GetFolders]
 @PortalID int
AS
BEGIN
 SELECT *
 FROM dbo.Folders
 WHERE (PortalID = @PortalID) OR (PortalID is null AND @PortalID is null)
 ORDER BY FolderPath
END

System.Data.SqlClient.SqlException: There is already an object named 'GetFolderByFolderID' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[GetFolderByFolderID]
 @FolderID int
AS
BEGIN
 SELECT *
 FROM dbo.[Folders]
 WHERE FolderID = @FolderID
END

System.Data.SqlClient.SqlException: There is already an object named 'aspnet_Membership_GetNumberOfUsersOnline' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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_Membership_GetNumberOfUsersOnline
 @ApplicationName            nvarchar(256),
 @MinutesSinceLastInActive   int,
 @CurrentTimeUtc             datetime
AS
 BEGIN
  DECLARE @DateActive datetime
  SELECT  @DateActive = DATEADD(minute,  -(@MinutesSinceLastInActive), @CurrentTimeUtc)

  DECLARE @NumOnline int
  SELECT  @NumOnline = COUNT(*)
  FROM    dbo.aspnet_Users u WITH (NOLOCK),
    dbo.aspnet_Applications a WITH (NOLOCK),
    dbo.aspnet_Membership m WITH (NOLOCK)
  WHERE   u.ApplicationId = a.ApplicationId                  AND
    LastActivityDate > @DateActive                     AND
    a.LoweredApplicationName = LOWER(@ApplicationName) AND
    u.UserId = m.UserId
  RETURN(@NumOnline)
 END

System.Data.SqlClient.SqlException: There is already an object named 'Dashboard_GetDbBackups' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.Dashboard_GetDbBackups
AS

IF CHARINDEX(@@VERSION, 'Azure') = 0
 EXEC ('SELECT TOP 20    
  name,
  backup_start_date as StartDate,
  backup_finish_date as FinishDate,
  backup_size/1024 as size,
  database_name,
  CASE type
   WHEN ''D'' THEN ''Database''
   WHEN ''I'' THEN ''Differential database''
   WHEN ''L'' THEN ''Log''
   WHEN ''F'' THEN ''File or filegroup''
   WHEN ''G'' THEN ''Differential file''
   WHEN ''P'' THEN ''Partial''
   WHEN ''Q'' THEN ''Differential partial''
  END as BackupType
 FROM        
  msdb..backupset
 WHERE
  database_name = DB_NAME()
 ORDER BY backup_start_date DESC')

System.Data.SqlClient.SqlException: Cannot drop the procedure 'dbo.GetPackageTypes', because it does not exist or you do not have permission.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/*****************************/
/* End Support for SQL Azure */
/*****************************/

/* Update  GetPackageTypes */
/***************************/

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.[GetPackageTypes]') AND type in (N'P', N'PC'))
 DROP PROCEDURE dbo.[GetPackageTypes]

System.Data.SqlClient.SqlException: There is already an object named 'GetPackageTypes' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[GetPackageTypes]
AS
 SELECT
  PackageType,
  Description,
  SecurityAccessLevel,
  EditorControlSrc
 FROM   dbo.PackageTypes

System.Data.SqlClient.SqlException: There is already an object named 'vw_PortalsDefaultLanguage' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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 VIEW dbo.[vw_PortalsDefaultLanguage]
AS
 SELECT DISTINCT   
  P.PortalID,  
  PL.PortalName as PortalName,
  PL.LogoFile,      
  PL.FooterText as FooterText,  
  P.ExpiryDate,  
  P.UserRegistration,  
  P.BannerAdvertising,  
  P.AdministratorId,  
  P.Currency,  
  P.HostFee,  
  P.HostSpace,  
  P.PageQuota,  
  P.UserQuota,  
  P.AdministratorRoleId,  
  P.RegisteredRoleId,  
  PL.Description as Description,  
  PL.KeyWords as KeyWords,  
  PL.BackgroundFile,  
  P.GUID,  
  P.PaymentProcessor,  
  P.ProcessorUserId,  
  P.ProcessorPassword,  
  P.SiteLogHistory,  
  U.Email,  
  P.DefaultLanguage,  
  P.TimezoneOffset,  
  PL.AdminTabId as AdminTabId,  
  P.HomeDirectory,  
  PL.SplashTabId as SplashTabId,  
  PL.HomeTabId as HomeTabId,  
  PL.LoginTabId as LoginTabId,  
  PL.RegisterTabId as RegisterTabId,  
  PL.UserTabId as UserTabId, 
  PL.SearchTabId as SearchTabId, 
  (SELECT TOP 1 TabID FROM dbo.Tabs WHERE (PortalID IS NULL) AND (ParentId IS NULL)) AS SuperTabId,
  P.CreatedByUserID,
  P.CreatedOnDate,
  P.LastModifiedByUserID,
  P.LastModifiedOnDate,
  PL.CultureCode
 FROM  dbo.Portals AS P
 INNER JOIN ( SELECT PortalID ,
      PortalName ,
      CASE WHEN LEFT(LOWER(LogoFile), 7) = 'fileid='
        THEN ( SELECT  Folder + FileName
         FROM    dbo.Files
         WHERE   fileid = CAST(( RIGHT(LOWER(LogoFile),
                 LEN(LogoFile) - 7) ) AS INT)
         )
        ELSE LogoFile
      END AS LogoFile ,
      FooterText ,
      Description ,
      KeyWords ,
      CASE WHEN LEFT(LOWER(BackgroundFile), 7) = 'fileid='
        THEN ( SELECT  Folder + FileName
         FROM    dbo.Files
         WHERE   fileid = CAST(( RIGHT(LOWER(BackgroundFile),
                 LEN(BackgroundFile)
                 - 7) ) AS INT)
         )
        ELSE BackgroundFile
      END AS BackgroundFile ,
      AdminTabId ,
      SplashTabId ,
      HomeTabId ,
      LoginTabId ,
      RegisterTabId ,
      UserTabId ,
      SearchTabId ,
      CultureCode
     FROM   dbo.PortalLocalization
    ) AS PL ON P.PortalID = PL.PortalID AND PL.CultureCode = P.DefaultLanguage
  LEFT OUTER JOIN dbo.Users AS U ON P.AdministratorId = U.UserID



System.Data.SqlClient.SqlException: There is already an object named 'IX_FileName' in the database.
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(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 [IX_FileName] UNIQUE NONCLUSTERED ([FolderID] ASC, [FileName] ASC)

System.Data.SqlClient.SqlException: There is already an object named 'AddFile' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[AddFile]
 @PortalId int,
 @UniqueId uniqueidentifier,
 @VersionGuid uniqueidentifier,
 @FileName nvarchar(246),
 @Extension nvarchar(100),
 @Size int,
 @Width int,
 @Height int,
 @ContentType nvarchar(200),
 @Folder nvarchar(246),
 @FolderID int,
 @CreatedByUserID int,
 @Hash varchar(40)
AS
BEGIN
 DECLARE @FileID int

 UPDATE dbo.[Files]
 SET
  /* retrieves FileId from table */
  @FileID = FileId,
  [FileName] = @FileName,
  VersionGuid = @VersionGuid,
  Extension = @Extension,
  Size = @Size,
  Width = @Width,
  Height = @Height,
  ContentType = @ContentType,
  Folder = @Folder,
  FolderID = @FolderID,
  LastModifiedByUserID = @CreatedByUserID,
  LastModifiedOnDate = getdate(),
  SHA1Hash = @Hash
 WHERE FolderID = @FolderID AND [FileName] = @FileName

 IF @@ROWCOUNT = 0
 BEGIN
  INSERT INTO dbo.[Files]
  (
   PortalId,
   UniqueId,
   VersionGuid,
   [FileName],
   Extension,
   Size,
   Width,
   Height,
   ContentType,
   Folder,
   FolderID,
   CreatedByUserID,
   CreatedOnDate,
   LastModifiedByUserID,
   LastModifiedOnDate,
   SHA1Hash
  )
  VALUES
  (
   @PortalId,
   @UniqueId,
   @VersionGuid,
   @FileName,
   @Extension,
   @Size,
   @Width,
   @Height,
   @ContentType,
   @Folder,
   @FolderID,
   @CreatedByUserID,
   getdate(),
   @CreatedByUserID,
   getdate(),
   @Hash
  )

  SELECT @FileID = SCOPE_IDENTITY()
 END

 SELECT @FileID
END

System.Data.SqlClient.SqlException: There is already an object named 'UpdateFile' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[UpdateFile]
 @FileId int,
 @VersionGuid uniqueidentifier, 
 @FileName nvarchar(246),
 @Extension nvarchar(100),
 @Size int,
 @Width int,
 @Height int,
 @ContentType nvarchar(200), 
 @Folder nvarchar(246),
 @FolderID int,
 @LastModifiedByUserID int,
 @Hash varchar(40)
AS
BEGIN
 UPDATE dbo.[Files]
 SET
  [FileName] = @FileName,
  VersionGuid = @VersionGuid,
  Extension = @Extension,
  Size = @Size,
  Width = @Width,
  Height = @Height,
  ContentType = @ContentType,
  Folder = @Folder,
  FolderID = @FolderID,
  LastModifiedByUserID = @LastModifiedByUserID,
  LastModifiedOnDate = getdate(),
  SHA1Hash = @Hash
 WHERE FileId = @FileId
END

System.Data.SqlClient.SqlException: There is already an object named 'DeleteFile' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[DeleteFile]
 @PortalID int,
 @FileName nvarchar(246),
 @FolderID int
AS
BEGIN
 IF @PortalID is null
 BEGIN
  DELETE FROM dbo.[Files] WHERE [FileName] = @FileName AND FolderID = @FolderID AND PortalId IS Null
 END ELSE BEGIN
  DELETE FROM dbo.[Files] WHERE [FileName] = @FileName AND FolderID = @FolderID AND PortalId = @PortalID
 END
END

System.Data.SqlClient.SqlException: There is already an object named 'UpdatePortalInfo' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.UpdatePortalInfo
 @PortalID           int,
 @PortalName         nvarchar(128),
 @LogoFile           nvarchar(50),
 @FooterText         nvarchar(100),
 @ExpiryDate         datetime,
 @UserRegistration   int,
 @BannerAdvertising  int,
 @Currency           char(3),
 @AdministratorId    int,
 @HostFee            money,
 @HostSpace          int,
 @PageQuota          int,
 @UserQuota          int,
 @PaymentProcessor   nvarchar(50),
 @ProcessorUserId    nvarchar(50),
 @ProcessorPassword  nvarchar(50),
 @Description        nvarchar(500),
 @KeyWords           nvarchar(500),
 @BackgroundFile     nvarchar(50),
 @SiteLogHistory     int,
 @SplashTabId        int,
 @HomeTabId          int,
 @LoginTabId         int,
 @RegisterTabId      int,
 @UserTabId          int,
 @SearchTabId          int,
 @DefaultLanguage    nvarchar(10),
 @HomeDirectory  varchar(100),
 @LastModifiedByUserID int,
 @CultureCode   nvarchar(50)
AS
 UPDATE dbo.Portals
  SET   
     ExpiryDate = @ExpiryDate,
     UserRegistration = @UserRegistration,
     BannerAdvertising = @BannerAdvertising,
     Currency = @Currency,
     AdministratorId = @AdministratorId,
     HostFee = @HostFee,
     HostSpace = @HostSpace,
     PageQuota = @PageQuota,
     UserQuota = @UserQuota,
     PaymentProcessor = @PaymentProcessor,
     ProcessorUserId = @ProcessorUserId,
     ProcessorPassword = @ProcessorPassword,
     SiteLogHistory = @SiteLogHistory,
     DefaultLanguage = @DefaultLanguage,
     HomeDirectory = @HomeDirectory,
     LastModifiedByUserID = @LastModifiedByUserID,
     LastModifiedOnDate = getdate()
 WHERE  PortalId = @PortalID

IF EXISTS (SELECT * FROM dbo.PortalLocalization WHERE PortalId = @PortalID AND CultureCode = @CultureCode)
 BEGIN
  UPDATE dbo.PortalLocalization
  SET
   PortalName = @PortalName,
   LogoFile = @LogoFile,
   FooterText = @FooterText,
   Description = @Description,
   KeyWords = @KeyWords,
   BackgroundFile = @BackgroundFile,
   HomeTabId = @HomeTabId,
   LoginTabId = @LoginTabId,
   RegisterTabId = @RegisterTabId,
   UserTabId = @UserTabId,
   SplashTabId = @SplashTabId,
   SearchTabId = @SearchTabId,
   LastModifiedByUserID = @LastModifiedByUserID,
   LastModifiedOnDate = getdate()
  WHERE PortalId = @PortalID AND CultureCode = @CultureCode
 END
ELSE
 BEGIN
  DECLARE @AdminTabId int
  SET @AdminTabId = (SELECT AdminTabId
        FROM dbo.PortalLocalization
        WHERE PortalID = @PortalID and CultureCode='en-US')

  INSERT INTO dbo.PortalLocalization (
   [PortalID],
   [CultureCode],
   [PortalName],
   [LogoFile],
   [FooterText],
   [Description],
   [KeyWords],
   [BackgroundFile],
   [HomeTabId],
   [LoginTabId],
   [UserTabId],
   [AdminTabId],
   [SplashTabId],
   [SearchTabId],
   [CreatedByUserID],
   [CreatedOnDate],
   [LastModifiedByUserID],
   [LastModifiedOnDate]
  )
  VALUES (
   @PortalID,
   @CultureCode,
   @PortalName,
   @LogoFile,
   @FooterText,
   @Description,
   @KeyWords,
   @BackgroundFile,
   @HomeTabId ,
   @LoginTabId ,
   @UserTabId,
   @AdminTabid,
   @SplashTabId  ,
   @SearchTabId,
   -1,
   getdate(),
   -1,
   getdate()
  )
 END

System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_ModuleControls'. Cannot insert duplicate key in object 'dbo.ModuleControls'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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)



/* Add new Download host ModuleControl */
/***************************************/

IF (SELECT COUNT(*) FROM dbo.ModuleControls WHERE ModuleDefID IS NULL AND ControlKey = 'Download') = 0
 BEGIN
  DECLARE @ModuleDefID int
  SET @ModuleDefID = (SELECT ModuleDefID FROM dbo.ModuleDefinitions WHERE FriendlyName = 'Extensions')

  INSERT INTO dbo.ModuleControls
   ( ModuleDefID, ControlKey, ControlTitle, ControlSrc, ControlType )
   VALUES ( @ModuleDefID, 'Download', 'Downloader', 'DesktopModules/Admin/Extensions/Download.ascx', 3)
 END

System.Data.SqlClient.SqlException: There is already an object named 'vw_TabModules' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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 VIEW dbo.vw_TabModules
AS
    SELECT    
        M.PortalID,
        TM.TabID,
        TM.TabModuleID,
        M.ModuleID,
        M.ModuleDefID,
        TM.ModuleOrder,
        TM.PaneName,
        TM.ModuleTitle,
        TM.CacheTime,
        TM.CacheMethod,
        TM.Alignment,
        TM.Color,
        TM.Border,
        CASE WHEN LEFT(LOWER(TM.IconFile), 6) = 'fileid' THEN (SELECT Folder + FileName FROM dbo.Files WHERE 'fileid=' + CONVERT(varchar, dbo.Files.FileID) = TM.IconFile) ELSE TM.IconFile END AS IconFile,
        M.AllTabs,
        TM.Visibility,
        TM.IsDeleted,
        TM.Header,
        TM.Footer,
        M.StartDate,
        M.EndDate,
        TM.ContainerSrc,
        TM.DisplayTitle,
        TM.DisplayPrint,
        TM.DisplaySyndicate,
        TM.IsWebSlice,
        TM.WebSliceTitle,
        TM.WebSliceExpiryDate,
        TM.WebSliceTTL,
        M.InheritViewPermissions,
        MD.DesktopModuleID,
        MD.DefaultCacheTime,
        MC.ModuleControlID,
        DM.BusinessControllerClass,
        DM.IsAdmin,
        DM.SupportedFeatures,
        CI.ContentItemID,
        CI.Content,
        CI.ContentTypeID,
        CI.ContentKey,
        CI.Indexed,
        TM.CreatedByUserID,
        TM.CreatedOnDate,
        TM.LastModifiedByUserID,
        TM.LastModifiedOnDate,
        M.LastContentModifiedOnDate,
        TM.UniqueId,
        TM.VersionGuid,
        TM.DefaultLanguageGuid,
        TM.LocalizedVersionGuid,
        TM.CultureCode
    FROM dbo.ModuleDefinitions AS MD
        INNER JOIN dbo.Modules AS M ON MD.ModuleDefID = M.ModuleDefID
        INNER JOIN dbo.ModuleControls AS MC ON MD.ModuleDefID = MC.ModuleDefID
        INNER JOIN dbo.DesktopModules AS DM ON MD.DesktopModuleID = DM.DesktopModuleID
        LEFT OUTER JOIN dbo.ContentItems AS CI ON M.ContentItemID = CI.ContentItemID
        LEFT OUTER JOIN dbo.TabModules AS TM ON M.ModuleID = TM.ModuleID
    WHERE (MC.ControlKey IS NULL)



System.Data.SqlClient.SqlException: There is already an object named 'GetFoldersByPermissions' in the database.
   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection. (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.[GetFoldersByPermissions]
 @PortalID int,
 @Permissions nvarchar(300),
 @UserID int,
 @FolderID int,
 @FolderPath nvarchar(300)

AS
 DECLARE @IsSuperUser BIT
 DECLARE @Admin BIT
 DECLARE @Read INT
 DECLARE @Write INT
 DECLARE @Browse INT
 DECLARE @Add INT

 --Determine Admin or SuperUser
 IF @UserId IN (SELECT UserId FROM dbo.UserRoles WHERE RoleId IN (SELECT RoleId FROM dbo.Roles WHERE PortalId = @PortalId AND RoleName = 'Administrators')) BEGIN SET @Admin = 1 END
 SELECT @IsSuperUser = IsSuperUser FROM dbo.Users WHERE UserId = @UserId

 --Retrieve Permission Ids
 IF @Permissions LIKE 'READ' BEGIN SELECT TOP 1 @Read = PermissionID FROM dbo.Permission WHERE PermissionCode = 'SYSTEM_FOLDER' AND PermissionKey = 'READ' END
 IF @Permissions LIKE 'WRITE' BEGIN SELECT TOP 1 @Write = PermissionID FROM dbo.Permission WHERE PermissionCode = 'SYSTEM_FOLDER' AND PermissionKey = 'WRITE' END
 IF @Permissions LIKE 'BROWSE' BEGIN SELECT TOP 1 @Browse = PermissionID FROM dbo.Permission WHERE PermissionCode = 'SYSTEM_FOLDER' AND PermissionKey = 'BROWSE' END
 IF @Permissions LIKE 'ADD' BEGIN SELECT TOP 1 @Add = PermissionID FROM dbo.Permission WHERE PermissionCode = 'SYSTEM_FOLDER' AND PermissionKey = 'ADD' END

 IF @PortalID IS NULL
  BEGIN
   SELECT DISTINCT F.*
   FROM dbo.Folders F
   WHERE F.PortalID IS NULL
    AND (F.FolderID = @FolderID OR @FolderID = -1)
    AND (F.FolderPath = @FolderPath OR @FolderPath = '')
   
    ORDER BY F.FolderPath
  END
 ELSE
  BEGIN
   SELECT DISTINCT F.*
   FROM dbo.Folders F
    JOIN dbo.FolderPermission FP ON F.FolderId = FP.FolderID
    JOIN dbo.Permission P ON FP.PermissionID = P.PermissionID
    JOIN dbo.UserRoles UR ON UR.RoleID = FP.RoleID
    JOIN dbo.Users U ON U.UserId = UR.UserId
   WHERE ((F.PortalID = @PortalID) OR (F.PortalID IS NULL AND @PortalID IS NULL))
    AND (F.FolderID = @FolderID OR @FolderID = -1)
    AND (F.FolderPath = @FolderPath OR @FolderPath = '')
    AND
     ((P.PermissionKey = 'WRITE' OR @IsSuperUser=1 OR @Admin=1) OR
      FP.PermissionID = CASE WHEN @Read > 0 THEN @Read END OR
      FP.PermissionID = CASE WHEN @Write > 0 THEN @Write END OR
      FP.PermissionID = CASE WHEN @Browse > 0 THEN @Browse END OR
      FP.PermissionID = CASE WHEN @Add > 0 THEN @Add END)
    AND FP.AllowAccess = 1
   
    ORDER BY F.FolderPath
  END






 
New Post
7/26/2011 12:47 AM
 
Hi Kevin,
Your best and easiest bet is to restore your files and Database from backup and rerun the upgrade.

If you don't have backups and/or want to help track this problem down, I've got a few things you could try...

This looks very similar to an issue I ran into today. If you look at your SQL log, it looks like it had already run the scripts and was trying to rerun them, just like mine.

When I turned compilation debug to true, the main error I was running into was the Services.FileSystem.FileManager.GetUrl(IFileInfo file) function was no longer working. It turned out this was because changes to the web.config that were supposed to be merged from this file:
\Install\Config\06.00.00.config
Never actually got merged. So, look in your web.config and make sure it has the entries from the \Install\Config\06.00.00.config file.

Hopefully, that will solve your problem.


David O'Leary
Efficion Consulting
 
New Post
7/26/2011 11:25 PM
 
Thanks David,

I have reinstalled from backup and reverted to the previous version.

I guess I will be stuck with what I have for now.
 
New Post
7/26/2011 11:35 PM
 
Kevin,
If you rerun the upgrade, you might find that it runs flawlessly this time. That's definitely an issue I've experienced with occasional upgrades lately. Odd errors when I run it the first time but restoring and re-running the upgrade goes smoothly. Not ideal by any means but it works.

David O'Leary
Efficion Consulting
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Upgrade FailureUpgrade Failure


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