Posts

Showing posts from January, 2018

Oracle Gather stats on database level

Gather stats in Database level:- EXEC DBMS_STATS.GATHER_DATABASE_STATS( ESTIMATE_PERCENT=>100,METHOD_OPT=>'FOR ALL COLUMNS SIZE SKEWONLY',       CASCADE => TRUE,       degree => 4,       OPTIONS => 'GATHER STALE',       GATHER_SYS => TRUE,       STATTAB => PROD_STATS); ======================================================================= CASCADE => TRUE :Gather statistics on the indexes as well. If not used Oracle will decide whether to collect index statistics or not. DEGREE => 4 :Degree of parallelism. OPTIONS :        =>’GATHER’ :Gathers statistics on all objects in the schema.        =>’GATHER AUTO’ :Oracle determines which objects need new statistics, and determines how to gather those statistics.        =>’GATHER STALE’:Gathers statistics on stale objects. will return a list of stale objects.        =>’GATHER EMPTY’:Gathers statistics on objects have no statistics.will return a list of no stats objects.

EXPLAIN PLAN of SQL in oracle

EXPLAIN PLAN OF SQL ==================== First connect sqlplus and generate plan like below, with out executing sql. ---i will take below sql for example---  select * from emp where empno = 202 ---how to generate plan without execution. EXPLAIN PLAN FOR  select * from emp where empno = 202; ---- how to display generated plan-- SET LINESIZE 300 SET PAGESIZE 300 SELECT * FROM table(DBMS_XPLAN.DISPLAY); --this sql will displays the plan.

Oracle Critical Patch Updates, Security Alerts and Bulletins

Image
Critical Patch Updates, Security Alerts and Bulletins:- ============================================================  Below one is link you can latest patches to find  https://www.oracle.com/technetwork/topics/security/alerts-086861.html you can select patch updates month and next page component like(database). and follows steps to download type of patch and version you need.  please note you need oracle account to download these.  if you need any specific number or type of patch you can directly login support account in tabs clock Patches&Update enter patch number and download.  https://support.oracle.com