moved order by to only be for active tnsfixed query log insert error