title: SP central admin Cannot connect to the configuration database after reinstalling sql server 2008 r2
body: <p>I have just re-installed SQL Server 2008 R2 in my Windows Server, but after installing the SQL Server, I am unable to open my central admin. On opening the central admin its showing me the message - </p>
  
  <blockquote>
    <p>Cannot connect to the configuration database</p>
  </blockquote>
  
  <p>I am unable to open any of my site collection too. On opening a site collection its showing</p>
  
  <blockquote>
    <p>Cannot connect to the configuration database.  Description: An
    unhandled exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the
    error and where it originated in the code. </p>
    
    <p>Exception Details:
    Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Cannot
    connect to the configuration database.</p>
    
    <p>Source Error: </p>
    
    <p>An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.</p>
    
    <p>Stack Trace: </p>
    
    <p>[WebPartPageUserException: Cannot connect to the configuration
    database.]<br>
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.EnsureInitialize(HttpRequest
    request) +740<br>
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.BeginRequestHandler(Object
    oSender, EventArgs ea) +164<br>
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    +80    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +171</p>
  </blockquote>
  
  <p>I have checked my SQL Server configuration manager and there is no sharepoint instance there too, I am afraid if my sharepoint db has been deleted. If yes, then is there anyway to restore it and how to make my sharepoint site collection and central admin up and running. Any help will be appreciated.</p>