Tuesday, September 08, 2015

export all mysql user databases at one go

/mnt/ssdata/mysql5.5_bak# time mysqldump --lock-all-tables -u root -p --all-databases > mysql5.5_dump.sql
Enter password:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

real    1m50.291s
user    0m52.281s
sys     0m5.228s


There is warning message above,  so

/mnt/ssdata/mysql5.5_bak# time mysqldump --events --ignore-table=mysql.events --lock-all-tables -u root -p --all-databases > mysql5.5_dump2.sql
Enter password:

real    1m45.663s
user    1m4.349s
sys     0m5.483s

Funny problem afte reset mysql root password

Followed this link for root password reset,

https://help.ubuntu.com/community/MysqlPasswordReset

However, hit below funny error

user:~/workdir/mysqlbak/5.6shrink$ sudo /etc/init.d/mysql start
 * Starting MySQL database server mysqld X11 connection rejected because of wrong authentication.
No directory, logging in with HOME=/
                                                                                                                         [ OK ]
 * Checking for tables which need an upgrade, are corrupt or were
not closed cleanly.


Googled , but no much can help.

Tried my luck to reboot the Ubuntu server, and it seems working fine now.

Monday, September 07, 2015

SSD benchmark of 240GB vs 120GB

Recently play with two SSD: Sandisk 120GB and Samsung 850 Evo 240GB.




Although different brand SSD, I hope they are re-presentable. In general,  240GB has significant performance improved as what I read from some articles.

This seems true based on my benchmark, especially for WRITE and average access time.

BTW, after migrate my Ubuntu from HDD to Sandisk SSD, the bootup time (from grub to first screen of logon window) reduces from 75 seconds to 18 seconds.

Cheers!



Tuesday, July 21, 2015

Open Cygwin Terminal in Windows Explorer

I like opening a terminal session under Linux file explorer.  I want to have the same in Windows Explorer.

Second round with hard working of Googling, I made it for another DBA Knife !

Again, playing with registry .






References:

http://scottiestech.info/2009/11/15/addyourownprogramtothewindowsexplorerrightclickcontextmenu/
http://www.vultaire.net/blog/2013/06/18/simpletrickscyghereopencygwinshellhere/

Right Click and Zip with PeaZip in windows 7

Feeling not convenient in Windows Explorer, which can only extract a .zip file, but can't zip a file or directory.  Due to license issue, I have to use open source PeaZip to do the compression job.

After hard working with Google, here are my new member of DBA Knife.

For selected file.



For selected directory


Note that the double quota of %1, which allows space with a file/directory name.


Thursday, August 28, 2014

cygwin wget over corprate proxy

liqy@testserver1 /bin
$ export http_proxy="http://domain1\liqy:password1@proxy1:8080/"

$ echo $http_proxy
http://domain1\liqy:password1@proxy1:8080/

liqy@testserver1 /bin
$ wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
--2014-08-26 11:10:43--  http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
Resolving proxy1 (proxy1)... 10.33.90.91
Connecting to proxy1 (proxy1)|10.33.90.91|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 10572 (10K) [text/plain]
Saving to: ‘apt-cyg.1’

100%[======================================>] 10,572      --.-K/s   in 0.001s

2014-08-26 11:10:43 (17.6 MB/s) - ‘apt-cyg.1’ saved [10572/10572]

Friday, August 22, 2014

impact of SYS password change to data guard

when SYS password is changed, password file changed accordingly.

If it is not sync to standby site, archived log transfer failed as shown below.

-- at primary site

Wed Aug 20 11:14:24 2014
Archived Log entry 2743 added for thread 1 sequence 5263 ID 0x69704abb dest 1:
Archived Log entry 2744 added for thread 1 sequence 5264 ID 0x69704abb dest 1:
Wed Aug 20 11:14:47 2014
Starting background process SMCO
Wed Aug 20 11:14:47 2014
SMCO started with pid=33, OS id=15785
Wed Aug 20 11:15:44 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
PING[ARC1]: Heartbeat failed to connect to standby 'dg'. Error is 16191.
Wed Aug 20 11:16:45 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
PING[ARC1]: Heartbeat failed to connect to standby 'dg'. Error is 16191.
Wed Aug 20 11:16:56 2014
Thread 1 advanced to log sequence 5266 (LGWR switch)
  Current log# 2 seq# 5266 mem# 0: /u01/oradata/DG/redo02.log
Wed Aug 20 11:16:56 2014
Archived Log entry 2745 added for thread 1 sequence 5265 ID 0x69704abb dest 1:
Wed Aug 20 11:16:57 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[server, ARC3]: Error 16191 creating remote archivelog file 'dg'
FAL[server, ARC3]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance DGS - Archival Error. Archiver continuing.


--at standby site

ARC8: Becoming the 'no FAL' ARCH
ARC1: Becoming the heartbeat ARCH
ARC1: Becoming the active heartbeat ARCH
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC9]: Error 16191 connecting to dgs for fetching gap sequence