This error generally comes when a conflicting DDL already running.
Possible reason could be
1. Some other user has triggered the optimization
2. Some other user has tried to save/ delete the same property which you are trying to optimize.
We dont have any out of the box way to kill a script like that on DB. The best you can do is to wait for sometime and try again. If the issue still persists, then you might need to contact your DBA to identify the long running thread which is executing the script and KILL that particular thread using KILL CONNECTION or KILL QUERY .
Thanks for your reply. In that case, I would like to know, is it happening for each and every property that you are trying to expose. Just try creating a new property and then and there expose it and see the result.
If you experience the same issue then please check the ALERT log file once and see whether any DB specific ALERT is coming or not. See this post for detail of all the PEGA ALERT .