Sunday, February 07, 2016

XServer on Windows 10

Recently upgrade to 64 bits windows 10.

Tried Cywin startxwin but not working, which was working on my 32bits windows7.

Luckily, MobaXterm still works well.

The other software in my mind is XMing. The installation is smooth. One thing to note is that I need to choose "No access control" as shown below (after click the XLaunch), which I guess this is the same effect to command "xhost + &"  of startxwin.







For MobaXterm, for those X11 forwarding is disabled on the SSH server end, we'll  need to export DISPLAY explicitly, After that, it works perfect.




Tuesday, February 02, 2016

investigating Delphix job timeout issue with inner tools




Recently we have Delphix jobs can't  complete within scheduled windows. even I separate them in more windows. 

The above three pages are handy for investigation. They tell me which databases are using the most bandwidth. From them drill down further, I identified problematic application/jobs, which should not be there. I even found  a problem in production, which does full table scan to a moderate size table. This is make the saying true that fast HW may help to hide the performance problem. 

As we use NFS to present storage to database, the network bandwidth becomes expensive for our 1GbE network interface , running on VMWare. 

From this case, we learn that for best practice, the recommend network is 10GbE


Best practices to improve network throughput include:
Use 10 Gigabit Ethernet (10GbE)
Use a dedicated storage network

And it is worth to read the Delphix performance tuning document again. 

Delphix cron

Delphix cron used by replication job is Quartz CronTrigger scheduler


And below is its format.


Format

A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows as I copy it from the site. But I think there error with 5th & 6th position , which should swap the "Day of week" and "Year"

Field NameMandatoryAllowed ValuesAllowed Special Characters
SecondsYES0-59, - * /
MinutesYES0-59, - * /
HoursYES0-23, - * /
Day of monthYES1-31, - * ? / L W
MonthYES1-12 or JAN-DEC, - * /
Day of weekYES1-7 or SUN-SAT, - * ? / L #
YearNOempty, 1970-2099, - * /

Monday, February 01, 2016

unto_retention=0

It is auto tuned by Oracle, if it is the retention is set to 0.

https://community.oracle.com/thread/833573?tstart=0

Wednesday, January 13, 2016

Monitor number of now changed for mview base table

One programer has interested on number of rows changed for a mview base table, thus he suggested to query x$knstmvr table , which may be found in http://avdeo.com/tag/materialized-view/.  As such, I have concern on accessing to the SYS x$ view.

Initially, I thought to use DBA_TAB_MODIFICATIONS, but it requires to run dbms_stats.flush_database_monitoring_info and gather table statistics of rest the counter, and time co-related to mview refresh.


 For performance reasons, the Oracle Database does not populate this view immediately when the actual modifications occur. Run the FLUSH_DATABASE_MONITORING_INFO procedure in the DIMS_STATS PL/SQL package to populate this view with the latest information. 


Confirmed from https://docs.oracle.com/cd/E26401_01/doc.122/e48791/T578797T589127.htm#T578863, that count on MLOG$_ is an easier way to achieve the purpose. 

MLOG$ Table

An MLOG$ table is the Snapshot Log table created against a base table. A row is inserted into the table each time a change (insert/update/delete) is made to the base table.
When a snapshot is refreshed in fast (incremental) mode, it reads the rows in the MLOG$ table and uses this information to get the updated information from the base table into the snapshot for further processing.
Standard RDBMS functionality manages rows inserted into the MLOG tables. When a snapshot is refreshed in either fast or complete mode, then the RDBMS will delete rows from the MLOG table. However, if multiple snapshots reference the same MLOG, then all the snapshots must be refreshed before the RDBMS can remove any rows from the MLOG table.
The RDBMS creates snapshot logs on the base table and automatically names them using MLOG$_[20 characters of the table name]. For example:
MRP_FORECAST_DATES (18 char) creates MLOG$_MRP_FORECAST_DATES BOM_DEPARTMENT_RESOURCES (24 char) creates MLOG$_BOM_DEPARTMENT_RESOU
In case of a tie, the RDBMS adds a number to the MLOG name. For example:
WSM_COPY_OP_RESOURCES creates MLOG$_WSM_COPY_OP_RESOURCE WSM_COPY_OP_RESOURCE_INSTANCES creates MLOG$_WSM_COPY_OP_RESOURCE1



SQL> select count(*) from mlog$_bonus; 
COUNT(*)
----------
0

from http://www.dba-oracle.com/t_mlog_dollar_tables.htm is a real case.

Moreover, questions to programer:
What is the purpose of getting this number?
What actions should be taken if the amount exceeds certain number? What number should be set as threshold?

Thanks for the challenge.

Monday, January 11, 2016

How to check if a table statistics is locked

LIQY@ORCL1> select table_name from user_tables;

TABLE_NAME
------------------------------
T1

LIQY@ORCL1> select STATTYPE_LOCKED from user_tab_statistics;

STATT
-----


LIQY@ORCL1> exec dbms_stats.lock_table_stats('LIQY','T1');

PL/SQL procedure successfully completed.

LIQY@ORCL1> select STATTYPE_LOCKED from user_tab_statistics;

STATT
-----
ALL

LIQY@ORCL1> exec dbms_stats.UNlock_table_stats('LIQY','T1');

PL/SQL procedure successfully completed.

LIQY@ORCL1> select STATTYPE_LOCKED from user_tab_statistics;

STATT
-----

Wednesday, January 06, 2016

Akeeba backup for Joomla 1.5

Helping to maintain a site using Joomla 1.5. Recently the hosting provider's server was hacked again, cause the site not working for few days.  Pouring oil on the fire by the provider is its poor technical support.
Luckily the site has Akeeba backup installed and takes snapshot on demand, and I found a backup copy of Aug. 

As the content of this site is quite static, I decided to roll back to Aug by using Akeeba kickstart script.

After reading the quick guide, I renamed the not-working www directory to www_bad, and uploaded below files to in the new www root directory, except for
  • the existing configuration.php
  • kickstart.php 
  • en-GB.kickstart.ini as English installation language
  • August's Akeeba backup file

With above and type my domain.com/kickstart.php for the restoration to production site. In few steps and minutes, I got the site working again.

However, pictures of phocagallery were not found.  Compared the directory , and found the image/phocagallery were not backed up in the Akeeba backup file. ( Akeeba backup version is v3.4.3).  Lucily, I didn't delete the old www directory, and it works again after copy the directory  from www_bad/image/phocagallery.


The last step is to rebuild thumnail of phocagallery, as it showed blank in phocagallery, but once clicked, the picture is still shown properly.

Cheers and Thanks Akeeba backup & Kickstart.

Say bye-bye to the hosting provider soon.