Daily Archives: November 12, 2013
SP2-0613: Unable to verify PLAN_TABLE format or existence SP2-0611: Error enabling EXPLAIN report
sqlplus / as sysdba SQL> set autotrace traceonly SP2-0613: Unable to verify PLAN_TABLE format or existence SP2-0611: Error enabling EXPLAIN report Hopssssss what is problem!!!! $ ORACLE_HOME / RDBMS / admin folder by running utlxplan.sql I can create the table automatically. Solution: SQL> @utlxplan.sql Table created. AUTOTRACE not result in an error. SQL> set autotrace […]
Move a database to ASM
If you are planning to migration LIVE your systems will be useful primarily examine the document 252219.1 on Oracle Support. sqlplus / as sysdba SQL> alter system set control_files=’+DATA’ scope=spfile; SQL> alter system set db_create_file_dest=’+DATA’ scope=spfile; SQL> alter system set db_recovery_file_dest=’+DATA’ scope=spfile; Oracle ASM files directly to your hard-disk group will be created automatically.. SQL> […]
Contraints/Objects/Set Operators
Not null Unique Primary key Foreign key Check Create table employees ( employee_id number(6) , First_name varchar2(20), Job_id varchar2(10) not null, Constraint emp_emp_id_pk primary key (employee_id), Constraint emp_dep_fk foreign key (department_id) references Departments (department_id) [on delete] [cascade | set null] ); Constraint <constraint_name> pimary key (col_names) Unique (col_names) […]
Resize all JPEG files in current directory, to size (Needs ImageMagick installed, for ‘convert’)
#!/bin/bash function shw_grey { echo -e ’33[1;30m'”$1″’33[0m’; } function shw_norm { echo “$1”; } function shw_info { echo -e ’33[1;34m'”$1″’33[0m’; } function shw_warn { echo -e ’33[1;33m'”$1″’33[0m’; } function shw_err { echo -e ’33[1;31mERROR: ‘”$1″’33[0m’; } function shw_usage { cat <<EOT Resize all JPEG files in current directory, to size (Needs ImageMagick installed, for ‘convert’) […]
AWR Snapshot Repository
select * from dba_hist_snapshot order by snap_id desc; begin dbms_workload_repository.create_snapshot(); end; select * from dba_hist_wr_control; begin — After a 30-minute periods during the month DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( retention => 43200 , interval => 30 ) end ; — displays the history of the contents of the in-memory active session history for recent system activity. select * from […]