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