Oracle: How to gather stats in a logical standby database?
You cannot run any DML in a logical standby database unless you deactivate, temporary, the guard feature. To overcome you isse you can do:

SQL&gt; ALTER DATABASE GUARD NONE;
SQL&gt; SELECT GUARD_STATUS FROM V$DATABASE; 
GUARD_STATUS 
-------------------- 
NONE


And then run your dbms_stats.