Open 4fd81048-Brian opened 3 years ago
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
)
Virtual network adapters are not cleaned up from [dbo].[tbl_WLC_VNetworkAdapter]