In Replication Server versions earlier than 15.5, you can set up a warm standby application and enable sp_reptostandby at the active database to allow replication of supported data definition language (DDL) commands to the standby database. See Chapter 3, “Managing Warm Standby Applications” in the Replication Server Administration Guide Volume 2.
However on a standby database or a replicate database in a non-Warm Standby environment, you cannot create a stored procedure that references a temporary table because Replication Server does not replicate temporary tables. The create stored procedure process must resolve the objects used internally by the stored procedure. However since there is no temporary table in the replicate or standby database, Replicate Server does not create the stored procedure in the replicate or standby database.
With support for deferred name resolution, Replication Server allows the replication of stored procedures that refer to temporary tables, tables that do not exist, and procedures that do not exist, to replicate or standby databases.