'Yi'에 해당되는 글 212건

  1. 2014.08.12 LogMiner를 이용한 redo 로그 분석
  2. 2014.08.12 Supplemental logging
  3. 2014.08.11 High, Normal, Extgernal Redundancy 비교
  4. 2014.02.24 Windows 7 비밀번호 초기화 2
  5. 2013.07.31 Transportable Tablespaces - TTS
  6. 2013.07.10 OSX ROOT 패스워드 변경 방법
  7. 2012.01.10 Oracle 10g - SGA 사이즈 변경시 SGA 전체 메모리 크기보다 클 경우 spfile 복구
  8. 2011.12.29 웹로직 11g(10.3.5) 64bit Console 설치
  9. 2011.06.07 리눅스 파티션 분할 용량 예제
  10. 2011.06.07 MSSQL(2000/2005/2008) JDBC Driver & URL 설정 변경 사항
  11. 2011.05.17 Centos 5.6 + JBoss 4.2.2.GA + mod_jk + apache 2.0 integration
  12. 2011.05.13 문자열 중 숫자 또는 특정 패턴의 문자열 찾기
  13. 2011.05.02 MSSQL 2005 이상 대칭 키 암호화 3
  14. 2011.05.02 SQL SERVER 데이터베이스(*.mdf)/로그(*.ldf) 파일 삭제
  15. 2011.04.20 MSSQL 간단 암호화(MSSQL 2000)
  16. 2011.04.20 Subversion 서버 설치 및 간단 설정
  17. 2011.04.20 Double submit 방지 - F5키 또는 새로고침 시 이전 페이지의 로직 수행(중복 저장 등)을 막아 보자! 5
  18. 2011.03.02 sqljdbc.jar 가 포함된 Runnable jar파일 실행시 SecurityException 처리 방법
  19. 2010.12.21 [ eclipse ] red hat 계열에 svn 설치시 이클립스 에러 javaHL library 읽기 실패
  20. 2010.12.21 [eclipse] 이클립스 + 리눅스 환경 :: failed to execute child process "eclipse" (permission denie)
  21. 2010.12.21 [ERROR - eclipse] fedora 14 + 이클립스 3.6(helios) 설정시 libjvm.so permission deined
  22. 2010.12.20 [JBOSS] JBOSS를 이용한 Web Application의 JDBC 설정
  23. 2010.12.16 Fedora 14 + jdk1.6.0 Install
  24. 2010.12.14 ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_6bb_0.MYI' (Errcode: 13) 1
  25. 2010.12.07 GUI 툴을 이용한 MySQL 사용하기 1 - SQLyog
  26. 2010.11.29 ASP.NET SQL Server 등록 도구(aspnet_regsql.exe)
  27. 2010.11.25 MSSQL Session Kill
  28. 2010.11.12 [Weblogic 8.1] WebLogic DataBase Connection Pool 설정
  29. 2010.11.12 Oracle 11g dbconsole이 시작되지 않을 때 - 다음 오류로 인해 Enterpirse Manager 구성을 실패했습니다.
  30. 2010.09.28 Hello Android! 예제
ORACLE2014. 8. 12. 17:38

# LogMiner로 데이터베이스에서 발생한 변경 내역을 트랜잭션별, 사용자별, 발생 시간대별로 추적할 수 있음.(8i이후 부터 사용가능 하며 9i 이상부터 DDL을 지원함.)


# 실습 예제(Flat File에 저장하는 방법)

1. Redo log file 상태 확인

set line 200

col group# for 99

col mb for 999

col member for a45

col seq# for 999

col status for a8

col arc for a5


select a.group#,a.member,b.bytes/1024/1024 MB, b.sequence# "SEQ#",b.status, b.archived "ARC"

from v$logfile a, v$log b

where a.group# = b.group#

order by 1,2

/



2. supplemental_log_data_min 설정 확인(YES)

select supplemental_log_data_min from v$database ;



3. utl_file_dir 파라미터 값 확인 및 변경

--경로 확인

show parameter utl_file_dir ;


--원하는 경로로 변경

alter system set utl_file_dir='/data/logmnr' scope=spfile ;



4. DB재시작



5. 딕셔너리 생성

--원하는 파일명과 경로 적용

exec dbms_logmnr_d.build(dictionary_filename=>'dict03.dat',-

dictionary_location=>'/data/logmnr') ;



6. 분석할 로그파일 추가

-- 1 : 신규등록, 2 : 파일삭제, 3 : 추가 등록


-- 신규등록 예제(redo log 파일 중 current 상태인 로그 등록)

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo03.log',1) ;


-- 추가등록 예제

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo01.log',3) ;

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo02.log',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/2_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/1_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/6_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/7_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/8_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/9_1_855409270.arc',3) ;

exec dbms_logmnr.add_logfile('/data/arch2/10_1_855409270.arc',3) ;


-- 삭제 예제

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo03.log',2) ;

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo01.log',2) ;

