PowerShell script exchange
Post Reply
i3uln
Influencer
Posts: 15
Liked: never
Joined: Jan 03, 2022 8:13 am
Full Name: BUHYUN SONG
Contact:

Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by i3uln »

Hello !

First, I opened ticket Case# 07791345for this request. [Moderator: Added Case #]

My new customer has dozens of MSSQL servers and hundreds of database instances.

Due to the customer's DB environment, MSSQL backups cannot be performed through Veeam.

Interestingly, even when Veeam's application is deactivated, the customer stated that it is not acceptable to view the list of DBs on the MSSQL server.

Therefore, the solution I found was to activate Database Exclusion in Veeam B&R and add the MSSQL server and database instances, which resolved the issue.

However, another issue is that new customers have hundreds of MSSQL database instances.
This results in significant waste of manpower.

Therefore, the customer requested a cmdlet or PowerShell command to perform bulk MSSQL database exclusion as the final requirement before purchasing Veeam B&R.

Is there a way to perform bulk MSSQL database exclusion?
david.domask
Veeam Software
Posts: 2911
Liked: 668 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by david.domask »

Hi i3uln,

There is no cmdlet to allow this at this time, and no unsupported methods I can locate either.

Can you elaborate a bit more on what is required here? As per https://www.veeam.com/kb2110, adding the Database Exclusions simply excludes the databases from the VSS snapshot, however if Guest Processing is enabled, to my recollection DB enumeration will still occur.

What actually needs to be protected on these machines if the MSSQL data is protected by another application? Also doesn't Copy-Only option work? I think this perhaps is not an automation request so if you can elaborate on the challenges more it would be appreciated.
David Domask | Product Management: Principal Analyst
i3uln
Influencer
Posts: 15
Liked: never
Joined: Jan 03, 2022 8:13 am
Full Name: BUHYUN SONG
Contact:

Re: Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by i3uln »

Hello David
As you said, the key point is to exclude the database from the VSS snapshot through https://www.veeam.com/kb2110를.

Since MSSQL is protected by other backups, the customer only wants to perform an Entire Backup of the MSSQL server.

With hundreds of MSSQL Database Instances, the customer does not want to manually add kb2110.

Therefore, I would like to add it in .csv file format if there is an MSSQL Database Exclude cmdlet or powershell.
david.domask
Veeam Software
Posts: 2911
Liked: 668 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by david.domask »

Hi i3uln,

Understood, but if the point is to avoid VSS, can I ask why not just disable Guest Processing and Indexing entirely? Disabling these features means Veeam will not load the guest agents and thus will perform a crash consistent backup.

To directly answer your request, as noted before there is no means to automate this process at this time. But if the goal is to avoid triggering VSS on the volumes with MSSQL databases (avoid VSS backup), then disabling Guest Processing will accomplish this.
David Domask | Product Management: Principal Analyst
i3uln
Influencer
Posts: 15
Liked: never
Joined: Jan 03, 2022 8:13 am
Full Name: BUHYUN SONG
Contact:

Re: Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by i3uln »

As far as I can tell, even if Guest Processing is disabled, VAW generates VSS during backup, and in the process of generating sql vss, it queries all mssql database instances.

In the customer's database environment, there are security regulations that prohibit other solutions from querying database instances.

Therefore, disabling Guest Processing does not help.
david.domask
Veeam Software
Posts: 2911
Liked: 668 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Is there a PowerShell command for working with MSSQL Database Exclusions?

Post by david.domask »

Ah, okay it's Veeam Agent for Windows, not virtual machine backup; you are correct, even with Guest Processing/Application Aware Processing disabled, Agent for Windows still utilizes a VSS snapshot, but uses VSS_COPY.

At this time this behavior is not changeable, and as noted, there is not a means of automating the exclusion process, so the entries will need to be made manually.

Out of curiosity, how are the databases being protected currently? Native MSSQL backups? Perhaps review in our Plugin for Microsoft SQL can be used, as it uses native MSSQL tooling to perform backup and restore, though I suppose it may still be considered a third party solution querying the databases.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests