Jumat, April 29

cara LOAD data ke MYSQL


 saya mau berbagi informasi nih tentang load data, apa sih itu load data???
 mungkin sebagian dari kalian masih belum tau apa itu load data, oke CEKIDOOOOOOOOT....

LOAD DATA itu adalah memasukan data yang berbentuk .CSV, atau .TXT ke dalam table yang ada di database.
ini nih cara LOAD datanya:

1. create Database contoh "DB_aryani"
2. copy Schema dan data yang akan diload pada direktori "/Source"
3. setelah itu masuk PUTTY dan running MYSQL dengan cara "/opt/mysql/mysql/bin”. Start the database by typing: “./mysqld_safe --datadir=/opt/mysql/mysql/data --user=mysql &”. 
4. Setelah itu masuk ke database dengan cara "use DB_aryani"
5. dan ketikan perintah "load data local infile (nama direktory dan nama file) into table (nama table) fields terminated by (pembatas data).

for example : load data local infile '/source/cr_agg.agg_process_log.csv' into table process_log fields terminated by ',';

6. setelah query ok maka dilihat dengan "select * from process log;"


7. sebelum kita ngeload data sebaiknya kita cek dulu jumlah datanya dengan cara "wc -l (nama file) e.g : "wc -l process_log;"

*kalo mau load data pada data misalnya diperisahaan jangan langsung ke table yang benernya tapi lakukan pada table temporary dulu setelah datanya valid maka load data pada table yang benernya..

"SELAMAT MENCOBA" 

Kamis, April 28

install JDK di FEDORA

1. Copy JDK, JDK.sh dan JDK .csh  ke home pada linux
2. Buka Putty dan masuk sebagai "root"
3. Masuk ke home dengan cara "cd /home"
4. lihat dengan cara "ls"
5. dan extract JDK dengan cara "#sh jdk-6u21-linux-i586.bin"
6. dan lakukan perintah dibawah ini
#mkdir /usr/local/jdk
#mv  jdk1.6.0_21 /usr/local/jdk/jdk1.6.0_21
#ln -s /usr/local/jdk/jdk1.6.0_21/ /usr/local/jdk/java
#cp jdk.csh /etc/profile.d/
#cp jdk.sh /etc/profile.d/
#cd /etc/profile.d
#vi jdk.csh  sesuaikan folder environment   /usr/local/jdk/java
#vi jdk.sh    sesuaikan folder environment   /usr/local/jdk/java
#reboot

7. Setelah di Reboot cek dengan cara "#java -version"
maka akan tampilan seperti :



Rabu, April 27

install ORACLE on SOLARIS

ORACLE 11g R2 Solaris x86_64 Installation Guide on Solaris 10 u9 x86_64

1. Prerequisite Installation

a.       RAM min 4G
HDD min 3.73 for Software and 1.48 for Data Files (Standard edition)
b.      JRE or JDK file version 1.5 or above.
By default, Solaris 10 u9 has installed java on the system.
For example, the following is the java version on 192.168.1.51
# java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
c.  Package Requirement files
Install package files as follow with the command :
       #pkgadd –d . package_directory_name
The followings are the Package files to be needed by Oracle 11g R2 installation.

SUNWarc                    ready installed
SUNWbtool                  ready installed
SUNWhea                    ready installed
SUNWlibC                   ready installed
SUNWlibm                   ready installed
SUNWlibms                  ready installed
SUNWsprot                  ready installed
SUNWtoo                    ready installed
SUNWi1of                   ready installed
SUNWi1cs (ISO8859-1)       need to be installed from DVD OS Source folder “Products”
SUNWi15cs (ISO8859-15)     need to be installed from DVD OS Source folder “Products”
SUNWxwfnt                  ready installed
SUNWcsl                    ready installed

The Package files can be found in folder “product” of  DVD Solaris 10 u9.
To determine the package is installed on the system, use the following command
#pkginfo –i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibms SUNWsprot
#pkginfo -i SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

d.      Patches Requirement files
Install patches files as follow with the command :
       #patchadd –M patch_id
The followings are the Patchesfiles to be needed by Oracle 11g R2 installation.

120754-06: SunOS 5.10_x86 libmtsk
119961-05: SunOS 5.10_x86: Assembler
119964-14: SunOS 5.10_x86 Shared library patch for C++_x86
137104-02
139575-03
139556-08
141445-09 (11.2.0.2)
141415-04

The patches usually is ready installed on Solaris 10 u9, but if not installed, you should have from Oracle – Solaris support.
To determine the package is installed on the system, use the following command
# /usr/sbin/patchadd -p | grep patch_number(without version number)
# /usr/sbin/patchadd -p | grep 120754
 
I.                   2. Oracle 11gR2 Installation
Login as root into Solaris 10 u9.
Add group installation and dba
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
Add user oracle
If user oracle exist please check by command:
# /usr/sbin/usermod -g oinstall -G dba oracle