exec dbms_logmnr.add_logfile('/dbms/oracle/product/oradata/SOLEXTDEV/redo02.log',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/2_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/1_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/6_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/7_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/8_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/9_1_855409270.arc',2) ;

exec dbms_logmnr.add_logfile('/data/arch2/10_1_855409270.arc',2) ;



7. 등록 상태 확인

set linesize 200

col db_name for a15

col filename for a50

select db_name, filename from v$logmnr_logs ;



8. LogMiner를 이용한 분석 시작(TEMP 테이블스페이스 공간이 넉넉해야함.)

exec dbms_logmnr.start_logmnr(dictfilename=>'/data/logmnr/dict03.dat',-

options=>dbms_logmnr.ddl_dict_tracking+dbms_logmnr.committed_data_only) ;



9. 결과 조회

col username for a10

col opration for a10

col sql_redo for a50

select timestamp,username, operation, sql_redo

from v$logmnr_contents

where seg_name='TEST1' ;



Posted by Tiwaz
ORACLE2014. 8. 12. 14:17

Supplemental logging이란 데이터에 DML이 발생할 경우 redo log에 추가적인 내용을 기록하여 복구에 도움이 되고자 할 때 설정해야 하는 기능.


# 약식 설정 및 확인

# 확인

select supplemental_log_data_min from v$database ;


# Database Level Supplemental log ENABLE

alter database add supplemental log data ;


# Database Level Supplemental log DISABLE

alter database drop supplemental log data ;


# Table Level Supplemental log ENABLE

alter table scott.emp add supplemental log data (all) columns ;


# Table Level Supplemental log DISABLE

alter table scott.emp drop supplemental log data (all) columns ;



# 상세 설정 옵션 및 확인

# 확인

select supplemental_log_data_min, supplemental_log_data_pk, supplemental_log_data_ui, supplemental_log_data_fk, supplemental_log_data_all from v$database ;


# 설정 옵션

-all columns 

-primary key columns

-unique columns

-foreign key columns


# ENABLE

alter database add supplemental log data (all|primary key|unique|foreign key) columns ;


# DISABLE

alter database drop supplemental log data (all|primary key|unique|foreign key) columns ;



Posted by Tiwaz
ORACLE2014. 8. 11. 10:58

오라클 RAC 설치 중 GRID 설치 시 ASM 디스크를 선택해야 하는 옵션에서

High, Normal, External Redundancy를 선택해야할 때 왜 선택을 해야하는지에 대해 정리가 잘 되있어서 퍼옴...


원문 링크 : https://blogs.oracle.com/ODA/entry/asm_normal_redundancy_versus_high


ASM Normal Redundancy versus High Redundancy on Oracle Database Appliance

The availability of normal redundancy configuration option for Automatic Storage Management (ASM) on Oracle Database Appliance starting with OAK version 2.4 allows for additional usable space on Oracle Database Appliance (about 6 TB with Normal Redundancy versus about 4 TB with High Redundancy). This is great news for many customers. Some environments, such as test and development systems, may benefit significantly as a result of this new option. However, the availability of Normal Redundancy option obviously should not be taken to mean that choosing Normal Redundancy may the best approach for all database environments. High redundancy would still provide a better and more resilient option (and may be a preferred choice) for mission critical production systems. It is therefore an option and not the default configuration choice. Many customers may choose to use Normal Redundancy for test, development, and other non-critical environments and High Redundancy for production and other important systems.

In general, ASM supports three types of redundancy (mirroring*) options.

High Redundancy - In this configuration, for each primary extent, there are two mirrored extents. For Oracle Database Appliance this means, during normal operations there would be three extents (one primary and two secondary) containing the same data, thus providing “high” level of protection. Since ASM distributes the partnering extents in a way that prevents all extents to be unable due to a component failure in the IO path, this configuration can sustain at least two simultaneous disk failures on Oracle Database Appliance (which should be rare but is possible).

Normal Redundancy - In this configuration, for each primary extent, there is one mirrored (secondary) extent. This configuration protects against at least one disk failure. Note that in the event a disk fails in this configuration, although there is typically no outage or data loss, the system operates in a vulnerable state, should a second disk fail while the old failed disk replacement has not completed. Many Oracle Database Appliance customers thus prefer the High Redundancy configuration to mitigate the lack of additional protection during this time.

External Redundancy - In this configuration there are only primary extents and no mirrored extents. This option is typically used in traditional non-appliance environments when the storage sub-system may have existing redundancy such as hardware mirroring or other types of third-party mirroring in place. Oracle Database Appliance does not support External Redundancy.

*ASM redundancy is different from traditional disk mirroring in that ASM mirroring is a logical-physical approach than a pure physical approach. ASM does not mirror entire disks. It mirrors logical storage entities called ‘extents’ that are allocated on physical disks. Thus, all “mirrored” extents of a set of primary extents on a given disk do not need to be on a single mirrored disk but they could be distributed across multiple disks. This approach to mirroring provides significant benefits and flexibility. ASM uses intelligent, Oracle Database Appliance architecture aware, extent placement algorithms to maximize system availability in the event of disk failure(s).


Posted by Tiwaz
WAS2014. 2. 24. 19:54
cmd 를 이용한 비밀번호 변경 방법으로 윈도우에서 제공하는 고정키 기능을 제공하는 실행 파일을 cmd로 변경하여 비밀번호를 초기화 한다.

  1. 윈도우 부팅 Media를 이용하여 설치화면 으로 부팅
  2. 첫 화면에서 shift + F10으로 명령 프롬프트 실행
  3. Windows가 설치된 HDD 찾기
  4. 설치된 HDD를 찾았다면
    C:> cd Windows
    C:> cd System32
    C:> copy sethc.exe sethc.exe.bak
    C:> copy cmd.exe sethc.exe
  5. 컴퓨터를 재부팅하여 Windows 로그인 창이 보이도록 실행
  6. 왼쪽 하단의 접근성 버튼을 클릭
  7. `바로가기키를 누른 상태로 고정( 고정 키)`을 체크하고 적용
  8. shift키를 연속으로 누름.
  9. cmd 창이 실행되면 명령어 입력
    C:> net user [계정명] [비밀번호]

** Windows가 정상적으로 시작된 상태에서는 sethc를 백업받았던 원래 파일로 변경이 불가능하므로 1~4번의 과정을 다시 실행하여 원복을 함.


Posted by Tiwaz
ORACLE2013. 7. 31. 21:28

1. Transportable Tablespace ?

v 다른 DATABASE의 테이블스페이스들을 복사하여 사용하는 기능으로 Oracle 8i부터 제공
v datafileOS level에서 복사하여 이관하는 방식으로  동일한 데이터에 대해 import/export 또는 unload/load 보다

   빠른 성능을 보장함.

v 서로 다른 플랫폼 간의 데이터 이동을 지원하므로 데이터 배포 작업을 한층 쉽고 빠르게 수행할 수 있음.
v Oracle 9i 이전 버전의 경우 동일한 block 크기이거나 DB내 기본 block 크기와 동일해야만 가능했으나

    Oracle 9i 이후 부터는 block 크기가 다르더라도 가능함.(, 테스트가 필요함)

v Oracle 10g부터 서로 다른 플랫폼간에 Tablespace 전송이 가능.(Solraris -> HP-UX)




2. Transportable Tablespace을 사용하는 경우

v 데이터웨어하우징 테이블 내의 파티션 테이블을 export/import 할 때
v Cross-Domains(CDs) 상의 구조화된 데이터를 Publising 할 때
v 여러 Database에 있는 여러 개의 Read-Only Tablespace를 복사하고자 할 때
v 오래된 데이터를 Archiving 하고자 할 때
v Tablespace Point-in-time-recovery를 수행 할 때

    TSPITR : RMAN을 이용하여 하나 또는 다수의 Tablespace를 빠르게 복구하는 방법.

v 다양한 RDBMS 버전과 OS플랫폼 사이에서 데이터베이스를 이전하고자 할 때.



3. Transportable Tablespaces를 사용할 때 사전 유의 사항.

 v SYSTEM, SYSAUX, TEMP Tablespace의 경우 이전 불가.

v 제약 및 제한사항 확인.

   Source DatabaseTarget Database가 호환이 되는지.(Platform, CharacterSet, XML Type의 테이블 스페이스 등.)

v 손상 버그(corruption bug)와 일반적인 이슈 확인.

   Source DatabaseTarget Database 버전에 따라 몇 가지 버그 발생.

v Source Database에서 유효하지 않은 객체 해결.

   ExportINVALIDObject가 없어야하며, SYS소유의 INVALID Object로 인해 Export를 실패할 수 있음.

v Export 하고자 하는 TTS Tablespace들이 자신을 포함하는지 확인.

   Export하고자 하는 TablespaceObject들이 다른 Tablespace를 참조하면 안됨. DBMS_TTS.TRANSPORT_SET_CHECK 패키지 이용

v Row 없이 전체 구조 Export 하기.(META정보)
v Import 전에 Target Databaseusername이 있는지 확인.

   사용자가 없을 경우 신규로 생성 또는 기존 user가 기본 Tablespace를 사용할 경우 임시 Tablespace로 변경.

v Tablespace 플러그인 후 전체 구조(META정보)Import하기.
v 운영 데이터이므로 연습 후 수행, Source Database 일정 기간 유지 클린(Clean up) 유의.



Posted by Tiwaz
Linux & Unix2013. 7. 10. 11:06


맥의 root  사용자의 비밀 번호 변경 방법.
최초 설치 후 root 패스워드를 변경하지 않았다면 터미널에서 쉽게 변경할 수 있습니다.

1. 변경 방법.
1) 관리자 권한이 있는 계정으로 접속.
2) 터미널을 실행
    응용프로그램 => 유틸리티 => 터미널
3) 명령어 입력
    $ sudo passwd root

2. 참조..
원문 : http://www.bloodyerror.com/2009/07/mac-os-x-what-is-my-default-sudo-password-root-password/
  • First you will have to logged in as Admin level user
  • Open your Terminal (Located Applications/Utilities/Terminal)
  • Type in command: sudo passwd root

Posted by Tiwaz
ORACLE2012. 1. 10. 21:14
sga_max_size와 sga_target 사이즈 변경 작업을 하고 오라클을 재구동 하였다.
SGA의 전체 사이즈보다 두 값의 초과 하여 서버 구동이 되지 않았다.

이유는 shared_pool_size와 java_pool_size가 SGA 전체 메모리 크기보다 클 경우라고 한다.

SQL> startup
ORA-00821: Specified value of sga_target 16M is too small, needs to be at least 128M
SQL> startup
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
연속으로 에러가 발생한다.

해결 방법은 spfile을 pfile로 생성하여 sga_target의 크기를 수정 후 다시 spfile로 생성하면 된다.

SQL> create pfile from spfile;
vi를 이용하여 init<SID>.ora 파일 수정
SQL> startup pfile="init<SID>.ora"
DB 구동이 정상적으로 되면 pfile을 spfile로 생성
SQL> create spfile from pfile
만약 
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file
'/u01/app/oracle/product/10.2.0/db_1/dbs/init<SID>.ora'
파일을 못찾았을 경우 DBMS 최초 설치시 $ORACLE_BASE/admin/<SID>/pfile/init.ora.xxxx 파일을 dbs폴더에 생성 해준다.


나의 경우 pfile 생성시 spfile의 바이너리가 깨져 아래의 에러가 발생하였다.
그래서 아래와 같이 $ORACLE_BASE/admin/<SID>/init.ora.xxx 파일을 이용하여 startup을 할 수 있었다.

SQL> show parameter pfile
ORA-00600: internal error code, arguments: [kspgip1], [101], [930], [1],
[sql92_security], [], [], []


SQL> shutdown immediate;
ORA-00600: internal error code, arguments: [kspgip1], [101], [508], [1], [_max_arch_lns_wait], [], [], []

