I am getting following error while I am trying to delete 355447 records in single delete query.
The transaction log for database is full. To find out why space in the lo
As Damien said, you should find out the reason why your log is growing. Check out this post for an explanation:Transaction Log Reuse Wait
Deleting that many records will require significant log-space in itself, so if you can't make more room for the log file, you might have to delete those rows in several smaller steps. If you are using "full" recovery, you will have to take a log backup after every step.
On a side note, BACKUP LOG ... WITH TRUNCATE_ONLY is in general a very bad idea. If you are in full recovery mode, than this will break you backup chain and prevent you from doing a point-in-time restore. If you don't need point-in-time recoverability, use the recovery setting "simple" instead. Otherwise take a real log backup and store it together with you other backup files.
DBCC SHRINKFILE on a log file does not help in any way for the database you are shrinking. You can use it to make room for other DBs on the drive, but it will not make room for the current database as it can only remove space that is reusable. That means that any space freed up by it could have been used for your transaction anyway.