반응형
#!/usr/bin/sh
TEAMDIR="csv"
WORKDIR="cst"
TMAXDIR="/tmax/tmax1"
echo " "
echo " Module Servide DBIO이관 "
echo " "
sleep 1
export ENVHOME=/nbsrep/pbk/pfm/tpl/env
. $ENVHOME/profile.mod
cd /nbsmod/$TEAMDIR/$WORKDIR/lib
A=`ls -al /nbsdev/$TEAMDIR/$WORKDIR/lib/libm$1*.so /nbsdev/$TEAMDIR/$WORKDIR/lib/libpdb_$1*.so /nbsdev/$TEAMDIR/$WORKDIR/lib/libs$1*.so| awk '{print $9}' |cut -c 21-60`
for BL in `echo $A`
do
cp /nbsdev/$TEAMDIR/$WORKDIR/lib/$BL /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
chmod 777 /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
ll /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
pfmdlupdate $BL
done
cd -
. $ENVHOME/profile
echo " "
echo " DBIO MAP 이관 "
echo " "
sleep 2
sqlplus -s apcon/apcon@TMODDB <<!
set feedback off
set serveroutput on
declare
begin
delete from dbio_map where map_id like '$WORKDIR_%';
delete from dbio_map_struct where map_id like '$WORKDIR_%';
delete from dbio_map_sql where map_id like '$WORKDIR_%';
insert into dbio_map select * from apcon.dbio_map@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
insert into dbio_map_struct select * from apcon.dbio_map_struct@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP_STRUCT $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
insert into dbio_map_sql select * from apcon.dbio_map_sql@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP_SQL $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
commit;
DBMS_OUTPUT.PUT_LINE('DBIO DATA $IN_MAP_ID TRANSFER SUCCESS!');
DBMS_OUTPUT.PUT_LINE(CHR(9));
exception
when others then
DBMS_OUTPUT.PUT_LINE('ERR MESSAGE :'||SQLERRM);
rollback;
end;
/
!
TEAMDIR="csv"
WORKDIR="cst"
TMAXDIR="/tmax/tmax1"
echo " "
echo " Module Servide DBIO이관 "
echo " "
sleep 1
export ENVHOME=/nbsrep/pbk/pfm/tpl/env
. $ENVHOME/profile.mod
cd /nbsmod/$TEAMDIR/$WORKDIR/lib
A=`ls -al /nbsdev/$TEAMDIR/$WORKDIR/lib/libm$1*.so /nbsdev/$TEAMDIR/$WORKDIR/lib/libpdb_$1*.so /nbsdev/$TEAMDIR/$WORKDIR/lib/libs$1*.so| awk '{print $9}' |cut -c 21-60`
for BL in `echo $A`
do
cp /nbsdev/$TEAMDIR/$WORKDIR/lib/$BL /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
chmod 777 /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
ll /nbsmod/$TEAMDIR/$WORKDIR/lib/$BL
pfmdlupdate $BL
done
cd -
. $ENVHOME/profile
echo " "
echo " DBIO MAP 이관 "
echo " "
sleep 2
sqlplus -s apcon/apcon@TMODDB <<!
set feedback off
set serveroutput on
declare
begin
delete from dbio_map where map_id like '$WORKDIR_%';
delete from dbio_map_struct where map_id like '$WORKDIR_%';
delete from dbio_map_sql where map_id like '$WORKDIR_%';
insert into dbio_map select * from apcon.dbio_map@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
insert into dbio_map_struct select * from apcon.dbio_map_struct@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP_STRUCT $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
insert into dbio_map_sql select * from apcon.dbio_map_sql@DCOREDB where map_id like '$WORKDIR_%';
DBMS_OUTPUT.PUT_LINE('DBIO_MAP_SQL $IN_MAP_ID ('||sql%rowcount||') Data Transfer...');
commit;
DBMS_OUTPUT.PUT_LINE('DBIO DATA $IN_MAP_ID TRANSFER SUCCESS!');
DBMS_OUTPUT.PUT_LINE(CHR(9));
exception
when others then
DBMS_OUTPUT.PUT_LINE('ERR MESSAGE :'||SQLERRM);
rollback;
end;
/
!
반응형
'컴퓨터활용 > 유닉스' 카테고리의 다른 글
dbx 사용 예제 ( IBM ) (0) | 2008.10.21 |
---|---|
일괄컴파일 쉘 (0) | 2008.10.11 |
정적 라이브러리, 공유 라이브러리, 동적 적재 라이브러리 (0) | 2008.10.01 |
외부 binary 링크하여 컴파일하기 (0) | 2008.09.19 |
strcpy 의 위험성 (0) | 2008.09.11 |