SQL> startup
ORA-00821: Specified value of sga_target 16M is too small, needs to be at least 128M
SQL> startup pfile="initTIWAZ.ora"
ORACLE instance started.

Total System Global Area  603979776 bytes
Fixed Size                  1218220 bytes
Variable Size             184551764 bytes
Database Buffers          402653184 bytes
Redo Buffers               15556608 bytes
Database mounted.
Database opened.

Posted by Tiwaz
WAS2011. 12. 29. 09:36
웹로직 11g(10.3.5) 64bit Console 설치

다운로드 경로 : http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html

1. 64bit 설치 파일을 받는다.(Additional Platforms (For 64-bit JVM Support, See Note Above)

2. java -jar -d64 -Djava.io.tmpdir=/var/temp wls1035_generic.jar
-d64 : 64bit로 설치
-Djava.io.tmpdir : 설치 전 압축해제 시 임시 파일 저장 경로, 약 1GB의 충분한 공간이 필요함. 생략시 기본 /var/temp에 압축이 풀림.

3. 세부 설치는 윈도우와 동일한 형태로 진행

No->Yes->No

4. 설치가 완료되면 웹로직 홈에서 아래와 같이 실행하여 도메인 생성
./config.sh -mode=console
 
Posted by Tiwaz
Linux & Unix2011. 6. 7. 18:18

파티션 분할은 사용자의 용도에 맞게 하는게 최적이지만 나같은 초보들을 위한 최적??의 분할율 이랄까 ;;

꼭 아래와 같이 할 필요는 없으며 용량은 상황에 맞게 설치 - !!

그냥 참조만 !!

- 퍼센트로 본 분할 예제
swap - 메모리 2배
/boot - 100m
/ - 8%
/var - 12%
/usr - 35%
/home - 나머지 (45%)

- 하드디스크가 80G라고 할때 분할 예제
swap - 2048MB
/boot - 100m
/ - 6.4
var - 9.6
/usr - 28
/home - 36

Posted by Tiwaz
Database/SQL Server2011. 6. 7. 18:08


SQLJDBC

SQL2005의 sqljdbc.jar 파일로 SQL 2008도 사용 가능함.
JDK 1.4이상 버젼에서 사용가능함.

driver class는 아래와 같이 변경!
com.microsoft.jdbc.sqlserver.SQLServerDriver - > com.microsoft.sqlserver.jdbc.SQLServerDriver

url 설정은 다음과 같이 -
jdbc:microsoft:sqlserver -> jdbc:sqlserver

** jdk1.3 이하 버젼의 경우 MSSQL 2000에서 사용했던 JDBC(3개의 *.jar 파일)만 사용 가능.

Posted by Tiwaz
WAS2011. 5. 17. 18:00

jboss 4.2.2.GA + mod_jk + apache 간단 연동 설정 입니다.

1. mod_jk 다운로드(version 1.2.X)
http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/i386/

2. mod_jk 파일 퍼미션 설정 및 이름 변경(기존 이름 사용 권장)
 - 저장 경로 변경 및 이름 변경
    > mv mod_jk-1.2.31-httpd-2.2.x.so /etc/httpd/modules/mod_jk.so
 -  퍼미션 설정
    > chmod +x /etc/httpd/modules/mod_jk.so

 * httpd 구동시 mod_jk.so에 대한 퍼미션 거부가 생길 경우 아래와 같이 처리
   > chcon -t textrel_shlib_t /usr/lib/httpd/module/mod_jk.so

3. 아파치 설정 - /etc/httpd/conf/httpd.conf
 - 200 Line 정도
    LoadModule jk_module modules/mod_jk.so
 
 - 874 Line 정도
    <IfModule jk_module>
             JkWorkersFile /etc/httpd/conf/worker.properties
             JkShmFile /etc/httpd/logs/mod_jk.shm
             JkLogFile /etc/httpd/logs/mod_jk.log
             JkLogLevel info
             JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
    </IfModule>
     
    JkMount /*.jsp ajp13
    <Directory />
         Options FollowSymLinks
         AllowOverride None
    </Directory>

 - 제일 하단
   <VirtualHost *:80>
            # 호스트 명
            ServerName localhost.localdomain
            # DocumentRoot
            DocumentRoot /usr/jboss-4.2.2.GA/deploy/runtime/EarContent/webapp/web.war
            JkMount /*.jsp ajp13
            JkMount /*.cmd ajp13
   </VirtualHost>

4. mod_jk 세부 설정 - /etc/httpd/conf/worker.properties
worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=127.0.0.1
# /usr/jboss-4.2.2.GA/server/midas/deploy/jboss-web.deployer/server.xml 파일의 AJP 포트 입력
worker.ajp13.port=8109
worker.ajp13.lbfactor=1
#worker.ajp13.socket_timeout=30
worker.ajp13.connection_pool_timeout=600
worker.ajp13.socket_keepalive=1

 

5. JBOSS의 톰켓에 Host 설정 -  /usr/jboss-4.2.2.GA/server/midas/deploy/jboss-web.deployer/server.xml

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8109" address="${jboss.bind.address}" protocol="AJP/1.3"
         emptySessionPath="true" enableLookups="false" redirectPort="8443" />

        <Host name="127.0.0.1"
                appBase="/usr/jboss-4.2.2.GA/deploy/runtime/EarContent/webapp/web.war"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
                <Context path="" docBase="" debug="1"/>
        </Host>

6. jboss 구동 후 httpd 서버 restart 그리고 테스트!

** Bad Gateway 나 proxy 관련 오류 발생시
 /etc/selinux/config 파일의 SELINUX=disabled 로 변경!


 

Posted by Tiwaz
JAVA2011. 5. 13. 14:27


package string;

import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class PatternTest {
 public static void main(String[] args) {
  
  System.out.println("생성자로 초기화 : " + new Integer("2"));
  System.out.println("Object를 기본 int type으로 변환 : " + Integer.parseInt("20"));
  
  //아래는 java.lang.NumberFormatException 발생
  //System.out.println(new Integer("a1"));
  
  // 예문
  String str = "학0교abc 1종2e이 땡f34땡g땡5!6! hi7어서 8모이9자!@ ";
  String result = "";
  
  // ASCII 값 47~58은 숫자 0~10
  int i = 0;
  while(i<str.length()) {
   if(str.charAt(i)>=47 &&  str.charAt(i)<=58) {
    result += "\t" + str.charAt(i);
   }
   i++;
  }
  System.out.println("ASCII 로 찾은 숫자 : " + result);
  
  
  // reference으로 확인
  int j = 0;
  result = "";
  while(j<str.length()) {
   if(Character.isDigit(str.charAt(j))) {
    result += "\t" + str.charAt(j);
   }
   j++;
  }
  System.out.println("Character의 isDigit(ch)을 이용한 찾기 : " + result);
  
  
  // Pattern을 이용한 숫자 찾기
  result = "";
  String patternStr = "[\\d]";
  Pattern pattern = Pattern.compile(patternStr);
  Matcher matcher = pattern.matcher(str);
  while(matcher.find()) {
   result += "\t" + matcher.group(0);
  }
  System.out.println("Pattern 을 이용한 숫자 찾기 : " + result);
  
  // Pattern을 이용한 a~z 찾기
  result = "";
  patternStr = "[a-z]";
  pattern = Pattern.compile(patternStr);
  matcher = pattern.matcher(str);
  while(matcher.find()) {
   result += "\t" + matcher.group(0);
  }
  System.out.println("Pattern 을 이용한 a~z 찾기 : " + result);
  
 }
}

'JAVA' 카테고리의 다른 글

javafx 예제 모음  (0) 2016.01.14
자바 멀티쓰레딩 관련 예제 링크  (0) 2016.01.14
Static Initialization in Java(tm)  (0) 2010.05.20
Singleton 패턴  (0) 2010.05.20
java.io.File을 이용한 디렉토리와 파일 검색(call back)  (0) 2010.05.07
Posted by Tiwaz
Database/SQL Server2011. 5. 2. 15:06

-- 마스터키 만들기
-- http://msdn2.microsoft.com/ko-kr/library/ms174382.aspx

-- 인증서 만들기
-- http://msdn2.microsoft.com/ko-kr/library/ms187798.aspx

-- 대칭키 생성
-- http://msdn2.microsoft.com/ko-kr/library/ms188357.aspx

-- 데이터를 암호화 해서 넣을때
-- http://msdn2.microsoft.com/ko-kr/library/ms174361.aspx

-- 데이터를 복호화 해서 가지고 올때
-- http://msdn2.microsoft.com/ko-kr/library/ms181860.aspx


예제))

-- 마스터 Key 생성
SELECT * FROM sys.symmetric_keys

IF NOT EXISTS (
SELECT * FROM sys.symmetric_keys WHERE name = N'##MS_DatabaseMasterKey##'
)
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '!votmdnjem(22qhekzmrptjfwjd)'   -- 패스워드(22보다 크게 설정)
GO

-- 마스터Key을 삭제 한다.
DROP MASTER KEY
--1. Master Key는 각각의 데이터 베이스에 대하여 분리되어 생성된다.
-- 데이터베이스 상에 하나의 마스터 KEY을 생성할 수 있다.
-- 하나의 데이터베이스 인스턴스에 두개의 마스터 key는 존재할 수 없다.


-- 인증서 생성
SELECT * FROM sys.certificates

IF NOT EXISTS (
SELECT * FROM sys.certificates WHERE name = N'TiwazPasswordFieldCertificate'
)
CREATE CERTIFICATE TiwazPasswordFieldCertificate WITH SUBJECT = 'Password Fields';
GO


DROP CERTIFICATE TiwazPasswordFieldCertificate
go

-- Creating a Symmetric Key
SELECT * FROM sys.symmetric_keys 

/*************** CREATE SYMMETRIC KEY *********************************/
CREATE SYMMETRIC KEY PasswordFieldSymmetricKey   -- Key 명칭
WITH ALGORITHM = AES_256
ENCRYPTION BY CERTIFICATE TiwazPasswordFieldCertificate;


CREATE SYMMETRIC KEY TiwazPasswordFieldSymmetricKey   -- Key 명칭
WITH ALGORITHM = AES_256
ENCRYPTION BY CERTIFICATE TiwazPasswordFieldCertificate;

-- Algorithm
-- DES, TRIPLE_DES, RC2, RC4, RC4_128, DESX, AES_128, AES_192 and AES_256
-- Microsoft Windows 2000, Window XP에서는 AES_128, AES_192 and AES_256의 알고리즘은 사용할 수 없다.
-- Win2K인 경우 TRIPLE_DES Algorithm을 사용한다.


OPEN SYMMETRIC KEY PasswordFieldSymmetricKey                -- 대칭 Key
DECRYPTION BY CERTIFICATE TiwazPasswordFieldCertificate;    -- 인증 Key 명칭

-- 암호화 및 복호화시 주의할 점은 원래의 데이터 타입으로 복호화 되어야 한다는 것이다.
-- Varchar 은
SELECT CONVERT(varchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), '테스터')))
SELECT CONVERT(nvarchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), N'테스터')))

