windows user is created and unable to connect to sqlserver

  • HI to all ,

    windows user is created and unable to connect to sqlserver management studio

    Thanks
    Naga.Rohitkumar

  • How did you create the user?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • You say the windows user is created but have you created a SQL Server login as well?

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • windows id is created by windows team and by using sql administrator login i created sql login but some times it says unable to connect in this case what should i do

    Thanks
    Naga.Rohitkumar

  • What kind of SQL login did you create?

    Windows Authentication? SQL Server Authentication?

    Did you enable it?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • --deleted duplicate post.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • new users are at least a three step process:

    create the user in Active directory (you said that was done)

    create a login for the user in SQL Server(you said that was done)

    Create a user in the database to match the login(missing?)

    Assign the appropriate permissions/role so the user can access data(missing)

    --creat the login for the Active Directory User

    CREATE LOGIN [mydomain\NewUse] FROM WINDOWS;

    --switch to the right database: if more than one database, repeat for each one

    USE SandBox;

    GO

    --Create the user to match the login

    CREATE USER [mydomain\NewUser] FROM LOGIN [mydomain\NewUser]

    --assign permissions

    --put the user in the correct permissions role

    exec sp_addrolemember 'RoleAlreadyCreated', 'mydomain\NewUser'

    --an example in case you don't have the role with the right permissions yet:

    CREATE ROLE [AlmostOwners]

    EXEC sp_addrolemember N'db_ddladmin', N'AlmostOwners'

    EXEC sp_addrolemember N'db_datareader', N'AlmostOwners'

    EXEC sp_addrolemember N'db_datawriter', N'AlmostOwners'

    --can the users EXECUTE procedures? comment out if false

    GRANT EXECUTE TO [AlmostOwners]

    exec sp_addrolemember 'AlmostOwners', ' mydomain\NewUser'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 7 posts - 1 through 6 (of 6 total)

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