<?xml version="1.0"?>
<!-- RES WISDOM Building Blocks -->
<!-- Created by demo\administrator on 24-02-2009 23:04:57 -->
<!-- Copyright © 1998-2008 RES Software, All rights reserved, patents pending. -->
<reswisdom>
	<buildingblock>
		<projects/>
		<modules>
			<module>
				<properties>
					<guid>{03D49DEF-4A3D-41DC-90EE-3D4A22CA1094}</guid>
					<name>SQL, Drop PowerTrace tables</name>
					<enabled>yes</enabled>
					<description>This module will clean out the PowerTrace tables out of your SQLserver, in case things have gotten out of hand and you have some really big tables which are giving you problems.

The module will drop the 5 tables. Once dropped, ensure  you run the RES PowerFuse console on a machine to re-create them properly.
</description>
					<folderpath>
						<folder>
							<name>Resguru.com</name>
							<folder>
								<name>PowerTrace and SQL</name>
							</folder>
						</folder>
					</folderpath>
					<deleteusedresources>yes</deleteusedresources>
				</properties>
				<tasks>
					<task hidden="yes">
						<parameters>
							<param>
								<name>DBServer</name>
								<value1>backend.demo.lab</value1>
								<value2/>
								<value3/>
								<type>0</type>
								<description/>
								<hint>Enter the name of your DBMS</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="no">yes</importbb>
									<schedulejob showprev="no">no</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
									<required>no</required>
									<validation>no</validation>
								</inputoptions>
							</param>
							<param>
								<name>DBName</name>
								<value1>PowerFuse</value1>
								<value2/>
								<value3/>
								<type>0</type>
								<description/>
								<hint>Enter the name of the PowerFuse DB you wish to modify:</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="yes">yes</importbb>
									<schedulejob showprev="no">no</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
									<required>no</required>
									<validation>no</validation>
								</inputoptions>
							</param>
							<param>
								<name>Account</name>
								<value1>powerfuse</value1>
								<value2>00CD</value2>
								<value3/>
								<type>2</type>
								<description/>
								<hint>Enter SQL credentials with rights to modify the PowerFuse DB</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="no">yes</importbb>
									<schedulejob showprev="no">no</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
								</inputoptions>
							</param>
						</parameters>
						<conditions>
							<condition guid="{8B99C12A-03D0-47CE-B25C-82748AED8052}">
								<expressions>
									<expression guid="{A5673385-EA8D-4C5F-8BC2-7335FA526DEA}">
										<operand>Computer Function</operand>
										<operator>=</operator>
										<value>SQL</value>
										<type>7</type>
									</expression>
								</expressions>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<setparametertrue>no</setparametertrue>
								<parametertrue>DBServer</parametertrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>1</action>
								<setparameter>no</setparameter>
								<parameter>DBServer</parameter>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
							<condition guid="{068285AE-0180-4086-A183-3282E5663D14}">
								<expressions/>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<setparametertrue>no</setparametertrue>
								<parametertrue>LOGS</parametertrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>0</action>
								<setparameter>no</setparameter>
								<parameter>LOGS</parameter>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
							<condition guid="{5791B526-E606-42BC-8D3E-FF5E1D5CE4FB}">
								<expressions/>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<setparametertrue>no</setparametertrue>
								<parametertrue>LOGS</parametertrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>0</action>
								<setparameter>no</setparameter>
								<parameter>LOGS</parameter>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
							<condition guid="{724925EC-6ECF-4FAE-9DEE-A5A9B97D3061}">
								<expressions/>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<setparametertrue>no</setparametertrue>
								<parametertrue>LOGS</parametertrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>0</action>
								<setparameter>no</setparameter>
								<parameter>LOGS</parameter>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
							<condition guid="{DF554950-E4CA-4E71-AB27-5F8CB7701463}">
								<expressions>
									<expression guid="{A5673385-EA8D-4C5F-8BC2-7335FA526DEA}">
										<operand>Computer Function</operand>
										<operator>=</operator>
										<value>SQL</value>
										<type>7</type>
									</expression>
								</expressions>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<setparametertrue>no</setparametertrue>
								<parametertrue>DBServer</parametertrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>1</action>
								<setparameter>no</setparameter>
								<parameter>DBServer</parameter>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
						</conditions>
					</task>
					<task>
						<properties>
							<type>EXECUTESQL</type>
							<guid>{8B99C12A-03D0-47CE-B25C-82748AED8052}</guid>
							<description>Execute SQL Statement</description>
							<enabled>yes</enabled>
							<comments>Drop all PowerTrace tables</comments>
							<onerror>fail</onerror>
						</properties>
						<settings>
							<scripttext>drop table TBLhistory
drop table TBLuser
drop table TBLserver
drop table TBLapp
drop table TBLsession</scripttext>
							<dbtype>MSSQL</dbtype>
							<dbserver>$[DBServer]</dbserver>
							<dbname>$[DBName]</dbname>
							<dbuser>$[Account]</dbuser>
						</settings>
					</task>
				</tasks>
			</module>
		</modules>
		<resources/>
		<runbooks/>
	</buildingblock>
</reswisdom>

