Comments
3 comments
-
What version of SQL Backup are you running? What is the result when you run the following:
DECLARE @version NVARCHAR(32) EXEC master..sqbutility 1030, @version OUTPUT SELECT @version
Are you backing up the databases using individual commands e.g.EXEC master..sqlbackup '-sql "BACKUP DATABASE [db1] ... EXEC master..sqlbackup '-sql "BACKUP DATABASE [db2] ... EXEC master..sqlbackup '-sql "BACKUP DATABASE [db3] ...
or all you backing up the databases by using the BACKUP DATABASES syntax e.g.EXEC master..sqlbackup '-sql "BACKUP DATABASE [db1, db2, db3] ...
Thanks. -
Version is SQL Backup 5.4.0.55
I am backing up using BACKUP DATABASES [db1, db2, db3, etc.]
Thanks. -
Is it possible for you to back up the databases using the EXCLUDE option, so that you do not need to provide such a long list of database names e.g.
BACKUP DATABASES EXCLUDE [db1, db2] TO DISK = ...
If it's possible, could you please try it and check if it still causes the error?
Thanks.
Add comment
Please sign in to leave a comment.
I get an error when I run my T-SQL code where I have 25 databases. I'm wondering if there's a limit. Also the database names are really long, some are over 100 char names. I get the error code:
exitcode 5270
Error: SQB service is no longer running.
Below is my code:
DECLARE @exitcode int
DECLARE @sqlerrorcode int
EXECUTE master..sqlbackup N'-SQL "BACKUP LOG [TEST] TO DISK = ''\\Share\Tlogs\<AUTO>.sqb'' WITH COMPRESSION = 2, ERASEFILES_ATSTART = 2, INIT"', @exitcode OUT, @sqlerrorcode OUT
IF (@exitcode >= 500) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup failed with exit code: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END