I'm "pretty sure" it's just the stuff inside the @Command in the 2nd section:
USE [CM_FUN]
GO
DECLARE @SQL NVARCHAR(MAX) = N''
''
SELECT
@SQL = @SQL+N''TRUNCATE TABLE dbo.''+TABLE_NAME+'';
''
FROM
INFORMATION_SCHEMA.TABLES x
WHERE
x.TABLE_SCHEMA = ''dbo''
AND x.TABLE_NAME LIKE ''%[_]HIST''
ORDER BY
x.TABLE_NAMEexec sp_executesql @SQL
but... not really sure. :( of course, change cm_fun to be your database.
On Thursday, August 13, 2015 11:43 AM, Todd Hemsell <[email protected]>
wrote:
Awesome! Can you possibly send me just the SQL to truncate the tables? SQL
Studio does not like the entire script to create the job.
On Wed, Aug 12, 2015 at 2:10 PM, Sherry Kissinger <[email protected]>
wrote:
How about all your history data?
http://mnscug.org/blogs/sherry-kissinger/357-configmgr-2012-truncate-history-tables
We have that running daily to clear the history. No one has ever asked us for
history data.
On Wednesday, August 12, 2015 2:06 PM, Todd Hemsell <[email protected]>
wrote:
Anyone know how to either manually kick off the main task to del aged inv hist
or know how to manually delete aged inventory? I have changed the date/time on
the task to try and get it to kick off and it does not seem to have any affect.
I had it misconfigured and filled my DB up. I urgently need to del some rows to
free up some space.