-- Encrypt 'Varchar' string and then decrypt encrypted data
SELECT
  CONVERT(varchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), '테스터'))),
  CONVERT(nvarchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), '테스터'))),
  CONVERT(varchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), N'테스터1'))),
  CONVERT(nvarchar, DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), N'테스터1')))

 

SELECT login_password
     , EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'),login_password ) ENCRYPT_LOGIN_PASSWORD
     , DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'),login_password ))  AS NON_CONVERT_LOGIN_PASSWORD
     , CONVERT(varchar,DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'),login_password ))) AS CONVERT_LOGIN_PASSWORD
  from skf_employee

 

-- 파라메터로 암호화 하기
DECLARE @sample_data nvarchar(MAX)
SET @sample_data = N'위의 내용은 SQL SERVER 2005 및 SQL SERVER 2008의 암호화를 설명한 것이다.'

SELECT
CONVERT(nvarchar(MAX), DecryptByKey(EncryptByKey(Key_GUID('PasswordFieldSymmetricKey'), @sample_data)))

Posted by Tiwaz
Database/SQL Server2011. 5. 2. 14:23

간단 사용 방법은 다음과 같다.
** 세부 자세한 내용은 MSDN 링크를 참조


-- 데이터베이스 mdf 파일 및 *_log.ldf 파일 정보 확인
sp_helpdb midas

--
--BACKUP LOG midas with NO_LOG


-- 트렌젝션 로그 축소
http://technet.microsoft.com/ko-kr/library/ms178037.aspx
DBCC SHRINKFILE([데이터베이스]_log, truncateonly)
또는
DBCC SHRINKFILE([데이터베이스]_log, 줄이고자 하는 파일 사이즈, truncateonly)

-- 데이터베이스 축소
http://technet.microsoft.com/ko-kr/library/ms189080.aspx
DBCC SHRINKDATABASE([데이터베이스])

Posted by Tiwaz
Database/SQL Server2011. 4. 20. 17:41
MSSQL 2005 이상 버젼의 경우 별도의 암호화 모듈을 제공합니다.
2000이하 버젼의 경우 별도 암호화 모듈은 없으며 암호화 함수를 제공(2005 이상도 포함) 합니다.

암호화 함수 : PWDENCRYPT([데이터]) / 임의의 16진수 값을 반환
복호화 함수 : PWDCOMPARE([원본 데이터], [비교 할 데이터]) / 원본 데이터와 비교할 데이터가 같을 경우 1 틀리면 0을 반환

예제)
SQL> SELECT '라면',PWDENCRYPT('라면'), PWDCOMPARE('라면', PWDENCRYPT('라면')), PWDCOMPARE('라면', PWDENCRYPT('국수'))
결과 : [라면]     [0x010064BE8FA85E45C5F3ABDDC43A98750D1A9550D13F99A268C1]     [1]     [0]

Posted by Tiwaz
Version Control2011. 4. 20. 13:57

## 설치파일 다운로드

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

 
1.  C:\repository 폴더를 생성합니다.

     C:\Documents and Settings\Administrator>md c:\repository

     C:\Documents and Settings\Administrator>cd c:\repository


2.
  
저장소 생성하기
     - 버클리 DB를 이용한 저장소

     C:\repository>svnadmin create --fs-type bdb sample

     - 파일시스템을 이용한 저장소

     C:\repository>svnadmin create --fs-type fsfs sample

 
3. 저장소 설정 및 사용자 등록
  Repository 폴더로 이동하면 conf폴더가 있습니다. 하위에는 아래와 같이 3개의 파일이 있습니다.

Authz / passwd / svnserve.conf


1)     Svnserve.conf 파일 설정

 

### This file controls the configuration of the svnserve daemon, if you

### use it to allow access to this repository.  (If you only allow

### access through http: and/or file: URLs, then this file is

### irrelevant.)

 

### Visit http://subversion.tigris.org/ for more information.

 

[general]

### These options control access to the repository for unauthenticated

### and authenticated users.  Valid values are "write", "read",

### and "none".  The sample settings below are the defaults.

anon-access = none

auth-access = write

### The password-db option controls the location of the password

### database file.  Unless you specify a path starting with a /,

### the file's location is relative to the directory containing

### this configuration file.

### If SASL is enabled (see below), this file will NOT be used.

### Uncomment the line below to use the default password file.

password-db = passwd

### The authz-db option controls the location of the authorization

### rules for path-based access control.  Unless you specify a path

### starting with a /, the file's location is relative to the the

### directory containing this file.  If you don't specify an

### authz-db, no path-based access control is done.

### Uncomment the line below to use the default authorization file.

#authz-db = authz

### This option specifies the authentication realm of the repository.

### If two repositories have the same authentication realm, they should

### have the same password database, and vice versa.  The default realm

### is repository's uuid.

#realm = My First Repository

 

[sasl]

### This option specifies whether you want to use the Cyrus SASL

### library for authentication. Default is false.

### This section will be ignored if svnserve is not built with Cyrus

### SASL support; to check, run 'svnserve --version' and look for a line

### reading 'Cyrus SASL authentication is available.'

# use-sasl = true

### These options specify the desired strength of the security layer

### that you want SASL to provide. 0 means no encryption, 1 means

### integrity-checking only, values larger than 1 are correlated

### to the effective key length for encryption (e.g. 128 means 128-bit

### encryption). The values below are the defaults.

# min-encryption = 0

# max-encryption = 256


2)    passwd 파일 설정 (사용자 등록 및 암호 설정)
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
suma = 123
tiwaz = 123

