Sql Server Database not accessible

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

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.
8,457 questions
{count} votes

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

    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 additional answers

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

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

    No comments

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

    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?

    No comments