Replacing Compiled Object Definitions

Replace existing compiled objects with a new definition while preserving the original name, object ID, auditing options, and permissions.

A compiled object is any object that requires entries in the sysprocedures table.

Compiled objects include:

When granular permissions is enabled or disabled, you must be the object owner to replace a compiled object. You cannot impersonate a user through an alias or by using setuser. However, if you are the owner through set proxy, you can replace a compiled object.

Replacing compiled objects is achieved by either using the Replace option from an object's context menu, or by using the Create wizard for the object and specifying a new definition for an existing object.

When using the Create wizard to replace a complied object definition, you must specify the same compiled object name, owner, and database location in the Create wizard.

These objects are supported by the Replace option: