'2007/08'에 해당되는 글 4건
DDL, DML, DCL 커맨드 :: 2007/08/30 08:47
What are the difference between DDL, DML and DCL commands?
DDL
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
- CREATE - to create objects in the database
- ALTER - alters the structure of the database
- DROP - delete objects from the database
- TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
- COMMENT - add comments to the data dictionary
- RENAME - rename an object
DML
Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
- SELECT - retrieve data from the a database
- INSERT - insert data into a table
- UPDATE - updates existing data within a table
- DELETE - deletes all records from a table, the space for the records remain
- MERGE - UPSERT operation (insert or update)
- CALL - call a PL/SQL or Java subprogram
- EXPLAIN PLAN - explain access path to data
- LOCK TABLE - control concurrency
DCL
Data Control Language (DCL) statements. Some examples:
- GRANT - gives user's access privileges to database
- REVOKE - withdraw access privileges given with the GRANT command
TCL
Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
- COMMIT - save work done
- SAVEPOINT - identify a point in a transaction to which you can later roll back
- ROLLBACK - restore database to original since the last COMMIT
- SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use
웹로직 8.1에서 스프링 어플리케이션 배포 :: 2007/08/13 16:39
웹로직8.1에서 스프링 프레임워크를 사용한 war 형태의 웹어플리케이션을 배포할 때
아래와 같은 오류가 발생한 다면..
weblogic.management.DeploymentException:
Exception:weblogic.management.ApplicationException: start() failed.
Module: batman Error: weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception:
[java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded]
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2423)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2138)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2237)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2132)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2384)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
아마도 log4j 설정과 관련이 있을 것입니다.
web.xml 에서 log4j listener 설정 부분을 제거하라.
<!--
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
-->
UTF-8 개발시 한글 처리 :: 2007/08/13 09:44
1. 모든 문서는 UTF-8 인코딩으로 저장되어야 함.
이클립스의 경우 Properties->Info->Text file encoding->Other 을 UTF-8 로 설정함.
2. JSP 파일 상단에 다음과 같이 인코딩 설정.
<%@ page contentType="text/html;charset=UTF-8" %>
3. 서블릿인 경우 아래와 같은 코드로 인코딩 처리.
response.setContentType("text/html;charset=UTF-8");
4. 자바스크립트에서 GET 방식으로 URL에 파라미터를 넘길 경우 아래처럼 인코딩 처리.
encodeURIComponent("Get방식한글");
5. Tomcat 서버일 경우 server.xml에서 Connector 요소에 URIEncoding="UTF-8" 속성을 추가.
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
6. HttpURLConnection 을 통하여 UTF-8로 된 URL을 읽을 경우.
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream(), "UTF-8"));
7. JSP -> Bean 데이터 전송은 문제 없지만 JSP -> JSP 에서 한글이 깨진다면 받는 부분에서 아래처럼 처리.
String test = request.getParameter("test");
test = new String(test .getBytes("8859_1"), "UTF-8");
8. MySQL 등 DBMS 역시 기본으로 UTF-8 세팅이 되어있어야 함.
9. UTF-8으로 인코딩 된 파일을 자바로 읽을 경우.
BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
오라클 LOB 타입 문자열 검색 :: 2007/08/10 17:00
WHERE
DBMS_LOB.INSTR(CONTENT,'검색어') > 0
;

