Skip to main content
SnapCenter Software 6.0

Create a storage system connection and a credential using PowerShell cmdlets for IBM Db2

Contributors netapp-soumikd netapp-nsriram

You must create a storage virtual machine (SVM) connection and a credential before using PowerShell cmdlets to back up, restore, or clone IBM Db2 databases.

Before you begin
  • You should have prepared the PowerShell environment to execute the PowerShell cmdlets.

  • You should have the required permissions in the Infrastructure Admin role to create storage connections.

  • You should ensure that the plug-in installations are not in progress.

    Host plug-in installations must not be in progress while adding a storage system connection because the host cache might not be updated and databases status might be displayed in the SnapCenter GUI as “Not available for backup” or “Not on NetApp storage”.

  • Storage system names should be unique.

    SnapCenter does not support multiple storage systems with the same name on different clusters. Each storage system that is supported by SnapCenter should have a unique name and a unique data LIF IP address.

Steps
  1. Click SnapCenterPS to launch the PowerShell Core.

  2. Create a new connection to the storage system by using the Add-SmStorageConnection cmdlet.

    PS C:\> Add-SmStorageConnection -StorageType DataOntap -Type DataOntap -OntapStorage ‘scsnfssvm’ -Protocol Https -Timeout 60
  3. Create a new credential by using the Add-SmCredential cmdlet.

    This example shows how to create a new credential named FinanceAdmin with Windows credentials:

    PS C:\> Add-SmCredential -Name 'FinanceAdmin' -Type Linux -AuthenticationType PasswordBased -Credential db2hostuser -EnableSudoPrevileges:$true
  4. Add the IBM Db2 communication host to SnapCenter Server.

    For Linux:

    PS C:\> Add-SmHost -HostType Linux -HostName '10.232.204.61' -CredentialName 'defaultcreds'

    For Windows:

    PS C:\> Add-SmHost -HostType Windows -HostName '10.232.204.61' -CredentialName 'defaultcreds'
  5. Install the package and the SnapCenter Plug-in for IBM Db2 on the host.

    For Linux:

    PS C:\> Install-SmHostPackage -HostNames '10.232.204.61' -PluginCodes DB2

    For Windows:

    PS C:\> Install-SmHostPackage -HostNames '10.232.204.61' -PluginCodes DB2,SCW
  6. Set the path to the SQLLIB.

    For Windows, Db2 plug-in will use the default path for SQLLIB folder: “C:\Program Files\IBM\SQLLIB\BIN”

    If you want to override the default path, use the following command.

    PS C:\> Set-SmConfigSettings -Plugin -HostName '10.232.204.61' -PluginCode DB2 -configSettings @{"DB2_SQLLIB_CMD"="<custom_path>\IBM\SQLLIB\BIN"}

The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.