This is a mirror of official site: http://jasper-net.blogspot.com/

SQL SERVER – Difference Between GRANT and WITH GRANT

| Tuesday, April 6, 2010
What is the difference between GRANT and WITH GRANT when giving permissions to the user? This is a very interesting question recently asked me to during my session at TechMela Nepal.

Let us first see the syntax and analyze.

GRANT:
USE master;
GRANT VIEW ANY DATABASE TO username;
GO

WITH GRANT:
USE master;
GRANT VIEW ANY DATABASE TO username WITH GRANT OPTION;
GO

The difference between these options is very simple. In case of only GRANT, the username cannot grant the same permission to other users. On the other hand, with the option WITH GRANT, the username will be able to give the permission after receiving requests from other users.

Read more: Journey to SQL Authority with Pinal Dave

Posted via email from jasper22's posterous

0 comments: