Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 GRANT CONNECT

Author  Topic 

steppinthrax
Starting Member

27 Posts

Posted - 2010-11-16 : 10:29:33
Hey, Anybody familure with the GRANT CONNECT command in SQL 2008. It exists in the generate script utility in SQL 2008, however, it's generating an error when it's generated from a database. I.E.


USE [master]
GO
GRANT CONNECT TO [SOME_USER] as [dbo]
GO

ERROR

Msg 15151, Level 16, State 1, Line 1
Cannot find the user 'SOME_USER', because it does not exist or you do not have permission.



However when done manually


USE [master]
GO
GRANT CONNECT SQL TO [SOME_USER]
GO


WORKS PERFECTLY




So my questions is what is SQL TO?

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-11-16 : 19:52:36
They are two different concepts:

GRANT CONNECT relates to an ENDPOINT
GRANT CONNECT SQL rrelates to a SERVER

ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/7d78bf17-6c64-4166-bd0b-9e9e20992136.htm

=======================================
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. -Oscar Wilde, writer (1854-1900)
Go to Top of Page

steppinthrax
Starting Member

27 Posts

Posted - 2010-11-17 : 08:53:31
quote:
Originally posted by Bustaz Kool

They are two different concepts:

GRANT CONNECT relates to an ENDPOINT
GRANT CONNECT SQL rrelates to a SERVER

ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/7d78bf17-6c64-4166-bd0b-9e9e20992136.htm

=======================================
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. -Oscar Wilde, writer (1854-1900)



Can you elaborate.
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2010-11-17 : 11:16:20
Have you read the BOL link I sent?

The GRANT CONNECT and GRANT CONNECT SQL are two different commands. It's much the same as SET ANSI_NULLS and SET ANSI_PADDING are two different commands. You can't be surprised that setting ANSI_NULLS ON or OFF has no impact on the ANSI PADDING configuration.

=======================================
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. -Oscar Wilde, writer (1854-1900)
Go to Top of Page
   

- Advertisement -