TELKOM
NIKA Indonesia
n
Journal of
Electrical En
gineering
Vol.12, No.6, Jun
e
201
4, pp. 4528 ~ 4
5
3
5
DOI: 10.115
9
1
/telkomni
ka.
v
12i6.539
2
4528
Re
cei
v
ed
De
cem
ber 2
7
, 2013; Re
vi
sed
Febr
uary 23,
2014; Accept
ed March 9, 2
014
Application of Resource Migration on Housing Fund
Archives System
Chan
gxing Qi
Soft
w
a
re Co
lle
ge, Shen
ya
n
g
Normal U
n
iv
ersit
y
, She
n
y
an
g
,
Liaon
in
g, 110
031, Ch
in
a
e-mail: qic
x
@1
63.com
A
b
st
r
a
ct
T
h
is pa
per a
n
a
ly
z
e
s th
e fe
ature a
nd n
e
c
e
ssity of reso
urce
migr
atio
n
,
and su
mmar
i
z
e
s
the
commonly
methods a
m
on
g di
fferent systems
.
According
to t
he req
u
ire
m
ent
s of the systems in the ho
usin
g
fund
c
enter, an
arch
itecture
mode
l
b
a
se
d on
resourc
e
mi
gra
t
ion is desi
g
n
e
d
.
T
he pr
oc
ess
of
mi
grati
on, t
he
format
an
d s
p
ecificati
onof
th
e d
a
ta
packet
are
descr
ib
ed
accor
d
in
g to
the arc
h
itectur
e
l
e
vels
a
nd t
h
e
process.
After
the mi
gratio
n a
pplic
atio
n
is d
e
v
elo
ped,
the
o
perati
on
data
of
the
syste
m
are ana
ly
z
e
d
a
nd
further sugg
est
i
ons ar
e give
n.
Ke
y
w
ords
: res
ource
mi
gratio
n, data pack
e
t
format, SQLLD
R, transaction
bus
Copy
right
©
2014 In
stitu
t
e o
f
Ad
van
ced
En
g
i
n
eerin
g and
Scien
ce. All
rig
h
t
s reser
ve
d
.
1. Introduc
tion
With the dev
elopme
n
t of informatio
n techn
o
logy an
d the pop
ula
r
ity of the enterpri
s
e
informatio
n,
The
explosiv
e g
r
owth
of
data info
rmat
ion p
o
ses an
eno
rmo
u
s challen
ge to
the
manag
eme
n
t of inform
atio
n sto
r
ag
e [1]. At the sa
m
e
time, the da
ta in the e
n
terp
rise sy
ste
m
s
indep
ende
ntly becom
e isolated i
s
land
s of info
rma
t
ion. With th
e co
nstructio
n
of enterpri
s
e
informatio
n fo
r the fu
rther d
e
velopme
n
t, migratio
n an
d
sha
r
in
g of re
sou
r
ces bet
ween the
vario
u
s
hetero
gen
eo
us data a
nd fi
les an
d othe
r resource
s
be
come
an urg
ent task in th
e con
s
tructio
n
of
enterp
r
i
s
e software
system
s.
In the Ho
using Fun
d
M
anag
ement
Cent
e
r
, bu
si
ness m
anag
ement
syste
m
and
archivessyste
m
have be
en
built. Ho
wev
e
r, the
two sy
stem
s have it
s o
w
n in
dep
e
ndent d
a
taba
se
system
s an
d
softwa
r
e a
pplication
s
, informatio
n with each
oth
e
r ind
epe
nd
ent, informat
ion
sha
r
ing
can
n
o
t be achi
eved. The targ
et of the sy
stem is to imp
o
rting the dat
a and files in
the
busi
n
e
ss
syst
em to the
archive
s
sy
ste
m
, and the
mappin
g
bet
wee
n
the o
r
i
g
inal file
re
so
urces
w
i
th
r
e
la
tion
al d
a
t
a
mu
s
t
be
r
e
se
r
v
ed
. Da
ta
mig
r
atio
n
using the form of incre
m
e
n
tal import, that
is to
say,
eve
r
y day
with th
e bu
sin
e
ss
sy
stem
data i
s
update
d
, the
update
d
d
a
ta
is i
m
po
rted i
n
to
the archives
system. Since the
two sy
stems have dif
f
erent data
st
ructu
r
e
s
. The
middle pa
rt of
the data logi
c pro
c
e
ssi
ng,
particl
e
si
ze conversion,
i
s
an
impo
rtant
con
s
id
eratio
n
in the migration
p
r
oc
es
s
.
Literatu
re [2] propo
se
d the thought of hier
a
r
chi
c
al storage m
ana
gement (HS
M
), Thi
s
provide
s
a g
u
i
deline
for th
e
sol
u
tion
of th
is p
r
obl
em, h
o
w to
mig
r
ate
sto
r
ag
e reso
urces i
s
a
key
techn
o
logy in
the hiera
r
chi
c
al sto
r
ag
e m
anag
ement [3
].
This pa
per d
e
sig
n
s an a
p
p
licatio
n based on the he
teroge
neo
us
enterp
r
i
s
e da
ta and
informatio
n reso
urce
s, re
alize
s
the fun
c
tion
s of
extracting the
source d
a
ta in
to a data pa
cket,
data logic p
r
o
c
e
ssi
ng and t
he target dat
a import and
so on. As a d
a
ta migratio
n
example of the
archives sy
st
em, de
sign
s
and
reali
z
e
s
a mig
r
ation
a
pplication
wit
h
op
en i
n
terf
ace
s
and
e
r
ror
correction capabilities
for
information resources.
2. Method
Curre
n
tly, data migratio
n commonly u
s
e
d
method
s are the followin
g
:
1) Cu
stom-deve
l
oped
p
r
og
ra
m.
Establish
conne
ction
s
to t
he source datab
ase
and target
databa
se,
ret
r
ieve the
data
from the
sou
r
ce
data
b
a
s
e
one by
one
a
nd in
se
rt it into the ta
rget
databa
se, thi
s
meth
od i
s
l
e
ss suitable f
o
r d
a
ta log
g
i
ng o
r
de
skto
p datab
ase
migratio
n. Th
is
method is
sui
t
able for data
migratio
n of
data-le
ss
re
cording or d
e
skt
op datab
ase.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Applicatio
n of Resource Mi
gration o
n
Ho
usin
g Fund A
r
chi
v
e
s
Syste
m
(Chang
xin
g
Qi)
4529
2)
Import and
e
x
port com
p
o
nents of the
databa
se.
Su
ch a
s
O
R
ACLE import an
d export tool
s,
export the
o
b
ject
s fro
m
source
datab
a
s
e, a
nd im
po
rt the b
a
cku
p
data file
s int
o
the ta
rget
databa
se. Th
is metho
d
is
suitabl
e iso
m
orphi
c d
a
tab
a
se a
nd the
stru
cture of the databa
se
table is ba
si
cally con
s
iste
n
t
.
3)
Features
of the datab
ase.
Such a
s
the
use of O
r
a
c
le databa
se
pipeline te
ch
nology. Thi
s
method i
s
ap
plica
b
le to h
o
moge
neo
us databa
se
a
n
d
the And t
he sta
b
ility of the netwo
rk
environ
ment
must be gu
aranteed.
4)
The thi
r
d
pa
rty middle
w
a
r
e. in
crea
sin
g
re
al
-time data import, suc
h
as
MQ
of IBM.This
method is a
p
p
lica
b
le to the ca
se of the data volume i
s
not very large scale.
5)
Processin
g
compon
ents o
f
database.
Such
a
s
SQLLDR of ORACLE.Export
ed the sou
r
ce
data in text mode, after technical pro
c
e
s
sing,
impo
rt the data into the target dat
aba
se.
6)
Special
soft
ware. Such
as IBM IBM DB2 Mi
g
r
at
ion Tool
kit, this tool i
s
usu
a
lly the
developm
ent of databa
se vendo
rs a
nd e
x
pensive.
7)
Migratio
n software devel
op
ed pe
rsonali
z
ed. It is
u
s
ual
ly busin
ess-o
r
ient
ed
pe
rso
nalized, an
d
the developm
ent cycle i
s
lo
ng.
In this
syste
m
, sin
c
e th
e
file data g
e
nerat
e
d
eve
r
y day, it is n
e
ce
ssary to
adopt a
n
increme
n
tal a
ppro
a
ch to mi
grate d
a
ta. In
acco
rdan
ce
with the
requi
reme
nts of th
e hou
sin
g
fu
nd
busi
n
e
s
s sy
stem, the
syste
m
mu
st extra
c
t ne
w
dat
a
a
nd .jpg
files f
r
om bu
sin
e
ss
system
s eve
r
y
day to form
of the migration pa
ckag
e, this sy
stem
will lea
r
n fro
m
the ab
ove
fifth method
and
combi
ne with
the cha
r
a
c
teri
stics of the
system to desi
gn the softwa
r
e sy
stem.
3. Requirem
e
nts
In the ho
usi
n
g fund
bu
sin
e
ss
system,
the
data
nee
d to be
mig
r
ated to the
archives
system i
n
clu
de rai
s
e
fun
d
s d
a
ta, oth
e
r
warrant
s
data, pe
rso
n
a
l loan
s d
a
ta
, loan can
c
el
the
accou
n
t data,
entru
st ban
k divert data,
Borro
we
r
info
rmation ch
an
ges data,
loa
n
peri
od sho
r
ted
data, loan ex
tensio
n data,
the mortga
g
o
r informatio
n cha
ngin
g
d
a
ta, Collate
ra
l chan
ging d
a
ta
and
so
on. E
a
ch
data i
n
cl
ude
s relation
al data
st
o
r
e
d
in a
data
b
a
se
table
an
d the
asso
ci
ated
pictures. In th
e archives
sy
stem, ea
ch b
u
sin
e
ss
data
store
d
in a ta
ble, and the
r
e are two tabl
e
s
whi
c
h saves the pictures information
asso
ci
ated
with the data table, one hold
s
sum
m
a
ry
informatio
n o
f
the pictures, the
other h
o
lds the
deta
il informatio
n
of the pictures. The
r
efo
r
e,
durin
g the d
a
ta migration
pro
c
e
ss, it m
u
st ta
ke the relevant bu
sin
e
ss data a
g
g
r
egated into
o
n
e
table firstly, and this is n
e
ce
ssary to en
sure data inte
g
r
ity, accu
ra
cy and co
nsi
s
te
ncy.
4. Design
The de
sign
inclu
d
e
s
the
system structure,
pro
c
ess de
scripti
on, tran
sacti
on bu
s,
monitor wind
ows,data
spe
c
ificatio
n,
packet format,co
mmuni
cation
proto
c
ol.
.
4.1. Sy
stem
Structure
Followi
ng Fig
u
re 1 is the o
v
erall structu
r
e of the syste
m
.
Figure 1. System Structure
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 6, June 20
14: 4528 – 4
535
4530
4.2. Process
Descrip
tion
From the Fig
u
re 1, we
can
see
that the stru
cture co
ntains
six layers: The first is
sou
r
ce
data laye
r, it
save
s h
o
u
s
in
g fund
day
-to
-
day
pro
d
u
c
tion d
a
ta a
n
d
i
m
age
files; th
e second
lay
e
r i
s
data extra
c
tio
n
layer, it
co
nsi
s
ts
of two
functio
n
s, o
ne is extra
c
ti
ng data
into
the txt files from
databa
se
by ORACLE SQ
LPLUS a
c
cording to the
specifie
d form
at, the other i
s
copying im
age
files: define the dire
cto
r
y named
with the archive
s
numbe
r an
d c
opy the ima
ge files into the
dire
ctoryo
rga
n
ize
d
by dat
e. Since
pro
ductio
n
sy
ste
m
and th
e a
r
chive
s
sy
ste
m
is lo
cate
d
in a
different lo
cat
i
on, this layer is depl
oyed
on the serv
e
r
of busin
ess
system; the t
h
ird laye
r is d
a
ta
comm
uni
cati
on layer. A
c
cordin
g to a
gi
ven data tran
sfer
proto
c
ol,i
t transmit
s
th
e data p
a
cket
to
the archive
s
system; the
fourth laye
r is logi
ca
l
p
r
ocessin
g
la
yer. Its main
function i
s
to
decomp
r
e
ss
packet
s
re
cei
v
ed and com
p
lete data fo
rmat validation, and given rule
s ne
ce
ssary
logical pro
c
e
ssi
ng; the fifth layer is d
a
ta impor
t la
yer. Acco
rdin
g to the information of th
e
pro
c
e
s
sed d
a
ta and ima
ge files, it generate the
CTL file
s to control the i
m
port p
r
o
c
e
s
s of
ORACLE by
SQLLDR [6].
The d
a
ta in te
xt files are
imported into the arc
h
ives
s
y
s
t
em data table.
And the pict
ure
s
are cop
y
to the serv
er, whi
c
h a
r
e
saved in th
e dire
ctory n
a
med by current
date.so the relation bet
we
en the data a
nd the pictu
r
e
s
are b
u
ilt; the last layer is target datab
ase
layer whi
c
h
saves the data
and pictu
r
e
s
of the archivessy
stem [4-6]
.
4.3. Transac
tion Bus
While the
sy
stem is
run
n
i
ng, the wh
o
l
e
pro
c
e
s
s is a unified transactio
n
including
extracting
dat
a, gene
rating
data pa
cket, comm
uni
cati
on, un
zip, lo
gical
pro
c
e
ss, data impo
rt. If
probl
em
s hap
pen du
ring a
n
y
steps, the whol
e pro
c
e
s
s will be rollb
ack, this mea
n
s the op
erati
on
failed.It need to restart the proc
ess.It
ensures data integrity and
security duri
ng
data mi
gration
p
r
oc
es
s
.
4.5. Monitor
Windo
w
s
The sy
stem p
r
ovide
s
thre
e monitori
ng int
e
rfac
e: log m
onitor, exce
ption remi
nd m
onitor,
dynamic runn
ing p
r
o
c
e
s
se
s m
onitor.
At the
sam
e
ti
me, the
co
nfigure
file
ca
n
be exa
m
ined
to
regul
ate the system.
4.6. Data Sp
ecifica
tion
The data that
the archives system ne
e
ded is
cla
ssif
i
cated a
nd coded a
s
Ta
ble 1, In
the migration
packet, the
d
a
ta filesa
re
saved a
s
a TX
T text, the first three le
tte
rs of the file na
me
are
define
d
b
y
the ID which have
be
en
given in
the
Table
1. Different en
codin
g
co
rrespon
ds
to
different data
tables.
Table 1. Data
File Encodi
n
g
ID Content
D02
raise funds data
L04 other
w
a
rran
t
s
data
L08
personal loans data
L09
loan cancel the account data
L10
entrust bank divert data
L11
borro
wer infor
m
a
t
ion changes data
L12
loan period short
ed
L13
loan extension d
a
ta
L14
the mortgag
or inf
o
rmationchangin
g
data
L15
collateral changing data
D02
raise funds data
4.7. Packet F
o
rmat
The form
at of migration d
a
ta packet is
as Figu
re 2.
In the target databa
se, th
e tables in
clu
de
rai
s
e fund
sinformation,
loan informati
on and
so o
n
. And e
v
ery type of data contain
s
three t
abl
es:
data table,
pictures
su
m
m
ary table
a
n
d
pictures d
e
ta
il table .In the pictu
r
e
s
detail tabl
e, all kind
s of pictures
info
rmation su
ch
as
photo
c
opy
s o
f
the hou
se p
r
ope
rty ce
rtificate a
nd id
e
n
tity card a
r
e
recorded in i
t. So the packet
comp
ositio
n are de
sig
ned
as follo
w:
1)
All summa
ry informatio
n of the pictur
es a
r
e re
co
rde
d
in the ScanFli
esNum.txt.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Applicatio
n of Resource Mi
gration o
n
Ho
usin
g Fund A
r
chi
v
e
s
Syste
m
(Chang
xin
g
Qi)
4531
2)
All detail information of the pictur
es a
r
e reco
rde
d
in the ScanFil
es.t
xt.
3)
All picture
s
are save in the
folder
which is name
d
with
archive
s
nu
mber.
Data informat
ion as
saved i
n
the text
file
s named with two part
s
:ID+yyyymmdd.txt, and
the ID is defin
ed in Table 1.
Figure 2. Dat
a
Packet Format
4.8. Communication Protocol
DataFla
g
.txt is the
d
a
ta
co
mmuni
cation
interfac
e, a
n
d
co
mpo
s
ition
of the file
is d
e
sig
ned
as Figu
re 3.
Figure 3. Co
mpositio
n of DataFla
g
.txt
The p
a
cket
communi
catio
n
process i
s
achi
eved
by i
dentificatio
n
of three
ele
m
ents i
n
DataFlag.txt.
1)
Flag: if the value of it is
0,it means th
e data p
a
cke
t
has b
een
re
ceived
su
cce
s
sfully. On the
contrary if the value of it is
1, it means fa
ilure.
2)
File: the nam
e of the data packet.
3)
Infor: the pro
m
pt informati
on.
5. Realiz
ation
In this pap
er, the system
is de
sign
ed
and realize
d
for data m
i
gration
between the
archives
syst
em and the b
u
sin
e
ss sy
ste
m
. The ta
rget
databa
se is
ORACLE 9I.The task of the
system
is extracting
data
from
sou
r
ce
da
tabase a
n
d
transmit
the
co
mpre
ssed
dat
a pa
ckets fro
m
the busi
n
e
ss
system to a
r
chives
sy
stem.
After deco
m
pre
ssi
on t
he
data are processed a
c
co
rd
ing
to spe
c
ified
busi
n
e
ss
rule
s. And in a
c
corda
n
ce
with
the set of in
sinu
ate rel
a
tionship bet
we
en
sou
r
ce d
a
ta a
nd target d
a
ta, the oracl
e
data
imp
o
rt
control file
s a
r
e
gen
erated. Then acco
rdi
n
g
to the
cont
rol
file. Use
the
co
mpo
nent
s of O
R
AC
LE’s SQ
LL
DR to
pe
rform
dat
a files imp
o
rti
n
g
operation [6].
5.1. Interfa
c
e
Modules
These mod
u
l
e
s are used to operate
the
application for the u
s
ers.
1)
Config
ure fil
e
: Set the system ope
rat
i
ng pa
ramete
rs a
nd
sou
r
ce data to a
target data
mappin
g
rule
s, sta
r
t this p
r
og
ram
(this
prog
ram
can
also
be
set to starte
d at
a pa
rticular
time
)
,
s
u
ch
as
th
e
us
er
n
a
me
an
d
p
a
s
s
w
o
rd
of
data
base, the
directory
of the
data p
a
cket,
the dire
ctory
of log file and control files,
the directo
r
y of zip appli
c
a
t
ion prog
ram
files.
2)
Log files: Qu
ery the log files in
cludi
ng
w
hole
re
cords,in
clud
e the time and o
peratio
n an
d
prom
pt messege informati
on.
3)
List of datapa
cket: Query a
ll data
packet
files whi
c
h h
a
ve been mig
r
ated.
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 6, June 20
14: 4528 – 4
535
4532
4)
SQLLDR l
og:
Que
r
y the i
n
formatio
n th
at
the data
b
a
se
gen
erate
d
du
ring th
e
pro
c
e
s
s of
import data b
y
ORACLE S
Q
LL
DR.
5)
MidFile
s: Qu
ery the files
whi
c
h ge
nera
t
ed duri
ng th
e pro
c
e
s
s of migratio
n, su
ch a
s
control
files, unzi
p
files. If the pro
c
e
ss of mig
r
a
t
ion
has
su
cceed, these files will b
e
del
eted. So the
function of thi
s
modul
e is e
rro
r co
rrectio
n
referen
c
e.
5.2. Core Fu
nctions
The prim
ary functio
n
s in the appli
c
atio
n as follo
wing
:
1)
The fun
c
tion of WriteSysL
og is
to Gen
e
r
ate the sy
ste
m
log files.
function Write
SysLog
(key:
stri
ng;
conten
t: string): bool
ean;
function Write
SysLog
(key:
stri
ng;
conten
t: string): bool
ean;
var
dates, date: string;
MyIniFile: TIniFile;
begin
try
try
dates
:=
For
m
at
D
a
teTime(
'
yyyy-
MM-
D
D
hh:mm:
ss
AM/PM', N
o
w
)
;
date :=
For
m
at
D
a
teTime(
'
yyyyMMD
D
'
,
N
o
w)
;
dates
:=
'Time
:
' +
dat
es;
MyIniFile
:=
TIniFile.
C
reate(In
clud
eT
railingB
ackslash
(Get
Cu
rre
ntDir)
+
d
a
te
+ 'DataSysLo
g.ini');
MyIniFile.
WriteString(dates
,
k
e
y, c
o
ntent);
except
end;
finally
My
IniFile.Free;
end;
Res
u
lt :=
true;
end;
2)
The fu
nctio
n
of ZipPross i
s
to
Zi
p o
r
u
n
zip
the
data
pa
cket rar files,an
d g
ene
rate
the dire
ctory of the data files.
f
un
ction ZipP
ross(key: integer; Zip
N
ame
:
string
;
): bo
olean;
try
Command
:= RarExtPath + '
x -ep1
-y ' +
Data
From
+ '\'
+
LB_Rar.Items.Strings
[LB_Rar.iteminde
x] +
' ' +
HandDataTrans
+
'\';
if winexec(pch
ar(Comm
and), sw_
h
id
e) <= 31 the
n
begin
RichEdit1.Lines.Add('al
ert'
+
LB
_Rar.Item
s
.Strings[LB_Rar.itemindex] + '
failure
,
t
r
y again!');
UpdateDataFlag(leftstr(LB_Rar
.Item
s
.Strings[LB_Rar.itemi
ndex], 4), '1',
LB_Rar.Items.Strings[LB_Rar.it
emi
ndex], 'unzip failure');
WriteSysLog('file:'
+
LB_
R
a
r
.
Items.String
s
[LB_Ra
r.itemi
ndex], 'un
zip
failure
!
');
exit;
end
els
e
begin
RichEdit1.Lines.Add('fil
e
:
'
+
LB_Rar.Item
s
.Strings[LB_Rar.itemindex] +
'
unzi
p
su
cce
s
s
!
')
;
WriteSysLog('File'
+
LB_
R
a
r
.
Items.String
s
[LB_Ra
r.itemi
ndex],
'un
zip
su
cc
es
s
!
')
;
end;
except
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Applicatio
n of Resource Mi
gration o
n
Ho
usin
g Fund A
r
chi
v
e
s
Syste
m
(Chang
xin
g
Qi)
4533
on E: Exception do
begin
WriteSysLog('file:'
+
LB_Rar.Ite
ms.
S
trings[LB_Rar.it
emindex], 'Exception
!
' +
'Nam
e:' + E.ClassName
+ #13#10 + 'Infor:' +
E.Message
);
RichEdit1
.
Lines.Add
('Al
ert
:
file '
+
LB_Rar.Items
.
S
tri
ngs
[LB_Rar.itemindex] +
'unzi
p
Failu
re
!!
' + '
N
am
e:' + E.ClassName
+ #13#10 + 'Infor:' +
E.Message
);
exit;
end;
end;
3)
The functio
n
of WriteCT
L
F
ile is to Ge
nerate the
control files to
handle SQL
L
DR
operation.
function Write
CTLFil
e(ImpF
ileNam
e
:
stri
n
g
; TableNam
e: string
): Integer;
var
Filename: st
ring;
f:
TextFile;
a: integer;
s:
st
ring;
begin
try
Filename := DataT
r
an
s
+ '\' + 'CTLO
p
erate.CTL';
AssignFil
e(f, Filename
)
;
if FileExists(Filename) then
Res
e
t(f)
els
e
Rewrite(f);
Append(f);
Writeln(f, 'load data'
);
Writeln(f, 'infile ' + '''' + ImpFile
Name
+ ''''
);
Writeln(f, 'appe
nd into table TABLENAME');
s:= 'fields
terminate
d
by ' + ''',''' + '(
GDH ,YWLX ,';
s
:
=
s
+
' B
M
, MC , SL ) ' ;
Writeln(f,
s
);
Clos
eFile(f);
WriteSysLog('CT
L
File
Gene
rate succe
s
s',' CTL
O
perate.
CTL'
);
a :=
0;
except
WriteSysLog(' CTL
F
ile
Generate Fai
l
ure', CTLO
p
e
rate.CTL'
)
;
Clos
eFile(f);
DELETEFILE(DataTra
ns + '\' +
CTL
O
perate.CT
L'
);
a :=
1;
end;
end;
The addtio
nal
funtions:
1) function
Data
Extract(
key: integer):st
ring
;
Extract data from source d
a
taba
se an
d gene
rate the
data pa
cket.
2) function
Upd
a
teDataFl
ag
(Key1:
string;
Key2: s
t
ring; Key3: s
t
ring; k
e
y4: s
t
ring):
boole
an;
Update the elements
in the DataFlag.txt file.
3) pro
c
ed
ure
MyCopyFile
(F
ro
mDir, To
Dir:
string
);
Tran
smit the i
m
age files to
target directo
r
y.
4)
function L
oop
tar(Data
Com
e
: string
): integer;
Get all files in
the current di
recto
r
y:Data
Come
5) function
Proces
sData(Data
Come: string
):
integer;
Che
c
k and h
andle the d
a
ta from data p
a
cket.
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 6, June 20
14: 4528 – 4
535
4534
6) function
Upd
a
teFilist(Co
ntent: string
): boolea
n;
Update filelis
t
in the tarfilelis
t.txt
5.3. SQLLDR
SQLload
er is one of the importa
nt tools of Or
a
c
le to
migrate data
between the
different
databa
se
sy
stem, it
can
migrates
th
e data
sto
r
e
d
in text fo
rmat sm
oothl
y into the
oracle
databas
e
by
us
ing the SQLLDR
c
o
mmands
.It inc
l
udes
t
w
o
parts
,the one is
the c
o
ntrol files
and
the other is th
e SQLLDR comman
d
s for
excuting.
The co
ntents
of the control file as follow:
1)
load data: ide
n
tifier or com
m
and
s of the control file
infile‘XXXX.T
X
T' –the name of the data txt file.
2)
appe
nd into table Tabl
eNa
m
e:appe
nd reco
rd
s into the databa
se, it can in
clud
e
appe
nd, insert, replace a
n
d
truncat
e.
3)
fields termi
n
a
t
ed by',' : field
interval in file.
(id,username,
password,.....
.j):
c
o
lumns
in the database.
The form
at of SQLLDR co
mmand
s for e
x
cuting a
s
follow:
SQLLD
R US
ERID=
Use
r
Nam
e
/ Pass
w
o
r
d
@ Sidlo
g
= logfile C
O
NT
ROL
=
CT
LFile;
The
UserNa
me, Password and Si
d is t
o
log o
n
the
databa
se
and
logfile is to
reco
rd th
e
migratio
n an
d the CTLFil
e
i
s the co
ntrol
file.
5.4. Trigger in ORACLE
In the files system, each table's p
r
ima
r
y key
is comple
ted by the se
quen
ce in O
r
acle; in
data
tabl
e, some sp
eci
a
l fields, su
ch
as date
of
o
peratio
n, o
p
e
r
ator,
and
so
me id
entificat
ion
field, will
be
set d
e
fault v
a
lue. T
he
assignm
ents
of
thesea
re
co
mpleted
by i
n
se
rt t
r
igg
e
rs in
ORACLE. When the sy
ste
m
import the
data into t
he target data
b
a
s
e, the triggers are executed
.
6. Conclusio
n
This prog
ram
can en
sure the resource
data
migrati
on betwe
en the archives
system
and th
e b
u
si
ness
syste
m
for th
e h
o
u
s
ing
fund.
It
ru
ns sta
b
ility now an
d
has the val
u
e of
popul
ari
z
atio
n. Mea
n
while
, with th
e o
p
e
ration
of th
e sy
stem, th
e data
p
a
cke
t
increa
se
s, t
he
spe
ed of the system ope
ration is also grad
ua
lly slo
w
ed do
wn, found by the analysi
s
of the
operating
dat
a
,
The
ru
n ti
me of th
e
system, in a
dditi
on to
the
rel
a
tionshi
p
with t
he
system
to
the
hard
w
a
r
e
co
n
f
iguration, b
u
t also
with m
a
ny elem
ent
s [
7
]. Set the executio
n time
of an ele
m
e
n
t
as ti,and the prop
ortio
n
of the element a
s
ai
,and the final time is sh
own a
s
form
u
l
a (1):
i
m
i
i
a
t
T
1
(
1
)
From the A
n
alysis,the
ca
p
a
city and o
r
g
anizati
on of the data p
a
cket itself are t
he mo
st
importa
nt ele
m
ents to affe
ct the
speed of
system ru
nning.
As sh
ow
n in
Figu
re 4, with the
data
packet
size i
n
crea
se
s, the
time need
ed
to run the
system nonli
n
ear
slo
w
ed
d
o
wn. Me
an
while
,
whe
n
choo
se
the ba
sic
da
ta packet
s
at
the sam
e
ca
pacity, but th
e numb
e
r
of data files
of the
packa
ge is dif
f
erent, the more nu
mbe
r
s
,
the slo
w
er t
he syste
m
is
runni
ng, as Fi
gure 5.
As
a
res
u
lt,to improve ef
fic
i
enc
y
,
it is a metho
d
to re
du
ce d
a
ta pa
cket si
ze or th
e
numbe
r of txt files in the
d
a
ta pa
cket. This al
so
req
u
i
r
es to de
sign
better alg
o
rit
h
ms to
red
u
ce
data re
dun
da
ncy, while ta
king advanta
g
e
of the pr
o
c
edure of data
base to impro
v
e the efficie
n
cy
of the system
.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Applicatio
n of Resource Mi
gration o
n
Ho
usin
g Fund A
r
chi
v
e
s
Syste
m
(Chang
xin
g
Qi)
4535
Figure 4. Rel
a
tion of Time and Capa
city
Fi
gure 5. Rel
a
tion of Time and Numbe
r
s of
Files
Referen
ces
[1]
Gibson T
,
Miller EL, Long D
D
E
l.
Long-t
e
rm
fi
le activity an
d i
n
ter-refere
nce
patterns.
T
he Procee
din
g
of
the 2
4
th Int
Conf
on
T
e
chnol
og
y M
a
n
a
g
e
ment
an
d P
e
rformance
Eva
l
uati
on
of Ent
e
rprise
W
i
d
e
Information S
ystems. Anahei
m. CA:CMG. 1
998: 97
6-9
87.
[2]
Z
H
AO Xia
o
-na
n
, LI Z
han-hu
a
i
, Z
E
NG Lei-jie
.
A Hierarchic
a
l storag
e stragegy b
a
se
d o
n
block-
leve
l
data v
a
l
uatio
n.
T
he proc
eed
i
ng
of the
4th
Internatio
na
l
c
onfere
n
ce
on
Net-
w
o
rke
d
C
o
mputi
ng an
d
Advanc
ed Infor
m
ation Ma
nag
ement. 200
8: 3
6
-41.
[3]
QI Chang-
xi
ng
, DU Qing-d
o
ng. Cal
l
Ce
nter Platform Based o
n
Ap
pli
c
ation Gate
w
a
y.
Jour
nal o
f
Sheny
an
g Nor
m
a
l
Univ
ersity (Natural Sc
ien
c
e).
2008; 2
6
(4
0): 438-4
41.
[4]
CONG Hui-
ga
ng, RE
N Qin
g
-do
ng,
LIT
i
an-
y
a
ng,
Y
U
AN
Man. Impl
eme
n
tation
of
Lar
ge
Data
ba
s
e
Migratio
n
T
ool Based on
M
e
ta
data-dr
iven.
Sc
ienc
eT
echn
ol
o
g
y an
d En
gi
ne
erin
g.
20
11; 1
1
(
100): 2
3
5
3
-
235
6.
[5]
Xi
on
gHu
a
p
i
ng,
Li Li
ji
ao, Ch
e
n
F
upi
ng, Ro
n
g
Hai
l
i
ang. R
e
s
earch A
nd A
p
plicati
on Of D
a
ta Migr
ation
S
y
stem Bet
w
e
enh
ug
e Heter
o
gen
eo
us Data
bases.
C
o
mput
er Appl
icati
ons
and Softw
are.
201
2; 29(7):
178-
181.
[6]
Z
H
ANG Xi.
Re
alizati
on
on
dat
a migr
ation
fun
c
tion i
n
p
a
ral
l
el
file s
y
stem.
Jo
urna
l of Be
iji
ng
Informati
o
n
Scienc
e an
d T
e
chn
o
lo
gy Un
i
v
ersity.
2012; 2
7
(5): 77-8
0
.
[7]
Xu
Bao-
yu,
LIA
O
T
ao. Desig
n
of data
mi
gra
t
ion time
in ti
ered stor
ag
e.
Co
mp
uter En
g
i
ne
erin
g An
d
Design.
20
13; 34(2): 72
5-7
2
8
.
Evaluation Warning : The document was created with Spire.PDF for Python.