3)    authz 파일 설정 (사용자 그룹 설정 및 접근 설정)

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
###  - a single user,
###  - a group of users defined in a special [groups] section,
###  - an alias defined in a special [aliases] section,
###  - all authenticated users, using the '$authenticated' token,
###  - only anonymous users, using the '$anonymous' token,
###  - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
 
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
 
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
mygroup = suma,tiwaz
 
# [/foo/bar]
# harry = rw
# &joe = r
# * =
 
#[repository:/]
# @harry_and_sally = rw
# * = r
 
[/]
@mygroup = rw
 
[sample:/]
* = r

@mygroup = rw


4. 서버 구동하기
  
- svnserve를 사용한 서버

     C:\>svnserve -d -r C:\repository


Posted by Tiwaz
JSP2011. 4. 20. 11:50

JSP 프로그래밍에서 페이지 이동 방법이 여러가지가 있습니다.
비지니스 로직 수행에서 redirect나 forward 아니면 해당 페이지에서 직접 redirect, forward, html, javascript 를 이용한 페이지 이동 등등..

그중에서 request.getRequestDispatcher("/view.jsp").forward(request, response) 를 사용하였을때 중복 저장 또는 중복 로직 수행에 대해서 알아 보려고 합니다.

forward를 사용하는 이유는 아래처럼 정리 할 수 있지만.. forward의 특징 중 하나가 이전페이지의 객체를 보존하고 있습니다.
'특정 페이지에서 전달된 데이터를 로직을 수행하고 수행된 결과(Object Data)를 원하는 페이지에 전달 후 보여주려고 한다.'

예로
              '사용자가 입력 페이지의 폼에서 저장버튼 클릭 -> 저장 로직 수행 후 DB 입력 -> 리스트 페이지 이동'
을 하였을 경우 이동한 리스트 페이지에서 F5키 나 새로고침을 하였을 경우 위의 로직을 다시 타는 경우가 발생합니다.
만약 DB의 PK 설정이 oracle의 sequence나 mssql의 시드를 이용한 자동 증가가 아닐 경우 PK 값 위반에 대한 Exception 이 일어 날 것이며 PK 가 없다면 같은 데이터가 중복 저장되는 경우가 생깁니다.

그래서 double submit을 막아 보려고 구글링 등등 이것저것 찾아 보았는데
Spring의 경우 SessionStatus, Struts의 Token, Post - Redirect- Get 패턴 등등 ;;

이미 프로젝트가 막바지라 급하게 손쓸 방법을 찾다가 쉽게 쓸수 있을 것 같아 적용해 보았는데 성공하여 포스트 합니다;;
http://blog.naver.com/PostView.nhn?blogId=canya83&logNo=40094442229&parentCategoryNo=15&viewDate=&currentPage=1&listtype=0

## 원리 ::
1. 최초 페이지(Token 없음) : jsp에서 Token을 생성 ( T1 생성)
2. 서버의 컨트롤러에서 JSP에서 생성된 Token이 컨트롤러의 Token과 같을 경우 신규 요청으로 설정
     (T1 == T2 으면 Token 생성)
3. 비지니스 로직 처리 후 특정 페이지로 이동하여 새로고침 ( T1 != T2)
4. 서버의 컨트롤러에서 이전 JSP에서 생성된 Token이 컨트롤러의 Token과 다르므로 Token 생성 안함
     (T1 != T2 )  해당 요청에 대해서는 비지니스 로직을 수행 안함.

## 코드
1. 공통 Controller에서 사용할 Token.java 를 하나 만들자!

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class Token {
 
 private static final String TOKEN_KEY = "TOKEN_KEY";
 
 public static void set(HttpServletRequest request) {
  HttpSession session = request.getSession(true);
  long systemTime = System.currentTimeMillis();
  byte[] time = new Long(systemTime).toString().getBytes();
  byte[] id = session.getId().getBytes();
  
  try {
   MessageDigest md5 = MessageDigest.getInstance("MD5");
   md5.update(id);
   md5.update(time);
   
   String token = toHex(md5.digest());
   request.setAttribute(TOKEN_KEY, token);
   session.setAttribute(TOKEN_KEY, token);
  } catch (NoSuchAlgorithmException e) {
   e.printStackTrace();
  }
 }
 
 public static boolean isValid(HttpServletRequest request) {
  HttpSession session = request.getSession(true);
  String requestToken = request.getParameter(TOKEN_KEY);
  String sessionToken = (String)session.getAttribute(TOKEN_KEY);
  if(requestToken == null || sessionToken == null) {
   return false;
  } else {
   return requestToken.equals(sessionToken);
  }
 }
 
 private static String toHex(byte[] digest) {
  StringBuffer buf = new StringBuffer();
  for(int i=0;i<digest.length;i++) {
   buf.append(Integer.toHexString((int)digest[i] & 0x00ff));
  }
  return buf.toString();
 }
}


2. HttpServlet 을 재구현한 공통 컨트롤러의 forward 부분에 아래와 같이 추가 한다.

if(Token.isValid(request)) {
    Token.set(request);
    request.setAttribute("TOKEN_SAVE_CHECK", "TRUE");
} else {
     request.setAttribute("TOKEN_SAVE_CHECK", "FALSE");
}


3. 중복 저장을 막고자하는 JSP 페이지 아래와 같이 추가 한다.

       <%
        if(request.getAttribute("TOKEN_KEY")==null) Token.set(request);
       %>
       <input type="hidden" name="TOKEN_KEY" value="<%=request.getAttribute("TOKEN_KEY")%>"/>


4. business logic을 수행하는 부분에서 CRUD 등등 처리 부분의 처음 부분에 아래와 같이 추가한다.

if("TRUE".equals(request.getAttribute("TOKEN_SAVE_CHECK"))) {
   // 신규 요청이므로 원하는 로직 작성
} else {
  // 중복 요청이므로 그에 따른 로직 작성
}


5. 테스트!

'JSP' 카테고리의 다른 글

사용자 정의 태그  (0) 2010.04.09
필터와 리스너  (0) 2010.04.09
Posted by Tiwaz
Database/SQL Server2011. 3. 2. 09:42

JDBC 테스트 중 sqljdbc.jar가 포함된 runnable jar 파일을 실행하면 아래와 같은 Exception을 일으키며 파일이 실행되지 않는다.

Exception in thread "main" java.lang.SecurityException: invalid SHA1 signature f
ile digest for com/microsoft/sqlserver/jdbc/SQLServerException.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)

at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)



내 나름대로 정의한 이유인즉 sqljdbc에 포함된 class 파일에 SHA1 방식으로 암호화 맵핑이 되어 있는데 JVM에서 풀지 못하여 Exception이 발생하지 않을까 한다.

그래서 간단한 해결 방법을 찾아보자~!

1. Microsoft 홈페이지로 들어가서 sqljdbc 파일을 다운로드 받는다.(해당 링크는 2.0 버젼)
http://www.microsoft.com/downloads/ko-kr/details.aspx?displaylang=ko&FamilyID=99b21b65-e98f-4a61-b811-19912601fdc9

2. 다운로드 받은 후 설치를 하면 디렉토리 안에 2.0 버젼의 경우 sqljdbc.jar와 sqljdbc4.jar 파일이 있음을 확인 할 수 있다.

3. sqljdbc.jar 또는 sqljdbc4.jar 파일을 압축 해제 한다.

3. 압축 해제한 디렉토리에서 META-INF 폴더로 이동한다.

4. 폴더에 있는 SIGNED.SF / SIGNED.RSA 파일을 삭제한다.
단, 2005 이하 버전용 sqljdbc의 경우 zigbert.sf / zigbert.rsa 이며 동일하게 삭제 한다.

5. MANIFEST.MF 파일을 열어보면 아래와 같은 내용을 확인 할 수 있다.
아래 부분의 1, 2, 3 Line 을 제외한 나머지 Line을 모두 지운 후 다시 sqljdbc.jar 파일로 압축을 한다.

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.)

Name: com/microsoft/sqlserver/jdbc/SQLServerException.class
SHA1-Digest: wJmi22LxY0sGSj6Fo/b+189olOA=

.....


6. sqljdbc.jar 파일을 해당 프로젝트에 다시 추가한후 runnable jar에 포함하여 실행 가능한지 테스트 한다.

Posted by Tiwaz
Version Control2010. 12. 21. 22:02
ERROR
    failed to load javaHL Library

해결 방법
1. root@localhost ~] yum install subversion - javahl

2. 설치가 완료되면 /usr/lib/ 디렉토리에 libsvn* 항목으로 설치된 파일을 확인 할 수 있다.

