Sql Server Database not accessible

amir 133 21 Reputation points
2021-11-17T17:36:25.707+00:00

I have a big problem
The main database of my site is not accessible.

Can anyone guide me? What should I do?

Displays the following error when opening (expanding) this database in SSMS:

===================================  
  
The database XXXDb is not accessible. (ObjectExplorer)  
  
------------------------------  
Program Location:  
  
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren()  
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)  
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)  

150238-image.png

Sqlserver 2019
SSMS 18
Windows Server 2019

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

Accepted answer
  1. Tom Phillips 17,741 Reputation points
    2021-11-17T17:59:39.2+00:00

    It must have been restored with "NORECOVERY". See: https://www.mssqltips.com/sqlservertip/5460/sql-server-database-stuck-in-restoring-state/

    Run
    RESTORE DATABASE [databasename] WITH RECOVERY

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Tom Phillips 17,741 Reputation points
    2021-11-17T17:40:10.4+00:00

    The database is in "Restoring" state. Someone is restoring the database.

    0 comments No comments

  2. amir 133 21 Reputation points
    2021-11-17T17:42:37.46+00:00

    I'm the only one who has access to the database.
    He has been in this State for 2 days. How do I get out of this State?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.