Xavier,
The right-click and Modify will work fine. For some reason when you scripted to file only the DROP and not the CREATE was showing. In regards to the differences between what you are seeing and what the correct stored procedures should be, here are the correct ones scripted from an install of DNN 5.6.2. Note that the below UpdatePortalSetting procedure includes the @CultureCode parameter while yours does not:
***************************************************************************
ALTER PROCEDURE [dbo].[UpdatePortalSetting]
@PortalID int,
@SettingName nvarchar(50),
@SettingValue nvarchar(2000),
@UserID int,
@CultureCode nvarchar(50)
AS
IF (SELECT COUNT(*) FROM dbo.PortalSettings WHERE PortalID = @PortalID AND SettingName = @SettingName) > 0
--Update
UPDATE dbo.PortalSettings
SET SettingValue = @SettingValue,
[LastModifiedByUserID]=@UserID,
[LastModifiedOnDate]=getdate()
WHERE PortalID = @PortalID
AND SettingName = @SettingName
ELSE
--Add
INSERT INTO dbo.PortalSettings ( PortalID, SettingName, SettingValue, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate,CultureCode )
VALUES ( @PortalID, @SettingName, @SettingValue ,@UserID ,getdate() ,@UserID ,getdate(),@CultureCode)
GO
ALTER PROCEDURE [dbo].[GetPortalSetting]
@PortalID int,
@SettingName nvarchar(50),
@CultureCode nvarchar(50)
AS
SELECT
CASE WHEN LEFT(LOWER(dbo.PortalSettings.SettingValue), 6) = 'fileid'
THEN
(SELECT Folder + FileName
FROM dbo.Files
WHERE 'fileid=' + convert(varchar,dbo.Files.FileID) = dbo.PortalSettings.SettingValue
)
ELSE
dbo.PortalSettings.SettingValue
END
AS SettingValue
FROM dbo.PortalSettings
WHERE PortalID = @PortalID
AND SettingName = @SettingName
GO
ALTER PROCEDURE [dbo].[GetPortalSettings]
@PortalID int,
@CultureCode nvarchar(50)
AS
SELECT
SettingName,
CASE WHEN LEFT(LOWER(dbo.PortalSettings.SettingValue), 6) = 'fileid'
THEN
(SELECT Folder + FileName
FROM dbo.Files
WHERE 'fileid=' + convert(varchar,dbo.Files.FileID) = dbo.PortalSettings.SettingValue
)
ELSE
dbo.PortalSettings.SettingValue
END
AS SettingValue,
dbo.PortalSettings.CreatedByUserID,
dbo.PortalSettings.CreatedOnDate,
dbo.PortalSettings.LastModifiedByUserID,
dbo.PortalSettings.LastModifiedOnDate,
dbo.PortalSettings.CultureCode
FROM dbo.PortalSettings
WHERE PortalID = @PortalID
GO
ALTER PROCEDURE [dbo].[DeletePortalSetting]
@PortalID int,
@SettingName nvarchar(50),
@CultureCode nvarchar(50)
AS
DELETE FROM dbo.PortalSettings
WHERE PortalID = @PortalID
AND SettingName = @SettingName
GO
*********************************************************************
You should be able to copy all of the above ALTER PROCEDURE statements (between the ****************) , paste them into a new query window, and execute them to correct the outdated stored procedures.
I also noticed that your site is using the attached \App_Data\Database.mdf database file included with DotNetNuke and am assuming that to access it in SQL Server Management Studio you first attached to it. Are you sure that this is the database that your DotNetNuke installation is using? You can check the web.config connectionStrings section to confirm what database is in use. If you are, in fact, using Database.mdf, you may have already noticed that DotNetNuke can no longer access the database. Please see the following blog post from Shawn Mehaffie for the fix to this issue:
http://www.dotnetnuke.com/Community/B...