Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover virtual network adapters #3

Open
4fd81048-Brian opened this issue Mar 23, 2021 · 1 comment
Open

Leftover virtual network adapters #3

4fd81048-Brian opened this issue Mar 23, 2021 · 1 comment

Comments

@4fd81048-Brian
Copy link
Owner

Virtual network adapters are not cleaned up from [dbo].[tbl_WLC_VNetworkAdapter]

4fd81048-Brian added a commit that referenced this issue Mar 23, 2021
Delete rows from VNetworkAdapter. Resolves #3 Does not address IP addresses assigned from a pool.  Using Get-SCIPAddress -IPAddress 'a.b.c.d' | Revoke-SCIPAddress seems to work.
@4fd81048-Brian
Copy link
Owner Author

Potential fix committed to branch, but untested. I cleaned up my own DB identified by

select VNicID, [tbl_WLC_VNetworkAdapter].[HostId], [tbl_ADHC_Host].[HostID]
from [dbo].[tbl_WLC_VNetworkAdapter] left outer join [dbo].[tbl_ADHC_Host]
on [tbl_WLC_VNetworkAdapter].[HostId] = [tbl_ADHC_Host].[HostID]
where [tbl_ADHC_Host].[HostID] is null
and [tbl_WLC_VNetworkAdapter].[HostId] is not null
order by [tbl_WLC_VNetworkAdapter].[HostId]

with

select * 
-- delete
from [dbo].[tbl_WLC_VNetworkAdapter]
where [dbo].[tbl_WLC_VNetworkAdapter].[HostId]
 in (
  select [tbl_WLC_VNetworkAdapter].[HostId]
  from [dbo].[tbl_WLC_VNetworkAdapter] left outer join [dbo].[tbl_ADHC_Host]
  on [tbl_WLC_VNetworkAdapter].[HostId] = [tbl_ADHC_Host].[HostID]
  where [tbl_ADHC_Host].[HostID] is null
  and [tbl_WLC_VNetworkAdapter].[HostId] is not null
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant