Error 5270
ASJ
Posts: 3
Hi,
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
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
Thanks!
Comments
Are you backing up the databases using individual commands e.g.
or all you backing up the databases by using the BACKUP DATABASES syntax e.g.
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I am backing up using BACKUP DATABASES [db1, db2, db3, etc.]
Thanks.
If it's possible, could you please try it and check if it still causes the error?
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8