Category Archives: Notes

All Articles

Different ways to make a table read only in a SQL Server database

Problem

In some cases there may be a need to make a SQL Server table read only. There are several different options for doing this and in this tip we cover various ways that you can make a table read only in a SQL Server database.

Solution

http://www.mssqltips.com/sqlservertip/2711/different-ways-to-make-a-table-read-only-in-a-sql-server-database/#comments

FIPS cryptographic algorithms validation error reporting service

Problem: Recently we have installed the SQL Server 2008 Reporting Service on the Windows Server 2008. Reporting Service installed and configured successfully but while browsing the http://servername:80/reports it is getting failed with the error HTTP 500. Below error recoded into the Reporting Service Error log.

Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) at System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString)

Solution:

It looks reason for the above error is two different encryptions (FIPS and AES) and decryption algorithm is trying to do the validation and because of that reporting service is unable to load the reporting service URL. I have resolved the issue by following the below steps.

Reporting Service will fail to load if any of the below condition will be true.

The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy registry value is set to 1.

ASP.NET 2.0 uses the RijndaelManaged implementation of the AES algorithm when it processes view state data

You can follow one of the below fix. Either disable the FipsAlgorithmPolocy or add the mentioned machine key into the web.config file. Browse the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy and changed value 1 to 0.

Open the reporting service web.config file and add the below <machinekey> into <system.web> section.

<machineKey validationKey=”AutoGenerate,IsolateApps” decryptionKey=”AutoGenerate,IsolateApps” validation=”3DES” decryption=”3DES”/>

Next step is to restart the reporting service and IIS. You can restart the IIS using IISRESET command and reporting service using NET START/STOP command.

NET STOP “SQL Server Reporting Services (MSSQLSERVER)”

NET START “SQL Server Reporting Services (MSSQLSERVER)”


How to give password to the excel file?

Most of us know, how to give the password to the excel file. But we are not giving it J, As best practice if you are exporting data to excel file and sharing with the client, never forget it to make it password protected.

 

To make the excel file password protected follow below steps.

Step 1: File -> Prepare -> Encrypt Document

Step 2: Enter and Re-enter the password.

Step 3: Save the file.

User ‘XXXX’ does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

Today while configuring the Reporting Service I got the below error.

 

User ‘XXXXX’ does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

 

You can change the UAC Restriction by following the below steps.

Step 1: Go to Start -> Control Panel -> User Accounts


 

Step 2: Click on Change User Account Control settings.


Step 3: Drag the slider to never notify and it will fix the issue.

Step 4: Reboot the box and issue will be fixed. To reboot you can use the shutdown –i dos command as well.

Steps to install the PostgreSQL on windows

Steps to install the PostgreSQL on windows

 

 

You can get the PostGreSQL installable from the http://www.postgresql.org/download/ site.

In the below step setup will create the super user PostGres for the database and service account.

Un-check the stack builder if you don’t want to download any additional tools.