Ax DB Clean by Company

USE AXDB
GO
exec sp_MSforeachtable
@command1 = ' Delete from ? where ((DATAAREAID <> ''dea'') AND (DATAAREAID <> ''dat'') AND (DATAAREAID <> ''per'')) '
, @whereand = '  '

GO
DBCC SHRINKFILE (AXDB_LOG,1)

Leave a Reply

Your email address will not be published. Required fields are marked *