Indeed that does seem to solve the problem except for 1 thing:
Msg 8114, Level 16, State 12, Line 103
Error converting data type varchar to nvarchar.
it seems to be here:
RESTORE DATABASE @restore_as
FROM DISK = @full_backup_path WITH FILE = 1,
MOVE 'U4S33_Data' TO @data_file_full_path,
MOVE 'U4S33_Data1' TO @data_file_1_full_path,
MOVE 'U4S33_Log' TO @log_file_full_path
I tried setting @restore_as to NVARCHAR but that didn't work.
I then added these satements to the script
The first SET statement is not shown.(.mdf file) So I think the problem is there.