Set-SmResource
Modifies custom plug-in resource or an Oracle plug-in application volume resource settings.
Syntax
Set-SmResource [-UndoDeletion] <> [-ResourceId] <String> [-HostName] <String> [-PluginCode] <PluginCode> [-ResourceId] <String> [-HostName] <String> [-PluginCode] <PluginCode> [-RunAsName] <String>
Detailed Description
Used for modifying allowed attributes of a custom plug-in resource or an Oracle plug-in application volume resource. Also used for re-adding a resource that was soft deleted (resource which is protected).
Parameters
Name | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|
UndoDeletion |
false |
true (ByPropertyName) |
||
ResourceId |
: System-generated unique ID of a resource. For Oracle Application Volume Resource, its resource ID is of the format HostName\ResourceName. |
false |
true (ByPropertyName) |
|
HostName |
Specifies the name or IP address of the host, only when the Agent or Plugin parameters are specified. |
true |
true (ByPropertyName) |
|
PluginCode |
Specifies which plug-in configuration you want to modify. Possible inputs include MSFT_SQL, SCW, SCO, HANA and SCU. For example, for SnapCenter Plug-in for Microsoft SQL Server instances, the plug-in code is MSFT_SQL. |
true |
true (ByPropertyName) |
|
RunAsName |
false |
true (ByPropertyName) |
||
TenantDatabaseName |
This is a SAP HANA database specific parameter. It is the name of the tenant database. This parameter is deprecated for MultiTenant database container resources, it will be ignored and auto discovered internally. |
false |
true (ByPropertyName) |
|
TenantType |
This is a SAP HANA database specific parameter. This specifies the tenant type of SAP HANA Multitenant Database Container. SingleTenant as tenant type is deprecated.SingleTenant as tenant type is deprecated |
true |
true (ByPropertyName) |
MultiTenant |
Examples
Example 1: Modifying custom plugin DB2 resource
Set-SmResource -HostName 'sccorelinux188.sccore.test.com' -PluginCode 'DB2' -ResourceName Database1 -ResourceType Database -StorageFootPrint (@{"QTREE_NAME"="inventory_vol_sec";"VolumeName"="inventory_vol";"StorageSystem"="vserver_scauto_secondary"}) -Instance INST
Modify Storage footprint for Database of DB2 plug-in
Cmdlet Output: Successfully updated the resource PluginName : DB2 Uid: INST\Database1 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : LastBackupDate : LastBackupStatus : IsProtected: False Name : Database1 Type : Database Id : sccorelinux188.sccore.test.com\DummyPlugin\INST\DominoA utoDatabase Host : sccorelinux188.sccore.test.com UserName : Passphrase : Deleted: False Auth : IsClone: False CloneLevel : 0 Hosts :
Example 2: Modifying SAP HANA Multitenant Database Container
Set-SmResource -HostName 'scspr0204312001.gdl.englab.netapp.com' -ResourceId 'scspr0204312001.gdl.englab.netapp.com\hana\MDC\M01' -PluginCode' 'hana' -DatabaseName 'newname' -ResourceType 'MultipleContainers' -SID 'M01' -TenantType 'SingleTenant'
Modify DatabaseName for SAP HANA database of type MultipleContainers.
cmdlet Set-SmResource at command pipeline position 1 Successfully updated the resource PluginName : hana Uid: MDC\M01 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters LastBackupDate : LastBackupStatus : IsProtected: False IsWindowsResource : False Name : newname Type : MultipleContainers Id : scspr0204312001.gdl.englab.netapp.com\hana\MDC\M01 Host : scspr0204312001.gdl.englab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0
Example 3: Undo SmResource deletion
Set-SmResource -HostName 'sccorelinux188.sccore.test.com' -PluginCode 'DB2' -ResourceName Database1 -UndoDeletion
Adds the deleted resource and is available for protection.
Example 4: Edit the database name and HDB Secure User Store Key for MultiTenant database container with multi tenants resource type.
Set-SmResource -HostName 'vp-hana2.gdl.englab.netapp.com' -PluginCode 'HANA' -DatabaseName MDC_MT_modified_again -ResourceType MultipleContainers -StorageFootPrint (@{'VolumeName'='VP_HANA2_data';'StorageSystem'='buck.gdl.englab.netapp.co'}) -sid 'A12' -userstorekeys 'A12KEY_modified_again' -TenantType 'MultiTenant'
This sets the database name and HDB Userstore Key for MultiTenant database container with multi tenants resource type.
cmdlet Set-SmResource at command pipeline position 1 Successfully updated the resource PluginName : hana Uid: MBC\A12 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters LastBackupDate : LastBackupStatus : IsProtected: False IsWindowsResource : False Name : MDC_MT_modified_again Type : MultipleContainers Id : vp-hana2.gdl.englab.netapp.com\hana\MDC\A12 Host : vp-hana2.gdl.englab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0
Example 5: Edit the database name and HDB User Store Key for single tenant resource type.
Set-SmResource -HostName 'vp-hana2.gdl.englab.netapp.com' -PluginCode 'HANA' -DatabaseName MDC_ST_modified -ResourceType MultipleContainers -StorageFootPrint (@{'VolumeName'='lun_vol';'StorageSystem'='10.232.206.5'}) -sid 'A12' -userstorekeys 'A12KEY_modified' -TenantType 'SingleTenant' -TenantDatabaseName 'TDB'
This sets the database name and HDB User Store Key for single tenant resource type. In this example, the tenant database name is required to edit the resource, which is added in SnapCener Server v4.2 or earlier.
cmdlet Set-SmResource at command pipeline position 1 Successfully updated the resource PluginName : hana Uid: TDB ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters LastBackupDate : LastBackupStatus : IsProtected: False IsWindowsResource : False Name : MDC_ST_modified Type : MultipleContainers Id : vp-hana2.gdl.englab.netapp.com\hana\TDB Host : vp-hana2.gdl.englab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0
Example 6: Edit an Oracle Application Volume Resource storage footprint
Set-SmResource -HostName 'R8092776CF4V1.HNK2.com' -PluginCode 'SCO' -ResourceName appVol -StorageFootPrint @(@{"VolumeName"="vol_test1";"StorageSystem"="10.232.206.165"},@{"VolumeName"="vol_test2";"LunName"="lun_test2";"StorageSystem"="10.232.206.165"},@{"QtreeName"="qtree_test1";"VolumeName"="vol_test3";"StorageSystem"="10.232.206.165"})
This example modifies storage footprint of an Oracle Application Volume Resource
Set-SmResource Are you sure you want to modify the resource : 'appVol' ? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y Successfully updated the resource Uid: appVol SmAppFileStorageGroups : {, , } IsProtected: False LastBackupDate : LastBackupStatus : Name : appVol Type : Application Volume Id : R8092776CF4V1.HNK2.com\appVol Host : R8092776CF4V1.HNK2.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 7: Edit hostname and resource name of an Oracle Application Volume Resource
Set-SmResource -HostName 'R809278EA03V1.HNK2.com' -PluginCode 'SCO' -ResourceName appVolModified -ResourceId R8092776CF4V1.HNK2.com\appVol
This example modifies hostname and resource name of an Oracle Application Volume Resource
Set-SmResource Are you sure you want to modify the resource : 'appVol' ? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y Successfully updated the resource Uid: appVolModified SmAppFileStorageGroups : {} IsProtected: False LastBackupDate : LastBackupStatus : Name : appVolModified Type : Application Volume Id : R809278EA03V1.HNK2.com\appVolMo Host : R809278EA03V1.HNK2.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 8: Undo soft deletion of an Oracle Application Volume resource
Set-SmResource -HostName 'R809278EA03V1.HNK2.com' -PluginCode 'SCO' -ResourceName appVol1 -UndoDeletion
Adds the deleted Oracle Application Volume resource and is available for protection.