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 7825087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:49:54+00:00 2026-06-02T08:49:54+00:00

We have several databases on SQL server. We would like to create 1 new

  • 0

We have several databases on SQL server.
We would like to create 1 new user that can see database ‘c’ but can not see the rest of the databases.

This user should only be able to select from this database, and nothing else.
I have been googleing and searching for a while now, and the closest I found was to deny view any database, and then make them the database owner.

But I don’t think that will work for limiting them to select, unless is there a way I can
deny everything except for select on a database owner?

Thanks in advance for any help!

Edit: SQL Server 2008 R2, by the way.

Edit2: Sorry, I was not clear in my original post. I am looking to make it so when they log in they won’t even see the names of other databases, not just that they can’t access them.

Thanks.

  • 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-06-02T08:49:57+00:00Added an answer on June 2, 2026 at 8:49 am

    1) Create the user on the server

    2) Add the user to the given database

    3) Grant read-only access to the database

    USE [master]
    CREATE LOGIN [SomeUserName] WITH PASSWORD=N'someStr0ngP@ssword', DEFAULT_DATABASE=[c], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
    GO
    
    USE [c]
    CREATE USER [SomeUserName] FOR LOGIN [SomeUserName] WITH DEFAULT_SCHEMA=[dbo]
    GO
    
    EXEC sp_addrolemember N'db_datareader', N'SomeUserName'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm helping implement a SQL Server 2008 database and I have several columns that
I have an application that uses a SQL Server database with several instances of
I'd like to create a view in SQL Server that combines several pieces of
We have several SQL Server 2000 databases (I know, we need to upgrade) that
At work, we have several applications with databases in a centralized SQL server. Whenever
I have a SQL Server database which is shared between several ASP.NET (VB.NET) websites,
I have several sql queries that I simply want to fire at the database.
We are moving our database server to a bigger box. I have several databases
I have several databases in my sql server in which some of them I
We have several systems with Oracle (A) and SQL Server (B) databases on backend.

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.