question

DarrylHoar-5879 avatar image
0 Votes"
DarrylHoar-5879 asked TomPhillips-1744 commented

Sql Server 2019 express edition backups problem

I have created a C# application that uses a Sql Server database. I have Sql Server 2019 express edition installed. The problem I am experiencing is that Sql Server will randomly backup my database many times in a row (think once a minute for several minutes straight). I did not send it a command. I do not have windows 10 scheduler setup to run a job. Nada.

I've looked as hard as I can and cannot figure out what is causing this. I know that Sql Server 2019 Express editon CANNOT schedule backups as it does NOT have the agent by design. The log files don't help.

Any ideas greatly appreciated.

sql-server-generalsql-server-transact-sql
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Exactly how do you determine that the databases are being backed up?

0 Votes 0 ·

Hi @DarrylHoar-5879,

Any update for this thread? Did the replies could help you? If the response helped, do "Accept Answer". If it is not, please let us know. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·

Not yet. I have run the suggested code and not yet found anything. I am continuing to trouble shoot and try to catch the cause in action. Right now, I do not have any additional information.

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @DarrylHoar-5879,

Try to check if you have some third party backup tool backup the database, when you do not have a backup job.

The software used to perform the backup is recorded in the msdb.dbo.backupmediaset table. Try below T-SQL;

 select software_name from msdb.dbo.backupmediaset

For standard SQL backups, I get "Microsoft SQL Server".

Thanks. I will give this a try. will it work on express edition ?

Yes.


If the response is helpful, please click "Accept Answer" and upvote it, thank you.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GuoxiongYuan-7218 avatar image
0 Votes"
GuoxiongYuan-7218 answered OlafHelper-2800 commented

If you do not have the scheduled task to generate the backups, you need to make sure there is no any software to perform the backups. The following script will show the details of the backups. That may help you to figure out why.

 SELECT * FROM msdb.dbo.backupset WHERE database_name = 'YOUR_DB_NAME';
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks. I will give this a try. will it work on express edition ?

0 Votes 0 ·

will it work on express edition ?

It's a simple query on a system table and works in any Edition.



0 Votes 0 ·
DarrylHoar-5879 avatar image
0 Votes"
DarrylHoar-5879 answered TomPhillips-1744 commented

It creates the .bak file for the database.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

And here does it create the file? How do you detect that is being backed up again and again?

Are there messages in the SQL Server error log about the database being backed up?

You know, when asking questions like this, it always help if you supply as much as information you can. Not the least in cases of mysteries like this.

0 Votes 0 ·

I apologize for incomplete information.
1. In the Sql server install directory\backups, Sql creates a new backup file every minute as indicated by the dbname_datetime.bak name construction. It does this for about 20 minutes. This repeats on random days and I see no pattern. The SQL server error log does not appear to contain messages regarding the backup. I wouldn't expect any either since this is the express edition and it does not have the agent functionality that has jobs.
2. I can not find anything in Sql (using SSMS nor configuration manager) indicating why this is occuring.
3. Microsoft Windows Application event log viewer shows informational messages that Sql starts and performs the backups and the success. it shows the file names created and what folder they were saved in. This was provided in point 1.
4. This is Sql Server 2014 express edition.


0 Votes 0 ·

This is Sql Server 2014 express edition.

In the title you say SQL 2019? Can you post the output from "SELECT @@version".

SQL Server normally writes messages about backups being taken to the SQL Server errorlog, so it is a little mysterious that there are no messages in the log file.

Can you post a sample of what you see in the Windows Application log?

0 Votes 0 ·

What exactly is the message you are seeing in the windows log?

The SQL Server log, would also log backups.

0 Votes 0 ·