DBCC TRACEON / DBCC TRACEOFF/ DBCC TRACESTATUS

DBCC TRACEON / DBCC TRACEOFF/ DBCC TRACESTATUS

DBCC TRACEON – Enable trace flags.
DBCC TRACEOFF - Disable trace flags.
DBCC TRACESTATUS - Display the status of trace flags.

–>  Turn flag on for only the session level 

DBCC TRACEON (1222)

DBCC TRACEON (1205,1222)
GO

–> Turn flag on globally at server for all the sessions

DBCC TRACEON (1222, -1)
GO

– >Turn flag off

DBCC TRACEOFF (1222);
GO

–> Show flag status

DBCC TRACESTATUS (1205,1222)

DBCC TRACESTATUS (-1)

Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it.

Error Description

Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it.

Root Cause

SQL Account only locked out, if it is enfoced to use password policies.

Resolution

You can unlock it by exeuction below command.

ALTER LOGIN sa WITH PASSWORD = ‘password’ UNLOCK

OR

You can do it GUI as well by unchecked locked checkbox

Follow

Get every new post delivered to your Inbox.

Join 133 other followers