Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
madeyem
Novice
Posts: 5
Liked: 2 times
Joined: Aug 05, 2020 9:22 am
Contact:

Manually erase failed tape backups from SQL database

Post by madeyem »

Case #04319207

Hi everyone,

I did a file-to-tape backup of a Windows file server with almost 20 million files, which failed because of the SQL database limitation of 10 GB. I also tried to split the job into 4 different jobs, but that failed, too.

I now would like to erase all the failed tape backups from the SQL database, but short-erasing the tapes or marking them as free also fails with the same error:

"05.08.2020 11:15:35 Error Failed to mark tape as free Error: Could not allocate a new page for database 'VeeamBackup' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup."

In total I have three tapes, that I cannot mark as free or erase.

Can you provide me with a way of erasing all those failed tape backups from the SQL database using SQL Management Studio? Or is there another solution for this? I couldn't find any inside the GUI.

My Disk-to-Disk backups are working well and should not be affected by this.

The database recovery model is set to simple, autogrowth is also enabled, session history retention set to 6 weeks. But the SQL file is almost 10 GB, so I somehow have to erase the failed tape backups from the database.

I already searched the forums, Knowledge Base and Internet for this, but could't find any solution.

Thank you very much in advance.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

Hello madeyem,

Unfortunately can provide you with SQL query, please keep working with our support team as they should have a workaround. Mind me asking what edition of the SQL server are you running? Is it SQL server standard or SQL Server Express that is bundled with Veeam B&R installation? Thanks!
madeyem
Novice
Posts: 5
Liked: 2 times
Joined: Aug 05, 2020 9:22 am
Contact:

Re: Manually erase failed tape backups from SQL database

Post by madeyem »

Hi Dima,

thanks for your reply. I have the default SQL Server 2016 Express, that comes with the Veeam setup. Yes, I will wait for the support team's response. I just wanted to ask in the forums as well, because maybe someone had the same issue before and can help.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

madeyem,

Thank you for the update! If you plan to backup so many objects via file to tape job in future - I'd recommend using the Standard edition of the SQL server since it has not limitation in database instance memory usage, thus all the queries work faster and, as a result, all file to tape operations get a boost in overall performance (next step would be to use SSD storage for the Veeam B&R database). Cheers!
madeyem
Novice
Posts: 5
Liked: 2 times
Joined: Aug 05, 2020 9:22 am
Contact:

Re: Manually erase failed tape backups from SQL database

Post by madeyem »

Hi Dima,

yes I'm aware of that now as well.
Unfortunately my support case was not processed, because I'm using the Community Edition and therefore am not entitled to support.

So if someone has dealt with this before and can help me out, I would appreciate that.
Thanks.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

madeyem,

Thanks! I'll ask support team to re-open the case, stay tuned.
madeyem
Novice
Posts: 5
Liked: 2 times
Joined: Aug 05, 2020 9:22 am
Contact:

Re: Manually erase failed tape backups from SQL database

Post by madeyem »

Ok, thank you Dima!
madeyem
Novice
Posts: 5
Liked: 2 times
Joined: Aug 05, 2020 9:22 am
Contact:

Re: Manually erase failed tape backups from SQL database

Post by madeyem » 2 people like this post

I would like to thank Dima, Dmitry and Adrian from the support team for helping me out with this. They provided me with a SQL script to delete all file-to-tape jobs from the database. Considering I'm on the free Community Edition, this is much appreciated and not taken for granted! Thank you!
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

madeyem,

Thank you for the kind words and glad we got this issue resolved. Cheers!
Gmaz
Lurker
Posts: 1
Liked: never
Joined: Apr 19, 2021 10:03 am
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Gmaz »

Case # 04753231

Hi, I am just experiencing the same problem as madeyem, because the DB has reached 10GB limit and any operation I will try the result is always "... the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.". I worked with Svetlana of Veeam support (case ID as mentioned) and she provided me the script to manually clean SQL database from failed tape backups, but when i exexute it the result is:
"Could not allocate space for object 'dbo.Tape.files'.'IX_Tape.files_directory_id_name' in database 'VeeamBackup' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. "
Can you help me? It seems no operation can be done in this DB, not even delete...

Thanks in advance
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

Hi Gmaz,

I've asked support team to review your case details and provide the needed instructions. Stay tuned.
Jurica.Radovan
Lurker
Posts: 2
Liked: 2 times
Joined: Jul 22, 2021 1:48 pm
Full Name: Jurica.Radovan
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Jurica.Radovan »

Hello I have just the same problem. My case numb: # 04860694 Is there any way to get the SQL scripts?

Thanks in advance

Radovan
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Manually erase failed tape backups from SQL database

Post by wishr »

Hi Jurica,

As far as I see you've already got the information from our support engineers.

Thanks
Yenming
Lurker
Posts: 2
Liked: never
Joined: Aug 13, 2021 7:05 am
Full Name: Yenming
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Yenming »

Hello I have just the same problem. Case #04946969 Is there any way to get the SQL scripts?

Very thankful

Yenming
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Dima P. »

Hello Yenming,

Please keep working with support team. Thanks!
Jurica.Radovan
Lurker
Posts: 2
Liked: 2 times
Joined: Jul 22, 2021 1:48 pm
Full Name: Jurica.Radovan
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Jurica.Radovan » 2 people like this post

Hello Wishr,
my problem was solved. Many thanks to Veeam Support Team. After sending copy of my Veeam Backup SQL database to Support, they prepared SQL script.

Once again, many thanks.

Radovan
Yenming
Lurker
Posts: 2
Liked: never
Joined: Aug 13, 2021 7:05 am
Full Name: Yenming
Contact:

Re: Manually erase failed tape backups from SQL database

Post by Yenming »

Dima P. wrote: Aug 13, 2021 8:52 am Please keep working with support team. Thanks!
Unfortunately, the answer that support gave me is SQL script has been deleted
Is there any other online support that can help?
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Manually erase failed tape backups from SQL database

Post by wishr »

Hi Yenming,

No, we have a single point of contact for technical issues with no alternative options. Scripts, fixes, and other tools can be only obtained directly from the technical support engineers. I would recommend escalating the case by pressing the "Talk to manager" button if you are unhappy with the service.

Update as of June 2, 2022:
The script has been pulled off from use as a few too many edge cases appeared where unanticipated issues appeared after the script. As this time there is no way of manually cleaning the tables.

Currently available solutions are:
  • Use the stored procedure from the KB1995 to drop the session history to recover some space and try to remove the tape from catalog.
  • Temporarily migrate the database to a SQL Standard (even trial edition), remove tapes from catalog, and migrate back to SQL Express.
The update has come from Veeam Customer Support.

Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests