1

I am new to powershell. I got requirement to take the backup of MS sql database backup from the other machine and not within the server.

Can you please let me know what possible utilities required to connect and take the full backup.

2 Answers 2

1

Make sure you have the sqlps module installed on the machine from which you could be taking the backup. After that you can use the Backup-SqlDatabase cmdlet to backup a certain database.

Example:

Backup-SqlDatabase -ServerInstance 'SERVERNAME\INSTANCE' -Database 'MYDB' -BackupFile 'F:\SQLBackup\mydbbackup.bak'

This would take a full backup. More info on the cmdlet here.

0

Wait, is powershell required? If it's not required, you can just install SQL Server Management Studio on any windows computer and access/backup the database remotely with this.

5
  • 1
    Management studio is not required too...
    – Sergey
    Nov 12, 2015 at 9:22
  • Sql server command line tools is enough to remote backup /restore of SQL server databases...
    – Sergey
    Nov 12, 2015 at 9:23
  • www.microsoft.com/en-US/download/details.aspx?id=36433
    – Sergey
    Nov 12, 2015 at 9:23
  • Sorry for comments spread - line feed (enter) works as send on mobile client :(
    – Sergey
    Nov 12, 2015 at 9:24
  • Haha no worries. And good point!
    – Neil
    Nov 13, 2015 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .