'분류 전체보기'에 해당되는 글 418건
- 2009.03.16 대충의 JBoss-4.2.3 GA 릴리즈 노트 정리
- 2009.03.16 JBoss 5.0.0 변경 내역
- 2009.03.13 Dual-Master Replication in MySQL
- 2009.03.13 오라클 관리 명령어 요약-
- 2009.03.10 JBoss 설정하기
- 2009.03.06 jboss 에서 datasource 설정 하기 및 테스트
- 2009.03.02 Windows에서 MySQL 설치하기
- 2009.03.02 MySQL Cluster
- 2009.03.02 MySQL리플리케이션
- 2009.02.25 [번역]MySQL Table Joins
Notes:
JBoss AS 4.2.3.GA Release Notes
이번 릴리즈는 JBoss Application Server v4.2 시리즈의 세번째 버그 픽스 릴리즈이다. 이 릴리즈는 커뮤니티에서 보고된
JBossAS v4.2.x릴리즈에 대한 버그를 수정한 것이다. 이전 버전인 4.2.0/4.2.1/4.2.2에 대한 하위버전 호환성이 있으므로
그냥 업그레이드 해도 된다. 자세한 내용은 상세 릴리즈 노트 섹션을 참고하십시오.
이 릴리즈의 두번째 목정은 Java6에 대한 지원이 향상되었다는 것이다. JBossAS 4.2.3.GA는 JDK5와 JDK6을 이용하여 빌드가
가능하다. JDK5 컴파일된 바이너리는 엄격한 테스트를 거쳐서 안정성을 보장할 수 있고, Java 5&6 VM에서 동작한다.( JDK6에 대해서
약간의 설정 변경이 필요하다. 아래를 참조 ) JDK6으로 컴파일된 버전은 JDBC 4 API를 지원한다. 그러나 지금 시점에서는 실험적이라고
생각한다.
JBoss AS 4.2 는 5.대 버전으로 넘어가는 과정에 있고, 5.대의 좋은 기능들을 (4.대 커널에 맞추어) 일부 적용하고 있다.
JBoss AS 4.2는 또한 JBoss Enterprise Application Platform의 중심축이다. JBoss AS와 JBoss Seam이 패키징되어 제공되는 상용 Application
플랫폼은 JBoss/Red Hat에 의해 제공된다. 자세한 정보는 Sacha의 블로그를 읽어보시라.
Java EE 1.4 를 구현한 API에 대한 내용은 Java EE v1.4 문서에 있다. Java EE 1.4에 대한 깊은 이해가 필요하면,Java EE™ 1.4 Tutorial를 읽어보라.
jboss-4.2.x 시작하기 안내 문서는 JBoss Application Server 문서 목록에 포함되어 있다.
Note: 4.2.x 릴리즈에서는 EJB3같은, 일부 JavaEE5 기능을 제공한다. 그러나 이는 Java EE5 인증을 받지 않았다.
Overview
* Highlights
* Known Compatibility Issues
* Known Configuration Issues
* JBoss/Thirdparty Library Updates
* Detailed Release Notes
* Additional Docs and Help
* Licenses
* About JBoss
Highlights of JBoss AS 4.2 series
* JBoss EJB3는 기본적으로 JBossAS 4.2.x에 포함되어 배포된다. JDK5에 기반하고 있기 때문에, 좀더 편리한 점이 있다. 더 이상
jdk1.4 런타임용 소스를 관리하지 않아도 된다. 기본적으로 jdk5에서 실행된다고, 가정한다.
* JBoss Web v2.x는 JBossAS 4.2에 포함되는 웹 컨테이너이고, Apache Tomcat에 기반하여 구현되었다. Tomcat에는 Apache Portable Runtime(APR)이 포함되고,
Apache Http 서버에 필적하거나 능가하는 tomcat의 native 대용량 처리와 성능 관련 특징들이 포함되어 있다.
이 native 라이브러리가 없으면 JBoss Web은 표준 non-native connector mode로 동작한다. native library는 별개로 다운로드하여 JBOSS_HOME/bin/native에 설치해야한다.
* Jboss Transactions v4.2는 JBossAS 4.2의 기본 트랜잭션 관리자이다. Jboss 트랜잭션은 18년간 산업현장에서 분산 트랜잭션분야의 선두로 이요되었고 검증되었다.
JBoss 트랜잭션의 JTA버전은 완전히 복구 가능한 트랜잭션을 제공한다. 분산 트랜잭션 지원을 위해서 JBoss 트랜잭션의 JTS버전이 필요하다.
또한, 언제나 과거의 JBossTM fast in-memory transaction manager 로 되돌릴 수도 있다. (단,구버전은 더이상 지원이 없을 것이다.)
* JBoss WS는 JBoss 4.2와 함께 제공되는 웹 서비스 스택이다.
* JGroups/JBossCache는 필요한경우 이용할 수 있는, 채널 다중화 를 제공한다.
* JBoss Remoting는 최신 2.2.x버전으로 업그레이드 되었다. 이는 새로운 JBoss Messaging을 필요로 하는 써드파트 라이브러리에 대한
의존성을 해결하기 위한 것이다. 즉, 특별한 개발 없이 JBossMQ 메시징 프로바이더를 JBoss Messaging으로 바꿀수 있다는 의미이다.
Compatibility Issues
This lists the changes that could affect compatibility.
우리의 제품 버전 원칙에 의해 JBossAS 4.2.3는 4.2.x 버전과 완벽히 일치한다. 그러나, 개별적인 JBoss나 써드파티 라이브러리 역시 그런지
확인하고 싶을것이다. 이전 버전의 JBoss 릴리즈와 관련된 이슈에 대해 다음에 대해 체크할 필요가 있다. :
(신버전 설치와 무관하므로 패스함)
JBossAS 4.2.2.GA
* JBossWS 1.2.1 supported JAX-WS only as a technology preview while JBossWS 2.0.1 used in AS 4.2.2 provides full
JAX-WS support. If you have used in your code the annotation org.jboss.ws.annotation.WebContext this must be
replaced by org.jboss.wsf.spi.annotation.WebContext.
* JBoss WS 1.0.x due to a deployer limitation used a proprietary .jse extension for deploying WS endpoints
nested in .sar files. This was deprecated with JBoss WS 1.2.x. and with JBoss WS 2.x this proprietary extension is
not supported anymore as it is possible to use the standard .war extension for deploying nested WS endpoints. If you
see: INIT_WAITING_DEPLOYER error messages for .jse files, re-package them using a .war extension, JBWS-1854.
* Another known limitation is that EJB3 web service endpoints can only be specified using annotations and not
metadata in jboss.xml. This is something that will be addressed in a future release, JBAS-4852, JBWS-1813.
* Finding the default local business interface on a ejb3 bean may not work in certain inheritance scenarios.
You may workaround this known problem by annotating the local business interface. Read more about this at EJBTHREE-1062.
* EJB Timer related fixes, JBAS-3379, JBAS-4053.
* JBossMQ related fixes, JBAS-4525, JBAS-4555, JBAS-4559, JBAS-4607, JBAS-4625, JBAS-4699
* JSP compiler now set to compile JDK 1.5 source code by default, JBAS-4605.
* The mail-ra.rar resource adapter was missing from the distro, JBAS-4659.
* HSQLDB (which shouldn't be used in production) v1.8.0.8 has a known bug when used in server mode,
JBAS-4694. This doesn't affect the default jboss installation where HSQLDB is used in in-process mode.
* Serialization of HomeHandleImplIIOP has changed. In the unlikely case of a compatibility problem, define the
system property
-Dorg.jboss.proxy.ejb.old.homehandle.serialization=true
to fall back to the legacy serialization mode, JBAS-4801.
JBossAS 4.2.1.GA
* JBoss TS, the new default transaction manager will not let you enlist multiple 1-phase participants in the
same transaction. This was *not* the default behavior with the legacy JBoss TM that would log a warning and continue.
There are good reasons for this change, mainly to avoid heuristic outcomes in the case of system crashes, which is
the primary reason of using a transaction manager anyway! If your come across this problem you should try to fix it
by switching to XA resources or implementing some form of compensating transactions. However, if this is not option
and you are fully aware of the consequences you can override this behavior by setting com.arjuna.ats.jta.allowMultipleLastResources
to true in conf/jbossjta-properties.xml. For more details read the wiki on Multiple1PC, or consult the JBoss
Transactions documentation.
* A major problem related to the cleaning up of threads after user transaction timeouts was corrected in JBAS-4481.
If you happen to be using User Transactions make sure you follow the correct pattern for committing or rolling them back.
* Another serious classloading issue that could lead to a hanging JBoss with a 100% CPU utilization was fixed with JBAS-4441.
JBossAS 4.2.0.GA
* A JavaSE 5 runtime is required to run JBossAS 4.2. A full JDK with tools.jar support is no longer needed by
jboss, since JBoss Web packages the eclipse JDT compiler for compiling JSP pages and javassist has its own internal
compiler. JAVA_HOME can point to a JRE, JBAS-4161.
* When compared to previous 4.0.x releases, the various JBoss APIs should be stable but backwards compatibility for
individual component implementations may not be guaranteed, e.g. interoperating with another JBoss instance that uses
an older version of JGroups.
* Tomcat 6 is now bundled as part of JBoss Web. deploy/jbossweb-tomcat55.sar has been replaced by deploy/jboss-web.deployer.
* conf/log4j.xml has been renamed to conf/jboss-log4j.xml, to allow log4j.properties override from scoped
deployments, JBAS-1853.
* log4j and commons-logging have both been upgraded. commons-logging is patched in addition, JBAS-2823.
* Since the latest log4j includes a trace level, there is no need to reference the custom jboss TRACE level in
conf/jboss-log4j.xml configs, JBAS-4163.
Instead of: <category name="org.jboss.system"><priority value="TRACE" class="org.jboss.logging.XLevel"/></category>
you can use: <category name="org.jboss.system"><priority value="TRACE"/></category>
* Better integration with WebSphere MQ 5.x, JBAS-3183.
* The MyFaces JSF implementation has been replaced by the Glassfish JSF 1.2 one, JBAS-3897.
* Hibernate, hibernate-annotations and hibernate-entity-manager have all been upgraded. to v3.2.1.
* The default invoker for EJBs has been changed from the rmi-invoker to the unified-invoker, provided by JBoss
Remoting, JBAS-3950.
* Apache commons http-client and apache-codec were removed from jbossall-client.jar, JBAS-4365.
* The address that is stored in the host portion of the RMI codebase URL can now be set correctly, JBAS-3325.
* The java2ClassLoadingCompliance setting in jboss-web.xml was ignored; this has been fixed, JBAS-3047.
* In JBoss 4.2 the unified invokers based on JBoss Remoting are the default transport for accessing EJBs.
Using the unified invokers JBoss 4.2 can interoperate safely with JBoss AS 4.0.4.GA/4.0.5.GA, using the flag
-Djboss.remoting.pre_2_0_compatible=true on the JBoss 4.2.x side. For interoperating with older JBoss AS versions
(3.2.8.SP1 to 4.0.3.SP1) the legacy rmi or pooled invokers need to be used. See JBAS-4407 and the wiki page on JBoss
Version Compatibility.
Configuration Issues
This lists the changes that could affect configuration.
JBossAS 4.2.3.GA
* JBossAS 4.2.3.GA 는 Java5,Java6과 모두 사용될 수 있다. Java5로 컴파일된 바이너리가 메인 배포본이다. 이는 Java5&6환경에서
철저한 테스트를 거쳤다. Java6에서 실행할때는 다음 라이브러리를 JBOSS_HOME/client 에서 JBOSS_HOME/lib/endorsed directory로
복사해야한다. 그래야 JBossWS에서 JAX-WS 2.0을 사용할 수 있다.:
o jboss-jaxrpc.jar
o jboss-jaxws.jar
o jboss-jaxws-ext.jar
o jboss-saaj.jar
o jaxb-api.jar
* Sun Java 6과 이용할때, 문제가 발생하면 -Dsun.lang.ClassLoader.allowArraySyntax=true 를 사용하라.
Java6에서는 다른 몇가지 잠재적인 문제가 있다.:
o ORB getting prematurely destroyed when using Sun JDK 6 (see Sun Bug ID: 6520484)
o Unimplemented methods in Hibernate for JDK6 interfaces.
* Java6으로 컴파일된 JBossAS 4.2.3 에서는 확장 JDBC 4 API를 사용할 수 있다. 이는 Java6 환경에서만 사용가능하다.
수동으로 설정해야 하는 것은 없다. 단, 실험적인 상태라는 것을 명심해야한다.
JBossAS 4.2.2.GA
* Extensions to LdapExtLoginModule, JBAS-4619.
* Escape syntax for mysql and postgresql in jboss CMP, JBAS-4463.
* Introduced a new system property org.jboss.mx.loading.UnifiedLoaderRepository.notifyMode to
provide fine-grained control over the emission of notifications whenever Unified Classloaders are created.
Classloader leaks can appear if those notifications are send to remote jmx agents, so the usage of the flag can
avoid this problem, JBAS-4953.
JBossAS 4.2.1.GA
* %PATH% is not removed from java.library.path in the presence of JAVA_HOME/bin/native, so e.g. native jdbc
drivers can be loaded, JBAS-4418.
JBossAS 4.2.0.GA
* JBossAS now binds its services to localhost (127.0.0.1) *by default*, instead of binding to all
available interfaces (0.0.0.0). This was primarily done for security reasons because of concerns of users going to
production without having secured their servers properly. To enable remote access by binding JBoss services to a
particular interface, simply run jboss with the -b option. To bind to all available interfaces and re-enable the
legacy behaviour use -b 0.0.0.0. In any case, be aware you still need to secure you server properly.
* There now distinct properties to configure the various mcast ports, JBAS-4021.
* When running under Linux, run.sh forces the use of IPv4, due to a jdk bug, JBAS-4332.
* JBoss EJB3 is now included by default. If you don't need/want EJB3 support, simply remove deploy/ejb3.deployer.
* When using native libraries for JBoss Web store them in JBOSS_HOME/bin/native, which is automatically included
in the classpath, JBAS-4162.
* JBoss Transactions is the new default transaction manager in JBoss. It is configured in
conf/jboss-service.xml and has additional properties defined in conf/jbossjta-properties.xml. The transaction
log is stored by default at server/default/data/tx-object-store.
* If you are on Red Hat Linux, check out the changes in bin/jboss_init_redhat.sh, JBAS-4041.
* The JBossAS distributions usually include the installer (.jar), the sources (.tar.gz) and the canonical
binary release (.zip). Unzipping the binary distribution (.zip) with a native unzip utility will restore correctly
the executable permission in the /bin/*.sh files. However, unzipping using the JDK jar utility ignores the executable
bit, so this need to be set manually.
* bin/shutdown.sh no longer sources run.conf, JBAS-4155.
Library Updates
For a full list of the JBoss and thirdparty libraries used with JBoss AS 4.2.3 see build-thirdparty.xml.
JBossAS 4.2.3.GA
JBoss Library Updates
* javassist upgraded to v3.8.0.GA (from v3.6.0.GA)
* jboss cache upgraded to v1.4.1.SP9 (from v1.4.1.SP5)
* jboss jaxr upgraded to v1.2.0.SP1 (from v1.2.0.GA)
* jboss transactions upgraded to v4.2.3.SP7 (from v4.2.3.SP6)
* jboss ws upgraded to v3.0.1 / native v2.0.4 (from v2.0.1.SP2)
* jboss xb upgraded to v1.0.0.SP3 (from v1.0.0.SP1)
* jboss remoting upgraded to v2.2.2.SP8 (from v2.2.2.SP1)
Thirdparty Library Updates
* jfreechart upgraded to v1.0.2 (from v0.9.20)
* oswego-concurrent upgraded to v1.3.4-jboss-update1 (from v1.3.4-jboss)
* sun-jsf upgraded to v1.2_09-b01 (from v1.2_04_P02)
* codehaus-jettison was introduced at v1.0-RC2
JBossAS 4.2.2.GA
JBoss Library Updates
* javassist upgraded to v3.6.0.GA (from v3.5.0.GA)
* jboss aop upgraded to v1.5.6.GA (from 1.5.5.GA)
* jboss cache upgraded to v1.4.1.SP5 (from 1.4.1.SP3)
* jboss common upgraded to v1.2.1.GA (from v1.2.0.GA)
* jboss remoting upgraded to v2.2.2.SP1 (from v2.2.1.GA)
* jboss ts upgraded to v4.2.3.SP6 (from v4.2.3.SP5)
* jboss web upgraded to v2.0.1.GA (from v2.0.0.GA)
* jboss ws upgraded to v2.0.1.SP2 (from v1.2.1.GA)
* jboss xb upgraded to v1.0.0.SP1 (from v1.0.0.GA)
* jgroups upgraded to v2.4.1.SP4 (from v2.4.1.SP3)
Thirdparty Library Updates
* hsqldb upgraded to v1.8.0.8 (from v1.8.0.2)
* jacorb upgraded to v2.3.0jboss.patch5 (from v2.3.0jboss.patch4)
* oswego-concurrent upgraded to v1.3.4-jboss (from v1.3.4)
JBossAS 4.2.1.GA
JBoss Library Updates
* hibernate, upgraded to v3.2.4.SP1_CP01 (from v3.2.3.GA)
* jboss-ts14, upgraded to v4.2.3.SP5 (from v4.2.3.SP3)
* jboss-remoting, upgraded to v2.2.1.GA (from v2.2.0.SP4)
Thirdparty Library Updates
* jacorb, upgraded to v2.3.0jboss.patch4 (from v2.2.4jboss.patch1)
* sun-jsf, upgraded to v1.2_04_P02 (from v1.2_04_P01)
Changes:
Detailed Release Notes
JBossAS-4.2.3.GA
Feature Request
* [ JBAS-3051 ] change jmx console title to display the name of the jboss server configuration with the machine name
* [ JBAS-4156 ] [jmx-console] Add additional informatin to page header
* [ JBAS-4455 ] LoadBalancePolicy that tries to pin all requests associated with a tx to one server
* [ JBAS-4501 ] JBoss AS 4.2 won't build with JDK 1.6
* [ JBAS-4804 ] GenericHeaderAuthenticator injection of ssoid, sessioncookie name
* [ JBAS-4986 ] Remove compile-time dependency on Debugger from ClusterPartition
* [ JBAS-5035 ] MySQLValidConnectionChecker has driver name com.mysql.jdbc.Driver hard coded
* [ JBAS-5139 ] Support injection-target properties within service-ref declarations
* [ JBAS-5704 ] Provide JAAS credentials in org.jboss.ant.JMX task so that calls can be made to security protected MBeans
Bug
* [ JBAS-1901 ] web-console shows dead archives after redeploy
* [ JBAS-2477 ] Exception in web-console j2ee domain after undeploy of application
* [ JBAS-3402 ] Web Console and Firefox
* [ JBAS-3406 ] JMX Console throws 500 exception on regular expressions
* [ JBAS-3637 ] twiddle ignores environment properties when creating its InitialContext
* [ JBAS-4246 ] JBoss logo not displayed for web status when accessed from web console
* [ JBAS-4287 ] run.sh can consume 100% single CPU resources on Solaris
* [ JBAS-4343 ] NullPointerException causing bad password exception in LdapLoginModule when the role attribute is not set for a given entry
* [ JBAS-4453 ] SerializableResultSetMetaData did not have the classname for the column set.
* [ JBAS-4662 ] XADatasource property names are not using the javabean convention
* [ JBAS-4673 ] SARDeployer should throw an error if there is more than one loader repository
* [ JBAS-4753 ] ExternalContext can pass duplicate interfaces to Proxy.newProxyInstance(loader, interfaces, handler)
* [ JBAS-4766 ] HTTP session replication failover failures with async buddy replication
* [ JBAS-4805 ] InitialContextFactory.getHAContext() should not use hardcoded localhost for lookup
* [ JBAS-4815 ] UnifiedInvokerProxyHA - Client instance check and assignment should be atomic
* [ JBAS-4870 ] Redelivery flags not updated in case of JBossMQ node failure
* [ JBAS-4892 ] WebService ignores java.rmi.server.codebase system property
* [ JBAS-4897 ] CVE-2007-5461: Information Leak in Tomcat Webdav Servlet
* [ JBAS-4911 ] MSSQLValidConnectionChecker throws exception with MS SQL Server 2005 JDBC driver
* [ JBAS-4921 ] Web service deployment: web.xml modified to web.xml.org - Subsequent runs fail
* [ JBAS-4927 ] Code added in 4.2.1 breaks web app that works in 4.2.0
* [ JBAS-4934 ] JBossCacheWrapper should not re-use data gravitation option
* [ JBAS-4938 ] source tarball contains non free code
* [ JBAS-4943 ] jboss-ds_1_5.dtd is wrong
* [ JBAS-4945 ] Messages transfered from DLQ to working queue will never be resent to DLQ
* [ JBAS-4950 ] Transaction failover authorisation is broken within UnifiedInvokerHAProxy
* [ JBAS-4964 ] txFailoverAuthorizations should be keyed on transaction propagation context
* [ JBAS-4969 ] Security-domain name entry in options map causing exception in custom login modules
* [ JBAS-4975 ] Usage of read-ahead on-find with entity beans containing binary attributes (mapped to BLOB, VARBINAR, ...) breaks eager loading.
* [ JBAS-4994 ] ReplyHeaderFilter reports old versions: Servlet 2.4, Tomcat-5.5
* [ JBAS-5014 ] EJBMethodPermission implies should check for null methodname and methodSig==""
* [ JBAS-5015 ] Deploy entity beans in Oracle 11g on JBoss 4.2.1 and JBoss 4.2.1
* [ JBAS-5020 ] Incorrect system property usage in JMX console clustering service
* [ JBAS-5026 ] NPE in JvmRouteValve.handleJvmRoute
* [ JBAS-5049 ] NoInitialContextException on deployment of EAR that contains MDB and persistence.xml
* [ JBAS-5063 ] JBoss 4.2.2 doesn't work with JSF RI 1.2_07
* [ JBAS-5068 ] Possible NullPointerException in DistributedReplicantManager#_add()
* [ JBAS-5072 ] Fix null pointer exception when getting keys, values, or entry's in the ConcurrentHashmap
* [ JBAS-5080 ] Need to check transaction status on SQL operations
* [ JBAS-5091 ] BuddyCommunicationTimeout is too low
* [ JBAS-5105 ] PostgreSQL Entity Command for jdbc2pm is Not Working Properly
* [ JBAS-5108 ] Twiddle should print out 'invoke' results, even when no propertyeditor for the returned object is found
* [ JBAS-5109 ] Web context and servlet paramters not available in WebMetaData
* [ JBAS-5112 ] WebXMLRewriter leaks input stream
* [ JBAS-5127 ] Hardcoded partition name in cluster-examples-service.xml
* [ JBAS-5142 ] cmp2.x jdbc2 pm: missing a join in a collection path translating "member of"
* [ JBAS-5149 ] 'webservices' meta data (jboss.xml) not available for ejb3 web service endpoints
* [ JBAS-5189 ] Txn-Manager arjuna commits data after timeout in long transactions
* [ JBAS-5206 ] Can't start JBoss 5 with a pure JRE installation
* [ JBAS-5220 ] twiddle not displaying info regarding java.lang:* beans when
-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl is used .
* [ JBAS-5228 ] Race condition maintaining acknowledgements when pushing messages to the client
* [ JBAS-5275 ] org.jboss.test.security.test.XMLLoginModulesUnitTestCase failing on Z-servers
* [ JBAS-5317 ] org.jboss.test.security.test.HttpsUnitTestCase failing with the IBM jvm
* [ JBAS-5354 ] Need to improve error handling around thread pool errors
* [ JBAS-5364 ] UnifiedInvokerHAProxy can throw NullPointerException under load
* [ JBAS-5428 ] Addition of undocumented feature has caused a bug in normal behaviour
* [ JBAS-5431 ] PooledInvokerProxy is not using the TPC factory setup by the UserTransaction client
* [ JBAS-5444 ] remove twiddle.bat/shutdown.bat %ARGS% processing in favour of %*
* [ JBAS-5459 ] JDBCStartCommand fails with index already exists
* [ JBAS-5475 ] NullPointerException when no invoker proxy bindings configured
* [ JBAS-5479 ] SSLSessionInterceptor has a copy/paste error in invokeHome method
* [ JBAS-5492 ] ClusteredSingleSignOn dead member cleaner throws NPE
* [ JBAS-5502 ] Enabling JBossMQ XA recovery fails
* [ JBAS-5526 ] DB Connections established which fail check-valid-connection-sql do not immediatly close their connection
* [ JBAS-5528 ] If SingletonStatelessSessionInstancePool is used for a SLSB, container MBean state is reported incorrectly
* [ JBAS-5568 ] sample-binding.xml does not work for jboss-messaging-1.4
* [ JBAS-5571 ] When JBossMQ does XA recovery it should always write the XID to the log
* [ JBAS-5574 ] Don't log an error for BMT Stateful not completing their transactions
* [ JBAS-5608 ] Removing a session from a clustered sso entry removes all sessions
* [ JBAS-5612 ] MySQLValidConnectionChecker is not serializable
* [ JBAS-5613 ] OracleValidConnectionChecker is not serializable
* [ JBAS-5623 ] JMS ActivationSpec 'acknowledgeMode' does not follow spec recommendation
* [ JBAS-5639 ] org.jboss.test.util.test.PropertyEditorsUnitTestCase failing on Z-systems
* [ JBAS-5644 ] Incorrect containerName attribute setting in valves
* [ JBAS-5657 ] JSP source code exposure in jmx-console
* [ JBAS-5670 ] Using MessageConsumers with Message Selector make messages stuck in queue
* [ JBAS-5678 ] closed jdbc connection before transaction rollback is called
* [ JBAS-5696 ] removal of entity with self-referencing CMR and fk-constraint
* [ JBAS-5706 ] Default session metadata replication too infrequent
* [ JBAS-5735 ] Session not reliably bound to SessionReplicationContext if SecurityAssocationValve not present
Task
* [ JBAS-4148 ] Replace Gjt code used in the ejb 2.x validation phase
* [ JBAS-4424 ] WebAuthentication:Generate a SSOID
* [ JBAS-4811 ] Integrate the JBossWS core testsuite in the release QA
* [ JBAS-4874 ] Track JBoss and thirdparty dependencies for JBossAS 4.2.3
* [ JBAS-4876 ] Re-enable JGroups message bundling
* [ JBAS-4918 ] replace ${jboss.server.home.dir}/log references with ${jboss.server.log.dir}
* [ JBAS-5057 ] testsuite regression org.jboss.test.security.test.EJBPermissionUnitTestCase
* [ JBAS-5059 ] Update Service Binding configuration for JBossMessaging
* [ JBAS-5060 ] Upgrade jfreechart to v1.0.2
* [ JBAS-5088 ] Failing org.jboss.test.jbossmq.test.ConnectionConsumerErrorFiredUnitTestCase.testExceptionListenerFiredOnError (jrockit)
* [ JBAS-5094 ] org.jboss.test.jaxr.scout failures
* [ JBAS-5101 ] Re-enable JGroups message bundling
* [ JBAS-5210 ] Expose sub-pool statistics for Improved Management.
* [ JBAS-5226 ] ClientUserTransaction should be configured with Unified invoker
* [ JBAS-5331 ] AOP deployer should include pluggable instrumentor jar(s)
* [ JBAS-5402 ] Keep JBoss Cache jars out of default
* [ JBAS-5485 ] Add mdbsessionpoolclear testcase from EJB3
* [ JBAS-5648 ] Upgrade to jboss-jaxr-1.0.2.SP1
* [ JBAS-5650 ] Merge clustering fixes from EAP branch
* [ JBAS-5677 ] Add discussion of usage of FC to Clustering Guide
* [ JBAS-5702 ] Add JDBC4 support to DataSourceInterceptor
* [ JBAS-5710 ] Get the JBoss-AS-4.2.x-TestSuite-sun15 passing
* [ JBAS-5711 ] Get the JBoss-AS-4.2.x-TestSuite-jrockit15 passing
* [ JBAS-5712 ] Add JDBC4 support to Branch_4_2
* [ JBAS-5720 ] Get a JBoss-AS-4.2.x-TestSuite-sun15-sun16 going
* [ JBAS-5721 ] Get a JBoss-AS-4.2.x-TestSuite-sun16-sun16 going
* [ JBAS-5722 ] Get all the testsuites passing
* [ JBAS-5723 ] Verify JBoss-AS-4.2.x-CompatibilityMatrix
* [ JBAS-5724 ] Verify TCK1.4 tests are passing
* [ JBAS-5725 ] Verify EJB3 tests are passing
* [ JBAS-5726 ] Verify JBossWS testsuite
* [ JBAS-5731 ] JaxWS 2.0 / JaxWS 2.1 support for Branch_4_2
* [ JBAS-5748 ] Update links in ROOT.war/index.html
* [ JBAS-5750 ] Update the interoperability tests matrix with 4.2.2.GA client libs
* [ JBAS-5765 ] Make release notes for 4.2.3.GA
Sub-task
* [ JBAS-4875 ] Upgrade jboss transactions to 4.2.3.SP7 (from 4.2.3.SP6)
* [ JBAS-4877 ] Upgrade JSF to 1.2_08
* [ JBAS-4925 ] Upgrade jboss cache to 1.4.1.SP7 (from 1.4.1.SP5)
* [ JBAS-4933 ] Upgrade to jbossxb 1.0.0.SP3 (from 1.0.0.SP1)
* [ JBAS-4955 ] All the known bind address properties should be set to the default bind address
* [ JBAS-4962 ] Upgrade jboss remoting to v2.2.2.SP5 (from v2.2.2.SP1)
* [ JBAS-4981 ] Transaction variable is not reset in ejb2 inflow interceptor
* [ JBAS-4996 ] Upgrade jbossws to 2.0.4.GA (from 2.0.1.SP2)
* [ JBAS-5082 ] Add a transaction status interface for the connection manager and implement it in TxConnectionManager
* [ JBAS-5083 ] Add the transaction active check to the jdbc resource adapter
* [ JBAS-5084 ] Add the transaction active check to the jms resource adapter
* [ JBAS-5170 ] 4.2.x fix to get HA Singleton election policies working in heterogeneous topologies
* [ JBAS-5498 ] JDK6: org.jboss.test.security.test.LoginModulesUnitTestCase
* [ JBAS-5727 ] Upgrade javassist to 3.8.0.GA
* [ JBAS-5729 ] Upgrade jboss remoting to v2.2.2.SP8 (from v2.2.2.SP5)
* [ JBAS-5753 ] fix org.jboss.test.jbossmx.compliance.objectname.MalformedTestCase
* [ JBAS-5754 ] Get tests-webservice passing
* [ JBAS-5755 ] org.jboss.test.jca.test.StatisticsFormatterUnitTestCase.testXmlFormatterStatistics
* [ JBAS-5758 ] fix iiop tests
* [ JBAS-5764 ] Upgrade to the latest JSF implementation 1.2_09 (from 1.2_08)
* [ JBAS-5768 ] Upgrade JBoss Cache to 1.4.1.SP9
* [ JBAS-5769 ] Fix org.jboss.test.jca.test.BackgroundValidationUnitTestCase.testDeployedBackgroundValidationFailure
* [ JBAS-5770 ] fix 3 org.jboss.test.jca.test.JDBCStatementTestsConnectionUnitTestCase failures
* [ JBAS-5772 ] org.jboss.test.cluster.test/FamilyClusterInfoUnitTestCase(Default-TCP)/testSynchronization
Patch
* [ JBAS-4478 ] ignore local ant options when building
* [ JBAS-5073 ] fix build authenticated proxy (there seems to have been a cut and paste error at some point)
* [ JBAS-5527 ] jboss_4_0.dtd should include support for SingletonStatelessSessionInstancePool
Changes: Detailed Release Notes Includes versions: JBossAS-5.0.0.GA Feature Request * [ JBAS-70 ] Security event listener that could be plugged in to listen to authentication and authorization events. * [ JBAS-3767 ] Create a canonical "JndiServiceMBeanSupport" useful for binding objects to JNDI * [ JBAS-3997 ] getManagedConnection retries * [ JBAS-4588 ] DeploymentSorter in the new profile service based deployment scanner * [ JBAS-5192 ] ServiceBindingManager that can handle pojo services * [ JBAS-5348 ] Move remoting configuration into deploy * [ JBAS-5535 ] Modularisation of the JBoss Bootstrap * [ JBAS-5545 ] Implement the jsr77 view on top of the new deployers/profileservice/mc * [ JBAS-5766 ] Add new aop deployers * [ JBAS-5900 ] jars are not loaded from the lib directory of a sar in JBoss AS 5 * [ JBAS-5960 ] EJB2: Lack of security domain in JBoss DD does not bypass security * [ JBAS-5966 ] Migrate TomcatService mbean deployment descriptor to mc bean descriptor * [ JBAS-5974 ] Turn of deployment of base-aspects.xml by default * [ JBAS-5975 ] Switch to MC based AOP deployers * [ JBAS-5989 ] Security Beans need ManagedObject annotations * [ JBAS-5998 ] Add resources filtering to MetaDataAwareProfile * [ JBAS-6013 ] Support createDestination in jboss/message-driven * [ JBAS-6032 ] Refactor AOPClassLoaderDeployer * [ JBAS-6058 ] Web descriptors parsing * [ JBAS-6070 ] Need an overview of the profile service in the 5.0 docs * [ JBAS-6088 ] Add simple cache / cluster support for Spring beans * [ JBAS-6099 ] add alternate, not meta data based JSF injection provider * [ JBAS-6130 ] AS5:JACC: * in web.xml should allow configurable authorization bypass * [ JBAS-6136 ] Pojoize the jca configuration * [ JBAS-6158 ] Reduce the distribution size by sharing the libraries between the all and default configs * [ JBAS-6182 ] Add support for JBC MVCC locking in Hibernate 2nd Level Cache configs * [ JBAS-6205 ] Make server.log logging level configurable via system property * [ JBAS-6223 ] Externalize the DeploymentRepository attachments location * [ JBAS-6267 ] Introduce SecurityContextInterceptor in the ejb2 proxy Bug * [ JBAS-2149 ] ByValueContainerInvoker * [ JBAS-5081 ] New transaction manager does not implement TransactionTimeoutConfiguration properly * [ JBAS-5114 ] MessageDriven EJB3 does not create destination automatically * [ JBAS-5115 ] Valid jboss-app.xml file not recognized correctly by jbossxb runtime * [ JBAS-5209 ] Hot deployment scanner deploys files which were expected to be filtered * [ JBAS-5301 ] JaasSecurityManagerService.startService - java.lang.IllegalArgumentException: handler exists * [ JBAS-5412 ] BaseLocalProxyFactory should not check for explicit security context * [ JBAS-5689 ] Not seeing bootstrap ManagedDeployment/ManagedComponents * [ JBAS-5732 ] Deployment of @WebService fails * [ JBAS-5767 ] Security schemas * [ JBAS-5895 ] OptAnnotationMetaDataDeployer is processing too many classes * [ JBAS-5942 ] Session replication with passivation causes inconsistent session data * [ JBAS-5943 ] JRMPInvokerProxyHA should not failover if PooledInvokerProxy.invoke() throws java.rmi.ConnectException with cause of java.io.EOFException * [ JBAS-5951 ] ProfileService unit tests are not validating persistence of updates * [ JBAS-5964 ] NPE in expiration of passivated sessions * [ JBAS-5968 ] NullPointerException in WebServiceDeployerEJB * [ JBAS-5978 ] Mask password logging in ServiceConfigurator * [ JBAS-5979 ] java.lang.NoClassDefFoundError: org/jboss/aop/pointcut/ast/PointcutExpressionParserVisitor in EJB client * [ JBAS-5999 ] EJBTimerServiceImpl timerServiceMap access should be synchronized * [ JBAS-6002 ] NPE for JSF managed beans. * [ JBAS-6007 ] Wrong bean name when EJB is not deployed within an ear * [ JBAS-6017 ] JRMPProxyFactory should rebind the proxy in JNDI rather than just bind it * [ JBAS-6028 ] Bootstrap dependencies failure of ejb3 session beans * [ JBAS-6040 ] Ensure correct TCCL is set before accessing clustered web session cache * [ JBAS-6041 ] let the web metadata override a default context-param * [ JBAS-6044 ] JMX console invokeOp confused ObjectName encoding * [ JBAS-6056 ] UserTransaction cannot be deployed as clustered proxy and sticky transactions randomly work * [ JBAS-6060 ] Tolerate security domain convention in JBoss DD * [ JBAS-6062 ] Exploded WAR archive with no web.xml is no longer supported * [ JBAS-6067 ] XACML policy is not removed when deployment unit is undeployed * [ JBAS-6068 ] Mask passwords in the Deployers * [ JBAS-6077 ] seam-int: hot-redeploys occur constantly on JBoss 5 trunk * [ JBAS-6076 ] Seam war not using jboss-seam-int * [ JBAS-6093 ] Exposing the EMF in JNDI via jboss.entity.manager.factory.jndi.name doesn't work in JBoss 5.0.0.CR2 * [ JBAS-6098 ] juddi-service.sar bundles juddi.jar & scout.jar * [ JBAS-6107 ] Seam hibernate and jpa examples throw ZipExceptions during deployment - but the jars are valid * [ JBAS-6110 ] Tomcat status in the web-console missing logo * [ JBAS-6111 ] Ensure hibernate.cache.region_prefix is specified by PersistenceUnitDeployment * [ JBAS-6116 ] UserTransaction.commit()/rollback() are not fully compliant with the JTA standard * [ JBAS-6117 ] IOException in VFS while undeploying a Seam example * [ JBAS-6131 ] EJB1.1 isCallerInRole must throw RTE if role is not found in deployment descriptor * [ JBAS-6135 ] Concurrent connection of HAPartition channels fails * [ JBAS-6147 ] Profile.getModifiedDeployments() does not ignore .bak file * [ JBAS-6149 ] connectionMap.remove in WrapperDatasourceService never called * [ JBAS-6153 ] Transaction sticky target not available should be thrown as ServiceUnavailableException * [ JBAS-6161 ] Two ears with a same named jar fails to deploy * [ JBAS-6162 ] Error logged when attempting to passivate invalidated session * [ JBAS-6165 ] NPE in TransactionScopedEntityManager * [ JBAS-6174 ] shutdown.jar is missing classes * [ JBAS-6176 ] appclient doesn't declare a dependency on persistence unit * [ JBAS-6177 ] Error on jchannel.getState() right after connect (even with flush) * [ JBAS-6181 ] cannot secure jmx invoker service * [ JBAS-6193 ] JBossCacheManager leaks ReplicationStatistics.TimeStatistic * [ JBAS-6194 ] Move transaction sticky logic in proxy to interceptors to avoid bottleneck * [ JBAS-6206 ] JBossManager sets invalid session cookie after failover * [ JBAS-6207 ] update jts install for new lib layout * [ JBAS-6209 ] DelegatingClassloader is trying to get the parent in an unprivileged block * [ JBAS-6214 ] Default port bindings overriding (bindings.xml) doesn't work. * [ JBAS-6224 ] SecurityContextEstablishmentValve is making expensive loadClass calls * [ JBAS-6229 ] Resolving of relative persistence units doesn't work * [ JBAS-6231 ] jboss.messaging.jar (server) on /client * [ JBAS-6239 ] Regression on run-as in a MDB * [ JBAS-6241 ] EJB TIMERS Table Creation Fails When Oracle Schema Specified * [ JBAS-6243 ] EJB2: Reintroduce explicit run as check before authentication * [ JBAS-6252 ] Messaging release is missing connection-factories-service.xml * [ JBAS-6256 ] NPE during undeployment of test artifact /bundled-myfaces-hellojsf.war * [ JBAS-6275 ] Fix *both* 4.2.x & 5.0.x compatibility matrix tests Task * [ JBAS-2563 ] Cleanup the build for jboss5 * [ JBAS-3916 ] Update source code headers. * [ JBAS-4370 ] SecurityDeployer: XACML/acl Policy Registration * [ JBAS-4814 ] Refactor the conf/jboss-service.xml services * [ JBAS-4967 ] Extract setting of default clustering JBossWebMetaData from TomcatDeployer * [ JBAS-5078 ] Validate SRP Configuration * [ JBAS-5234 ] Include the Windows Service Runner binary (jbossvc.exe) in the distro * [ JBAS-5358 ] Move remote access to profile service into deploy * [ JBAS-5677 ] Add discussion of usage of FC to Clustering Guide * [ JBAS-5778 ] Improve HttpSessionListener handling in clustered environment * [ JBAS-5794 ] Administration and configuration guide * [ JBAS-5795 ] Administration and configuration guide * [ JBAS-5872 ] Update org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase * [ JBAS-5873 ] Create JBoss-AS-5.0.x-CompatibilityMatrix test run based on the 4.2.x one * [ JBAS-5883 ] Unify name usage in ProfileService * [ JBAS-5908 ] ClientUserTransactionObjectFactory is inefficient * [ JBAS-5930 ] Investigate ENC issues to obtain JBoss Security Manager in the web layer * [ JBAS-5945 ] Make JBossCacheClusteredSession.initAfterLoad() part of an override of update() * [ JBAS-5958 ] Fix any remaining testsuite failures * [ JBAS-5963 ] ClientUserTransaction should log cause exceptions * [ JBAS-5977 ] FIXME the HackClassloaderMetaDataDeployer boot WARN * [ JBAS-5988 ] AS5 Codebase Privileged Blocks * [ JBAS-5994 ] Switch to repository based ProfileService as the default * [ JBAS-6023 ] Inject Naming instance into DetachedHANamingService * [ JBAS-6030 ] Uncomment @JMX annotation in deployers.xml to enable JMX management of DeployersImpl * [ JBAS-6039 ] Change JGroups thread pool rejection policy to 'Discard' * [ JBAS-6064 ] JSR-196 integration for web layer * [ JBAS-6080 ] On Linux, HA-JNDI to pass SocketAddress to MulticastSocket constructor * [ JBAS-6081 ] Remove TUNNEL config * [ JBAS-6084 ] Reduce Logging Visibility when setting DefaultJndiBindingPolicy (when not explicitly specified) * [ JBAS-6087 ] Reduce the excessive logging * [ JBAS-6090 ] Convert legacy clustered services to pojo configuration * [ JBAS-6091 ] Allow JRMPInvoker to work as an MC bean * [ JBAS-6103 ] Review the 'minimal' config * [ JBAS-6105 ] Improve start-up time * [ JBAS-6109 ] ClusteredSession should not subclass StandardSession * [ JBAS-6129 ] Missing licenses * [ JBAS-6132 ] Revert to AS 4 behavior of handling distributable webapps in default config * [ JBAS-6143 ] Remove legacy persistence unit resolving functions from appclient and tomcat * [ JBAS-6148 ] Port metadata awareness to the repository profileservice * [ JBAS-6154 ] Verify JAXB version for 5.0.0.GA release * [ JBAS-6159 ] Make an integration abstraction for the UserTransactionListener and CachedConnectionManager * [ JBAS-6160 ] Component Update to jboss-ejb3-as-int * [ JBAS-6163 ] JACC: Look at the cmp2-audit.jar for security domain * [ JBAS-6169 ] Make "bootstrap" module reusable * [ JBAS-6170 ] Update package names moved from "main" to "bootstrap" * [ JBAS-6172 ] org.jboss.system.server.Server should be JVM-agnostic * [ JBAS-6183 ] ATTRIBUTE granularity clustered session should store attribute in same JBC node as metadata * [ JBAS-6184 ] Eliminate a JBC Fqn level in clustered session caching * [ JBAS-6186 ] Use JBossWebMetaData to drive DistributedCacheManagerFactory * [ JBAS-6189 ] Add plain reports to the test target * [ JBAS-6201 ] Eliminate injection of DistributedReplicantManagerImpl into ClusterPartition * [ JBAS-6237 ] Remove the old JMX kernel's dependency on the Deployment layer * [ JBAS-6238 ] Remove JBossMQ from the 5.0.0 branch * [ JBAS-6249 ] Pick a different port for the JBM Data channel's MPING * [ JBAS-6254 ] Provide an implementation for ejb3 CachedConnectionManager SPI * [ JBAS-6261 ] Rename cluster-jboss-beans.xml to hapartition-jboss-beans.xml * [ JBAS-6263 ] Use Microcontainer to build JBC configs * [ JBAS-6271 ] Create a 'standard' config out of the 'cts' one. * [ JBAS-6273 ] Create release notes for AS 5.0.0.GA * [ JBAS-6279 ] Remove assumption about who master is from HA Singleton test cases * [ JBAS-6280 ] Refresh the communit docs Sub-task * [ JBAS-3858 ] Update jbossweb-cluster.aop to match the current configuration * [ JBAS-5349 ] Test bootstrap dependencies * [ JBAS-5370 ] Deploy an ear/war app through ProfileService * [ JBAS-5856 ] SBM-compatible JBM remoting connector config * [ JBAS-5858 ] Add @JMX annotation to ServiceBindingManager * [ JBAS-5953 ] JBoss-AS-5.0.x-TestSuite-sun16-sun16 - org.jboss.test.jmx.test.UndeployBrokenPackageUnitTestCase * [ JBAS-5969 ] Remove dependency of AOP on VFSDeploymentUnit * [ JBAS-5970 ] Remove dependency of AOP on ServiceMBeanSupport * [ JBAS-5984 ] Make names unique in jbossweb-cluster.aop/META-INF/jboss-aop.xml * [ JBAS-5985 ] Make the switch in aop.xml and deployers.xml * [ JBAS-5986 ] Remove jboss-aop.xml from the deployment for aop.AnnotatedTestCase and aop.ScopedAnnotatedTestCase * [ JBAS-5987 ] Add new tests for scoped aspects with dependencies * [ JBAS-5996 ] Move TomcatDeployer.securityManagerService injection out of the deployer * [ JBAS-5997 ] iiop-service.xml is missing naming service dependencies * [ JBAS-6036 ] Add tests for restart of server to validate profileservice overrides are applied * [ JBAS-6037 ] Restore ProfileService attachments persistence * [ JBAS-6042 ] Remove the user of LoaderRepositoryConfig as an attachment * [ JBAS-6055 ] Use the enforcer plugin to avoid bringing in duplicate/wrong dependencies * [ JBAS-6082 ] JUDDIService.setBindJaxr cannot attempt to bind into jndi * [ JBAS-6083 ] HAPartitionCacheHandler.cache injection is broken * [ JBAS-6096 ] Upgrade ha-server-cache-jbc * [ JBAS-6121 ] Upgrate JAXR to 1.2.1.GA * [ JBAS-6124 ] regression - org.jboss.test.jcaprops.test.* * [ JBAS-6125 ] regression - org.jboss.test.deployers.seam.test.SeamVFSClassloadingUnitTestCase * [ JBAS-6139 ] Create a hudson job that builds using a clean local maven repo. * [ JBAS-6141 ] Upgrade to jboss-server-manager 1.0.0.GA and jboss-test 1.1.3.GA * [ JBAS-6146 ] JBoss-AS-5.0.x-TestSuite-jrockit16-jrockit16 - server all fails to shutdown * [ JBAS-6151 ] Upgrade JBossXACML dependency to 2.0.2.SP1 * [ JBAS-6166 ] regression - org.jboss.test.security.test.authorization.XACMLEJBIntegrationUnitTestCase * [ JBAS-6167 ] Restore the ServerInfo bean/mbean * [ JBAS-6168 ] Modify the Bootstrap spi to pass the kernel deployments loaded by the Server bootstrap * [ JBAS-6178 ] JBoss-AS-5.0.x-CompatibilityMatrix Failures * [ JBAS-6187 ] Break out profileservice spi from jboss-system.jar * [ JBAS-6190 ] repository based ProfileService hot deployment is not working * [ JBAS-6191 ] VFS URL Handler Stubs for JDK PolicyFile implementation to read vfs entries * [ JBAS-6198 ] Javadoc for ManagedOperation.invoke() says it will return a MetaValue, but it's returning unwrapped Objects * [ JBAS-6199 ] break out profileservice spis as a separate project * [ JBAS-6203 ] "config-property" property on Local Datasource managed component returns incorrect MetaType * [ JBAS-6210 ] common core to 2.2.10.GA * [ JBAS-6211 ] jboss integration to 5.0.2.GA * [ JBAS-6215 ] when creating a new Datasource via managementView.applyTemplate(), if the "metadata" CompositeValue property contains no items or a null-valued item, the ds.xml file is written with an empty "metadata" element, which causes the deployer to complain * [ JBAS-6216 ] ManagementView.getComponentsForType(type) returns null, rather than an empty Set, if no Components of the specified type are deployed * [ JBAS-6217 ] JBossWebRealm->enableAuditFlag should be false by default * [ JBAS-6234 ] ManagedProperty contains certain metadata that is not contained in MetaType * [ JBAS-6245 ] org.jboss.test.asynch.AsynchTestCase * [ JBAS-6246 ] org.jboss.test.web.test.JSFIntegrationUnitTestCase * [ JBAS-6247 ] org.jboss.test.xml.DDValidatorUnitTestCase * [ JBAS-6248 ] org.jboss.test.profileservice.override.test.JmsDestinationOverrideTestCase * [ JBAS-6251 ] 15 failures in JBossWS-3.0.4.GA-testsuite-AS5.0.x * [ JBAS-6253 ] Management interface for HAPartition and DRM * [ JBAS-6255 ] 8 test-aop-scoped failures * [ JBAS-6269 ] regression - org.jboss.test.refs.test.ResourceResolutionUnitTestCase.testClientORBResources * [ JBAS-6270 ] ManagementView.getDeploymentNames does not show the bootstrap deployment names Thirdparty Change * [ JBAS-5597 ] Track jboss and thirdparty dependencies upgrades for JBoss 5.0.0.GA Component Upgrade * [ JBAS-5382 ] Upgrade PojoCache to 3.0.0.GA * [ JBAS-5894 ] Upgrade jboss AOP to 2.0.0.GA * [ JBAS-5919 ] Upgrade jboss transactions to 4.4.0.GA * [ JBAS-5927 ] Upgrade jboss-integration spis to 5.0.1.GA * [ JBAS-6004 ] Upgrade jbossws to 3.0.4.GA * [ JBAS-6015 ] Upgrade seam-integration to 5.0.0.GA * [ JBAS-6016 ] Upgrade JBossWeb to 2.1.1.GA * [ JBAS-6018 ] Upgrade jboss-javaee apis to 5.0.0.GA * [ JBAS-6019 ] Upgrade JBoss Aspects to their final version * [ JBAS-6021 ] Upgrade jboss-security to 2.0.2.SP3 * [ JBAS-6022 ] Upgrade jboss vfs to 2.0.0.GA * [ JBAS-6024 ] Upgrade jbossxb to 2.0.0.GA * [ JBAS-6025 ] Upgrade to jnp-client/server 5.0.0.GA * [ JBAS-6026 ] Upgrade jboss-messaging to 1.4.1.GA * [ JBAS-6045 ] Upgrade jboss-microcontainer to 2.0.0.GA * [ JBAS-6046 ] Upgrade jboss-managed/metatype to 2.0.0.GA * [ JBAS-6048 ] Upgrade jboss-deployers to 2.0.0.GA * [ JBAS-6049 ] Upgrade jboss-reflect to 2.0.0.GA * [ JBAS-6050 ] Upgrade jboss-mdr to 2.0.0.GA * [ JBAS-6051 ] Upgrade jboss-classloading to 2.0.1.GA * [ JBAS-6053 ] Upgrade jboss-jaxbintros to a final release * [ JBAS-6063 ] Upgrade javassist to 3.9.0.GA * [ JBAS-6065 ] Upgrade jgroups * [ JBAS-6079 ] Upgrade JBoss Cache to 3.0.1.GA * [ JBAS-6100 ] JBoss Remoting update needed * [ JBAS-6233 ] Upgrade jboss-reflect to 2.0.1.GA
1.2.2 MASTER 계정생성 ¶
master mysql > GRANT REPLICATION SLAVE ON *.* -> TO 'user_name'@'user_host' IDENTIFIED BY 'user_password';
master mysql > GRANT FILE ON *.* -> TO 'user_name'@'user_host' IDENTIFIED BY 'user_password';
1.2.3 MASTER 데이터 SLAVE 에 복사 ¶
master mysql > FLUSH TABLES WITH READ LOCK; master shell > tar -cvf /tmp/mysql-snapshot.tar . slave shell > tar -xvf /tmp/mysql-snapshot.tar master mysql > UNLOCK TABLES;
master Shell > mysqldump -u root -p ‘password’ -B db_name > dump_file.sql
1.2.4 MASTER 환경설정 ¶
master shell> vi /etc/my.cnf
[mysqld]
log-bin
server-id = 1
1.2.5 SLAVE 환경설정 ¶
slave shell> vi /etc/my.cnf
[mysqld] server-id = 2 master-host = xxx.xxx.xxx.xxx(user_host) master-port = 3306 master-user = user_name master-password = user_password
1.2.7 SLAVE 덤프파일 LOAD ¶
slave shell > mysql -u root -p < dump_file.sql
1.2.8 MASTER 계정 설정 ¶
slave mysql > CHANGE MASTER TO -> MASTER_HOST='master_host_name', -> MASTER_USER='replication_user_name', -> MASTER_PASSWORD='replication_password', -> MASTER_LOG_FILE='recorded_log_file_name', -> MASTER_LOG_POS=recorded_log_position;
MASTER_HOST 60 MASTER_USER 16 MASTER_PASSWORD 32 MASTER_LOG_FILE 255
1.2.10 SUCCESS CERTIFICATION ¶
Slave I/O thread: connected to master 'user_name@user_host:3306', replication started in log 'FIRST' at position 4
1.3 How to Set Up Dual-Master Replication ¶
1.3.1 SLAVE STOP ¶
mysql2 shell > /etc/init.d/mysqld stop
1.3.4 GRANT REPLICATION SLAVE ¶
mysql2 mysql > GRANT REPLICATION SLAVE ON *.* -> TO 'users_name'@'users_host' IDENTIFIED BY 'users_password';
1.3.5 MASTER SETUP ¶
mysql1 shell > /etc/init.d/mysqld stop
1.3.6 MASTER CONFIGURATION ¶
[mysqld] server-id = 1 <= 그대로 두고, 아래 내용을 추가한다. master-host = users_host master-port = 3306 master-user = users_name master-password = users_password
1.3.8 SUCCESS CERTIFICATION ¶
Slave I/O thread: connected to master 'ccotti@222.112.137.172:3306', replication started in log 'FIRST' at position 4
1.4 장애복구 ¶
mysql1 shell > /etc/init.d/mysqld start
mysql2 mysql > slave stop; mysql2 mysql > slave reset; mysql2 mysql > slave start;
1.5 참고 ¶
순전히 이기적인 용도로 사용하기 위해 대충 만든 요약본입니다.
필요하신 분은 유용하게 사용하세요.
혹시나 옮겨가실 분은 댓글이라도 달아주세요. ^^
작성자 : mirsya
http://mirsya.tistory.com
최종수정 2007년 2월 18일 일요일
※틀린 부분이나 수정이 필요 한 부분은 가차없이 알려주세요.
- !! 오렌지색 부분은 환경에 맞게 수정하세요.
- Oracle 9i / 10g 관리자 명령어 요약
- Startup / Shutdown
- Session
- Parameter File
- Control File
- Redo Log
- Tablespace
- Temporary Tablespace
- Undo Tablespace
- Database Buffer Cache
- Row Migration / Chaining
- Partitioned Table
- Deferred Constraints
- User
- Profile
- Privileges
- Role
- Export
- Import
- Direct Load
- Oracle Net - Host Naming
- Oracle Net - Local Naming
- Create DB - 9i
- Create DB - 10g
- Archive Log
- STARTUP / SHUTDOWN
- STARTUP
- startup [ nomount | mount | open [ read only ]]
- SHUTDOWN
- shutdown [ immediate | transactional | normal | abort ]
- 상태 변경
- alter database [ mount | open [ read only ]];
- STARTUP 상태 조회
- select status from v$instance;
- OPEN 상태 조회
- select open_mode from v$database;
- >>Index<<
- SESSION
- 제한 상태로 변경
- alter system enable restricted session;
- 제한 상태 조회
- select logins from v$instance;
- 사용자 SESSION 조회
- select sid, serial#, username, status from v$session;
- 사용자 SESSION 강제종료
- alter system kill session 'SID,SERIAL#';
- RESTRICTED SESSION 권한 조회
- select * from dba_sys_privs where privilege like '%RESTRICT%';
- >>Index<<
- PARAMETER FILE
- 파일구분
- spfile : binaryfile, open 상태에서 수정
- pfile : textfile, shutdown 상태에서 수정
- 파일생성
- shutdown 상태에서 수행
- create spfile from pfile;
- create pfile from spfile;
- SPFILE
- alter system set parameter_name = 'value' [ comment 'text' ]
[ scope = memory | spfile | both ] [ sid = 'sid' | '*' ]; - PFILE
- shutdown 상태에서 편집기로 편집
- >>Index<<
- CONTROL FILE
- SPFILE 사용시
- open 상태에서 명령수행
alter system set control_files = '경로1', '경로2' scope = spfile;
콘트롤 파일 복사 후 DB 재기동 - PFILE 사용시
- shutdown 상태에서 pfile 파라미터 수정
콘트롤 파일 복사 후 DB 기동 - >>Index<<
- REDO LOG
- LOGSWITCH
- 현재 사용하는 로그파일을 변경
- alter system switch logfile;
- CHECKPOINT
- active 상태의 로그파일을 inactive로 변경
- alter system checkpoint;
- LOG FILE 상태 조회
- select a.group#, a.member, b.bytes, b.status
from v$logfile a, v$log b
where a.group# = b.group#; - GROUP 추가
- alter database add logfile group 그룹번호 '파일경로' size 크기;
- alter database add logfile group 그룹번호 ('파일경로1', '파일경로2') size 크기;
- MEMBER 추가
- alter database add logfile member '파일경로' to group 그룹번호;
- GROUP / MEMBER 삭제
- alter database drop logfile group 그룹번호;
- alter database drop logfile member '파일경로';
- ※삭제 명령시 파일은 삭제되지 않음
- >>Index<<
- TABLESPACE
- TABLESPACE 조회
- select tablespace_name, status, contents, extent_management, segment_space_management
from dba_tablespaces; - DATAFILE 조회
- select tablespace_name, bytes, file_name from dba_data_files;
- TEMPFILE 조회
- select tablespace_name, bytes, file_name from dba_temp_files;
- 일반 TABLESPACE 생성
- create tablespace 테이블스페이스명 datafile '파일경로' size 크기
[ blocksize 크기] // 해당 블럭 사이즈의 db_nk_cache_size 설정 필요
[ extent management local ] // 8i 이전 필수 옵션
[ segment space management auto ] // 9i 이후 필수 옵션; - UNDO TABLESPACE 생성
- create undo tablespace 테이블스페이스명 datafile '파일경로' size 크기;
- TEMPORARY TABLESPACE 생성
- create temporary tablespace 테이블스페이스명 tempfile '파일경로' size 크기;
- TABLESPACE 확장
- alter tablespace 테이블스페이스명 add datafile '파일경로' size 크기;
- alter database datafile '파일경로' resize 크기;
- TABLESPACE 관리
- alter tablespace 테이블스페이스명 offline;
- alter tablespace 테이블스페이스명 online;
- alter tablespace 테이블스페이스명 rename datafile '원본파일경로' to '파일경로';
- TABLESPACE 삭제
- drop tablespace 테이블스페이스명 including contents and datafile cascade constraints;
- 문법
- CREATE TABLESPACE 테이블스페이스명
DATAFILE '파일경로1' SIZE integer [M/K], '파일경로2' SIZE integer [M/K]
[ MINIMUM EXTENT integer [M/K]]
[ BLOCKSIZE integer [K]] [ DEFAULT STORAGE (
INITIAL integer [M/K]
NEXT integer [M/K]
MAXEXTENTS integer
MINEXTENTS integer
PCTINCREASE integer)]
[ ONLINE | OFFLINE ]
[ PERMANENT | TEMPORARY ]
[ EXTENT MANAGEMENT [ DICTIONARY | LOCAL
[ AUTOALLOCATE | UNIFORM [ SIZE integer [M/K]]]]]
[ SEGMENT SPACE MANAGEMENT [ MANUAL | AUTO]] - OPEN 상태에서 DATAFILE 이동
- alter tablespace 테이블스페이스명 offline;
offline 된 T/S에 대해 복사/이동 후
alter tablespace 테이블스페이스명 rename datafile '파일경로' to '파일경로';
alter tablespace 테이블스페이스명 online; - MOUNT 상태에서 DATAFILE 이동
- startup mount;
해당 T/S에 대해 복사/이동 후
alter database rename file '파일경로' to '파일경로';
alter database open; - 모든 데이타 파일은 mount상태에서 복사/이동 가능
- system 파일은 mount상태에서만 복사/이동 가능
- >>Index<<
- TEMPORARY TABLESPACE
- TEMPORARY TABLESPACE 관리
- TEMPORARY T/S는 READ ONLY 설정 불가, nologgin 상태이며 rename불가, 복구대상이 아님
READ ONLY DATABASE 에서도 TEMPORARY 파일은 필요 - DEFAULT TEMPORARY TABLESPACE 확인
- select * from database_properties where property_name like '%TEMP%';
- TEMPORARY TABLESPACE 변경
- create temporary tablespace 테이블스페이스명_신 tempfile '파일경로' size 크기;
alter database default temporary tablespace 테이블스페이스명_신;
drop tablespace 테이블스페이스명_구; - >>Index<<
- UNDO TABLESPACE
- PARAMETER 설정 / 9i
- UNDO_MANAGEMENT = AUTO [ MANUAL ]
UNDO_TABLESPACE = UNDOTBS1
UNDO_SUPPRESS_ERRORS = TRUE // 10g 에서는 쓰이지 않음
UNDO_RETENTION = integer (초) - PARAMETER 확인 / 9i
- show parameter undo;
- DEFAULT UNDO TABLESPACE 설정
- alter system set undo_tablespace = 테이블스페이스명;
parameter 'UNDO_TABLESPACE' 수정 - 설정 조회
- select segment_name, owner, tablespace_name, status
from dba_rollback_segs; - >>Index<<
- DATABASE BUFFER CACHE
- DBWR 기동 이벤트
- Checkpoint - 일반적인 ckpt는 어디까지 내려썼는지만 확인 immediate ckpt시 즉시 내려씀
Dirty Block 임계값 도달
LRU List 의 Free Block 이 부족할 때
Time out
T/S offline (9i부터는 online시), read only, begin backup
Table Drop, Truncate
RAC ping - STANDARD BLOCK SIZE
- System과 Temporary tablespace는 스탠다드 사이즈만 사용 가능
- DB생성시 설정되는 표준 사이즈, 수정 불가(system T/S 가 이미 사용중이므로)
- show parameter db_block_size
- 사용 가능한 BLOCK SIZE 조회
- show parameter cache_size
- db_nk_cache_size / n = '2, 4, 8, 16, 32'
- DB_KEEP_CACHE_SIZE, DB_RECYCLE_CACHE_SIZE
- hit rate 향상을 위한 parameter
db_keep_cache_size : 자주 호출되는 data를 pinning 할 때 쓰임
db_recycle_cache_size : 차후 호출될 가능성의 희박한 data를 읽을 때 쓰임 - SGA 크기 조회
- show parameter sga
show parameter sga_max - nk BLOCK SIZE의 TABLESPACE 생성
- alter system set db_cache_size = 크기[M]; // SGA영역의 공간 확보를 위해 db_cache_size를 줄임
alter system set db_nk_cache_size = 크기[M]; // 줄여진 db_cache_size 만큼 할당 가능
create tablespace 테이블스페이스명 datafile '파일경로' size 크기 blocksize nk; - nk 블럭의 T/S가 존재하면 해당 db_nk_cache_size 를 0으로 설정 불가
- >>Index<<
- ROW MIGRATION / CHAINING
- migration 은 해소 가능 chaining 은 해소 불가
오라클은 이 두 가지 경우를 구분하지 않음 - TABLE 상태 확인
- select owner, table_name, tablespace_name from dba_tables
where owner = '유저명' and table_name = '테이블명'; - TABLE ANALYZE
- analyze table 스키마.테이블명 compute statistics;
- dictionary의 통계정보를 갱신시켜 주는 작업
- CHAIN COUNT 조회
- select num_rows, chain_cnt from dba_tables where table_name = '테이블명';
- TABLE 이동
- alter table 테이블명 move
[ tablespace 테이블스페이스명]; // 생략시 현재 사용중인 T/S 내에서 옮겨짐 - INDEX 조회
- select table_name, index_name, status from dba_indexes where table_name = '테이블명'
- INDEX REBUILD
- alter index 스키마.인덱스명 rebuild;
- TABLE MOVE 명령후 ROWID가 변경됐으므로 INDEX를 REBUILD 해주어야 함
- TABLE의 공간 사용량 조회
- select num_rows, blocks, empty_blocks, avg_space, avg_row_ren from dba_tables
where owner = '유저명' and table_name = '테이블명'; - BLOCKS : H/M 왼쪽 블럭 수
EMPTY_BLOCKS : 미사용 블럭 , H/M 오른쪽 블럭 수
AVG_SPACE : 사용중인 블럭의 평균 빈공간
AVG_ROW_LEN : row의 평균 길이 - TABLE의 EXTENT설정 조회
- select table_name, initial_extent, min_extents from dba_tables
where owner = '유저명' and table_name = '테이블명'; - TABLESPACE의 EXTENT설정 조회
- select tablespace_name, block_size, initial_extent, min_extents from dba_tablespaces
where tablespace_name = '테이블스페이스명'; - >>Index<<
- PARTITIONED TABLE
- LIST 분할
- create table table_name (column_1 type( ), column_2 type( ) ... )
partition by list (column_2) (
partition partition_name values ('value_1') tablespace tablespace_name,
partition partition_name values ('value_2') tablespace tablespace_name); - multi column partition 지원 안함
NULL 값 지정 가능, MAXVALUES 지정 불가
list를 구성하는 문자열은 4k 초과 불가 - PARTITIONED TABLE 조회
- select table_owner, table_name, partition_name, tablespace_name from dba_tab_partitions where table_owner = '유저명';
- TABLE의 PARTITION 여부 조회
- select owner, table_name, partitioned from dba_tables where owner = '유저명';
- PARTITION 관리
- alter table 테이블명 add partition partition_name values ('value') tablespacetablespace_name;
- alter table 테이블명 drop partition partition_name;
- RANGE 분할
- create table table_name (column_1 type( ), column_2 type( ) ... )
partition by range (column_2) (
partition partition_name values less than (value_1),
partition partition_name values less than (value_2),
partition partition_name values less than ( MAXVALUE ) ); - HASH 분할
- create table table_name (column_1 type( ), column_2 type( ) ... )
partition by hash (column_2)
partitions integer store in (tablespace_name, tablespace_name); - >>Index<<
- DEFERRED CONSTRAINTS
- 문법
- CREATE TABLE table_name (column_1 type( ), column_2 type ( ), ...
CONSTRAINT constraint_name constraint_type (column)
[ NOT DEFERRABLE | DEFERRABLE [ INITIALLY [ IMMEDIATE | DEFERRED ]]]); - 지연된 제약조건 활성화
- ALTER SESSION SET CONSTRAINTS = [ IMMEDIATE | DEFERRED | DEFAULT ]
- >>Index<<
- USER
- USER 생성
- create user 유저명 identified by 패스워드
default tablespace 테이블스페이스명
temporary tablespace 임시테이블스페이스명
quota integer [M] on 유저명; - USER 변경
- alter user 유저명 identified by 패스워드
default tablespace 테이블스페이스명
temporary tablespace 임시테이블스페이스명
quota integer [M] on 유저명
[ password expire ]; - USER 의 TABLESPACE 할당량 조회
- select * from dba_ts_quotas;
- >>Index<<
- PROFILE
- PROFILE 조회
- select distinct profile from dba_profiles;
- USER 의 PROFILE 조회
- select username, profile from dba_users;
- PROFILE 생성
- create profile profile_name limit
제한사항 value 제한사항 value ... ; - PROFILE 적용
- alter user 유저명 profile profile_name;
- PARAMETER 'resource_limit' 의 값이 TRUE로 설정되어 있어야 함
- >>Index<<
- PRIVILEGES
- 권한 부여 / SYSTEM PRIVS
- grant 권한 to 유저명
[ with admin option ]; - 권한 부여 / OBJECT PRIVS
- grant 권한 on 개체 to 유저명
[ with grant option ]; - 권한 조회
- select * from dba_sys_privs where grantee like '유저명';
- GRANT 조회 / TABLE
- select * from all_tab_privs where table_name = '테이블명';
- 권한 취소 / SYSTEM PRIVS
- revoke 권한 from 유저명;
- 권한 취소 / OBJECT PRIVS
- revoke 권한 on 개체 from 유저명;
- >>Index<<
- ROLE
- ROLE 의 PRIVS 조회
- select * from dba_sys_privs where grantee = 'role_name';
- ROLE 생성
- create role role_name;
- ROLE 에 SYSTEM PRIVS 부여
- grant privs_name to role_name;
- ROLE 에 OBJECT PRIVS 부여
- grant privs_name on 개체 to role_name;
- DEFAULT ROLE 지정
- alter user user_name default role role_name;
- ROLE 활성화
- set role role_name;
- set role all;
- ROLE 조회
- select * from session_roles;
- >>Index<<
- EXPORT
- 문법
- ]$ exp username/passwd option=(value1, value2, ... ) option=value ...
- OPTION
- file: 백업 파일명 지정 (default : expdat.dmp)
- rows: 테이블의 row의 포함 여부 지정
- full: 전체 DB에 대한 익스포트 지정
- owner: 익스포트할 사용자 지정 (사용자모드)
- table: 익스포트할 테이블 지정 (테이블모드)
- tablespace: 익스포트할 테이블스페이스 지정 (T/S 모드)
- inctype: 전체 백업 레벨 지정 (8i까지만 사용됨)
- indexes: 인덱스 익스포트 지정
- full, owner, table, tablespace 는 동시 사용 불가
- 익스포트시 sys로 작업은 지양 (dictionary data까지 포함되므로)
- >>Index<<
- IMPORT
- 문법
- ]$ imp username/passwd option=(value1, value2, ... ) option=value ...
- OPTION
- file: 입력 파일명 지정
- ignore: 임포트 실행중 입력 오류 무시
- rows: 테이블의 row의 포함 여부 지정
- full: 전체 DB에 대한 임포트트 지정
- fromuser: 익스포트된 객체를 소유한 사용자중 임포트 대상이 되는 사용자
- touser: 임포트할 대상이 되는 사용자
- table: 임포트할 테이블 지정
- tablespace: 임포트할 테이블스페이스 지정
- 임포트 작업시 실행 순서 : 새로운 테이블생성 / 데이터 입력, 인덱스 리빌드 / 제약조건 활성화
- >>Index<<
- DIRECT LOAD
- DIRECT LOAD SAMPLE
- sample.ctl
LOAD DATA INFILE * INTO TABLE table_name
FIELDS TERMINATED BY ',' (column1, column2, column3)
BEGINDATA
111,aa,95
112,ab,86
...
...
- ]$ sqlldr username/passwd sample.ctl
- >>Index<<
- ORACLE NET / HOST NAMING
- HOST NAMING
- port 번호등의 정보를 Client에게 제공하지 않음
다수의 DB를 운용하는 경우는 사용할 수 없음
GLOBAL_DBNAME은 되도록이면 도메인 형식을 사용
(호스트명만 기입시 Windows Client 에서만 이용가능) - SERVER 설정 / LINUX
- $ORACLE_HOME/network/admin/listener.ora
- ora10g =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1521))
- )
- SID_LIST_ora10g =
- (SID_LIST =
- (SID_DESC = (GLOBAL_DBNAME = ora10g.xxx.xxx)
- (ORACLE_HOME = /app/ora10g/10g)
- (SID_NAME = DB09)
- )
- )
- LISTENER 구동
- ]$ lsnrctl start ora10g
- CLIENT 설정 / WINDOWS
- GLOBAL_DBNAME 으로 ping이 되는지 확인, 필요시 hosts나 DNS에 등록
- %ORACLE_HOME%\network\admin\sqlnet.ora
- SQLNET.AUTHENTICATION_SERVICES= (NTS)
- NAMES.DIRECTORY_PATH= (HOSTNAME)
- C:\>sqlplus username/passwd@ora10g.xxx.xxx
- CLIENT 설정 / LINUX
- GLOBAL_DBNAME 으로 ping이 되는지 확인, 필요시 hosts나 DNS에 등록
- $ORACLE_HOME/network/admin/sqlnet.ora
- NAMES.DIRECTORY_PATH= (HOSTNAME)
- ]$ sqlplus username/passwd@ora10g.xxx.xxx
- >>Index<<
- ORACLE NET / LOCAL NAMING
- LOCAL NAMING
- port 번호등 서버정보를 Client가 가지고 있음
- SERVER 설정 / LINUX
- $ORACLE_HOME/network/admin/listener.ora
- ora10g =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1521))
- )
- SID_LIST_ora10g =
- (SID_LIST =
- (SID_DESC = (ORACLE_HOME = /app/ora10g/10g)
- (SID_NAME = DB09)
- )
- )
- 다수의 DB가 존재 할 경우 각 DB의 listner port번호는 다르게 설정한다
- LISTENER 구동
- ]$ lsnrctl start ora10g
- 각각의 DB에 해당하는 listener.ora 파일을 생성하고 listener를 각각 구동한다
- CLIENT 설정 / NAMES.DEFAULT_DOMAIN 미설정 시
- sqlnet.ora
- NAMES.DIRECTORY_PATH= (TNSNAMES)
- tnsnames.ora
- ora9i =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1529))
- (CONNECT_DATA = (SID = DB09))
- )
- ora10g =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1521))
- (CONNECT_DATA = (SID = DB10))
- )
- ]$ sqlplus username/passwd@ora10g
]$ sqlplus username/passwd@ora9i - CLIENT 설정 / NAMES.DEFAULT_DOMAIN 설정 시
- TCP/IP 에서의 DOMAIN과 관계 없음
- sqlnet.ora
- NAMES.DEFAULT_DOMAIN= webdb.co.kr
- NAMES.DIRECTORY_PATH= (TNSNAMES)
- tnsnames.ora
- ora9i.webdb.co.kr =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1529))
- (CONNECT_DATA = (SID = DB09))
- )
- ora10g.webdb.co.kr =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1521))
- (CONNECT_DATA = (SID = DB10))
- )
- ]$ sqlplus username/passwd@ora10g
]$ sqlplus username/passwd@ora9i
]$ sqlplus username/passwd@ora10g.webdb.co.kr - >>Index<<
- DATABASE 생성 / 9i
- ENV CHECK
- ]$ env | grep ORACLE
- 기존 파일 삭제
- $ORACLE_BASE/oradata/
$ORACLE_BASE/admin/$ORACLE_SID/ - PARAMETER FILE 편집
- $ORACLE_HOME/dbs/initSID_name.ora
- DB 생성
- createdb.sql
- CREATE DATABASE $ORACLE_SID
- LOGFILE
- GROUP 1 ('$ORACLE_BASE/oradata/disk4/redo01.log') size 1M,
- GROUP 2 ('$ORACLE_BASE/oradata/disk4/redo02.log') size 1M,
- GROUP 3 ('$ORACLE_BASE/oradata/disk4/redo03.log') size 1M
- MAXLOGFILES 5
- MAXLOGMEMBERS 5
- MAXDATAFILES 100
- DATAFILE
- '$ORACLE_BASE/oradata/disk3/system01.dbf' size 300M
- EXTENT MANAGEMENT LOCAL
- UNDO TABLESPACE undo DATAFILE
- '$ORACLE_BASE/oradata/disk3/undo01.dbf' size 10M
- DEFAULT TEMPORARY TABLESPACE temp TEMPFILE
- '$ORACLE_BASE/oradata/disk3/temp01.dbf' size 10M
- CHARACTER SET KO16KSC5601
- ;
- @$ORACLE_HOME/rdbms/admin/catalog.sql
- @$ORACLE_HOME/rdbms/admin/catproc.sql
- conn system/manager;
- @$ORACLE_HOME/sqlplus/admin/pupbld.sql
- ]$ sqlplus '/as sysdba'
SQL> startup nomount
SQL> @createdb.sql - >>Index<<
- DATABASE 생성 / 10g
- ENV CHECK
- ]$ env | grep ORACLE
- 기존 파일 삭제
- $ORACLE_BASE/oradata/
$ORACLE_BASE/admin/$ORACLE_SID/ - PARAMETER FILE 편집
- $ORACLE_HOME/dbs/initSID_name.ora
- DB 생성
- createdb.sql
- CREATE DATABASE $ORACLE_SID
- LOGFILE
- GROUP 1 ('$ORACLE_BASE/oradata/disk4/redo01.log') size 4M,
- GROUP 2 ('$ORACLE_BASE/oradata/disk4/redo02.log') size 4M,
- GROUP 3 ('$ORACLE_BASE/oradata/disk4/redo03.log') size 4M
- MAXLOGFILES 5
- MAXLOGMEMBERS 5
- MAXDATAFILES 100
- DATAFILE
- '$ORACLE_BASE/oradata/disk3/system01.dbf' size 300M
- EXTENT MANAGEMENT LOCAL
- SYSAUX DATAFILE
- '$ORACLE_BASE/oradata/disk3/sysaux01.dbf' size 200M
- UNDO TABLESPACE undo DATAFILE
- '$ORACLE_BASE/oradata/disk3/undo01.dbf' size 10M
- DEFAULT TEMPORARY TABLESPACE temp TEMPFILE
- '$ORACLE_BASE/oradata/disk3/temp01.dbf' size 10M
- CHARACTER SET KO16KSC5601
- ;
- @$ORACLE_HOME/rdbms/admin/catalog.sql
- @$ORACLE_HOME/rdbms/admin/catproc.sql
- conn system/manager;
- @$ORACLE_HOME/sqlplus/admin/pupbld.sql
- ]$ sqlplus '/as sysdba'
SQL> startup nomount
SQL> @createdb.sql - >>Index<<
- ARCHIVE LOG MODE
- DB 종료
- SQL> shutown immediate
- Parameter File 수정
- log_archive_start = true
- log_archive_dest = destination
- log_archive_format = %S.arc
- 다수의 아카이빙
- log_archive_duplex_dest = destination
- log_archive_min_succed_dest = [ 1 | 2 ]
- log_archive_dest_# = "location = destination"
- log_archive_dest_# = "service = tnsname"
- DB 기동 / 아카이브 모드 변경
- SQL> startup mount
SQL> alter database archivelog; SQL> startup open - 아카이브 모드 확인 후 Close Backup
SQL> archive log list - >>Index<<
# jboss설치
-http://labs.jboss.com/ 에서 최근버전을 받아서 압축을 푼다
-자바 환경변수는 1.5버전을 추천한다.
-JBOSS_HOME/bin/run.bat 실행 후 http://localhost:8080/으로 확인한다.
-JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/root.war 이 경로가 디폴트로 보여진다.
# jboss deploy 폴더 설정
-JBOSS_HOME/server/default/conf/jboss-service.xml의 아래 예시와 같이 콤마(,)를 구분자로 하여 배포파일 또는 폴더를 추가한다.
-디폴트는 deploy/ 폴더이고 경로의 끝에 슬래쉬(/)를 붙이면 폴더로 인식한다.
-주의할 점은 jar, war, ear같은 파일뒤에 슬래쉬를 붙이면 deploy 되지 않지만 JBOSS_HOME/server/default/deploy폴더 속에 aaa.jar 과 같은 이름의 폴더는 deploy 가능하다.
<attribute name="URLs">
deploy/,
file:///D:/aa/bbb/ccccejb.jar
</attribute>
# jboss 오라클 드라이버 설정
-ojdbc14.zip를 JBOSS_HOME/server/default/lib 폴더에 복사
-JBOSS_HOME/docs/examples/jca/oracle-ds.xml을 JBOSS_HOME/server/default/deploy 폴더에 복사
-oracle-ds.xml를 아래와 같이 수정
<local-tx-datasource>
<jndi-name>oracle</jndi-name>
<connection-url>jdbc:oracle:thin:@127.0.0.1:1521:orcl(일반적으로)</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>xxx</user-name>
<password>yyy</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
-jboss를 restart하면 콘솔에서
[WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=oracle' to JNDI name 'java:oracle'
메시지 확인 가능
-WEB-INF/web.xml 수정
<resource-ref>
<res-ref-name>jdbc/oracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
-WEB-INF/jboss-web.xml
<resource-ref>
<res-ref-name>jdbc/oracle</res-ref-name>
<jndi-name>java:oracle</jndi-name>
</resource-ref>
# 기타 라이브러리 추가
ojdbc.jar 파일 등
서비스시 필요한 라이브러리는 JBOSS_HOME/server/default/lib 폴더에 복사한다
# 서비스 루트 설정
WEB-INF/jboss-web.xml 아래 소스 추가 또는 수정
<context-root>/</context-root>
# 서비스 설정이 되었다면 이클립스로 가서 유저 라이브러리를 설정해 ejb를 사용해 보자.
이클립스를 실행하고 환경설정에 가서 JAVA 항목으로 간다.
두번째 유저 라이브러리 항목을 설정하고 EJB 라는 이름을 라이브러리를 만든다.
그리고 필요한 jar 파일을 가져오자.
Windows에서 MySQL 설치하기
![]() |
Windows에서는 MSI(Microsoft Windows Installer)를 사용한다. Windows 2000 / XP / 2003 Server에서 사용할 수 있으며, http://dev.mysql.com/downloads/mysql/5.0.html에서 다운로드받을 수 있다("Windows Downloads"로 검색하라). 필수 설치 파일을 받았다면 더블클릭하여 실행한다.
다음 설명은 Windows용 MySQL 5.0.22 기준이다. 설치 과정은 Windows 환경에는 독립적이다.
[노트]
MSI 형식 이외의 설치 방법도 제공한다. "Complete Package" 방식과 "Noinstall Archive" 방식이 그것이다. "Essentials Package" 이외의 방법을 사용한다면 MySQL 매뉴얼을 반드시 읽어보아야 한다. 매뉴얼은 http://dev.mysql.com/doc/refman/5.0/en/windows-choosing-package.html에서 구할 수 있다.
본격적으로 설치를 시작해보자(MySQL AB 웹 사이트에서 MSI 파일을 다운로드했다고 가정한다).
1. MSI 파일을 더블클릭한다. [그림 2-4]와 같은 화면이 나오면 [Next] 버튼을 누른다.
[그림 2-4] Windows용 설치 마법사 시작 화면
2. "Typical", "Complete" 또는 "Custom" 중에 하나를 선택한다([그림 2-5] 참조). "Custom"은 MySQL의 구성 요소들을 선택적으로 설치할 수 있다. "Complete"는 MySQL의 모든 요소를 설치한다. 즉, 문서에서 벤치마킹까지 MySQL 전체를 설치한다. "Typical"은 클라이언트와 서버 그리고 일반적으로 필요한 도구들을 설치해준다. 대부분의 사용자들에게는 "Typical"이 적당하므로 "Typical"을 선택하고 [Next] 버튼을 클릭한다.
[그림 2-5] 설치 유형을 선택한다.
3. 앞서 선택했던 것을 다시 확인하고 [Install] 버튼을 클릭하면 설치가 시작된다.
[노트]
설치를 하다보면 MySQL.com 계정이 필요할 것이다. 이 계정은 여러분이 설치하고 있는 데이터베이스와는 전혀 관련이 없다. 단지 MySQL.com 웹 사이트의 계정일 뿐이다. 계정을 가지고 있지 않다면 계정을 생성해야 한다. 참고로 이런 등록 절차는 생략할 수 있다.
4. 설치가 완료되면 "MySQL Configuration Wizard"를 설치할 것인지 묻는다. 이 마법사는 반드시 설치해야 한다. 왜냐하면, 여러분의 필요에 맞게 my.ini 파일을 생성해주기 때문이다. "MySQL Configuration Wizard"를 설치하기 위해서 "Configure the MySQL Server Now" 체크 상자를 선택하자([그림 2-6] 참조).
[그림 2-6] MySQL 설치 후 Configuration Wizard를 설치하는 것이 좋다.
5. "MySQL Configuration Wizard"가 실행되면 간단한 환영 메시지가 나온다. [Next] 버튼을 클릭하면 "Detailed"와 "Standard" 설치 방법 중에 하나를 선택할 수 있다. 우리는 가능한 옵션을 모두 확인하기 위해서 "Detail" 방식을 선택할 것이다. "Standard" 방식을 선택할 경우, 설정 변경을 하려면 직접 my.ini 파일을 수정해야 한다. "Detailed" 라디오 버튼을 선택하고 [Next] 버튼을 클릭한다.
6. 다음 단계는 서버 머신 타입을 결정한다. [그림 2-7]과 같이 "Developer Machine", "Server Machine", "Dedicated MySQL Server Machine"을 선택할 수 있다. 서버 머신 타입에 따라서 메모리, 디스크, 프로세서의 할당이 달라진다. 개인 컴퓨터에서 테스트 목적으로 MySQL을 설치한다면 "Developer Machine"을 선택해야 한다. 서버용 머신에서 다른 서버와 함께 MySQL을 설치하려면 "Server Machine"을 선택해야 한다. MySQL을 위한 전용 서버 머신이 준비된 경우라면 "Dedicated MySQL Server Machine"을 선택하는 것이 좋다. 이 경우 대부분의 시스템 자원을 MySQL에 할당해준다.
[그림 2-7] 서버 머신 타입의 설정
7. 다음 설정은 데이터베이스 사용에 대한 것이다. "Multifunctional Database"는 InnoDB와 MyISAM 엔진에 균등하게 자원을 배분한다. "Transaction Database"는 InnoDB와 MyISAM 엔진을 모두 사용할 수 있지만, InnoDB에 대부분의 자원을 할당한다. "Non-Transactional Database"는 MyISAM 엔진에 모든 자원을 할당한다. 즉, InnoDB는 사용할 수 없다. 여러분의 사용 패턴을 확신할 수 없다면 "Multifunctional Database"를 선택하는 것이 좋다.
8. InnoDB 저장 엔진이 활성화되었다면 [그림 2-8]과 같이 저장 관련 정보를 설정해야 한다. [그림 2-8]은 초기 설정 상태이다. 원한다면 설정을 바꿔도 좋다. [Next] 버튼을 클릭하면 다음 단계로 넘어간다.
[그림 2-8] InnoDB 저장 엔진을 위한 디스크 튜닝
9. MySQL 서버의 동시 접속수를 지정한다. 동시 접속수는 데이터베이스의 사용 패턴과 트래픽 정도에 따라서 달라져야 한다. "Decision Support (DSS)/OLAP"이 기본 설정이다. 기본 설정은 최대 100개의 동시 접속을 허용하며, 평균적으로 20개의 동시 접속이 있다고 가정한다. "Online Transaction Processing(OLTP)"은 최대 500개의 동시 접속을 허용한다. "Manual Setting"은 여러분이 직접 동시 접속수를 지정할 수 있도록 해준다. 동시 접속에 대한 결정을 했다면 [Next] 버튼을 클릭한다.
10. 다음은 네트워크 옵션 설정이다. TCP/IP 사용여부와 포트를 지정할 수 있다. 기본 포트는 3306이지만, 다른 포트(사용중이지 않은 포트)로 변경할 수 있다. TCP/IP 이외에 "Enable Strict Mode" 사용여부도 지정할 수 있다. "Strict Mode"가 무엇인지 잘 모르겠다면 "Enable Strict Mode"를 선택된 상태로 두는 것이 좋다. 좀 더 자세한 정보가 필요하다면http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html을 방문해보자. 모든 선택이 끝났다면 [Next] 버튼을 클릭한다.
[노트]
TCP/IP 설정에서 지정한 포트를 위해 방화벽 수정이 필요하다. 즉, 3306포트(직접 포트를 지정했다면 다를 수 있다)를 위한 방화벽 흐름제어가 필요하다.
11. 다음은 문자세트을 지정한다. 기본 옵션은 "Standard Character Set"으로 "Latin1"을 사용한다. "Best Support for Mulilingualism"은 UTF8을 사용한다. UTF8은 하나의 문자세트로 다국어를 표현할 수 있다. "Manual Selected Default Character Set"은 직접 문자세트를 선택할 수 있게 해준다. 이 항목을 선택하면 적당한 문자 세트를 선택할 수 있도록 드롭다운 리스트가 나온다. 설정을 마쳤으면 [Next] 버튼을 클릭한다.
12. MySQL은 서비스 형태로 설치하는 것이 좋다. [그림 2-9]는 이와 관련된 설정 화면이다. "Install As Windows Service" 체크 상자를 체크하고 서비스 이름을 선택한다. 원한다면 "Launch the MySQL Server Automatically"를 체크해도 좋다. 참고로, MySQL의 bin 폴더를 Windows PATH 환경변수에 추가하면 cmd 창에서 MySQL를 쉽게 접근할 수 있다. 설정을 마쳤으면 다음으로 넘어간다.
[그림 2-9] MySQL 서버 인스턴스 설정
13. 다음은 보안 옵션에 대한 설정으로 가장 중요하다. [그림 2-10]과 같이 root 암호를 지정한다. 암호를 두 번 입력하여 오타 여부를 다시 확인한다. "Enable Root Access"는 의미를 잘 알고 있는 경우에만 선택하는 것이 좋다. 일반적으로 root 접근은 로컬로 제한하는 것이 보통이다. 익명 접근을 허용할 수도 있지만 추천하지는 않는다. 보안에 좋지 않기 때문이다. 설정을 마쳤으면 [Next] 버튼을 클릭한다.
[그림 2-10] root 암호를 지정한다.
14. 이제 마지막 단계이다. [Execute] 버튼을 클릭하면 화면에 나열된 순서대로 처리를 시작한다. 모든 처리가 끝나면 [그림 2-11]과 같은 화면을 볼 수 있다.
[그림 2-11] MySQL Configuration Wizard의 성공적인 종료
"MySQL Configuration Wizard"는 my.ini 설정 파일을 "C:\Program Files\MySQL\MySQL Server 5.0\"에 만들고 MySQL 서비스를 시작시켜 주는 것으로 인스톨 및 설정 과정을 마무리한다.
[팁]
my.ini 파일을 직접 수정하는 것도 가능하다. 수정 후에는 반드시 MySQL 서버를 다시 시작해야 한다.
Introduction
MySQL Cluster Overview
Basic MySQL Cluster Concepts
- MGM node : 이 노드는 설정을 포함, 다른 노드를 관리하는 매니저 노드이다. 다른 노드보다 가장 먼저 실행되며 ndb_mgmd 명령으로 실행시킨다.
- data node : 클러스터의 데이터를 저장하는 노드이다. ndbd 명령으로 실행시킨다.
- SQL node : 클러스터 데이터에 접근하는 노드이다. MySQL 클러스터에서는 NDB 클러스터 스토리지 엔진을 사용하는 MySQL 서버가 클라이언트 노드이다. mysqld --ndbcluster나 mysqld 명령으로 실행시키는데, 이 때는 my.cnf 에 ndbcluster를 추가한다.
Simple Multi-Computer How-To

# cd /usr/local # groupadd mysql # useradd -g mysql mysql
# tar -xzvf mysql-max-4.1.13-pc-linux-gnu-i686.tar.gz # ln -s /usr/local/ mysql-max-4.1.13-pc-linux-gnu-i686 mysql
# cd mysql # scripts/mysql_install_db --user=mysql
# chown -R root . # chown -R mysql data # chgrp -R mysql .
# cp support-files/mysql.server /etc/rc.d/init.d/ # chmod +x /etc/rc.d/init.d/mysql.server # chkconfig --add mysql.server
# cd /usr/local/mysql/bin/ # cp ndb_mgm* /usr/local/bin/ # chmod +x ndb_mgm*
# vi /etc/my.cnf [MYSQLD] # Options for mysqld process: Ndbcluster # run NDB engine ndb-connectstring=192.168.0.10 # location of MGM node [MYSQL_CLUSTER] # Options for ndbd process: ndb-connectstring=192.168.0.10 # location of MGM node
# mkdir /var/lib/mysql-cluster # cd /var/lib/mysql-cluster # vi config.ini [NDBD DEFAULT] # Options affecting ndbd processes on all data nodes: NoOfReplicas=2 # Number of replicas DataMemory=80M # How much memory to allocate for data storage IndexMemory=18M # How much memory to allocate for index storage # For DataMemory and IndexMemory, we have used the # default values. Since the "world" database takes up # only about 500KB, this should be more than enough # for this example Cluster setup. [TCP DEFAULT] # TCP/IP options: portnumber=2202 # This the default; however, you can use any # port that is free for all the hosts in cluster # Note: In MySQL 5.0, this parameter is deprecated; # it is recommended that you do not specify the # portnumber at all and simply allow the port to be # allocated automatically [NDB_MGMD] # Management process options: hostname=192.168.0.10 # Hostname or IP address of MGM node datadir=/var/lib/mysql-cluster # Directory for MGM node logfiles [NDBD] # Options for data node "A": # (one [NDBD] section per data node) hostname=192.168.0.30 # Hostname or IP address datadir=/usr/local/mysql/data # Directory for this data node's # datafiles [NDBD] # Options for data node "B": hostname=192.168.0.40 # Hostname or IP address datadir=/usr/local/mysql/data # Directory for this data node's # datafiles [MYSQLD] # SQL node options: hostname=192.168.0.20 # Hostname or IP address datadir=/usr/local/mysql/data # Directory for SQL node's datafiles # (additional mysqld connections can be # specified for this node for various # purposes such as running ndb_restore)
# ndb_mgmd -f /var/lib/mysql-cluster/config.iniMGM 노드를 다운시킬 때에는 다음과 같이 하면 된다.
# ndb_mgm -e shutdown
# ndbd --initial
# /etc/rc.d/init.d/mysql.server start
# ndb_mgm -- NDB Cluster -- Management Client -- ndb_mgm>
ndb_mgm> show Connected to Management Server at: 192.168.0.10:1186 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 @192.168.0.30 (Version: 4.1.13, Nodegroup: 0, Master) id=3 @192.168.0.40 (Version: 4.1.13, Nodegroup: 0) [ndb_mgmd(MGM)] 1 node(s) id=1 @192.168.0.10 (Version: 4.1.13) [mysqld(API)] 1 node(s) id=4 (Version: 4.1.13) ndb_mgm>
MySQL 클러스터의 제한
- 트랙잭션 수행 중의 롤백을 지원하지 않으므로, 작업 수행 중에 문제가 발생하였다면, 전체 트랙잭션 이전으로 롤백하여야 한다.
- 실제 논리적인 메모리의 한계는 없으므로 물리적으로 허용하는 만큼 메모리를 설정하는 것이 가능하다.
- 컬럼 명의 길이는 31자, 데이터베이스와 테이블 명은 122자까지 길이가 제한된다. 데이터베이스 테이블, 시스템 테이블, BLOB인덱스를 포함한 메타 데이터(속성정보)는 1600개까지만 가능하다.
- 클러스터에서 생성할 수 있는 테이블 수는 최대 128개이다.
- 하나의 로우 전체 크기가 8KB가 최대이다(BLOB를 포함하지 않은 경우).
- 테이블의 Key는 32개가 최대이다.
- 모든 클러스터의 기종은 동일해야 한다. 기종에 따른 비트저장방식이 다른 경우에 문제가 발생하기 때문이다.
- 운영 중 스키마 변경이 불가능하다.
- 운영 중 노드를 추가하거나 삭제할 수 없다.
- 최대 데이터 노드의 수는 48개이다.
- 모든 노드는 63개가 최대이다. (SQL node, Data node, 매니저를 포함)
MySQL Cluster FAQ
5. MySQL Cluster Glossary
- ndbd : 데이터 노드 데몬
- ndb_mgmd : MGM서버 데몬
- ndb_mgm : MGM 클라이언트
- ndb_waiter : 클러스터의 모든 노드들의 상태를 확인할 때 사용
- ndb_restore : 백업으로부터 클러스터의 데이터를 복구할 때 사용
Dual-Master Replication in MySQL
1.1 Replication 이란?
1.2.1 MASTER 와 SLAVE 설치
1.2.2 MASTER 계정생성
master mysql > GRANT REPLICATION SLAVE ON *.* -> TO 'user_name'@'user_host' IDENTIFIED BY 'user_password';
master mysql > GRANT FILE ON *.* -> TO 'user_name'@'user_host' IDENTIFIED BY 'user_password';
1.2.3 MASTER 데이터 SLAVE 에 복사
master mysql > FLUSH TABLES WITH READ LOCK; master shell > tar -cvf /tmp/mysql-snapshot.tar . slave shell > tar -xvf /tmp/mysql-snapshot.tar master mysql > UNLOCK TABLES;
master Shell > mysqldump -u root -p ‘password’ -B db_name > dump_file.sql
1.2.4 MASTER 환경설정
master shell> vi /etc/my.cnf
[mysqld] log-bin server-id = 1
1.2.5 SLAVE 환경설정
slave shell> vi /etc/my.cnf
[mysqld] server-id = 2 master-host = xxx.xxx.xxx.xxx(user_host) master-port = 3306 master-user = user_name master-password = user_password
1.2.7 SLAVE 덤프파일 LOAD
slave shell > mysql -u root -p < dump_file.sql
1.2.8 MASTER 계정 설정
slave mysql > CHANGE MASTER TO -> MASTER_HOST='master_host_name', -> MASTER_USER='replication_user_name', -> MASTER_PASSWORD='replication_password', -> MASTER_LOG_FILE='recorded_log_file_name', -> MASTER_LOG_POS=recorded_log_position;
MASTER_HOST 60 MASTER_USER 16 MASTER_PASSWORD 32 MASTER_LOG_FILE 255
1.2.10 SUCCESS CERTIFICATION
Slave I/O thread: connected to master 'user_name@user_host:3306', replication started in log 'FIRST' at position 4
1.3 How to Set Up Dual-Master Replication
1.3.4 GRANT REPLICATION SLAVE
mysql2 mysql > GRANT REPLICATION SLAVE ON *.* -> TO 'users_name'@'users_host' IDENTIFIED BY 'users_password';
1.3.5 MASTER SETUP
mysql1 shell > /etc/init.d/mysqld stop
1.3.6 MASTER CONFIGURATION
[mysqld] server-id = 1 <= 그대로 두고, 아래 내용을 추가한다. master-host = users_host master-port = 3306 master-user = users_name master-password = users_password
1.3.8 SUCCESS CERTIFICATION
Slave I/O thread: connected to master 'ccotti@222.112.137.172:3306', replication started in log 'FIRST' at position 4
1.4 장애복구
mysql1 shell > /etc/init.d/mysqld start
mysql2 mysql > slave stop; mysql2 mysql > slave reset; mysql2 mysql > slave start;
1.5 참고
SQL(Structured Query Language)의 가장 큰 특징 중의 하나는 여러개의 테이블을
연결시켜 데이터를 검색하거나 조작할 수 있는 기능이다. 이것은 데이터를 쉽고
빠르게 검색하고 불필요한 데이터를 줄여주는 장점이 있다. 다른 SQL 언어와 마찬
가지로 MySQL도 join명령어로 이 연산을 수행한다.
간단히 말하면 join은 두개 이상의 테이블로부터 필요한 데이터를 연결해 하나의
포괄적인 구조로 결합시키는 연산이다.
예를 들어, 한 컴퓨터 제조업자가 자신의 데이터를 능률적으로 관리하기 위한
데이터베이스가 필요하다고 하자. 이 데이터들은 주문, 고객, 생산과 같은 어떤
일관성있는 개념과 관련된 각각의 데이터들이 모여 다양하고 간결한 테이블들을
이룰 것이다. 테이블을 생성한 후에는, 다양한 예를 들어 데이터베이스에서 가장
많이 사용되는 join의 조작법에 대해 설명하겠다.
첫번째 테이블은 제조업자가 분류한 다양한 타입의 PC들의 데이터로 구성될 것이다.
----------------------------------------------
mysql> create table pcs (
-> pid INT, // product id
-> spec char(3),
-> os char(10),
-> ram INT,
-> hd char(4)
-> );
-----------------------------------------------
두번째 테이블은 제조업자의 다양한 고객들에 관한 데이터로 이루어질 것이다.
-----------------------------------------------
mysql> create table clients (
-> name char(25),
-> cid char(8), // client id
-> email char(25),
-> tel char(10)
-> );
-----------------------------------------------
세번째 테이블은 주문 정보에 관한 데이타를 포함할 것이다.
-----------------------------------------------
mysql> create table orders (
-> order_date date,
-> pid INT,
-> cid char(8)
-> );
-----------------------------------------------
◆◆ 자료(Data) 삽입하기
각각의 테이블에 아래와 같이 자료를 삽입해 보자.
☆ pcs (테이블1)
+------+------+-------+------+------+
| pid | spec | os | ram | hd |
+------+------+-------+------+------+
| 1 | 386 | Linux | 64 | 3.1 |
| 2 | 386 | Linux | 128 | 4.2 |
| 3 | 486 | WinNT | 64 | 3.1 |
| 4 | 586 | Linux | 128 | 4.2 |
| 5 | 586 | Win98 | 128 | 6.4 |
+------+------+-------+------+------+
[삽입방법]
-----------------------------------------------------------
mysql> INSERT INTO pcs (pid, spec, os, ram, hd)
-> VALUES (1, '386', 'Linux', 64, '3.1');
-----------------------------------------------------------
☆ clients (테이블2)
+--------+---------+---------------------------+------------+
| name | cid | email | tel |
+--------+---------+---------------------------+------------+
| 원주희 | wjh-042 | haremoon at won.hongik.ac.kr | 123-456-78 |
| 홍길동 | hgd-043 | honggd at won.hongik.ac.kr | 421-555-34 |
| 이쁘니 | pty-042 | pretty at won.hongik.ac.kr | 459-555-32 |
| 못난이 | ugy-043 | ugly at won.hongik.ac.kr | 439-555-88 |
+--------+---------+---------------------------+------------+
[삽입방법]
-----------------------------------------------------------
mysql> INSERT INTO clients (name, cid, email, tel)
-> VALUES ('원주희', 'wjh-042',
-> 'haremoon at won.hongik.ac.kr', '123-456-7890');
-----------------------------------------------------------
☆ orders (테이블3)
+------------+------+---------+
| order_date | pid | cid |
+------------+------+---------+
| 1999-12-05 | 2 | wjh-042 |
| 1999-12-04 | 3 | hgd-043 |
| 1999-12-04 | 1 | wjh-042 |
| 1999-12-05 | 2 | wjh-042 |
| 1999-12-12 | 5 | ugy-043 |
| 1999-12-05 | 5 | pty-042 |
+------------+------+---------+
[삽입방법]
-----------------------------------------------------------
mysql> INSERT INTO orders (order_date, pid, cid)
-> VALUES ('1999-12-05', 2, 'wjh-042');
-----------------------------------------------------------
자, 이제부터 만들어진 3개의 테이블로부터 필요한 데이터만을 추출해 결합하는
방법에 대해 알아보자. 만일 당신의 상사가 특정한 날에 특정한 PC를 주문한 모든
고객의 이메일 목록을 원한다고 하자! 또는 특정한 고객에 의해 작성된 주문서에
있는 RAM의 양을 보고받기를 원한다고 하자. 이러한 모든 일들은 다양한 join문에
의해 쉽게 수행될 수 있다. 만들어진 테이블을 사용해 첫번째 join문을 생성해보고
작성해보자.
◆◆ The Cross Join
Cross Join은 가장 기본적인 join의 타입으로 한 테이블에 있는 각각의 열이 다른
테이블의 모든 열에 간단하게 매치되어 출력된다. 능률적이지는 않지만, 모든 join
의 공통된 특징을 나타내준다.
Cross Join의 간단한 예 :
----------------------------------------------
mysql> SELECT * FROM pcs, clients;
----------------------------------------------
매우 많은 열들이 출력될 것이다. 테이블1(pcs)에 있는 각각의 열이
테이블2(clients)
의 모든 열에 매치된다는 것을 기억하자. 따라서, 3 열을 가진 테이블1(pcs)과 4
열을
가진 테이블2(clients)를 포함한 join문은 총 12 열의 테이블을 만들것이다.
즉 cross-join은 테이블1에 있는 각각의 열들이 테이블2에 있는 모든열들을 한 번씩
교차해 출력한다고 기억하는 것이 쉬울 것같다.
첫번째 join을 성공적으로 수행했다면 다음의 예도 어렵지 않을 것이다.
아래의 예를 따라해 보고 어떤 결과가 출력될지 예상해보자.
-----------------------------------------------------------------------------
mysql> select c.name, o.cid from orders o, clients c where o.cid = "wjh-042";
-----------------------------------------------------------------------------
+--------+---------+
| name | cid |
+--------+---------+
| 원주희 | wjh-042 |
| 원주희 | wjh-042 |
| 원주희 | wjh-042 |
| 홍길동 | wjh-042 |
| 홍길동 | wjh-042 |
| 홍길동 | wjh-042 |
| 이쁘니 | wjh-042 |
| 이쁘니 | wjh-042 |
| 이쁘니 | wjh-042 |
| 못난이 | wjh-042 |
| 못난이 | wjh-042 |
| 못난이 | wjh-042 |
+--------+---------+
예상한 대로 결과가 출력되었나? clients 테이블에 있는 각각의 name이 orders테이
블의 "wjh-042"를 포함한 열마다 매치되어 출력되었다. 지금까지의 설명이 Cross
Join을 설명하는데 충분하지 않으므로 다른 질의를 사용해가며 JOIN을 활용해보기
바란다.
NOTE : 왜 테이블의 이름에 별명을 주어 사용할까? Aliases(별명)은 질의를 입력할
때 반복적인 키의 입력을 줄여주는 방법으로 사용되어진다. 따라서 열을 지정해 줄
때 반복적으로 'clients'를 한자 한자 입력하는 대신에, 질의내에 'from clients c'
를 지정해주고 'c'를 사용할 수 있다.
Cross Join이 테이블들을 연결해 주기는 하지만, 능률적이지는 못하다. 따라서
각각의 테이블들로 부터 우리가 원하는 데이타를 어떻게 하면 쉽게 선택할 수 있는지
계속 다음 장을 읽어보기 바란다.
◆◆ The Equi-join
Equi-join은 한 테이블에 있는 어떠한 값이 두번째(또는 다수의) 테이블내에 포함된
값에 일치 할 때 수행된다.
product id 가 1인 PC를 주문한 고객의 목록을 원한다고 가정해 보자.
-------------------------------------------------------------------
mysql> select p.os, c.name from orders o, pcs p, clients c
-> where p.pid=o.pid and o.pid = 1 and o.cid=c.cid;
-------------------------------------------------------------------
+-------+--------+
| os | name |
+-------+--------+
| Linux | 원주희 |
+-------+--------+
◆ Non-Equi-join
Equi-join은 다수의 테이블들 사이에서 일치하는 자료들만을 추출해낸다. 그러나
만일 일치하지 않은 자료들만을 추출해야 한다면...? 예를 들어, 당신의 상사가
주문한 pid가 제품의 pid보다 더 큰 order id의 모든 운영체제(OS)의 목록을
필요로 한다면 어떻게 할 것인가? 적당히 이름을 non-equi join라고 하겠다.
-------------------------------------------------------------------
mysql> SELECT p.os, o.pid from orders o, pcs p where o.pid > p.pid;
-------------------------------------------------------------------
+-------+------+
| os | pid |
+-------+------+
| Linux | 2 |
| Linux | 3 |
| Linux | 2 |
| Linux | 5 |
| Linux | 5 |
| Linux | 3 |
| Linux | 5 |
| Linux | 5 |
| WinNT | 5 |
| WinNT | 5 |
| Linux | 5 |
| Linux | 5 |
+-------+------+
orders 테이블의 pid가 pcs테이블의 pid보다 더 큰 모든 열들이 매치될 것이다.
주의깊게 살펴보면, 여러가지 제한을 준 간단한 cross-join 임을 파악할 수 있
을 것이다. 상사에게는 특별하게 유용하지 않을 지도 모르지만, 매우 유용한 기
능인 left join을 위한 준비 과정으로 생각하자. 자, 이제 다음장으로 가서
left join을 사용할 때 유용할 수있는 옵션들에 대해 집중적으로 알아보자.
◆◆ The Left Join
Left Join은 사용자가 어떠한 제한을 기반으로 관심있는 모든 종류의 자료를 추출
하게한다. 테이블 join중 가장 막강한 옵션으로, 테이블을 매우 쉽게 조작할 수
있게 한다.
만일 상사가 좀더 자세히, 자세히, 자세하게, 자세하게!를 외친다고 가정해보자.
left join이 우리의 문제를 해결해 줄 것이다.
-------------------------------------------------------------------
mysql> select * from orders left join pcs on orders.pid = pcs.pid;
-------------------------------------------------------------------
+------------+------+---------+------+------+-------+------+------+
| order_date | pid | cid | pid | spec | os | ram | hd |
+------------+------+---------+------+------+-------+------+------+
| 1999-12-05 | 2 | wjh-042 | 2 | 386 | Linux | 128 | 4.2 |
| 1999-12-04 | 3 | hgd-043 | 3 | 486 | WinNT | 64 | 3.1 |
| 1999-12-04 | 1 | wjh-042 | 1 | 386 | Linux | 64 | 3.1 |
| 1999-12-05 | 2 | wjh-042 | 2 | 386 | Linux | 128 | 4.2 |
| 1999-12-12 | 5 | ugy-043 | 5 | 586 | Win98 | 128 | 6.4 |
| 1999-12-05 | 5 | pty-042 | 5 | 586 | Win98 | 128 | 6.4 |
+------------+------+---------+------+------+-------+------+------+
고객이 주문한 모든 PC들의 목록을 추출해 낸다. 예를 들어, PHP3 또는 Perl
스크립트를 사용해 영수증을 출력하는데 사용할 수도 있다. 고객들에게 우리회
사로부터 구입한 모든 제품의 목록을 가끔씩 메일로 보내야 할 때에도
clients 테이블과 연결해 사용할 수 있을 것이다.
아래의 예에서 우리는 제품의 id(pid)가 3인 PC의 정보만을 볼 수 있다.
-------------------------------------------------------------------
mysql> select * from orders left join pcs on pcs.pid=3 and pcs.pid=orders.pid;
-------------------------------------------------------------------
+------------+------+---------+------+------+-------+------+------+
| order_date | pid | cid | pid | spec | os | ram | hd |
+------------+------+---------+------+------+-------+------+------+
| 1999-12-05 | 2 | wjh-042 | NULL | NULL | NULL | NULL | NULL |
| 1999-12-04 | 3 | hgd-043 | 3 | 486 | WinNT | 64 | 3.1 |
| 1999-12-04 | 1 | wjh-042 | NULL | NULL | NULL | NULL | NULL |
| 1999-12-05 | 2 | wjh-042 | NULL | NULL | NULL | NULL | NULL |
| 1999-12-12 | 5 | ugy-043 | NULL | NULL | NULL | NULL | NULL |
| 1999-12-05 | 5 | pty-042 | NULL | NULL | NULL | NULL | NULL |
+------------+------+---------+------+------+-------+------+------+
◆ The Using Clause
left join에 약간의 옵션을 주어 둘 이상의 테이블에 있는 동일한 컬럼을 조금 더
깊게 연관지을수도 있다. on과 using옵션이 사용되며, 아래의 예제를 참조하자.
--------------------------------------------------------------------
## 원본의 예제는 아래와 같지만, 에러가 발생해 필자가 MySQL매뉴얼을 참조해
나름대로 수정을 했다.##
mysql> SELECT * from clients join on orders where clients.cid = orders.cid;
mysql> SELECT * from clients join on orders using (cid);
-------------------------------------------------------------------
==> 수정한 예제
-------------------------------------------------------------------
mysql> SELECT * from clients left join orders on clients.cid = orders.cid;
-------------------------------------------------------------------
또는 아래와 같이 나타낼 수도 있다.
-------------------------------------------------------------------
mysql> SELECT * from clients left join orders using (cid);
-------------------------------------------------------------------
두 예제 모두 똑같은 결과가 출력될 것이다.
+--------+---------+---------------------------+------------+------------+------+---------+
| name | cid | email | tel | order_date | pid |
cid |
+--------+---------+---------------------------+------------+------------+------+---------+
| 원주희 | wjh-042 | haremoon at won.hongik.ac.kr | 123-456-78 | 1999-12-05 | 2 |
wjh-042 |
| 원주희 | wjh-042 | haremoon at won.hongik.ac.kr | 123-456-78 | 1999-12-04 | 1
| wjh-042 |
| 원주희 | wjh-042 | haremoon at won.hongik.ac.kr | 123-456-78 | 1999-12-05 | 2
| wjh-042 |
| 홍길동 | hgd-043 | honggd at won.hongik.ac.kr | 421-555-34 | 1999-12-04 | 3
| hgd-043 |
| 이쁘니 | pty-042 | pretty at won.hongik.ac.kr | 459-555-32 | 1999-12-05 | 5
| pty-042 |
| 못난이 | ugy-043 | ugly at won.hongik.ac.kr | 439-555-88 | 1999-12-12 | 5
| ugy-043 |
+--------+---------+---------------------------+------------+------------+------+---------+
다른 구문의 예를 적용해 가며 left join에 대해 이해하기 바란다. 공부를 하다보면
left join이 여러분의 개발활동에 매우 중요한 역할을 한 다는 것을 느낄 것이다.
테이블 join에 관한 정보를 좀더 깊게 교환하고 싶다면 http://www.mysql.com에 있는
다양한 토론 그룹을 체크해 보기 바란다.
◆◆ Self-joins
Self-join은 관리자가 하나의 테이블에 관련된 데이타를 집중시키는 막강한 방법을
제공해 준다. 사실, self-join은 그 자신의 테이블에 결합하는 것에 의해 수행된다.
개념의 이해를 위해 예를 들어 설명하겠다.
컴퓨터 워크스테이션을 만드는데 사용되는 하드웨어의 다양한 부품에 관한 정보를
가진 매우 큰 데이타베이스를 관리해야 한다고 가정하자. 워크스테이션은 데스크,
PC, 모니터, 키보드, 마우스등으로 이루어져 있다. 게다가, 데스크는 워크스테이션의
모두 다른 부분의 '부모'라고 생각될 수 있다. 우리는 각 워크스테이션의 레코드가
정확한 자료로 유지되기를 원할 것이며, 유일한 ID번호를 부여함으로써 워크스테이션
의 모든 부분을 구체적으로 관련시킬 것이다. 사실, 각 부분은 항목을 분명하게
해주는
유일한 ID번호와 그것의 부모(데스크) ID번호를 확인하기 위한, 두개의 ID 번호를
포함 것이다.
테이블이 아래와 같다고 가정하자.
mysql> select * from ws;
+---------+-----------+-----------+
| uniq_id | name | parent_id |
+---------+-----------+-----------+
| d001 | desktop | NULL |
| m4gg | monitor | d001 |
| k235 | keyboar | d001 |
| pc345 | 200mhz pc | d001 |
| d002 | desktop | NULL |
| m156 | monitor | d002 |
| k9334 | keyboar | d002 |
| pa556 | 350mhz pc | d002 |
+---------+-----------+-----------+
desktop은 그와 관련된 모든 부분들의 부모와 같으므로 parent_id를 가지고 있지
않음을 주목하자. 지금부터 유용한 정보를 위한 질의를 시작할 것이다. self-join
의 사용법을 쉽게 설명하기 위해 테이블을 간단하게 만들었다.
-------------------------------------------------------------------
mysql> select t1.*, t2.* from ws as t1, ws as t2;
-------------------------------------------------------------------
어떻게 출력되는가? 이전처럼, 첫번째 테이블의 각 열들이 두번째 테이블에 있는
모든 열들에 매치되어 연결되 출력될 것이다. 우리에게 매우 유용하지는 않지만
다시 한번 시도해보고 확인해 보기바란다. 좀더 재미있는 예를 들어보겠다.
-------------------------------------------------------------------
mysql> select parent.uniq_id, parent.name, child.uniq_id, child.name
-> from ws as parent, ws as child
-> where child.parent_id = parent.uniq_id and parent.uniq_id = "d001";
-------------------------------------------------------------------
흥미로운 결과가 출력될 것이다.
+---------+---------+---------+-----------+
| uniq_id | name | uniq_id | name |
+---------+---------+---------+-----------+
| d001 | desktop | m4gg | monitor |
| d001 | desktop | k235 | keyboar |
| d001 | desktop | pc345 | 200mhz pc |
+---------+---------+---------+-----------+
self-join은 테이블의 자료를 검증하는 방법으로도 사용된다. 테이블내에 있는
uniq_id컬럼은 테이블에서 유일해야 하며, 만일 데이타의 엔트리가 깊어 뜻하지
않게 같은 uniq_id를 가진 두개의 항목이 데이타베이스에 입력된다면 좋지 않은
결과가 생길것이다. 이럴 경우 정기적으로 self-join을 사용해 체크할 수 있다.
우리는 350mhz pc의 uniq_id가 'm156'(이 값은 워크스테이션 'd002'에 속한
모니터의 uniq_id 값이다.)이 되도록 변경했다고 가정하자.
테이블의 내용은 다음과 같이 변경한다.
-------------------------------------------------------------------
mysql> update ws set uniq_id = 'm156' where name = '350mhz pc';
-------------------------------------------------------------------
아래의 예를 참고해 ws테이블에 self-join을 적용해보자.
-------------------------------------------------------------------
mysql> select parent.uniq_id, parent.name, child.uniq_id, child.name
-> from ws as parent, ws as child
-> where parent.uniq_id = child.uniq_id and parent.name <> child.name;
-------------------------------------------------------------------
아래와 같이 출력될 것이다.
+---------+-----------+---------+-----------+
| uniq_id | name | uniq_id | name |
+---------+-----------+---------+-----------+
| m156 | 350mhz pc | m156 | monitor |
| m156 | monitor | m156 | 350mhz pc |
+---------+-----------+---------+-----------+
Table join은 데이터베이의 관리를 쉽게 도와줄것이다. 구문의 이해를 정확하게
하기위해서 예제에서 배운 명령을 다양하게 변화시켜 적용해보기 바란다.
---- MySQL_Tables_Joins.txt 내용 --------------------------
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- 원본사이트: http://www.devshed.com/Server_Side/MySQL/Join/ * MySQL Table Joins *(o) By W.J. Gilmore *(o)| July 06, 1999 (o)| | 번역 : 원주희(lolol@shinan.hongik.ac.kr) ======================================================================= [영어실력이 너무 부족하다보니 잘못된 부분이 있을 수도 있습니다. 고쳐야할 부분이 있으면 꼭 메일을 보내주세요.] ◆◆ 소개하기 SQL(Structured Query Language)의 가장 큰 특징 중의 하나는 여러개의 테이블을 연결시켜 데이터를 검색하거나 조작할 수 있는 기능이다. 이것은 데이터를 쉽고 빠르게 검색하고 불필요한 데이터를 줄여주는 장점이 있다. 다른 SQL 언어와 마찬 가지로 MySQL도 join명령어로 이 연산을 수행한다. 간단히 말하면 join은 두개 이상의 테이블로부터 필요한 데이터를 연결해 하나의 포괄적인 구조로 결합시키는 연산이다. 예를 들어, 한 컴퓨터 제조업자가 자신의 데이터를 능률적으로 관리하기 위한 데이터베이스가 필요하다고 하자. 이 데이터들은......생략