Author Archives: Nick Xu

About Nick Xu

Not a DBA anymore

3 Ways to Log In Through Sqlplus as ‘sysdba’

1.If you are a member of DBA group on the Linux/Unix OS level: sqlplus ‘/ as sysdba’ 2.Or you can first log on as ‘nolog’ sqlplus /nolog And then SQL>connect / as sysdba 3. Directly connect to Oracle instance as sysdba sqlplus ‘sys as … Continue reading

Posted in Oracle | Leave a comment

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 … Continue reading

Posted in Linux | Tagged , , , | Leave a comment

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 … Continue reading

Posted in SQL Server, T-SQL Script | Tagged | Leave a comment

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 … Continue reading

Posted in SQL Server, T-SQL Script, User Defined Function | Tagged , | Leave a comment

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:

Posted in SQL Server | Tagged , | Leave a comment

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, … Continue reading

Posted in Linux | Leave a comment

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 … Continue reading

Posted in Linux | Tagged , , , | Leave a comment

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 … Continue reading

Posted in Linux | Tagged , | Leave a comment

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 … Continue reading

Posted in MySQL, PhpMyAdmin | Leave a comment

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 … Continue reading

Posted in MySQL | Leave a comment