backup-sqldatabase

SQL backup job script windows schedule task

大憨熊 提交于 2020-01-17 02:20:07
问题 I knew about the possibility to get backup db using SQL server agent, but I was curious to know if we can have a backup script (like batch file) that just runs in windows and gets automatic backup according to the schedule that we define? I think for the next part we can use windows task schedule (or crontab) for run the backup script job routinely, but the most important thing is to know: is it possible to login via SQL and backup the DB just using a batch scrip file (that there not be any

Backup-SqlDatabase is not recognized

南楼画角 提交于 2019-12-11 09:43:21
问题 I have a PowerShell script to backup a database. But today it has stoped working with next error: Backup-SqlDatabase : The term 'Backup-SqlDatabase' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I didn't change the script. What could be the reason for that? UPDATE: Installed SqlServer module. Now I have next: Windows PowerShell Copyright (C)