ORA-32021: parameter value longer than 255 characters (log_archive_dest)

Problem:

alter system set log_archive_dest_2='service="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=stagedb.test.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=db2.test.com)(SERVER=DEDICATED)))", LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="db2", valid_for=(all_logfiles,primary_role)' scope=both;

ORA-32021: parameter value longer than 255 characters

Solution:

Splitting with two ' ', ' '

alter system set log_archive_dest_2='service="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=stagedb.test.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=db2.test.com)(SERVER=DEDICATED)))"','LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="db2", valid_for=(all_logfiles,primary_role)' scope=both;