Start a new topic

Issue in BackupStmtGet with long database names.

I Have MinionBackup1.4 . 

When I try to use the Store procedure BackupStmtGet  with a Database name longer than 46 characters I get following error:

Msg 8152, Level 16, State 30, Procedure Minion.BackupStmtGet, Line 1362 [Batch Start Line 49]

String or binary data would be truncated.

The Statement has been terminated.

 

I’m not sure but I think the problem could be with FileName field. With a 46 characters DB the Filename field reach 100 characters length (it has suffix like server, date, etc.).


Please advise.


Hey Alejandro,

Can you post the DBName and the Inline Token used to build the filename?

It'll help me get you a fix faster.

This is the settings for the Filename:

FileName  = '%DBName%__%Date%_%Hour%%Minute%%Second%__%AGName%__%Server%__%BackupType%__%Ordinal%_of_%NumFiles%'  


For DBName i test a bunch , but bellow an example.  (it fails, with one character less it success)


  EXEC [Minion].[BackupStmtGet]

  @DBName = 'ThisIsAFortySevenCharaterslenghtDatabaseName123',

  @BackupType = 'Full',

  @DBSize = 1


A side question if you don't mind. 

@DbSize is 1 just to get something in the output . With null i do not get information returned. Is this normal?

Ok I was able to repro and fix it with this version.  If this works for you then just put this code in your install folder in place of the current one and you won't have this issue on new boxes.  You can also run the installer on your current boxes again and it'll update them to the new object without touching your config data.

Let me know how it goes.


Oh, and yeah, @DBSize has to have a value.

sql

Thanks a lot .  


Works like a charm


Login or Signup to post a comment