TECHNOLOGY TIPS

No package mysql-server available

Starting CentOS7 MySQL is replaced with MariaDB. You might encounter the following error “mysql -u root -p4Samsung4” when you try installing mysql using yum. [[email protected]~]# yum install mysql-server Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirror.es.its.nyu.edu * extras: mirrors.rit.edu * updates: mirrors.advancedhosters.com No package...

Read More

How to Create an Awesome Database Design?

How to Create an Awesome Database Design?

Creating an awesome database design asks for the discipline of following certain rules. Here are some of them for you to get an overall idea of the data modeling and the development process. Plan before you start development If you see the work procedure of an architect, he creates...

Read More

ORACLE DBA

oracle impdp as sysdba and attach job

impdp allows Oracle DBA to exit out of the current process while the job continues to run in the background.  In the event you have to connect to the job and take some action, below is how that can be accomplished: In the following example job name is –...

Read More

ORACLE DATABASE

Enabling and Disabling – auto optimizer stats collection

Here is how you can query if the Auto Optimizer Stats Collection job is running in Oracle Database 11g: Login to database as SYSDBA: [sql] SELECT CLIENT_NAME, STATUS FROM DBA_AUTOTASK_CLIENT WHERE CLIENT_NAME = ‘auto optimizer stats collection’; [/sql] Below is how the job can be disabled: [sql htmlscript=”false”] EXEC...

Read More

ORACLE DATABASE

Identifying Blocking Sessions in Oracle Database

Below SQL gives the blocker and blockee sessions in database. Oracle RAC Environment: select (select username from gv$session where sid=a.sid) blocker, a.sid, 'is blocking', (select username from gv$session where sid=b.sid) blockee, b.sid from gv$lock a, gv$lock b where a.block > 0 and b.request > 0 and a.id1=b.id1 and a.id2=b.id2;...

Read More

ORACLE CONSULTANT

oracle archive log history

Here is the Oracle SQL script that comes handy to find out the number of archive logs that are generated by the database by day by the hour. set lines 120 set pages 999 spool log_history.log SELECT to_char(first_time,'YYYY-MON-DD') day, to_char(sum(decode(to_char(first_time,'HH24'),'00',1,0)),'99') "00", to_char(sum(decode(to_char(first_time,'HH24'),'01',1,0)),'99') "01", to_char(sum(decode(to_char(first_time,'HH24'),'02',1,0)),'99') "02", to_char(sum(decode(to_char(first_time,'HH24'),'03',1,0)),'99') "03", to_char(sum(decode(to_char(first_time,'HH24'),'04',1,0)),'99') "04",...

Read More