문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
develop:perl:oracle [2017/05/29 15:04] starlits |
develop:perl:oracle [2017/05/29 17:27] (현재) starlits [DBD::Oracle 설치] |
||
---|---|---|---|
줄 3: | 줄 3: | ||
===== 사전작업 ===== | ===== 사전작업 ===== | ||
- apt-get 을 이용하여 패키지 설치 < | - apt-get 을 이용하여 패키지 설치 < | ||
- | # apt-get install libdbi-test-perl | + | # apt-get install libdbi-test-perl |
+ | </ | ||
+ | # apt-get install python3 python-dev python3-dev \ | ||
+ | | ||
+ | | ||
+ | | ||
</ | </ | ||
+ | ===== DBD::Oracle 설치 ===== | ||
+ | - http:// | ||
+ | - http:// | ||
+ | - 컴파일해서 설치한다. < | ||
+ | $ perl Makefile.PL | ||
+ | $ make | ||
+ | $ sudo make install | ||
+ | </ | ||
+ | |||
+ | ===== Oracle Database Instant Client Installation ===== | ||
+ | - [[dbms: | ||
===== sample code test ===== | ===== sample code test ===== | ||
- <code perl> | - <code perl> | ||
줄 31: | 줄 47: | ||
#my $dbh = DBI-> | #my $dbh = DBI-> | ||
- | my $que = " | + | my $que = " |
- | my $itemcode; | + | my $table_name; |
# | # | ||
my $sth = $dbh-> | my $sth = $dbh-> | ||
$sth-> | $sth-> | ||
- | while( ($itemcode) = $sth-> | + | while( ($table_name) = $sth-> |
- | print "select * from tb_studyunit where itemcode=$itemcode ;\n"; | + | print "$table_name\n"; |
} | } | ||
+ | |||
$sth-> | $sth-> | ||