You receive an exception in SQL Server 2008 when you try to modify the properties of the SQL Server Administrator account by using SQL Server Management Studio


Symptoms


Consider the following scenario. You use the Microsoft SQL Server 2008 tools to connect to a server that is running Microsoft SQL Server 2005. You open the properties dialog box for the SQL Server Administrator account, and then you perform an "sa" login by using the SQL Server Management Studio tools. You modify the properties for the "sa" login, and then you click OK. In this scenario, you receive the following error message:
TITLE: Microsoft SQL Server Management Studio

------------------------------

Alter failed for Login 'sa'. (Microsoft.SqlServer.Smo)
------------------------------
ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot set a credential for principal 'sa'. (Microsoft SQL Server, Error: 15535)
------------------------------

Cause


This problem occurs if the Map To Credential check box is not selected on the General tab of the Login Properties - sa dialog box. If this check box is not selected, SQL Server 2008 will try to drop any credential that is mapped to your login credentials. Because your credentials cannot be set to the "sa" login, you receive the exception error message that is mentioned in the "Symptoms" section when you click OK to close the dialog box.

Resolution


To resolve this issue, make sure that you select the Map To Credential check box on the General tab of the Login Properties - sa dialog box before you change the "sa" login properties and then click OK to close the dialog box.

References


For information about login properties, visit the following MSDN Web site: