myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Deleting Records from ConfigMgr

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Deleting Records from ConfigMgr Page: [1]
Login
Message << Older Topic   Newer Topic >>
Deleting Records from ConfigMgr - 6/17/2008 8:01:27 AM   
jquirk822


Posts: 180
Score: 8
Joined: 2/20/2003
Status: offline
Hi All,
I'm looking for some info on deletion of records from ConfigMgr. What I want to know is how data deletion works when a record is removed from the console.

For example. If I delete the record for PC1234 with MAC Address 00:11:22:33:44:55 using the ConfigMgr admin console, then go to SQL Management Studio and execute

USE SMS_XXX
select * from SMS_XXX.dbo.Netcard_DATA where MACAddress0='00:11:22:33:44:55'

I get lots of results. I'd expect this to return 0 rows as I've deleted the resource, but that's not the case. Can anyone shed any light on how to prune the database of these entries immediately (or thereabouts).

I'm looking at this as I use the PackageMapping functionality from BDD/MDT and when re-comissioning a machine I don't always want it to put the apps that the machine had previously back onto the box, I'm fairly sure that under SMS 2003 deleting the object from the console deleted all references to it in the database, but this doesn't seem to be the case any longer...

Thanks

John
 
Post #: 1
RE: Deleting Records from ConfigMgr - 6/17/2008 10:41:52 AM   
jnelson993


Posts: 731
Score: 91
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Well, first off, my advice is that you use the view (dbo.v_GS_NETWORK_ADAPTER) instead of the base table (dbo.NETCARD_DATA)...second, just because there are records there, doesn't mean they're valid records that get used for anything.  If the records belong to decommissioned or obsolete machines, then they're not hurting anything by sitting there and the DB maintenance tasks will wipe them out eventually.  Try adding a filter to this query you whipped up to only include non-obsolete, non-decommissioned, valid clients and see if THAT shows a bunch of records.

SELECT
  *
FROM
  dbo.v_GS_NETWORK_ADAPTER
WHERE
  resourceID IN (SELECT resourceID FROM dbo.v_R_System_Valid)





_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jquirk822)
Post #: 2
RE: Deleting Records from ConfigMgr - 6/17/2008 10:47:33 AM   
jquirk822


Posts: 180
Score: 8
Joined: 2/20/2003
Status: offline
Hi John,
Thanks for the reply, I am using the view in my stored procedure, I was just trying to rule out a suggestion that I use the tables rather than the views...

The subselect works great, I've not used v_R_System_Valid before, is that new???

Anyway, it works great, thanks very much for your help.

John

(in reply to jnelson993)
Post #: 3
RE: Deleting Records from ConfigMgr - 6/17/2008 10:48:18 AM   
jnelson993


Posts: 731
Score: 91
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Oops, forgot to add the MAC address filter
SELECT
  *
FROM
  dbo.v_GS_NETWORK_ADAPTER
WHERE
resourceID IN (SELECT resourceID FROM dbo.v_R_System_Valid)

  AND MACAddress0 = '00:11:22:33:44:55'



_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jnelson993)
Post #: 4
RE: Deleting Records from ConfigMgr - 6/17/2008 10:50:15 AM   
jnelson993


Posts: 731
Score: 91
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
quote:

ORIGINAL: jquirk822

Hi John,
Thanks for the reply, I am using the view in my stored procedure, I was just trying to rule out a suggestion that I use the tables rather than the views...

The subselect works great, I've not used v_R_System_Valid before, is that new???

Anyway, it works great, thanks very much for your help.

John


Yes, that view is new with SCCM, but many of us were doing essentially the same thing in SMS by using V_R_System and putting filter criteria for DECOMMISSIONED0 = 0 and OBSOLETE0 = 0 and CLIENT0 = 1.  Now it's done for us!


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jquirk822)
Post #: 5
RE: Deleting Records from ConfigMgr - 6/17/2008 10:59:36 AM   
jnelson993


Posts: 731
Score: 91
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Oh, and if someone suggests you use tables instead of views, you tell them to go pound sand.  Querying the table directly is not good practice, and it's unsupported.  Microsoft reserves the right to change anything about them whenever they want.  However they generally wouldn't modify the output of the views so querying the views will pretty much always give you the results you want.  They also add logic to the views sometimes to make sure it's returning the proper information. (like joining V_GS_Add_Remove_Programs_DATA with V_GS_Add_Remove_Programs_64_DATA to get you both the ARP data on the 32-bit machines and the ARP data on the 64-bit machines)

My advice (as well as Microsoft's advice), never use the base tables directly.


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jnelson993)
Post #: 6
RE: Deleting Records from ConfigMgr - 6/25/2008 3:25:46 AM   
jquirk822


Posts: 180
Score: 8
Joined: 2/20/2003
Status: offline
To tie up the loose ends of this, I was looking for help with this to fix a "bug" in the MDT PackageMapping functionality where obsolete data is being interrogated to evaluate which applications should be reinstalled on the new OS. Using the v_R_System_Valid view in the stored procedure logic prevents this from happening. I've added some detail to this on my blog here.

JQ

(in reply to jnelson993)
Post #: 7
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Deleting Records from ConfigMgr Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.422