Failed to Connect error using Restore-SQLDatabase command

This topic contains 0 replies, has 1 voice, and was last updated by  Anshul Sri 1 month ago.

  • Author
    Posts
  • #91674

    Anshul Sri
    Participant

    I am running this line in order to restore a Database from a backup file which is stored locally.

    Restore-SqlDatabase -ServerInstance "Server\Instance" -Database "ProdDB" -BackupFile "C:\Temp\Prod.bak"
    

    The error that i am getting is–

    Restore-SqlDatabase : Failed to connect to server Triage7204-1\Triage7204-1.
    At line:1 char:1
    + Restore-SqlDatabase -ServerInstance "Triage7204-1\Triage7204-1" -Data ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Restore-SqlDatabase], ConnectionFailureException
    + FullyQualifiedErrorId : Microsoft.SqlServer.Management.Common.ConnectionFailureException,Microsoft.SqlServer.Management.PowerShell.RestoreSqlDatabaseCommand.

    I have enabled TCP/IP & Named Pipes for client and even checked with starting all services related to my sql server but nothing helped.

You must be logged in to reply to this topic.