Title: SQLserver restore with rename/relocate failing
NV Version: all
OS Version: all
Application version: MS SQL
Plugin version: <4.5
A restore that consists of multiple files in an SQL file group or where the path is long will fail with Child Process Died. This is because there is a limited amount of space in the buffer for the restore command, and if the total required command exceeds this available buffer space, the plugin crashes. A straight restore back to the original location succeeds
This has been identified as a problem with the length of the rename/relocate buffer, an overrun happens due to the number of files or total path length, thus causing the process to quit unexpectedly. This will only occur when attempting a restore that requires the SQLserver data files to be relocated to a new name or location and via the move command
In the binary log;
Job Message 2006/12/06 16:41:18 129 Data Plugin TESTSQL Will restore 'tedeschi' to data and log path 'e:\'
Job Message 2006/12/06 16:41:18 129 Data Plugin TESTSQL Restoring Server: TOPOLONA\CANALIS
Error 2006/12/06 16:41:18 129 Jobs SERVER-DC Child Process died unexpectedly
Error 2006/12/06 16:41:18 129 Jobs SERVER-DC Fatal error: Restore Died Unexpectedly
Error 2006/12/06 16:41:18 129 Jobs SERVER-DC Job Status: Restore Failed
In the SQL client trace;
1 UTILS :3500 505 0 164051 Rename: 'restore', DataPath: 'e:\', LogPath: '(null)'
1 UTILS :3500 446 1 164051 Rename/relocate all files
1 UTILS :3500 456 1 164051 RelocateFile(): Database name: restore
1 UTILS :3500 786 0 164051 File: 'tedeschi_Data.MDF'
1 UTILS :3500 458 1 164051 Move file: ', MOVE 'tedeschi_Data' TO 'e:\\restore_tedeschi_Data.MDF''
1 UTILS :3500 786 0 164051 File: 'tedeschi_Log.LDF'
1 UTILS :3500 458
as a workaround the original database can be renamed, and files relocated, allowing the backup to be restored without requiring the rename/relocate.
This fault will be corrected in a furture release of the MS SQL plugin