<?xml version="1.0"?>
<!-- RES WISDOM Building Blocks -->
<!-- Created by demo\administrator on 24-02-2009 23:05:14 -->
<!-- Copyright © 1998-2008 RES Software, All rights reserved, patents pending. -->
<reswisdom>
	<buildingblock>
		<projects/>
		<modules>
			<module>
				<properties>
					<guid>{46A9C9F1-69AA-4B53-ADB0-31D53857DAAD}</guid>
					<name>SQL, How big is the database?</name>
					<enabled>yes</enabled>
					<description>Use this query to get a fix on the size of the database including all objects. This is usefull if you do not have access to, or do not know the location of the database files. This module uses a standard SQL query to get the information.

This module has been tested on MSSQL2000
</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>Please provide the hostname 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>wisdom_labreg</value1>
								<value2/>
								<value3/>
								<type>0</type>
								<description/>
								<hint>Enter the name of the database you wish to sizecheck:</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="no">yes</importbb>
									<schedulejob showprev="yes">yes</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
									<required>no</required>
									<validation>no</validation>
								</inputoptions>
							</param>
							<param>
								<name>Account</name>
								<value1>sa</value1>
								<value2>00CD</value2>
								<value3/>
								<type>2</type>
								<description/>
								<hint>Enter a DBO account with credentials to the databae</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="no">yes</importbb>
									<schedulejob showprev="no">no</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
								</inputoptions>
							</param>
							<param>
								<name>BlockSize</name>
								<value1>8</value1>
								<value2/>
								<value3/>
								<type>0</type>
								<description>The blocksize is default 8kb, but may vary. Change this if necessary to the blocksize of your database to get an accurate fix on the size.</description>
								<hint>Please verify the blocksize of your database</hint>
								<selection/>
								<inputtiming>
									<importbb showprev="yes">yes</importbb>
									<schedulejob showprev="yes">yes</schedulejob>
								</inputtiming>
								<inputoptions>
									<confirm>no</confirm>
									<force>no</force>
									<required>no</required>
									<validation>no</validation>
								</inputoptions>
							</param>
						</parameters>
						<conditions>
							<condition guid="{F5E86DDF-17A4-4054-A684-6226BD78A54F}">
								<expressions/>
								<operator>AND</operator>
								<actiontrue>3</actiontrue>
								<parametervaluetrue></parametervaluetrue>
								<when>0</when>
								<action>3</action>
								<parametervalue></parametervalue>
								<enabled>yes</enabled>
							</condition>
						</conditions>
					</task>
					<task>
						<properties>
							<type>QEXECUTESQL</type>
							<guid>{F5E86DDF-17A4-4054-A684-6226BD78A54F}</guid>
							<description>Query SQL Statement</description>
							<enabled>yes</enabled>
							<comments>Query the size of the database and associated files. Size is returned in MB</comments>
							<onerror>fail</onerror>
						</properties>
						<settings>
							<script>SELECT [size] * $[BlockSize] / 1024 AS [Size in MB], filename FROM sysfiles</script>
							<dbtype>MSSQL</dbtype>
							<dbserver>$[DBServer]</dbserver>
							<dbname>$[DBName]</dbname>
							<dbuser>$[Account]</dbuser>
						</settings>
					</task>
				</tasks>
			</module>
		</modules>
		<resources/>
		<runbooks/>
	</buildingblock>
</reswisdom>

