Oracle DB: Add/Drop/Rename objects

Some sample commands for Add/Drop/Rename objects:--Dropping the primary key:ALTER TABLE "VAG"."TEST_TABLE" drop primary key;drop index "VAG"."TEST_TABLE_PK";--Adding primary key:CREATE UNIQUE INDEX "VAG"."TEST_TABLE_PK" ON "VAG"."TEST_TABLE" ("TEST_TABLE_ID");ALTER TABLE "VAG"."TEST_TABLE" ADD CONSTRAINT "TEST_TABLE_PK" PRIMARY…

Continue ReadingOracle DB: Add/Drop/Rename objects

Oracle PL/SQL: Autonomous Transaction for logging

Here is an example how to use autonomous_transaction for logging purposes.In case of rollback only the main transaction is affected.declare    l_categories_count      varchar2(100);    process_error            Exception;        procedure log(p_message varchar2) is        …

Continue ReadingOracle PL/SQL: Autonomous Transaction for logging