BUG - When exporting MVIEWs with remove and add to refresh group commit goes in wrong spot

Oh, I see.

We're missing a slash after the begin..end, so that whole block is invalid. Weird that it runs in Toad, but that's the problem.

I will have this fixed for the next beta, which will be released on Monday. Are you using 16.3? If so, you can get the beta here. If not, 17.0 will be officially released around the end of October.

If you can't get the beta, you should be able to solve by search-replace on that comment:

-- DBMS_REFRESH requires a commit. ...and just replace it with a slash.

Or, can you turn that option off, then get separate scripts for the refresh groups?

-John