SQL Server: Blocked On Windows Users

Skar.2007 1 Reputation point
2022-04-20T15:25:13.273+00:00

SQL Server 2014 | 2019

Hello everyone

In a computer, there are Windows Users A, B and C.

SQL Server and SSMS are installed on Windows User A. So far so good in terms of operation.

By logging in to Windows User B or C, SSMS can be opened normally. In the Object Explorer the Databases are listed, however when trying to "open" a Database and access the Tables, the Error is displayed:

       Database <<Database_Name>> is not accessible

Nor can any script that refers to Tables or Fields be executed, displaying a message similar to the previous one.

In the same way, if SQL Server and SSMS are installed in Windows User B, the operation is correct, but the previously described happens in the other Windows Users.

How to configure SQL Server and SSMS so that it can run on all Windows Users and manage the Databases?

Thank you very much already

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,840 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tom Phillips 17,636 Reputation points
    2022-04-20T20:51:21.317+00:00

    The message "Database xxxx is not accessible" only happens if the database is in a state which is not usable, restoring, single user mode or some other state restricting access.

    This is most likely caused by connecting to a mirrored or DR secondary database server and not the primary server.

    Check the state of the database in question.

    SELECT name, state_desc  FROM sys.databases
    

    This is not an SSMS issue.

    0 comments No comments

  2. YufeiShao-msft 6,991 Reputation points
    2022-04-21T05:46:38.933+00:00

    Hi @Skar.2007

    You can try to connect to database in single-user mode, start SQL Server in single-user mode enables any member of the computer's local administrators group to connect to the instance of SQL Server as a member of the sysadmin fixed server role
    Choose your login, on the server roles page, assin the sysadmin role to your user
    https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2012/dd207004(v=sql.110)?redirectedfrom=MSDN

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

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.