SQL 2019 Express Missing sp_BackupDatabases

rr-4098 2,051 Reputation points
2024-10-11T19:18:31.4266667+00:00

I am currently running SQL 2019 Express GDR. I am looking to setup a script to backup the DB's nightly using sqlcmd. What is interesting is the stored procedure sp_BackupDatabases is missing and do not see it in SSMS under the Master DB. I have already tried the suggestions online to use the full path name etc... but no luck

Any ideas???

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2024-10-11T21:22:53.6533333+00:00

    Do you mean this one: https://gist.github.com/WimObiwan/db11014ec035ea80c9ba30c0791b5a48?

    I don't recall this as a name of a procedure that ships with SQL Server.

    I also found this article, https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/backup-restore/schedule-automate-backup-database, which suggests that you need to create it.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Arpit Dhote 0 Reputation points
    2024-10-12T06:29:37.6666667+00:00

    It sounds like you're trying to use a stored procedure that might not be included by default in SQL Express. sp_BackupDatabases isn't a built-in procedure in SQL Server Express, so you would need to manually create it. You can find custom scripts online for sp_BackupDatabases, or consider writing your own backup script using sqlcmd and the BACKUP DATABASE command. Also, SQL Server Agent isn't available in Express, so you’ll need to schedule the backups using Task Scheduler.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.