3. 이클립스가 설치된 디렉토리로 이동하여 eclipse.ini 파일을 연다.

4. --vmargs 아래에 -Djava.library.path=/usr/lib/ 를 추가 해준다.

이클립스 구동하 sync를 맞춰주면 해결 완료!!

'Version Control' 카테고리의 다른 글

Subversion 서버 설치 및 간단 설정  (0) 2011.04.20
Posted by Tiwaz
Linux & Unix2010. 12. 21. 21:52
ERROR
    failed to execute child process "eclipse" (permission denie)

해결 방법
    root@localhost ~] cd /usr/local/bin
    root@localhost bin] ln -s /opt/eclipse/eclipse eclipse
Posted by Tiwaz
Linux & Unix2010. 12. 21. 21:44
ERROR
/opt/jdk1.6.0/jre/lib/i386/client/libjvm.so:
    cannot enable executable stack as shared object requires: Permission denied

해결 방법
    root@localhost ~] setsebool -P allow_execstack 1
    root@localhost ~] execstack -c /opt/jdk1.6.0/jre/lib/i386/client/libjvm.so
Posted by Tiwaz
WAS2010. 12. 20. 18:37

JBOSS의 default 서버를 기본으로 간단하게 JDBC드라이버를 설정하는 방법을 알아보겠습니다.

1. 준비물
- 사용하고자하는 JDBC Driver (sqljdbc.jar, odbc14.jar 등등)
- WEB-INF 디렉토리에 jboss-web.xml
- JBOSS 설치 디렉토리의 > docs > examples > jca 디렉토리에서
   연결하고자하는 [DB명]-ds.xml 파일 (예: oracle-ds.xml)

2. Web.xml 의 JDBC 설정

    <resource-ref>
        <res-ref-name>jdbc/TiwazDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

3. jboss-web.xml 설정

    <resource-ref>
        <res-ref-name>jdbc/TiwazDS</res-ref-name>
        <jndi-name>java:/jdbc/TiwazDS</jndi-name>
    </resource-ref>

4. [DB명]-ds.xml 설정
* xml 파일마다 설명과 차이점이 조금씩 있으나 아래와 같이 공톡적으로 적용되는 기본 설정만 하여도 DB 연결이 가능하다.
  <datasources>
      <local-tx-datasource>
          <jndi-name>JNDI 명</jndi-name>
          <connection-url>각각의 JDBC에 맞는 Connection String</connection-url>
          <driver-class>해당 드라이버의 Driver Class</driver-class>
          <user-name>사용자명</user-name>
          <password>비밀번호</password>
          <metadata>
             <type-mapping>DB종류</type-mapping>
          </metadata>
      </local-tx-datasource>
  <datasources>

5. jdbc 파일 설정
  - JBOSS_HOME\server\default\lib 에 JDBC Driver .jar 파일을 복사 한다.
  ** JBOSS 6.0 버젼의 경우 JBOSS_HOME\common\lib
  *만약 인식이 서버에서 인식이 되지 않을 경우 WEB-INF\lib 디렉토리에 포함시킨다.

6. 서버 구동 및 JDBC 연결 확인
 - run.bat 또는 run.sh 를 실행하였을때 아래와 같이 Binding 된것을 확인 할 수 있다.

10:41:22,960 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=jdbc/TiwazDS,service=DataSourceBinding' to JNDI name 'java:jdbc/TiwazDS'

Posted by Tiwaz
Linux & Unix2010. 12. 16. 22:17
대학 다닐대 Centos 5에 JDK를 설치하고 정리까지 해본 경험이 있었는데 새로 설치 해보려하니 하나도 기억이 나지 않는다.
원본 출처는 http://whiteship.tistory.com/950 이며 fedora 2와 14와 크게 다른점은 없는 것 같다.
bianry 라 초보자도 쉽게 설치 가능하오니 한번쯤 기회가 되보면 해보는 것도 괜찮다는 생각이 든다.

1. 준비물
- jdk-6u23-linux-i586.bin
(아래 경로에서 Java SE Development Kit을 클릭하여 Linux Platform을 선택하여 binary 파일을 다운로드 받는다.)
http://www.oracle.com/technetwork/java/javase/downloads/index.html

[yi@localhost ~]$ su -
password:
[root@localhost ~]$ cd /home/yi/Downloads
1. 다운로드한 디렉토리에서 설치하고자 하는 디렉토리로 파일 이동
[root@localhost Downloads]$ mv jdk-6u23-linux-i586.bin /opt
[root@localhost Downloads]$ cd /opt
[root@localhost opt]$ ls -al
합계 82496
drwxr-xr-x.  2 yi yi     4096 2010-12-16 21:32 .
drwx------. 23 yi yi     4096 2010-12-16 21:04 ..
-rw-rw-r--.  1 yi yi 84461758 2010-12-16 21:32 jdk-6u23-linux-i586.bin

2. 처음 받은 binary 파일의 경우 실행권한이 없으므로 권한을 준다.
[root@localhost opt]$ chmod +x jdk-6u23-linux-i586.bin
[root@localhost opt]$ ls -al
합계 82496
drwxr-xr-x.  2 yi yi     4096 2010-12-16 21:32 .
drwx------. 23 yi yi     4096 2010-12-16 21:04 ..
-rwxrwxr-x.  1 yi yi 84461758 2010-12-16 21:32 jdk-6u23-linux-i586.bin

3. 바이너리 파일을 실행하면 아래와 같이 자동으로 unpack 및 완료가 되었다는 메세지를 확인 할 수 있다.
[root@localhost opt]$ ./jdk-6u23-linux-i586.bin
...
Java(TM) SE Development Kit 6 successfully installed.
...
Press Enter to continue.....

 
Done.
4. 다운 받았던 파일 삭제
[root@localhost opt]$ rm -rf jdk-6u23-linux-i586.bin
[root@localhost opt]# ls -al
합계 12
drwxr-xr-x.  3 root root 4096 2010-12-16 21:46 .
dr-xr-xr-x. 23 root root 4096 2010-12-16 19:08 ..
drwxr-xr-x. 10 yi   yi   4096 2010-12-16 21:36 jdk1.6.0_23
[root@localhost opt]#

5. 파이어폭스 플러그인에서 사용하는 java 링크를 변경하고자 하였는데 libjavaplugin_oji 파일이 없었는데 있는 분들은 설치시 해주시기 바랍니다.
[root@localhost /]# ln -s /opt/jdk1.6.0_23/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

6. 패스 설정
[root@localhost /]# vi /etc/profile.d/java.sh
export J2RE_HOME=/opt/jdk1.6.0_23/jre
export PATH=$J2RE_HOME/bin:$PATH

7. 기존 시스템에 깔린 자바 확인
[root@localhost ~]# which java
/usr/bin/java

8. 설치한 자바로 패스 설정 및 확인
[root@localhost /]# source /etc/profile.d//java.sh
[root@localhost /]# which java
/opt/jdk1.6.0_23/jre/bin/java

10. 시스템에서 사요할 자바를 설정.
[root@localhost /]# /usr/sbin/alternatives --install /usr/bin/java java /opt/jdk1.6.0_23/jre/bin/java 2
[root@localhost /]# /usr/sbin/alternatives --config java

3 개의 프로그램이 'java'를 제공합니다.

  선택    명령
-----------------------------------------------
   1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
*+ 2           /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
   3           /opt/jdk1.6.0_23/jre/bin/java

현재 선택[+]을 유지하려면 엔터키를 누르고, 아니면 선택 번호를 입력하십시오: 3
(위와 같이 선택할 수 있는 화면이 나오면 새로 설치한 경로의  java 를 선택하면 설치가 완료 된다.)

