img by Coba

Cannot set a credential for principal 'sa'. (SQL Server 2005/2008)

So today I was using SQL Server Management Studio (SSMS) to change my SQL Server’s sa account password (a good routine to do every so often BTW) and I got an unexpected error message:

Msg 15535, Level 16, State 1, Line 1
Cannot set a credential for principal 'sa'.

Whoa! I wasn’t expecting that… So I googled and googled and I couldn’t find anything about SQL Server 2005. I did find a KB article for SQL Server 2008 that mentioned the “fix” - 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. Thankfully I was just on my local development server and, since I don’t even use the “sa” account, I could afford to try this and, if it didn’t work, so what… (Yes, it should be disabled but it isn’t)

When I followed the instructions in the article, it worked perfectly. What’s weird is that I’m on SQL Server 2005, not SQL Server 2008. I am only up to SQL Server 2005 SP3. So I’m wondering if this is a new bug/feature in SQL Server 2005 SP3…

Anyway, for anyone on SQL Server 2005 who gets this Cannot set a credential for principal ‘sa’ error, the fix is easy. Here’s what you see:

image

Notice the arrow points to the “Map to Credential” checkbox that is unchecked. That’s the problem – it should be checked. I made my changes, clicked “Ok” and that’s when I received the error. Being the industrious little beaver that I am, I then clicked the Script button and tried to run the code:

USE [master]
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[LIFTest], DEFAULT_LANGUAGE=[us_english]
, CHECK_EXPIRATION=OFF, CHECK_POLICY=ON, NO CREDENTIAL
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'JH@46O!IH#NFi349gh'
GO

Same error…………………………..

The fix looks like this:

image

It’s weird how “Map to Credential” is checked yet there is no credential specified. But that’s what you have to do.

authors
scott whigham
grant moyle
chad weaver
recent comments
  • Anthony Buzbee: After reading this article, I feel that I need more read more
  • xda: Thank a lot scott. I try to fix for a read more
  • Owen Slowe: I must say your site is really interesting I truely read more
  • kevin : Intimately, the post is actually the sweetest on this precious read more
  • Laura: Comfortabl y, the post is really the greatest on this read more
  • xbox live gold: Comfortabl y, the article is really the freshest on this read more
  • Laura: Intimately, the post is in reality the greatest on this read more
  • free xbox live gold: Considerably, the post is actually the best on this laudable read more
  • Laura: Considerably, the post is really the sweetest on this worthw read more
  • Mike: Well, the article is in reality the greatest on this read more