Invoke-NimDatabaseSnapshot

The Invoke-NimDatabaseSnapshot cmdlet enables you to create snapshots of SQL databases residing on volumes in a volume collection. If -CrashConsistentswitch is specified for a volume collection, the cmdlet creates crash-consistent snapshots.

This cmdlet returns a HPESnapshotCollection object, which contains {GroupMgmtIP, Name,VolumeCollectionName, CreationTime, Snapshots, SyncReplOwner, and IsReplicated}.

Refer to General Best Practices for Using Cmdlets for general tips for working with cmdlets. The Invoke-NimSnapVolumeCollection cmdlet also has the following best practice recommendations:
  • In the array group UI, configure a VLAN for iSCSI initiator groups.

  • Define a single initiator group with all the initiators of each node in the cluster.

The Invoke-NimDatabaseSnapshot cmdlet has the following limitations:
  • The databases being passed in the cmdlet must all reside on volumes that belong to the same group.
  • Your credentials must allow you to access the groups affected by the cmdlet. Use the Set-Configuration cmdlet to configure your credentials.

If you experience a problem using the Invoke-NimDatabaseSnapshot cmdlet, check the information in Troubleshooting Cmdlet Issues.

Options

The Invoke-NimDatabaseSnapshot cmdlet supports several command options.

-Application <String> option. The name of the application for which you are searching the database. The default value is sql.
NOTE: Currently only sql is supported.

-SQLInstance <String[]> option. The name of the SQL instance for which the snapshot will be created. You can use this option with the DBName option. When you include the DBName option, only the details of the database that is under that instance are shown. If you do not use the DBName option, then all the databases under SQLInstance will have a snapshot created. SQLInstance takes precedence. If the value for DBName is not found under that instance, all databases under that instance will be have a snapshot created.

-DBName <String[]> option. The name of the database for which a snapshot will be created. The format of the parameter is instanceName/DBName. If you do not provide an SQL instance as the value for instanceName, the default SQL instance (the localhostname) is used. You can use this option with the SQLInstance option.

-CrashConsistent [<SwitchParameter>] option. This option tells the cmdlet to take a crash-consistent snapshot of the volume collection where the database volumes reside.

-OnlineSnapshot [<SwitchParameter>] option. This option sets the snapshot to online.

-WritableSnapshot [<SwitchParameter>] option. This option allows applications to write to the snapshots that are created.

-ReplicateSnapshot [<SwitchParameter>]

-InformationAction <ActionPreference> option. This option marks the snapshot collection for replication. option. This is a default PowerShell option and has no effect on the cmdlet execution.

-InformationVariable <String> option. This is a default PowerShell option and has no effect on the cmdlet execution.

-WhatIf [<SwitchParameter>] option. This option validates the parameter, but does not modify data. When used with the -Verbose option, it displays messages on the console.

-Confirm [<SwitchParameter>] option. This option is used with the -Force option to ensure that a confirmation message is displayed. It has no effect on the cmdlet execution.

<CommonParameters>. This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Syntax variants

The command options you use with the Invoke-NimDatabaseClone cmdlet vary depending on the type of object you want to remove.

NOTE: For more details about working with the cmdlet, view the cmdlet help by entering Get-Help <cmdlet_name>.

The cmdlet has the following basic format:

Invoke-NimDatabaseSnapshot [-Application <String>] [-SQLInstance <String[]>] [-DBName <String[]>] [-CrashConsistent <SwitchParameter>] [-OnlineSnapshot <SwitchParameter>] [-WritableSnapshot <SwitchParameter>] [-ReplicateSnapshot <SwitchParameter>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf <SwitchParameter>] [-Confirm <SwitchParameter>] [<CommonParameters>]

Create a snapshot of a single database belonging to a default instance example:

Invoke-NimDatabaseSnapshot -DBName db1

Create a snapshot of a single database belonging to a named instance example:

Invoke-NimDatabaseSnapshot -DBName dbo -SQLInstance test1

Create a snapshot of multiple databases belonging to a single volume collection example:

Invoke-NimDatabaseSnapshot -DBName db1,test1/dbp