Run the following stored procedure:
/****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/
-- =========================================================
-- Create date: 08/31/2007
-- Description: Get VNetworkAdapter for a given NicId
-- =========================================================
ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId]
@VNicId uniqueidentifier
AS
BEGIN
DECLARE @error int
SET @error = 0
SET NOCOUNT ON;
SELECT
[Name],
[Description],
[OwnerIdentifier],
[CreationTime],
vna.[ModifiedTime],
[Accessibility],
[ObjectState],
[VNicId],
[HWProfileId],
[ParentType],
[VirtualNetwork],
[MACAddressType],
[MACAddress],
[IPv4AddressType],
[IPv6AddressType],
[PortId],
[DeviceId],
[NetworkAdapterType],
[VMSubnetId],
[VMNetworkId],
[PortClassificationId],
[PortProfileSetId],
[VLanEnabled],
[VLanId],
[VmwAdapterIndex],
[VmwPortGroup],
[SlotId],
[MACSpoofingEnabled],
[EnableGuestIPNetworkVirtualizationUpdates],
[VMNetworkOptimizationEnabled],
[HostId],
[LogicalSwitchId],
[NetworkKBytesReadTieredPerfCounterID],
[NetworkKBytesWriteTieredPerfCounterID],
[VMNetworkServiceSetting],
[UsesSriov],
[IsUsedForHostManagement],
[IPv4Addresses],
[IPv6Addresses],
[DefaultGateways],
[DNSServers],
[TemplateNicName],
compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors],
compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors]
FROM dbo.tbl_WLC_VNetworkAdapter vna
LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance
ON vna.VNicId = compliance.VirtualNetworkAdapterId
WHERE VNicId = @VNicId
SET @error = @@ERROR
SET NOCOUNT OFF
RETURN @error
END
IF EXISTS (SELECT * FROM dbo.sysobjects
WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_Add]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
SET NOEXEC OFF
ELSE
SET NOEXEC ON
GO
/****** Object: StoredProcedure [dbo].[prc_RBS_UserRole_Add] Script Date: 10/03/2007 12:13:45 ******/
ALTER PROCEDURE [dbo].[prc_RBS_UserRole_Add]
(
@RoleID uniqueidentifier,
@ProfileType tinyint,
@Description nvarchar(2048),
@Name nvarchar(256),
@OwnerIdentifier nvarchar(256),
@ParentUserRole uniqueidentifier,
@LastUpdatedTimestamp datetime,
@ShowPROTips bit,
@VMNetworkMaximum smallint,
@VMNetworkMaximumPerUser smallint,
@VPNConnectionMaximum smallint,
@VPNConnectionMaximumPerUser smallint,
@VMNetworkVPNMaximumBandwidthInKbps bigint,
@VMNetworkVPNMaximumBandwidthOutKbps bigint,
@NATConnectionMaximum smallint = NULL,
@NATConnectionMaximumPerUser smallint = NULL
)
AS
BEGIN TRAN
SET NOCOUNT ON
DECLARE @error int
DECLARE @IsDuplicateName bit
DECLARE @IsRoleAlreadyPresent bit
SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name)
-- This is especially used in Upgrade scenarios where we are inserting Administrator role
SELECT @IsRoleAlreadyPresent = Count(RoleID) FROM [dbo].[tbl_RBS_UserRole]
WHERE RoleID = @RoleID
IF (@IsDuplicateName = 0
AND @IsRoleAlreadyPresent = 0)
BEGIN
INSERT INTO [dbo].[tbl_RBS_UserRole]
([RoleID]
,[ProfileType]
,[Description]
,[Name]
,[OwnerIdentifier]
,[ParentUserRole]
,[LastUpdatedTimestamp]
,[ShowPROTips]
,[VMNetworkMaximum]
,[VMNetworkMaximumPerUser]
,[VPNConnectionMaximum]
,[VPNConnectionMaximumPerUser]
,[VMNetworkVPNMaximumBandwidthInKbps]
,[VMNetworkVPNMaximumBandwidthOutKbps]
,[NATConnectionMaximum]
,[NATConnectionMaximumPerUser]
)
VALUES
(
@RoleID,
@ProfileType,
@Description,
@Name,
@OwnerIdentifier,
@ParentUserRole,
@LastUpdatedTimestamp,
@ShowPROTips,
@VMNetworkMaximum,
@VMNetworkMaximumPerUser,
@VPNConnectionMaximum,
@VPNConnectionMaximumPerUser,
@VMNetworkVPNMaximumBandwidthInKbps,
@VMNetworkVPNMaximumBandwidthOutKbps,
@NATConnectionMaximum,
@NATConnectionMaximumPerUser
)
-- Insert flattened tree of the hierarchy for this user role
INSERT INTO [dbo].[tbl_RBS_UserRoleHierarchy]
SELECT RoleId, ParentRoleId, hl
FROM view_RBS_UserRoleParentChildRelation ur where ur.RoleID = @RoleID
SELECT @error = @@ERROR
END
ELSE
BEGIN
SET @error = 50008
END
SET NOCOUNT OFF
COMMIT TRAN
RETURN @error
Go
SET NOEXEC OFF
--------------------------------------------------------------------------------------------
IF EXISTS (SELECT * FROM dbo.sysobjects
WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_CommonUpdate]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
SET NOEXEC OFF
ELSE
SET NOEXEC ON
GO
/****** Object: StoredProcedure [dbo].[prc_RBS_UserRole_CommonUpdate] Script Date: 10/03/2007 12:13:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[prc_RBS_UserRole_CommonUpdate]
(
@RoleID uniqueidentifier,
@Description nvarchar(2048),
@OwnerIdentifier nvarchar(256),
@Name nvarchar(256),
@LastUpdatedTimestamp datetime,
@ShowPROTips bit,
@VMNetworkMaximum smallint,
@VMNetworkMaximumPerUser smallint,
@VPNConnectionMaximum smallint,
@VPNConnectionMaximumPerUser smallint,
@VMNetworkVPNMaximumBandwidthInKbps bigint,
@VMNetworkVPNMaximumBandwidthOutKbps bigint,
@NATConnectionMaximum smallint = NULL,
@NATConnectionMaximumPerUser smallint = NULL
)
AS
SET NOCOUNT ON
DECLARE @error int
DECLARE @ParentUserRole uniqueidentifier
DECLARE @IsDuplicateName bit
DECLARE @OldName nvarchar(256)
SELECT @ParentUserRole = [ParentUserRole], @OldName = [Name] FROM [dbo].[tbl_RBS_UserRole]
WHERE [RoleID] = @RoleID
IF (@OldName = @Name)
BEGIN
-- We are not changing role name. This is necessary if Admin has already an SSU1 and TA created SSU1, we should not error out here
SELECT @IsDuplicateName = 0
END
ELSE
BEGIN
SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name)
END
IF (@IsDuplicateName = 0)
BEGIN
UPDATE [dbo].[tbl_RBS_UserRole]
SET [Description] = @Description,
[OwnerIdentifier] = @OwnerIdentifier,
[Name] = @Name,
[LastUpdatedTimestamp] = @LastUpdatedTimestamp,
[ShowPROTips] = @ShowPROTips,
[VMNetworkMaximum] = @VMNetworkMaximum,
[VMNetworkMaximumPerUser] = @VMNetworkMaximumPerUser,
[VPNConnectionMaximum] = @VPNConnectionMaximum,
[VPNConnectionMaximumPerUser] = @VPNConnectionMaximumPerUser,
[VMNetworkVPNMaximumBandwidthInKbps] = @VMNetworkVPNMaximumBandwidthInKbps,
[VMNetworkVPNMaximumBandwidthOutKbps] = @VMNetworkVPNMaximumBandwidthOutKbps,
[NATConnectionMaximum] = @NATConnectionMaximum,
[NATConnectionMaximumPerUser] = @NATConnectionMaximumPerUser
WHERE [RoleID] = @RoleID
SELECT @error = @@ERROR
END
ELSE
BEGIN
SET @error = 50008
END
SET NOCOUNT OFF
RETURN @error
GO
SET NOEXEC OFF
Use SQL Management Studio to run the following stored procedure against the VMM database:
/****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/
-- =========================================================
-- Create date: 08/31/2007
-- Description: Get VNetworkAdapter for a given NicId
-- =========================================================
ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId]
@VNicId uniqueidentifier
AS
BEGIN
DECLARE @error int
SET @error = 0
SET NOCOUNT ON;
SELECT
[Name],
[Description],
[OwnerIdentifier],
[CreationTime],
vna.[ModifiedTime],
[Accessibility],
[ObjectState],
[VNicId],
[HWProfileId],
[ParentType],
[VirtualNetwork],
[MACAddressType],
[MACAddress],
[IPv4AddressType],
[IPv6AddressType],
[PortId],
[DeviceId],
[NetworkAdapterType],
[VMSubnetId],
[VMNetworkId],
[PortClassificationId],
[PortProfileSetId],
[VLanEnabled],
[VLanId],
[VmwAdapterIndex],
[VmwPortGroup],
[SlotId],
[MACSpoofingEnabled],
[EnableGuestIPNetworkVirtualizationUpdates],
[VMNetworkOptimizationEnabled],
[HostId],
[LogicalSwitchId],
[NetworkKBytesReadTieredPerfCounterID],
[NetworkKBytesWriteTieredPerfCounterID],
[VMNetworkServiceSetting],
[UsesSriov],
[IsUsedForHostManagement],
[IPv4Addresses],
[IPv6Addresses],
[DefaultGateways],
[DNSServers],
[TemplateNicName],
compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors],
compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors],
[AccessControlListID],
compliance.NetworkAccessControlListComplianceErrors AS [NetworkAccessControlListComplianceErrors]
FROM dbo.tbl_WLC_VNetworkAdapter vna
LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance
ON vna.VNicId = compliance.VirtualNetworkAdapterId
WHERE VNicId = @VNicId
SET @error = @@ERROR
SET NOCOUNT OFF
RETURN @error
END
GO