"Cannot create file 'C:\temp\2\TOAD4.tmp'. Access is denied" error given when running a query ro starting / launchingToad.
This occurs for any query run in Toad on a Citrix setup.
Conflict with directory accessed by Toad. Toad uses the temp folder and files for it's recovery feature.
SOLUTION 1:
Verify that the user has full read / wrire access to the directory. He/she needs permissions for read/write to the temp by default.
SOLUTION 2:
The directory accessed for temp and recovery is specified under under Toad's options, Toad | Options | General | Temp file directory. This setting can be changed and another folder/directory can be specified.
SOLUTION 3:
Verify if multiple users could be accessing the local citrix server's temp folder. If that's the case, changes to the Citrix set up might be necessary to avoid this kind of conflict. Balance the user load across multiple servers to avoid conflicts.