Learn the Rules, Break The Rules, and Create the New Ones...

Hi... My name is Rizky Prihanto. You can call me RQ, or Rizky either. I am currently living on Bandung, Indonesia. Had a lot of works and research about Enterprise Information Systems (majoring on education and e-governments). I have bunch of interests (some friends call it 'freakz') about MySQL Opensource Database and now I am one of the administrator of MySQL Indonesia User Group - the opensource community initialized by Sun Microsystems Indonesia.

My Company PT Cinox Media Insani, Bandung, Indonesia. I work here since 2008 and I take responsibility as Chief of Software Architect. My job is about planning, imaginating, fantasy-ing, concepting, and build the infrastructure of the new information systems (or app engines) which going to be implemented.

This blog This is my blog that represent my current opinion, research and experiences about anything in Software Engineering. Written since 2007 (actually) and has been vaccum for a lot of while. And now I wanna ressurrect this blog (optimistically) from the long-long-hibernation with something fresh and new ideas -- still about MySQL, software engineering, development, and may be something managerial here.

About the tagline I've learned the statement above from some paper written by Kent Beck about Extreme Programming (XP) methodology -- some sort of practical software development methods which have no boundaries. That's very inspiring me a lot. I have written some article on this blog that tell my interpretation about that statement here.

My Another Blogs I have classifying my blogs into some sort of genre. The blog that you read here right now is my primary blog that tell you (majoring) about IT stuff. But if you wanna look another side of me, you can visit here, here, here,or here. Hope it'll be interesting for some of you.

Credits I would thanks to Blogger for this great blog platform. Skinpress who designed this Wordpress template (which is bloggerized by Free Blogger Templates). My appreciate is also going to you who give your generously time for visiting my blog.

4
Cara-Cara Membuka Windows Explorer

Sekian cara membuka Windows Explorer:
  1. Start Menu -> Accessories -> Windows Explorer
  2. Bikin shortcut Windows Explorer di desktop atau di Quick Launch trus buka dari sana
  3. Win Key + E
  4. Klik Kanan Start Menu trus pilih Explore
  5. Klik Kanan My Computer trus pilih Explore
  6. Klik Kanan Recycle Bin trus pilih Explore
  7. Win Key + R trus ketik explorer
  8. Dobel klik My Computer trus setelah muncul window, aktifkan navigation pane
  9. Pakae Internet Explorer trus tulis path file kita seperti biasa
  10. Klik menu menu "My Document" atau "My Pictures" di start menu, toh semuanya juga bakal nge-launching Windows Explorer
  11. Win Key + R trus ketik cmd trus ketik explorer
  12. Start Menu -> Accessories -> Command Prompt trus ketik explorer
  13. Lupakan Windows Explorer, aku lebih suka nge-browse file pakai ACDSee
  14. Tambahkan windows explorer di start-up program trus untuk membuka windows explorer lakukan dengan cara restart komputer!
Yang manakah Anda?

4
Batch Script Generator untuk Backup Database

Jalankan ini di console query mysql client kesayangan anda:

set @path_backup = 'D:\\backup\\';
set @sv_host = '192.168.10.121';
set @sv_port = '3306';
set @sv_uname = 'root';
set @sv_pwd = '123123';

select * into outfile 'D:\\script_batch_mysqldump.bat'
lines terminated by '\n'
from
(
select concat('mysqldump --host=',@sv_host,' --port=',@sv_port,' -u',@sv_uname,' -p',@sv_pwd,' --add-drop-table --max_allowed_packet=1GB --routines --triggers --quote-names -E --no-data ', db.schema_name ,' > ',@path_backup, 'structure_',db.schema_name,'.sql') as syntax from information_schema.schemata as db where db.schema_name not in ('information_schema','mysql','test')

union

select concat('mysqldump --host=',@sv_host,' --port=',@sv_port,' -u',@sv_uname,' -p',@sv_pwd,' --add-drop-table --extended-insert --hex-blob --max_allowed_packet=16GB --lock-tables --no-create-db --no-create-info --quote-names --order-by-primary --dump-date ',db.schema_name,' > ',@path_backup, 'data_', db.schema_name,'.sql') as syntax from information_schema.schemata as db where db.schema_name not in ('information_schema','mysql','test')
) as script;


sesuaikan value dari variabel-variabel yang ada di SET itu dengan informasi koneksi yang benar.
trus sesuaikan juga OUTPUT PATH dari file bat yang akan di-processing (yg gw kasih font warna merah di atas)

setelah itu di-eksekusi, NISCAYA akan di-hasilkan sebuah file BAT di directory di server untuk langsung segera di-eksekusi untuk nge-generate script backup SEMUA DATABASE kita ke dalam 2 file utk masing-masing database, yaitu struktur saja atau data saja.

Kalo yang "struktur" saja, itu isinya:
  1. DDL untuk create table
  2. script stored procedure/function, kalo ada
  3. script pembentuk trigger, kalo ada
  4. script pembentuk events, kalo ada
Sedangkan kalo yang "data" saja, itu isinya dump-dump-an isi data dalam database kita. Sengaja dipisah karena mungkin kita ingin merubah struktur entah create table/routines/dll (mengedit file *.sql -nya menggunakan notepad/text editor) tanpa perlu merubah data. Tentunya beban untuk meng-edit script struktur saja akan lebih ringan ketimbang kalo dicampur dengan script data.

Masalah lainnya yang bisa dicegah dengan memisahkan dump2an data dengan struktur ini adalah RUSAKNYA DATA. Kalo data kita berbentuk binary, atau dibentuk dengan character set khusus (memakai tulisan arab, misalnya) -- seandainya dibuka di editor yang sifatnya nggak I18N-aware (notepad, contohnya), InsyaAllah script dump2an data tersebut akan rusak. Dengan memisahkan script dump2an struktur dan data secara terpisah, setidaknya kita nggak perlu ngebuka data.sql kalo emang nggak penting2 amat untuk menjaga eksistensi data tersebut.

oke, silakan dicoba.


atau kalo mau, adopsi query-query select gw utk nge-build generator sendiri pake bahasa-bahasa pemrograman andalan anda...