Backup Azure SQL database from local windows Powershell ise

  • Hi,

    I am to backup azure sql database from my local windows power shell ise. In azure cloud i have created blob container.

    When i am running below command

    backup-sqldataase -serverinstance "server name given in the azure sql database" -database "db_name" -sqlcredential "username of databae"

    getting error as below.

    Backup-SqlDatabase : Failed to connect to server server.

    At line:1 char:1

    + Backup-SqlDatabase -ServerInstance server -Database 'adventureworksDW ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : NotSpecified: (:) [Backup-SqlDatabase], ConnectionFailureException

    + FullyQualifiedErrorId : Microsoft.SqlServer.Management.Common.ConnectionFailureException,Microsoft.SqlServer.Management.PowerShell.Backu

    pSqlDatabaseCommand

    Please help me.

    Thanks in advance.

    Regards,

    Sun

  • You can't run a backup command against an Azure SQL Database. That's the core of the problem. You can export one to a DACPAC or other process, but no backups outside of Azure are possible. Azure itself does do backups and you can restore from those, but only within Azure.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply