Hello,
We have an AX Database having its database size ~7 GB and its Log File has grown upto ~41 GB. What are the consequences if I delete Log file after detaching database and attaching it again? Will I lose any data? I do not require to keep any transaction logs.
Transaction log is actually very important - you need it if you want to restore a database to some point of time after a normal database backup and it also contains transactions that are still active. You can’t just delete it.
If you use full recovery model, you should run transaction log backups often enough to avoid the log growing too fast. To actually reduce size of transaction log, you can use DBCC ShrinkFile command, for example. If you’re sure you don’t need full recovery model, don’t try to delete transaction log files - change the recovery model instead.
Internet is full of information about this topic - for example, see Understanding the importance of transaction logs in SQL Server or MSDN: Transaction Log Management.