Does Create Login automatically grant connect privilige

  • I created a Login:

    create login ravid with password = 'ravid', DEFAULT_DATABASE = plu

    Then tried to login to SQL Server with ravid and could not so I assumed that the connect privilige was not granted and proceeded to execute:

    grant connect to ravid

    and got the following error:

    Msg 15151, Level 16, State 1, Line 1

    Cannot find the user 'ravid', because it does not exist or you do not have permission.

    ravid however is listed in Security/Logins in Management Studio.

    help please.

  • Duplicate post.

    Already answered here.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • No it is not a duplicate post it is a different problem. In my first post there was a syntax error in the create login statement in my second post I cannot grant connect to login ravid and I also wanted to find out if when you create a login with a default_database clause if the connect privilege is granted automatically.

  • You command syntax was incorrect, "grant connect sql" not "grant connect"

    select name, denylogin from syslogins where name = 'ravid'

    grant connect sql to ravid

    select name, denylogin from syslogins where name = 'ravid'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply