FORCE EDITIONABLE VIEW in Oracle

41.6k views Asked by At

I know view, materialized view, force view etc in Oracle database. today when i had to tune a package I saw below

CREATE OR REPLACE FORCE EDITIONABLE VIEW "IMCAPPS"."PJM_EID_ONHAND_VALUES_V"

Can anybody tell me what is FORCE EDITIONABLE VIEW And benefit it offers when we use it.

1

There are 1 answers

0
APC On BEST ANSWER

FORCE and EDITIONABLE are two different things.

FORCE instructs the database to create the view regardless of whether the query is valid. Default behaviour is for a CREATE VIEW statement to fail if its query does not compile for any reason (e.g. invalid syntax, missing privileges on a referenced object). However, this is not always desirable, especially when we're running a long build script with lots of statements. Using FORCE means the view is created but with USER_OBJECTS.STATUS of INVALID. The view exists but we cannot use it until we fix the underlying issue. However, at least our build script can run to completion.

EDITIONABLE is a keyword relating to Edition-based Redefinition. This is a mechanism Oracle provides which allows us to support multiple versions of the same object in our database. This can be very useful for wrangling complex deployments in live environments. In my experience very few places avail themselves of this capability. Find out more.