/*
This permision(SP_HELPTXT) is only on those particular databases
and those particular logins only
*/
USE Database1
GO
GRANT VIEW DEFINITION TO [Domain\User1]
GRANT VIEW DEFINITION TO [Domain\User2]
go
USE Database2
GO
GRANT VIEW DEFINITION TO [Domain\User1]
GRANT VIEW DEFINITION TO [Domain\User2]
/*
Granting VIEW(SP_HELPTEXT) permissions to on ALL databases in that server
and to this account only
*/
USE master
GO
GRANT VIEW ANY DEFINITION TO USER1
The below command will give ALTER,CONTROL and VIEW DFFINITION permissions on a sepcific database.
USE Test
GO
/*
The below commands will give you
Modify or ALTER Stored procedure and see the text
of the logical objects which are created with dbo
*/
GRANT ALTER ON SCHEMA::dbo
TO LoginName
GRANT CONTROL ON SCHEMA::dbo
TO LoginName
GRANT VIEW DEFINITION ON SCHEMA::dbo
TO LoginName
Comments