I have started the axapta transactions deletion by using SysDatabaseTransDelete class for about 3 years data then after long hours axapta was not responding and the database transaction log started increasing and db server was left with low disk space. How can i reduce the transaction log of db or set not to grow larger ?
You can detach the database and than delete the ldf file.
After that, reattach the database. Log file will get created automatically with low size.
For safer side, do keep the backup of log file for some moment.
Another suggestion, isntead of deleting transaction through class, you can delete the transactions through sql queries. Although it will be tedious but it will save lot of time.
I tried the same detaching process but transaction log is still increasing and showing low disk space on server. But your another suggestion is quite good and can u point or give me that script.
yes… i have stopped the ax process because server was on low disk… anyway… i will restore the backup to another machine and try the sql script. Can u provide me the script …!!!
Always use ‘SysDatabaseTransDelete’ class to delete transactions. This class is written with performance in mind. Making the change I mentioned above, should make deletion process fairly quicker.
If you try to delete data manually, you might get into unncessary tangles and this might end up corrupting database integrity.
Even after setting the database recovery to simple, the log was growing, So, i set a breakpoint in the SysDatabaseTransDelete to see the table which axapta is trying to delete and truncated the table from sql server. I considered truncating only those table which were having huge number of transactions. At last, it worked.