Single query to grant Read/Write/View permissions to all stored procs

–For SQL Server 2005 and above Continue reading

How to fix Orphaned Users in database

FIX : Error 15023: User already exists in current database

Introduction
Orphan user is a user in a SQL Server database that is not associated with a SQL Server login..

Continue reading

How to Unlock SQL user account

A. Unlocking a login
To unlock a SQL Server login, execute the following statement, replacing **** with the desired account password.

ALTER LOGIN [Mary5] WITH PASSWORD = ‘****’ UNLOCK ;
GO
To unlock a login without changing the password, turn the check policy off and then on again.

ALTER LOGIN [Mary5] WITH CHECK_POLICY = OFF;
ALTER LOGIN [Mary5] WITH CHECK_POLICY = ON;
GO

Continue reading

Grant Execute All Stored Procedures

Here I have tried to explain how we can provide permission to execute all the stored procedure in particular database. In SQL Server 2000 has fixed database roles such as db_datareader and db_datawriter that allow a user read or write access respectively to all the table is a database, no such role exists for the execution of stored procedures (a db_executor role if you will). Continue reading