Failed to Connect error using Restore-SQLDatabase command

Welcome Forums General PowerShell Q&A Failed to Connect error using Restore-SQLDatabase command

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

  • Author
    Posts
  • #91674

    Participant
    Points: 0
    Rank: Member

    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.

The topic ‘Failed to Connect error using Restore-SQLDatabase command’ is closed to new replies.