11. 설치된 자바 확인 및 버젼 확인
[root@localhost /]# /usr/sbin/alternatives --display java
java - 상태가 수동입니다.
현재 /opt/jdk1.6.0_23/jre/bin/java로 링크되어 있습니다
/usr/lib/jvm/jre-1.5.0-gcj/bin/java - 우선순위 1500
 슬레이브 javaws: (null)
 슬레이브 keytool: /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
 슬레이브 orbd: (null)
 슬레이브 pack200: (null)
 슬레이브 rmid: (null)
 슬레이브 rmiregistry: /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
 슬레이브 servertool: (null)
 슬레이브 tnameserv: (null)
 슬레이브 unpack200: (null)
 슬레이브 jre_exports: /usr/lib/jvm-exports/jre-1.5.0-gcj
 슬레이브 jre: /usr/lib/jvm/jre-1.5.0-gcj
 슬레이브 java.1.gz: (null)
 슬레이브 javaws.1.gz: (null)
 슬레이브 keytool.1.gz: (null)
 슬레이브 orbd.1.gz: (null)
 슬레이브 pack200.1.gz: (null)
 슬레이브 rmid.1.gz: (null)
 슬레이브 rmiregistry.1.gz: (null)
 슬레이브 servertool.1.gz: (null)
 슬레이브 tnameserv.1.gz: (null)
 슬레이브 unpack200.1.gz: (null)
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java - 우선순위 16000
 슬레이브 javaws: /usr/lib/jvm/jre-1.6.0-openjdk/bin/javaws
 슬레이브 keytool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/keytool
 슬레이브 orbd: /usr/lib/jvm/jre-1.6.0-openjdk/bin/orbd
 슬레이브 pack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/pack200
 슬레이브 rmid: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmid
 슬레이브 rmiregistry: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmiregistry
 슬레이브 servertool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/servertool
 슬레이브 tnameserv: /usr/lib/jvm/jre-1.6.0-openjdk/bin/tnameserv
 슬레이브 unpack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/unpack200
 슬레이브 jre_exports: /usr/lib/jvm-exports/jre-1.6.0-openjdk
 슬레이브 jre: /usr/lib/jvm/jre-1.6.0-openjdk
 슬레이브 java.1.gz: /usr/share/man/man1/java-java-1.6.0-openjdk.1.gz
 슬레이브 javaws.1.gz: /usr/share/man/man1/javaws-java-1.6.0-openjdk.1.gz
 슬레이브 keytool.1.gz: /usr/share/man/man1/keytool-java-1.6.0-openjdk.1.gz
 슬레이브 orbd.1.gz: /usr/share/man/man1/orbd-java-1.6.0-openjdk.1.gz
 슬레이브 pack200.1.gz: /usr/share/man/man1/pack200-java-1.6.0-openjdk.1.gz
 슬레이브 rmid.1.gz: /usr/share/man/man1/rmid-java-1.6.0-openjdk.1.gz
 슬레이브 rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.6.0-openjdk.1.gz
 슬레이브 servertool.1.gz: /usr/share/man/man1/servertool-java-1.6.0-openjdk.1.gz
 슬레이브 tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.6.0-openjdk.1.gz
 슬레이브 unpack200.1.gz: /usr/share/man/man1/unpack200-java-1.6.0-openjdk.1.gz
/opt/jdk1.6.0_23/jre/bin/java - 우선순위 2
 슬레이브 javaws: (null)
 슬레이브 keytool: (null)
 슬레이브 orbd: (null)
 슬레이브 pack200: (null)
 슬레이브 rmid: (null)
 슬레이브 rmiregistry: (null)
 슬레이브 servertool: (null)
 슬레이브 tnameserv: (null)
 슬레이브 unpack200: (null)
 슬레이브 jre_exports: (null)
 슬레이브 jre: (null)
 슬레이브 java.1.gz: (null)
 슬레이브 javaws.1.gz: (null)
 슬레이브 keytool.1.gz: (null)
 슬레이브 orbd.1.gz: (null)
 슬레이브 pack200.1.gz: (null)
 슬레이브 rmid.1.gz: (null)
 슬레이브 rmiregistry.1.gz: (null)
 슬레이브 servertool.1.gz: (null)
 슬레이브 tnameserv.1.gz: (null)
 슬레이브 unpack200.1.gz: (null)
현재 '최고' 버전은 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java입니다.

[root@localhost /]# java -version
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)

Posted by Tiwaz
Database/MySQL2010. 12. 14. 17:10

윈도우에서 설치만 하면 잘 돌던 MySQL을 fedora 12에 설치 후 구동 중

몇몇 명령어에 아래와 같은 에러를 뿌리더라 -_ㅠ

mysql> describe board;
 ' ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_6bb_0.MYI' (Errcode: 13) '

이유인즉 리눅스 환경에서 /tmp 디렉토리의 권한 중 방문자의 쓰기 권한이 없어서 발생

무식한 방법이지만.... /tmp 디렉토리의 권한에 쓰기 권한을 준다 -_-;;

[root@localhost /]# chmod 777 /tmp
[root@localhost /]# ls -al
...
drwxrwxrwx    25  root  root   4096  2010-12-14  16:54   tmp
..

변경 완료 후
mysql> describe board;
....
테이블 정보 출력~!


** MySQL의 tmp 파일 저장 경로 설정 방법이오니 참고 바람.
http://dev.mysql.com/doc/refman/5.0/en/cannot-create.html

'Database > MySQL' 카테고리의 다른 글

GUI 툴을 이용한 MySQL 사용하기 1 - SQLyog  (0) 2010.12.07
Posted by Tiwaz
Database/MySQL2010. 12. 7. 11:24

MySQL을 사용할때 command 창으로만 사용한 경험만 있어서 SQL-Deveoloper 같은 툴이 없나 찾아보게 되었는데요.
GNU 프로젝트의 한가지로 google 쪽에서 개발이 되고 있는듯? 합니다.
초보자도 쉽게 설치 및 사용 가능하며 아래의 경로에서 다운로드 가능합니다.

다운로드 : http://code.google.com/p/sqlyog/

사용법은 오라클 기본 관리 도구인 SQL-Deveoloper와 유사하며 아래의 MySQL 텝으로만 사용 가능합니다.

 

1. 연결 설정

2. 연결 후

 

Posted by Tiwaz
.Net Framework/.NET2010. 11. 29. 11:16
웹파트 ?? 라는 녀석을 해보려고 굴러다니는 예제를 주워서 조합해보니.....
뭔가 에러가 뚜둥 -

[ dbo.aspnet_CheckSchemaVersion ] 이런 인스턴스가 있다나 없다나 -_ㅠ

아직 배우는 단계라 웹파트도 버벅이지만 웹파트 - SQL 서버 등록 도구로 생성된 테이블 이 두녀석들이 연관 관계가 있나 보다.

툴을 상세 옵션은 아래를 참조 -
http://msdn.microsoft.com/ko-kr/library/ms229862(VS.80).aspx

- ASP.NET SQL Server 등록 도구???
ASP.NET의 SQL Server 공급자에서 사용할 Microsoft SQL Server 데이터베이스를 만들거나 기존 데이터베이스의 옵션을 추가 또는 제거하는 데 사용됩니다.

일단 웹파트를 사용하기 위한 관련 테이블을 생성하기 위해서 자~ 하나씩 차근차근 순서대로 해보도록 하자.

1. 생성된 [SUMA] 라는 데이터베이스를 자세히 보면 테이블에 [시스템테이블] 항목만 있다.


2. 시작->프로그램->Microsoft visual Studio 2008 --> Visual Studio Tools -> Visual Studio 2008 명령 프롬프트 선택



3. 명령프롬프트가 실행되면 aspnet_regsql 을 입력 후 enter


4. 아래와 같이 ASP.NET SQL Server 설치 마법사가 실행되면 다음 클릭


5. 새로운 것을 추가 할 것이므로 [응용 프로그램 서비스에 대해 SQL Server 구성] 선택 후 다음 클릭


6. 설치할 서버와 데이터베이스를 확인하고 서버 인증 방법을 선택 후 다음
서버 : TIWAZ
인증방법 : 윈도우 인증
데이터베이스 : SUMA


7. 설정한 정보가 맞는지 확인 후 다음 클릭


8. 설치가 완료 되면 아래와 같이 완료 창을 확인후 마침 클릭.


9. 다시 SQL Server 로 돌아와서 테이블을 확인해보면 aspnet_ 로 시작하는 테이블이 생성 된 것을 확인할 수 있다.


여기까지 끝 -

웹파트는 다시 정리후....-_-

'.Net Framework > .NET' 카테고리의 다른 글

▒ 개발자가 빠지기 쉬운 “나쁜 습관 6가지” ▒  (4) 2010.02.03
.NET Framework란?  (0) 2010.01.28
JQuery를 이용한 메뉴바  (0) 2009.12.14
ILDASM.EXE 사용법  (0) 2009.11.16
IBatis + SQL server 2005 설정  (0) 2009.10.27
Posted by Tiwaz
Database/SQL Server2010. 11. 25. 12:06

SQL Server 에서 세션 죽이기 -

1. 현재 연결된 세션을 조회 한다.
SQL> select * from master.dbo.syslockinfo

2. 죽이고자하는 세션의 spid 를 입력하여 죽여 준다 -
SQL> kill [spid]

Posted by Tiwaz
WAS2010. 11. 12. 15:27

이슈 내용 : WebLogic 서버를 실시간으로 운영 상태를 체크할 때 최초 모듈 생성 및 배포시 정상적으로 서버 구동 및 DB connection에 이상이 없지만... 시간이 지날 수록 WebLogic에서 커넥션 풀에 대한 자원 해제가 원할 하지 않아 Connection 이 끊어지는 사태가 발생 할 수 있다. 그래서 Connection pool을 설정하는 방법을 간단하게 설명 하겠다.

1) Services > JDBC > Connection Pools > XXXX Connection Pool 이라는 이름 이 있으면 선택.
2) 설정 Tap 에서 Connections 메뉴 선택. 아래와 같은 창이 뜨면 아래와 같이 설정한다.
Maximun Capcity : 15 (기본 15개 - 최대 Connection 갯수를 입력 한다.) ==> 원하는 만큼 확장 필자는 30으로 함;
StatementCache Size : 10 (기본 10개 - SQL 쿼리문에 대한 cache size를 선택 한다.) ==> 20 (2배 줌)


3) 아래의 설정이 끝나면 Advaced Options 메뉴 보기를 클릭.
아래와 같은 체크 체크박스를 볼 수 있다. 2가지 옵션의 기본 값은 체크가 안된 상태이다.

- Enable Connection Leak Profiling : 구글링하며 본 내용인즉 웹로직 서버의 GC가 돌면서 운휴 커낵션을 자동해제 해주어야 하는데 안그럴 경우가 있다고 한다. 그래서 Profiling 기능을 설정하면 웹로직 서버에서 동작하지 않는 connection을 찾아 자동으로 해제 해준다고 한다.

- Test Reserved Connection : DB 서버로 테스트 쿼리를 날림.





위와 같이 설정이 완료되면 심한 과부하가 아닌 이상 DB서버와의 connection이 죽을 일은 없을 것 같다 -_-
Posted by Tiwaz
ORACLE2010. 11. 12. 15:02


win XP SP2 에서 Oracle 11g 설치를 처음으로 해봤다.
설치 완료 후 서비스 관리자 항목을 보던중 아래와 같은 오류 메세지를 뿌리며 서비스가 구동이 되지 않더라...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
다음 오류로 인해 Enterpirse Manager 구성을 실패했습니다.
Database Control을 시작하는 중 오류가 발생했습니다.
자세한 내용은 C:\oracle\administrator\cfgtoollogs\dbca\orcl\emConfig.log에 있는 로그 파일을 참조하십시오.
나중에 C:\oracle\Administrator\product\11.1.0\db_1\bin\emca스크립트를 수동으로 실행하여 Enterprise Manager로 이 데이터베이스 구성을 재시도 할 수 있습니다.

-----------------------------------------------------------------------------------------
데이터베이스 구성 파일은 C:\oracle\Administrator에 설치되었으며 설치 시 선택한 다른 구성 요소는 C:\oracle\Administrator\product\11.1.0\db_1에 설치되었습니다. 실수로 이들 구성 파일을 삭제하지 않도록 주의하십시오.

설치 프로그램에서 "Oracle Windows 인터페이스" 구성 요소 그룹에 제품을 설치했습니다. Microsoft Visual Studio에서 Oracle Database를 사용하여 완벽한 개발 작업을 수행할 수 있도록 지원하기 위해 Oracle은 Oracle Technology Network에서 "Oracle Developer Tools for Visual Studio .NET"의 최신 버전을 다운로드하여 설치할 것을 권장합니다.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

문제를 해결 해보고자 구글링을 하다가 찾은 자료 -

문제시 자삭 하겠지만... 참조 경로는 아래와 같다.
http://pavandba.wordpress.com/2010/05/18/em-dbconsole-not-started-and-giving-net-helpmsg-3547/

내용인 즉 Oracle 10g 기준으로 em을 재구성 하는 내용 ;;;

원본 파일이라 수정은 차후 정리하여 새로 작성 하겠음...



1) i checked the status of dbconsole as follows

C:\Documents and Settings\oracms>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://cmsp-database.klpcph.local:5500/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.
——————————————————————
Logs are generated in directory N:\oracle\product\10.2.0\db/cmsp-database.klpcph.local_KLPPROD01/sys
man/log

2) then i tried starting dbconsole and got following error

C:\Documents and Settings\oracms>emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://cmsp-database.klpcph.local:5500/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control …The OracleDBConsoleKLPPROD01 service is s
tarting…………………………………………………………………………………
……………………………………………………………………………………….
……………………
The OracleDBConsoleKLPPROD01 service could not be started.

A service specific error occurred: 1.

More help is available by typing NET HELPMSG 3547.

3) then i tried to find out what this message is

C:\Documents and Settings\oracms>NET HELPMSG 3547

A service specific error occurred: ***.
EXPLANATION

A service-specific error occurred.

ACTION

Refer to the Help or documentation for that service to determine the problem.

as you can see we cannot understand what is the exact problem here…

4) sometimes this problem may occur because SYSMAN and DBSNMP users got locked. so i checked their account status

C:\Documents and Settings\oracms>sqlplus “/ as sysdba”

SQL*Plus: Release 10.2.0.4.0 – Production on Tue May 18 08:26:24 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Release 10.2.0.4.0 – 64bit Production

SQL> select username,account_status from dba_users;

USERNAME                       ACCOUNT_STATUS
—————————— ——————————–
MGMT_VIEW                      OPEN
SYS                            OPEN
SYSTEM                         OPEN
DBSNMP                         OPEN
SYSMAN                         OPEN

so from above, its clear that both the user accounts are open

5) then i checked if agent is running or not

C:\Documents and Settings\oracms>emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
Agent is Not Running

6) because agent is not running, i tried to start it

C:\Documents and Settings\oracms>emctl start agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

as mentioned i tried to check what this message is…

C:\Documents and Settings\oracms>NET HELPMSG 2185

The service name is invalid.
EXPLANATION

You tried to start a service that is not configured on this system.

ACTION

Check the spelling of the service name or check the configuration information for the service using
the Services option from Server Manager.

7) restarting the server could be a solution, but we cannot do that if it is a production database. so i recreated repository
Do remember, recreating enterprise manager repository will not have any impact on database functionality

before recreating, take out the info like
Database hostname
Database SID
Listener port number
password for SYS user
password for DBSNMP user
password for SYSMAN user
also, it is important that DBSNMP and SYSMAN user’s account should be opened

use the following command to recreate repository

C:\Documents and Settings\oracms>emca -config dbcontrol db -repos recreate

STARTED EMCA at May 18, 2010 8:28:24 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: KLPSTAGE01
Database Control is already configured for the database KLPSTAGE01
You have chosen to configure Database Control for managing the database KLPSTAGE01
This will remove the existing configuration and the default settings and perform a fresh configurati
on
Do you wish to continue? [yes(Y)/no(N)]: y
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
—————————————————————–

You have specified the following settings

Database ORACLE_HOME ……………. N:\oracle\product\10.2.0\db

Database hostname ……………. klpdbscph601.klpcph.local
Listener port number ……………. 1521
Database SID ……………. KLPSTAGE01
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: y

this successfully created repository and started my dbconsole

'ORACLE' 카테고리의 다른 글

Transportable Tablespaces - TTS  (0) 2013.07.31
Oracle 10g - SGA 사이즈 변경시 SGA 전체 메모리 크기보다 클 경우 spfile 복구  (0) 2012.01.10
WHERE 1=1  (0) 2010.07.19
도메인(Domain)  (0) 2010.06.08
Procedure & Fuction 삭제  (0) 2010.05.19
Posted by Tiwaz
Mobile2010. 9. 28. 00:12

모든 프로그램의 기본 Hello, World 출력 어플 만들기


1. 신규 프로젝트 생성 창에서 Android --> Android Project 선택

2. 생성할 프로젝트 정보 설정
- Application name : Hello, Android
- Package name : org.example.hello
- Activity : Hello

3. 생성된 HelloAndroid 프로젝트. 생성된 Hello.java 파일을 연다.


4. Hello.java
** 기본 생성된 파일

** Hello, Android!! 출력

5. 결과
Posted by Tiwaz