If user oracle doesn’t exist please type the following command:
# useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle
# mkdir /export/home/oracle
# chown oracle:oinstall /export/home/oracle
# passwd -r files oracle
Login as “oracle” user into Solaris 10 u9.
# su - oracle
Copy the zip installation file  :
“solaris.x64_11gR2_database_1of2.zip & solaris.x64_11gR2_database_2of2.zip” into oracle home directory:  export /home/oracle
Use WinSCP to copy zip file from your windows xp into oracle home directory

Unzip the zip installation file :
$ unzip solaris.x64_11gR2_database_1of2.zip
$ unzip solaris.x64_11gR2_database_2of2.zip

You will have “database” folder containing the installation oracle files.

Login as root into Solaris 10 u9.
Edit and Setup Kernel Parameter, bu use the project to configure kernel parameter, it will impact to /etc/system file
#projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" oracle
#projmod -sK "project.max-sem-nsems=(priv,256,deny)" oracle
#projmod -sK "project.max-sem-ids=(priv,100,deny)" oracle
#projmod -sK "project.max-shm-ids=(priv,100,deny)" oracle

# cat /etc/project

Verify resource control is actived
# su - oracle
$ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba)
$ prctl -n project.max-shm-memory -i process $$
$ exit

Make Folder installation and change the directory the permission to “oracle” user software
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle

# mkdir -p /u02/oradata
# chown -R oracle:oinstall /u02/oradata
# chmod -R 775 /u02/oradata
Login as “oracle”user by type :
# su - oracle

Edit and setup your profile (bash profile)
$ vi .bash_profile
Add the following line into .bash_profile file
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_home; export ORACLE_HOME
ORACLE_SID=sales; export ORACLE_SID
PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/export/home/oracle/database:$ORACLE_HOME/bin

Relogin as “oracle” user to get an effect from .bash_profile.
$ exit
# su - oracle

Set DISPLAY variable on the local or remote machine
$ export DISPLAY=local_host:0.0

$ export  192.168.1.57:0.0       
  à if installed through server/local machine
$ export  192.168.1.222:0.0
  à if installed through remote (using xManager remote desktop)

Now to enable X applications, run the following commands on the other terminal winndows of the local computer:
# login: root
# xhost +

Install the Oracle Database by type the following command:
$cd database
$pwd
/home/oracle/database
$./runInstaller



Selasa, April 26

cara install mySQL di SOLARIS

untuk menginstall mysql di solaris ada 5 tahap :
1. Download mySQL

2. Preparation

a. login as “root”

b. ketik "#pkginfo | grep mysql" pada shell di putty untuk mengecek

c. jika ada beberapa package maka hapus dengan cara mengetikan “pkgrm

d. instalan mysql dari .gz ubah menjadi .pkg dengan cara #gunzip (nama file)

3. Installation

a. login as root

b. buat mysql group dengan cara “groupadd mysql”.

c. buat mysql user dengan cara “useradd -g mysql mysql”

d. ubahlah directory dimana mysql berada dengan cara. “cd /usr/files”

e. install dengan cara: “pkgadd -d mysql-standard-xxx.pkg”

f. untuk mengecheck mysql berada “/opt/mysql/mysql”.

g. ubah directory dengan cara /etc/init.d dan edit "mysql" . dengan mengganti nama menjadi "datadir=/opt/mysql/mysql/data".

h. setelah itu ketik “chown -R mysql:mysql mysql”.

4. Initiallizing the Database

a. pada root ketik : “su mysql”.

b. ubah the working directory to “/opt/mysql/mysql/scripts” by typing: “cd /opt/mysql/mysql/scripts”.

c. Execute the mysql_db_install script by typing: “./mysql_install_db --user=mysql --ldata=/opt/mysql/mysql/data”.

d. Change the working directory to "/opt/mysql/mysql/bin”.

e. Start the database by typing: “./mysqld_safe --datadir=/opt/mysql/mysql/data --user=mysql &”.

5. Connecting to MySQL

a. Try to connect to the MySQL database by typing “mysql” as the root user. You should be able to see the “mysql>” prompt for the successful connection.

Senin, April 4

Diam diam diam…

yah hanya begitulah yang aku bisa, menahan emosi ku dengan diam, tanpa bisa berkata apapun untuk meluapkan semua perasaan ku saat marah,

Kadang aku menjaga perasaan ku untuk menjaga perasaan orang lain,
tapi apa orang lain seperti itu kepada ku?

kadang aku menjaga perkataan untuk menjaga perasaan orang lain tapi apa orang lain melakukan hal yang sama untuk menjaga perasaan ku?

kadang aku mengalah untuk orang lain,yang akhirnya harus mengorbankan perasaan aku sendiri, tapi apa orang lain akan melakukan itu untuk ku???

Apa orang lain menjaga perasaannya dan menjaga perkataannya untuk menjaga perasaan ku????

Kehidupan ini begitu egois dimana orang lain hanya memikirkan perasaannya sendiri mementingkan kebutuhannya sendiri,
Lelah, Jenuh, Bosan dengan hal seperti ini. Haruskah memulai untuk TIDAK lagi menjaga perasaan orang lain dalam hal apapun????