Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6129449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:44:38+00:00 2026-05-23T16:44:38+00:00

I want to grant access to a user to a specific database with read

  • 0

I want to grant access to a user to a specific database with read and write access. The user is already available in the domain but not in the DB.

So, how can I give them that access with creating a new user and password?

Someone told me that it can be done with only specifying the user, domain & the DB that you want to give the user the access to without needing to create a new user and password.

This is the old way that I was implementing. It works but it creates a new login and user rather than using the one that is available in the domain:

use DBName;
create login a_2 with password='Aa123';
create user a_2 for login a_2;
grant insert to a_2;
grant select to a_2;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:44:39+00:00Added an answer on May 23, 2026 at 4:44 pm

    This is a two-step process:

    1. you need to create a login to SQL Server for that user, based on its Windows account

      CREATE LOGIN [<domainName>\<loginName>] FROM WINDOWS;
      
    2. you need to grant this login permission to access a database:

      USE (your database)
      CREATE USER (username) FOR LOGIN (your login name)
      

    Once you have that user in your database, you can give it any rights you want, e.g. you could assign it the db_datareader database role to read all tables.

    USE (your database)
    EXEC sp_addrolemember 'db_datareader', '(your user name)'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a postgres user that can access only one database on
I want to grant a user access to only specific directory (including its sub-directories)
want to ask user to input something but not want to wait forever. There
I have a user who I want to give readonly access to an SQL
I want to know How to grant user access to additional tablespaces in Oracle?
In my application, key query string parameter can be used to grant access to
What I am trying to do is give user access to an application once
want to have a Hyperlink-Button in a gridView in which I can display a
Want the function to sort the table by HP but if duplicate HPs then
want to rewrite urls like site.com/software to wp-content/themes/dir/software.php and something is not working.. Here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.