Even the faintest ink beats the strongest memory.

  • How to Type Escape Key while Using Bluetooth Keyboard Connected with Android System

    Well, every user’s situation is unique, so I’ll just present mine here for starter: Phone: Galaxy S2 Andorid Version:4.0.3 Keyboard: B.O.W hb086 (it is a cheap Chinese knockoff, but probably your own high-end couterpart is using the same set of hardware inside) I first had trouble with the Ctrl key, and later I fixed it…

  • Best Way to Set up a Server Side Trace

    Accidentally bumped into this tutorial about setting up server side trace. By using SQL profile and scripting our the trace definition, you’d save a lot of work by defining various events that you’d like to trace. I am taking a note here for future reference. Some other useful T-SQL commands that involve the control of…

  • T-SQL Function to Get the Default Backup Folder

    Again, DBA’s are often faced with adhoc backup tasks that shall dump relevant data or log to the existing backup location for all other data/log dumps. Quick way to do so will invovling concatenating dynamic sql commands with the default backup folder location. [sourcecode language=”sql”] /* Script to create a function to get default backup…

  • T-SQL Function to Return Current Timestamp as String

    Sometimes, a DBA will have to make adhoc backups and it is ideal that these backup files are named with proper timestamp info. The below function returns current date and time as a string fomartted in ‘yyymmdd_hhmmss’ style: [sourcecode language=”sql”] /* Script to create a function to get current timestamp in the format of YYYYmmdd_hhmmss;…

  • Linux 101: How to Sync Two Folders on Two Hosts

    This is a genuine request from a friend of mine who has a website and needs to be backed up in a hot stand-by server in case the production goes down. The command that I am using is ‘rsync’. Firstly, you’ll have to install rsync on both boxes if you have not done so: sudo…

  • Linux 101: How to Recovery Forgotten Root’s Password

    It is recommended to avoid using root account frequently and this does cause trouble when admins suddenly would like to connect to a box under root account. One of the best ways to recover a forgotten root password is to use another account that has sudo privilege and can reset password for root. I am using…

  • Linux 101: Vsftp Service Configuration Tutorial

    I am reposting this tutorial for future’s reference. Also, to check if vsftpd service is running or not, you can use shell>service –status-all | grep vsftpd And to control vsftpd service, you can use shell>/etc/init.d/vsftpd start shell>/etc/init.d/vsftpd stop shell>/etc/init.d/vsftpd restart And to make vsftpd automatically start everytime system is rebooted, you can run shell>chkconif vsftpd on In addittion,…

  • MySQL Newbie 002: PhpMyAdmin Error: “Wrong permissions on configuration file, should not be world writable”

    The titled error message is referring to wrong permissions of configuration file “config.inc.php” and a simple chmod command will suffice: shell> chmod 0755 config.inc.php In case you wonder where to find this config.inc.php file, it is located in the same folder where PhpMyAdmin is installed. And for a more detailed solution on both Linux and Windows systems, please click here.

  • MySQL Newbie 001: How to Check if MySQL Service is Running on CentOS

    As I am new comer in the MySQL domain, I am going to write up a few trivial posts about administrating MySQL. Today this is the first one: The BASH command you are looking for to achieve the MySQL service status on CentOS system is: shell> /etc/init.d/mysql status And to connect to localhost’s MySQL service: shell>…

  • An Example of Using LEAD and LAG Functions from SQL Server 2012

    I recently encountered a technical interview question and it was something like this: A company has its door access logging system and the company policy dictates that every employee’s card-in/card-out records shall reflect his/her true presence in or absence from office. But somehow, some employees skip cardings or tailgate behind others. Therefore, the logging system…