<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Networknet.nl Blog &#187; SMS</title>
	<atom:link href="http://www.networknet.nl/apps/wp/archives/category/microsoft/sms/feed" rel="self" type="application/rss+xml" />
	<link>http://www.networknet.nl/apps/wp</link>
	<description>Stay Connected</description>
	<lastBuildDate>Sat, 04 Sep 2010 16:37:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SMS 2003: Error 25100</title>
		<link>http://www.networknet.nl/apps/wp/archives/744</link>
		<comments>http://www.networknet.nl/apps/wp/archives/744#comments</comments>
		<pubDate>Mon, 16 Mar 2009 06:37:16 +0000</pubDate>
		<dc:creator>Ivan Versluis</dc:creator>
				<category><![CDATA[2003]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">http://www.networknet.nl/apps/wp/?p=744</guid>
		<description><![CDATA[I am still managing a SMS 2003 environment and last week we encountered following message on one of the SMS 2003 clients. The message appeared in Application Eventviewer and SMS client did not report back to our SMS Primary site: Event Type:        Error Event Source:      MsiInstaller Event Category:    None Event ID:          10005 Date:              3/10/2009 Time:             ]]></description>
			<content:encoded><![CDATA[<p>I am still managing a SMS 2003 environment and last week we encountered following message on one of the SMS 2003 clients. The message appeared in Application Eventviewer and SMS client did not report back to our SMS Primary site:</p>
<blockquote><p>Event Type:        Error<br />
Event Source:      MsiInstaller<br />
Event Category:    None<br />
Event ID:          10005<br />
Date:              3/10/2009<br />
Time:              12:17:06 PM<br />
User:              NETWORKNET\Ivan<br />
Computer:          IVAN-VM01<br />
Description:<br />
Product: SMS Advanced Client &#8212; Error 25100. Setup was unable to create the WMI namespace CCM<br />
The error code is 80041002</p></blockquote>
<p> To fix the problem see my cmd script below which was used by the local IT contact: </p>
<blockquote>
<p class="MsoNormal">@echo off<br />
REM Ivan Versluis<br />
REM Date: 2009/03/11<br />
REM Description: FIX WMI Database for SMS Client<br />
c:<br />
cd %windir%\system32\wbem\<br />
mofcomp cimwin32.mof<br />
mofcomp cimwin32.mfl<br />
net stop winmgmt<br />
rmdir /s /q repository<br />
rmdir /s /q Logs<br />
mkdir Logs<br />
net start winmgmt<br />
rundll32 wbemupgd, UpgradeRepository<br />
rundll32 wbemupgd, CheckWMISetup<br />
rundll32 wbemupgd, RepairWMISetup<br />
pause</p>
<p class="MsoNormal"> </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networknet.nl/apps/wp/archives/744/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to shrink the SMS_SITENAME database SMS 2003?</title>
		<link>http://www.networknet.nl/apps/wp/archives/346</link>
		<comments>http://www.networknet.nl/apps/wp/archives/346#comments</comments>
		<pubDate>Thu, 24 Jan 2008 12:06:39 +0000</pubDate>
		<dc:creator>Ivan Versluis</dc:creator>
				<category><![CDATA[SMS]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[shrinkfile]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://www.networknet.nl/apps/wp/archives/346</guid>
		<description><![CDATA[The SMS 2003 infrastructure I am managing has one singe SMS database which became 4 GB. 1GB data and 3GB log. Today I planned the database maintenance and managed to shrink the files with 3GB. Open the Enterprise Manager or Microsoft SQL Server Management tools and make sure the database option is set to Auto]]></description>
			<content:encoded><![CDATA[<p>The SMS 2003 infrastructure I am managing has one singe SMS database which became 4 GB. 1GB data and 3GB log. Today I planned the database maintenance and managed to shrink the files with 3GB. Open the Enterprise Manager or Microsoft SQL Server Management tools and make sure the database option is set to Auto Shrink = Auto (enhancement for the future).</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="150" alt="image" src="http://www.networknet.nl/apps/wp/wp-content/uploads/HowtoshrinktheSMS_SITENAMEdatabaseSMS200_696E/image.png" width="429" border="0" /> </p>
<p>Run the following sql script:</p>
<blockquote><p><span style="font-size: 10pt; font-family: courier new"><span style="color: blue">USE</span> [SMS_123]        <br /></span></p>
<p><span style="font-size: 10pt; font-family: courier new">GO       <br /></span></p>
<p><span style="font-size: 10pt; font-family: courier new"><span style="color: blue">DBCC</span> SHRINKFILE <span style="color: gray">(</span>N<span style="color: red">&#8216;SMS_123_log&#8217;</span><span style="color: gray">,</span> 0<span style="color: gray">,</span> TRUNCATEONLY<span style="color: gray">)         <br /></span></span></p>
<p><span style="font-size: 10pt; font-family: courier new">GO       <br /></span></p>
</blockquote>
<p>Another useful script can be found <a href="http://vyaskn.tripod.com/code/sp_show_huge_tables.txt">here</a> which will create a stored procedure and show all table space sizes with rows and MB used.</p>
<blockquote><p><span style="font-size: 10pt; font-family: courier new"><span style="color: blue">exec</span> sp_show_huge_tables </span></p>
<p><span style="font-size: 10pt; font-family: courier new">       <br /></span></p>
</blockquote>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://www.networknet.nl/apps/wp/wp-content/uploads/HowtoshrinktheSMS_SITENAMEdatabaseSMS200_696E/image_3.png" width="400" border="0" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.networknet.nl/apps/wp/archives/346/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMS Report &#8211; Delete Computer Object</title>
		<link>http://www.networknet.nl/apps/wp/archives/3</link>
		<comments>http://www.networknet.nl/apps/wp/archives/3#comments</comments>
		<pubDate>Wed, 13 Jun 2007 11:50:39 +0000</pubDate>
		<dc:creator>Ivan Versluis</dc:creator>
				<category><![CDATA[SMS]]></category>
		<category><![CDATA[Delete Computer object]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[SMS 2003]]></category>

		<guid isPermaLink="false">http://www.networknet.nl/apps/wp/?p=3</guid>
		<description><![CDATA[This report will delete a computer object from the SMS database. Use this report if you restage a computer with the same name. Normal process will take more than 30days to age to stale the record.  // ********************************************************************************* // // Created by SMS Export object wizard // // Thursday, May 31, 2007 created // //]]></description>
			<content:encoded><![CDATA[<p>This report will delete a computer object from the SMS database. Use this report if you restage a computer with the same name. Normal process will take more than 30days to age to stale the record. </p>
<pre class="brush: sql;">
// *********************************************************************************
//
// Created by SMS Export object wizard
//
// Thursday, May 31, 2007 created
//
// File Name: Delete Computer Object.MOF
//
// Comments :
//
//
// *********************************************************************************
// ***** Class : SMS_Report *****
[SecurityVerbs(140551)]
instance of SMS_Report
{
Category = &quot;Networknet-LocalIT tasks&quot;;
Comment = &quot;Author:Ivan1980@Networknet.nl
\nCreate date: 5/30/2007
\nDescription: This report will delete a computer object from the SMS database. Use this report if you restage a computer with the same name. Normal process will take more than 30days to age to stale the record.
\n
\nNote: Select the computer you will restage and click Display. When report is displayed it will show 0 rows!&quot;;
GraphXCol = 1;
GraphYCol = 2;
MachineDetail = FALSE;
MachineSource = FALSE;
Name = &quot;Delete Computer Object&quot;;
NumPrompts = 1;
RefreshInterval = 0;
ReportParams = {
instance of SMS_ReportParameter
{
AllowEmpty = FALSE;
DefaultValue = &quot;&quot;;
PromptText = &quot;Computername&quot;;
SampleValueSQL = &quot;begin
\n if (@__filterwildcard = '')
\n SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS ORDER By SYS.Netbios_Name0
\n else
\n SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS
\n WHERE SYS.Netbios_Name0 like @__filterwildcard
\n ORDER By SYS.Netbios_Name0
\nend&quot;;
VariableName = &quot;comp&quot;;
}};
SecurityKey = &quot;&quot;;
SQLQuery = &quot;exec sp_RemoveComputerObject1 @comp&quot;;
StatusMessageDetailSource = FALSE;
};
// ***** End *****
</pre>
<p><span id="more-3"></span><br />
Save the the mof code above to a text file with file name like delete.mof. Start the Systems Management Console and scroll down to Reporting and click Reports. Right click Reports; go to All Tasks and click Import Objects. Browse to the delete.mof file to import the report. After you the delete.mof file has been imported; start IE and open the SMSReporting website. New category should be available like Networknet-LocalIT tasks. If you want to change this go to the SMS console and change the category name.<br />
 Step 1 is finished now. The report is created. Next step is to extend the SMS database with extra stored procedure. Copy the text below to a text file named sp_delete.sql. Please change the SMS_ABC to your 3code Site name.</p>
<pre class="brush: sql;">
USE [SMS_ABC]
GO
/****** Object: StoredProcedure [webreport_approle].[sp_RemoveComputerObject1] Script Date: 10/15/2007 11:27:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Ivan1980@Networknet.nl
-- Create date: 5/30/2007
-- Description: Stored Procedure for deleting computer from SMS database by SMS Reports
-- =============================================
ALTER PROCEDURE [webreport_approle].[sp_RemoveComputerObject1]
-- Add the parameters for the stored procedure here
@Machinename varchar(15)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
--SELECT * from system_Data where Name0=@machinename
delete from system_Data where Name0 =@machinename
--SELECT * from system_DISC where Name0=@machinename
delete from system_DISC where Name0 =@machinename
--SELECT * from system_Hist where Name0=@machinename
delete from system_Hist where Name0 =@machinename
--print @machinename + ' has been deleted from SMS database'
select @machinename as 'Deleted'
END
</pre>
<p>Login to your SQL server which hosts the SMS_ABC database and open SQL Query Analyzer tool. Open the sp_delete.sql file and execute the SQL (F5 short key).<br />
Step 2 is completed now. Stored procedure has been created. Before the report will work for the reporting users the internal role webreport_approle will need to be granted with select and delete permissions on the SMS database tables.<br />
These tables were granted with select and delete to webreport_approle. This is my test environment and I didn&#8217;t extend the SMS schema.</p>
<pre class="brush: sql;">
USE [SMS_ABC]
GO
grant select,delete on object::Add_Remove_Programs_DATA TO webreport_approle
grant select,delete on object::Add_Remove_Programs_HIST TO webreport_approle
grant select,delete on object::CD_ROM_DATA TO webreport_approle
grant select,delete on object::CD_ROM_HIST TO webreport_approle
grant select,delete on object::ClientKeyData TO webreport_approle
grant select,delete on object::Computer_System_DATA TO webreport_approle
grant select,delete on object::Computer_System_HIST TO webreport_approle
grant select,delete on object::DataItem TO webreport_approle
grant select,delete on object::DataItemContext TO webreport_approle
grant select,delete on object::DataItemProperty TO webreport_approle
grant select,delete on object::Desktop_Monitor_DATA TO webreport_approle
grant select,delete on object::Desktop_Monitor_HIST TO webreport_approle
grant select,delete on object::Disk_DATA TO webreport_approle
grant select,delete on object::Disk_HIST TO webreport_approle
grant select,delete on object::IDE_Controller_DATA TO webreport_approle
grant select,delete on object::IDE_Controller_HIST TO webreport_approle
grant select,delete on object::Keyboard_DATA TO webreport_approle
grant select,delete on object::Keyboard_HIST TO webreport_approle
grant select,delete on object::Last_Logon_Domain_DATA TO webreport_approle
grant select,delete on object::Last_Logon_Domain_HIST TO webreport_approle
grant select,delete on object::Logical_Disk_DATA TO webreport_approle
grant select,delete on object::Logical_Disk_HIST TO webreport_approle
grant select,delete on object::MeterData TO webreport_approle
grant select,delete on object::Modem_DATA TO webreport_approle
grant select,delete on object::Modem_HIST TO webreport_approle
grant select,delete on object::Motherboard_DATA TO webreport_approle
grant select,delete on object::Motherboard_HIST TO webreport_approle
grant select,delete on object::Mouse_DATA TO webreport_approle
grant select,delete on object::Mouse_HIST TO webreport_approle
grant select,delete on object::Netcard_DATA TO webreport_approle
grant select,delete on object::Netcard_HIST TO webreport_approle
grant select,delete on object::Network_Client_DATA TO webreport_approle
grant select,delete on object::Network_Client_HIST TO webreport_approle
grant select,delete on object::Network_DATA TO webreport_approle
grant select,delete on object::Network_HIST TO webreport_approle
grant select,delete on object::Operating_System_DATA TO webreport_approle
grant select,delete on object::Operating_System_HIST TO webreport_approle
grant select,delete on object::Parallel_Port_DATA TO webreport_approle
grant select,delete on object::Parallel_Port_HIST TO webreport_approle
grant select,delete on object::Partition_DATA TO webreport_approle
grant select,delete on object::Partition_HIST TO webreport_approle
grant select,delete on object::PC_BIOS_DATA TO webreport_approle
grant select,delete on object::PC_BIOS_HIST TO webreport_approle
grant select,delete on object::PC_Memory_DATA TO webreport_approle
grant select,delete on object::PC_Memory_HIST TO webreport_approle
grant select,delete on object::Printer_Configuration_DATA TO webreport_approle
grant select,delete on object::Printer_Configuration_HIST TO webreport_approle
grant select,delete on object::Printer_Device_DATA TO webreport_approle
grant select,delete on object::Printer_Device_HIST TO webreport_approle
grant select,delete on object::Processor_DATA TO webreport_approle
grant select,delete on object::Processor_HIST TO webreport_approle
grant select,delete on object::ScanPackage_Version_DATA TO webreport_approle
grant select,delete on object::ScanPackage_Version_HIST TO webreport_approle
grant select,delete on object::SCSI_Controller_DATA TO webreport_approle
grant select,delete on object::SCSI_Controller_HIST TO webreport_approle
grant select,delete on object::Services_DATA TO webreport_approle
grant select,delete on object::Services_HIST TO webreport_approle
grant select,delete on object::Sites_DATA TO webreport_approle
grant select,delete on object::SMS_Advanced_Client_S_DATA TO webreport_approle
grant select,delete on object::SMS_Advanced_Client_S_HIST TO webreport_approle
grant select,delete on object::SMSData TO webreport_approle
grant select,delete on object::Software_Updates_DATA TO webreport_approle
grant select,delete on object::Software_Updates_Extended_DATA TO webreport_approle
grant select,delete on object::Software_Updates_Extended_HIST TO webreport_approle
grant select,delete on object::Software_Updates_HIST TO webreport_approle
grant select,delete on object::Sound_Devices_DATA TO webreport_approle
grant select,delete on object::Sound_Devices_HIST TO webreport_approle
grant select,delete on object::System_DATA TO webreport_approle
grant select,delete on object::System_Enclosure_DATA TO webreport_approle
grant select,delete on object::System_Enclosure_HIST TO webreport_approle
grant select,delete on object::System_HIST TO webreport_approle
grant select,delete on object::Tape_Drive_DATA TO webreport_approle
grant select,delete on object::Tape_Drive_HIST TO webreport_approle
grant select,delete on object::USB_Controller_DATA TO webreport_approle
grant select,delete on object::USB_Controller_HIST TO webreport_approle
grant select,delete on object::Video_Controller_DATA TO webreport_approle
grant select,delete on object::Video_Controller_HIST TO webreport_approle
grant select,delete on object::VULNERABILITY_DATA TO webreport_approle
grant select,delete on object::VULNERABILITY_DETAIL_DATA TO webreport_approle
grant select,delete on object::VULNERABILITY_DETAIL_HIST TO webreport_approle
grant select,delete on object::VULNERABILITY_HIST TO webreport_approle
grant select,delete on object::Windows_Update_Agent__DATA TO webreport_approle
grant select,delete on object::Windows_Update_Agent__HIST TO webreport_approle
grant select,delete on object::WorkstationStatus_DATA TO webreport_approle
</pre>
<p>Save the code above to sql_grants.sql and execute the file in SQL Query Analyzer. Now you are ready to delete a computer object. Select one computer and run the report.<br />
If the report is providing you an error message; most probably the stored procedure is trying to delete the data within SMS tables where the SMS Reporting user role has no permissions.<br />
Go back to SQL Query Analyzer and grant the permissions. E.g.</p>
<pre class="brush: sql;">
grant select,delete on object::TABLENAME_DATA TO webreport_approle
grant select,delete on object::TABLENAME_HIST TO webreport_approle
</pre>
<p>If you have any questions please drop me an email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networknet.nl/apps/wp/archives/3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
