I made a connection to SQL Server through ODBC by using CDatabase class. However, each new SQL transaction ( even including using "SELECT" to open table etc ) always occupy new space in tempDB. It should be dead in short time if tempDB is too small. So I have to disconnect from database and SQL Server will automatically clean tempDB, and then I can re-connect and reuse Database.

Question : How to clean up tempDB without disconnection or not use any space resource on SQL Server ?