Backup Exec Management Command Line Interface Help
New-BESqlDatabaseSelection Cmdlet
Synopsis

Creates a backup selection object for Microsoft SQL databases.

Syntax
New-BESqlDatabaseSelection [[-InstanceName] [<String>]] [-Exclude [<SwitchParameter>]] [<CommonParameters>]

New-BESqlDatabaseSelection [-InstanceName] [<String>] [[-DatabaseName] [<String>]] [-Exclude [<SwitchParameter>]] [<CommonParameters>]
Description

Creates a backup selection object for Microsoft SQL databases.

Parameters

-InstanceName <String>

Specifies a SQL instance name. Specify '*' to indicate all available SQL instances.


Required true
Position 0
Accepts pipeline input true (ByPropertyName)
Accepts wildcard characters false


-DatabaseName <String>

Specifies a SQL database name. Specify '*' to indicate all available SQL databases.


Required false
Position 1
Accepts pipeline input true (ByPropertyName)
Accepts wildcard characters false


-Exclude <SwitchParameter>

Excludes the SQL Instance/Database selection specified with the -InstanceName parameter and the -DatabaseName parameter.


Required false
Position Named
Accepts pipeline input false
Accepts wildcard characters false


<CommonParameters>

For more information about common parameters, type "Get-Help about_commonparameters".

Input Type
None

This cmdlet does not accept any input.

Return Value
BackupExec.Management.CLI.BESqlDatabaseSelection

New-BESqlDatabaseSelection returns an BESqlDatabaseSelection object.

Examples

Example 1

C:\PS> $x = New-BESqlDatabaseSelection -InstanceName "Instance1" -DatabaseName "DB1"
C:\PS> Get-BEAgentServer -Local | New-BEBackupDefinition -BackupJobDefault BackupToDisk -SqlDatabaseSelection $x | Save-BEBackupDefinition

These commands create a backup definition that backs up the SQL database named "DB1" in the SQL instance named "Instance1" for the local computer using the "BackupToDisk" job defaults.


Example 2
C:\PS> $x = New-BESqlDatabaseSelection -InstanceName "Instance1" -DatabaseName "DB1"
C:\PS> Get-BEAgentServer -Local | Submit-BEOnetimeBackupJob -SqlDatabaseSelection $x

These commands submit a one-time backup job that backs up the Exchange database named "DB1" in the SQL instance named "Instance1" on the local computer.

Related Links

Get-BEAgentServer
New-BEBackupDefinition
Save-BEBackupDefinition
Submit-BEOnetimeBackupJob