How to Delete History in Asset Manager
Enter SQL Command Line:c:\Users\Administrator>sqlcmd
Enter the "Daytona" (default) database:
Query the database for all tables:
2>SELECT sobjects.name FROM sysobjects sobjects WHERE sobjects.xtype = 'U'
In the example above we are isolating a specific historical table named "t1_attribute_history_2013_06". The history tables (starting in version 2.6 of Asset Manager) are created every month and are month/year time stamped. The one above would indicate history from June, 2013. The history tables are the ONLY tables that are recommended to be deleted. Deleting any other tables can cause significant issues in the database.
Delete (aka "Drop") a specific table:
2>drop table t1_attribute_history_2013_06
Continue deleting as many tables as you wish. Upon completion, the database needs to be shrunk in order to reclaim the space for the DB.
2>alter database [daytona]
3>set recovery simple
1>alter database [daytona]
2>set recovery full
In this example we set the recovery mode to simple temporarily and back to full for the remainder. You might consult a DBA for the proper/desired functionality in your environment.
Once the DB is shrunk, restart the Asset Manager service and ensure everything is back up and running normally. For additional resources on backing up and restoring an SQL Express DB via command line, refer to this article:
Backup/Restore SQL Express Command Line