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
  • SEO Software: Wonderful to read! read more
  • discount paintings: Thanks for a great time visiting your site. It's really read more
  • Felica Whipps: You raise good quality points, then again I think your read more
  • Replica jerseys: A very interesting read and a great post alltogether. Would read more
  • Scott Magbitang: I'm gonna send this to my daghter! I think she read more
  • Hello Kitty Coloring Pages: Adding to my bookmarks thanks. Needed more pictures though. read more
  • best registry cleaner: This is such a great resource that you are providing read more
  • Hello Kitty: Good read. Needed more pictures though. read more
  • The Love Calculator: Which Golf Clubs Are Better - Steel or Graphite ? read more
  • The Love Calculator: I find myself coming to your blog more and more read more