You are going to need more information to resolve this.
You might want to start by switch logging on in your dex.ini file and also perhaps start a SQL trace to see what is going in SQL. The debug logging on Dynamics GP will let you see exactly which command is hanging, that might help track it down.