Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

BackupStmtGet error on SQL 2016 SP1 CU 2 (13.0.4422.0)

Andrea Apr 27, 2017 05:02PM CDT

Hello,

I have 2 SQL 2016 instances that have have Minion Backup installed from the same installer. I've done a schema compare and both Minion databases are identical. The first instance is on SP1 (13.0.4001.0) the second is on SP1 CU 2 (13.0.4422.0). Everything works awesome on the first instance. On the second instance, I'm getting an error that I've tracked down to the the Minion.BackupStmtGet stored procedure. If I run the command

EXECUTE Minion.BackupStmtGet
@DBName = 'model'
, @BackupType = 'Full'


then I get the following error:

Msg 213, Level 16, State 1, Procedure BackupStmtGet, Line 947 [Batch Start Line 0]
Column name or number of supplied values does not match table definition.


Everything that I can think to check is identical (server configs, Minion settings tables), except the SQL version. Is this a known issue with this version, or is there something else I've missed.

Thanks in advance!

Up 0 rated Down
Sean McCown Apr 27, 2017 05:11PM CDT MinionWare Agent

Andrea,
Thanks for letting me know this. I’ll get CU2 loaded and get this fixed for you. Stay tuned and I’ll have something soon.
Sean.

Up 0 rated Down
Sean McCown Apr 27, 2017 05:21PM CDT MinionWare Agent

I’ve looked at one of my lab boxes that already has CU2 on it, and MB works just fine on that box, so I’m unable to repro. There may be an issue with your config, or with powershell on that server.
Try running this and see if you get anything back. You need to call the SP with 3 params, not the 2 you sent me.
EXECUTE Minion.BackupStmtGet
@DBName = ‘model’
, @BackupType = ‘Full’, @DBSize = 1

Let me know what happens with that and it’ll help me determine what to do next.

Up 0 rated Down
Andrea Apr 28, 2017 11:38AM CDT
Essentially the same error when using all 3 parameters:
Msg 213, Level 16, State 1, Procedure BackupStmtGet, Line 947 [Batch Start Line 2]
Column name or number of supplied values does not match table definition.

So one interesting thing of note is that it turns out that they're on different versions of Windows, even though sys.dm_os_windows_info says that they're the same (6.3). The server that's working well is on 2012 R2 (6.3.9600 and PS 5.1.14409.1005). The server that isn't working is 2016 (10.0.14393 and PS 5.1.14393.1066).
Up 0 rated Down
Andrea May 05, 2017 03:29PM CDT
The issue was that this insert statement is missing an explicit column list and the select statement does not have the same columns:


IF @SettingLevel = 0
BEGIN --@SettingLevel = 0
INSERT #BackupTuningThresholdsStmtGet
SELECT --TOP 1
Buffercount ,
MaxTransferSize ,
Compression ,
NumberOfFiles ,
BlockSize,
BeginTime,
EndTime,
[DayOfWeek]
FROM Minion.BackupTuningThresholds
WHERE DBName = 'MinionDefault'
AND ThresholdValue = 0
AND IsActive = 1
ORDER BY ThresholdValue DESC
Up 0 rated Down
Sean McCown May 08, 2017 08:55AM CDT MinionWare Agent

Hey Andrea, while I understand what you’re saying, I don’t know how you came to that conclusion. If that were the case, then nobody should be able to run the code, and you shouldn’t either. As you said, it works just fine on your first instance but not on the second. Why would that be if the cols were mismatched?

Up 0 rated Down
Sean McCown May 23, 2017 08:32AM CDT MinionWare Agent

Closed due to inactivity.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
556ca399015f31edc97a62de2771be1a@minionware.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete