Category: SQL

code best of #oracle_sql

code best of #oracle_sql

Case 1 I use COALESCE( v(‘APP_USER’),USER );  instead of NVL( V(‘APP_USER’),USER ); Cause: More performance. Case 2 I use SYS_CONTEXT(‘APEX$SESSION’, ‘app_user’) instead of V(‘APP_USER’) Cause: i can’t use v(‘APP_USER’) by default value for column but...

How to use the SQL Tuning Advisor feature in Oracle SQL Developer

How to use the SQL Tuning Advisor feature in Oracle SQL Developer

First execute some codes .. ALTER system SET CONTROL_MANAGEMENT_PACK_ACCESS=’DIAGNOSTIC+TUNING’; GRANT advisor, administer SQL tuning SET,SELECT any dictionary TO &USER; GRANT advisor to &USER; GRANT administer sql tuning set to &USER; EXEC DBMS_STATS.DELETE_SCHEMA_STATS (‘&USER’); And...

Some audit codes

Some audit codes

Next codes help you to audit your app .. Go head… — Find most accessed pages SELECT application_id, application_name, page_id, page_name, SUM (page_id) page_hit_count FROM apex_workspace_activity_log GROUP BY application_id, application_name, page_id, page_name ORDER BY...

How to looking for item_name into all apps ?

How to looking for item_name into all apps ?

Sometimes you looking for item_  you forget it or not remember whats app include it.. so you use next code to find it…. SELECT workspace, application_id, application_name, page_id, page_name, item_name, item_help_text FROM apex_application_page_items WHERE...

Alter User in SQL

Alter User in SQL

You can alter user by.. sqlplus /nolog connect / as sysdba Once connected, you can change the SYS password to something you know: ALTER USER ADMIN IDENTIFIED BY new_password