-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed installation when an older version was installed
- Loading branch information
Airam Hernández Hernández
committed
Aug 2, 2023
1 parent
49ee1b4
commit c9532be
Showing
7 changed files
with
150 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
Providers/DataProviders/SqlDataProvider/01.06.00.SqlDataProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE LIKE 'PROCEDURE' AND ROUTINE_NAME LIKE 'int_GetDNNPulse') | ||
BEGIN | ||
DROP PROCEDURE int_GetDNNPulse; | ||
END | ||
GO | ||
|
||
CREATE PROCEDURE [dbo].[int_GetDNNPulse] | ||
AS | ||
BEGIN | ||
|
||
DECLARE @DNNVersion TABLE | ||
( | ||
DNNVersion VARCHAR(100) | ||
); | ||
|
||
DECLARE @PortalAliases TABLE | ||
( | ||
HTTPALIAS VARCHAR(100) | ||
); | ||
|
||
DECLARE @ModulesVersions TABLE | ||
( | ||
ModuleName VARCHAR(100), | ||
ModuleVersion VARCHAR(100) | ||
); | ||
|
||
DECLARE @DatabaseSize TABLE | ||
( | ||
Size VARCHAR(100) | ||
); | ||
|
||
DECLARE @DatabaseTier TABLE | ||
( | ||
Tier VARCHAR(100) | ||
); | ||
INSERT INTO @DNNVersion (DNNVersion) | ||
SELECT TOP 1 CONCAT(major, '.' , minor, '.' ,build) | ||
FROM Version | ||
ORDER BY VersionId DESC; | ||
|
||
INSERT INTO @PortalAliases (HTTPALIAS) | ||
SELECT HTTPAlias | ||
FROM PortalAlias | ||
ORDER BY IsPrimary DESC, HTTPAlias; | ||
|
||
INSERT INTO @ModulesVersions (ModuleName, ModuleVersion) | ||
SELECT ModuleName, Version | ||
FROM DesktopModules | ||
ORDER BY ModuleName ASC, Version ASC; | ||
|
||
INSERT INTO @DatabaseSize (Size) | ||
SELECT SUM(size/128.0) AS DatabaseDataSpaceAllocatedInMB | ||
FROM sys.database_files | ||
GROUP BY type_desc | ||
HAVING type_desc = 'ROWS' | ||
|
||
BEGIN TRY | ||
INSERT INTO @DatabaseTier (Tier) | ||
EXEC ('SELECT service_objective FROM sys.database_service_objectives WHERE database_id = DB_ID();'); | ||
END TRY | ||
BEGIN CATCH | ||
INSERT INTO @DatabaseTier (Tier) VALUES ('Not Available'); | ||
END CATCH; | ||
|
||
|
||
SELECT * | ||
FROM ( | ||
SELECT 'DNNVersion' AS TYPE, DNNVersion AS NAME | ||
FROM @DNNVersion | ||
|
||
UNION ALL | ||
|
||
SELECT 'PortalAlias' AS TYPE, HTTPALIAS AS NAME | ||
FROM @PortalAliases | ||
|
||
UNION ALL | ||
|
||
SELECT 'Modules' AS TYPE, CONCAT(ModuleName, ' - ', ModuleVersion) AS NAME | ||
FROM @ModulesVersions | ||
|
||
UNION ALL | ||
|
||
SELECT 'DatabaseSize' AS TYPE, Size AS NAME | ||
FROM @DatabaseSize | ||
|
||
UNION ALL | ||
|
||
SELECT 'DatabaseTier' AS TYPE, Tier AS NAME | ||
FROM @DatabaseTier | ||
) AS DNNPulse | ||
|
||
END | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters