Start a new topic

Issues w/ Backup on SQL Server 2012

I've been running Minion Backup 1.5 (+ some subsequent fixes) on SQL Server 2017 and it runs great.  Recently, though, we had to set up a SQL Server 2012.  I installed and configured Minion Backup on it.  Everything went smoothly -- no errors -- but I am getting errors.


I then noticed that several stored procedures and functions were missing.  (Is there an install log to look for installation errors?).  The MMAGInfo SP had CREATE OR ALTER PROCEDURE, so I took the OR ALTER out and reran it and added the other two missing functions: MMCmdServerNameGet and MMSQLInfoGet.  Still, strange behavior.


I removed the OR ALTER from the install source and reran the install.  No errors.  But still the strange behavior.  Here's what's happening:


On the Primary SQL Server in the AG, it ran the system backups at the appointed time, but it hasn't been running the user backups -- full or diff or log, and there is nothing about them in the BackupLogDetails table, though there are entries in the BackupLog table.  It I run BackupMaster on user DBs, it looks like it runs (output is DBName: rlstest, BackupGroupOrder: 0, BackupGroupDBOrder : 0), but there is no entry in the BackupLogDetails (there is in the BackupLog table).  In all these cases, there are no user DB backup files in the target backup folder.


On the Secondary (non-readable) SQL Server in the AG, the system backups ran at their appointed hour, but the user db backups, while running as scheduled (log backups every 15 minutes), are failing with this message in the BackupLogDetails table:


"FATAL ERROR: @BackupCmd is empty. Common causes are misconfigured BackupSettings and BackupTuningThresholds tables. If you need help configuring them, consult the documentation as it has examples of proper configurations outlined."


On all of my other SQL Servers, Minion Backup seems to know that these are non-readable secondary data bases and skips trying to back them up.


I configure all of my Minion Backups the exact same way, using a script to make sure there are no differences.  Here, too, there are no user DB backup files in the target backup folder.


The SQL Server version is Developer Edition (SP4-GDR) (KB4532098) - 11.0.7493.4 (X64)

Any guidance you can give would be greatly appreciated.


Thank you.



Hey Richard,

There isn't any problem with MB running on 2012 so the issue is in something else.  

So let's start by figuring out which part of the process is failing.

Let's see if we can generate a stmt by itself.

Run this:

Minion.BackupStmtGet 'DBName', 100;


Of course, put in the DBName itself, and make sure it's a user Db that isn't being generated in the routine.

The 100 is the size in MB.  It doesn't really matter what you put in there as long as it's a valid size.  But it'll be more realistic if you use something close to the real size of the DB.  Again, it's in MB so if the DB is 1GB then you'll put 1024 into the SP.


What should happen here is you should get a resultset that includes the cmd.

Tell me what happens with that and we'll go from there.

Hi Sean,


I ran the statement on each server with the user data base name and appropriate size, and no results were returned on either server, just an empty results set.


By the way, I ran a SQL Compare between these servers and 2017 SQL Server where things are working.  It showed that all the table, procedures and functions are present with no differences.


I think the "Create or Alter" may have been left over from an earlier working session of our where I put it in to make the recreates easier.  I commented the "or Alter" out so it ran on SQL Server 2012.


Don't worry about any out-of-office messages you may get on your e-mails to me.  I'm off but am still logging in every day and will run anything you want me to try as soon as I see it.


Thanks!


Richard,

Believe it or not this means that the issue is prob config related.  Can I see the data in the following tables...

BackupSettings

BackupSettingsPath

BackupTuningThresholds


Of course, if there's any private data in there, be sure to change it.  It would only be DB names, but only if you think it would compromise you.

The best way is to put them in excel... and don't forget the col names.

Hi Sean,


Excel is attached.  I X'ed out the drive, path, and port column values.  The first two sets are from the servers having the trouble.  The third set is from another server where it's working fine.

xlsx

Ok, it's a little hard to read, but I don't immediately see anything wrong.

Do you wanna get together for some live tshooting?

We can use my GtM.

The problem is resolved and was not caused by Minion Backup.


I had configured the SQL Server 2012 Availability Group using SSMS 18.6.  In doing so, I told it to make the Primary as the preferred backup replica since our secondary data bases are not readable.  SSMS gave no error message but did not make the change, so the preferred backup replica remained the Secondary, unbeknownst to me.


Once this was found out, I was able to change the preferred backup replica using an Alter AG statement.  After that, everything in Minion is working as expected.


Login or Signup to post a comment