RSS

Tag Archives: sql

Cannot set a credential for principal ‘sa’. (Microsoft SQL Server, Error:15535)

In this Quick and dirty post, let’s see a simple fix for one of the annoying error messages you’ll see in SQL Server 2005. Basically, You’ll see below mentioned error in few cases when you try to change the sa password using SSMS.

The Simple trick is to check the box “Map to credential” as shown below after providing a new password and click Okay.

This should work…Hope this helps!

APPLIES TO
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Standard Edition for Small Business
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Express with Advanced Services
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Standard Edition for Small Business
  • Microsoft SQL Server 2008 R2 Web
  • Microsoft SQL Server 2008 R2 Workgroup
Advertisements
 
4 Comments

Posted by on December 11, 2012 in MSSQL, Tips

 

Tags: , , ,

How to enable IDENTITY_INSERT for a table

I wonder how many times every one  us might have stumbled to insert values to identity column.Though identity
column serves as healthy mean of maintaining unique identification for a table and more often then not we do use
identity column to be the primary key field but it does come with it’s own baggage of hindrance, ofcourse until
you know how to unload the baggage

One hindrance that identity column serves is that does not allow you to enter your desired value at a particular
place until you play this little trick with it.While the simplest solution that i have used often to get across this situation
is here to unrevealed.

SET IDENTITY_INSERT TableName ON
INSERT IdentityTable(TheIdentity, TheValue)
VALUES (3, ‘here we go’)
SET IDENTITY_INSERT IdentityTable OFF

This is one of those  little trick that every sql programmer would love to be  scrolled in their sleeves

 
Leave a comment

Posted by on November 21, 2012 in Uncategorized

 

Tags: ,

 
%d bloggers like this: