<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2488490746136830746</id><updated>2011-08-19T16:58:49.808+07:00</updated><category term='Oracle RDBMS'/><category term='Windows 2003'/><category term='Fedora'/><category term='JBoss'/><category term='iis'/><category term='Oracle Portal'/><category term='VMWare'/><category term='SQL Command'/><category term='Windows Clustering'/><category term='SQL Server Clustering'/><category term='SQL Reporting Services'/><category term='SQL Server Integration Services'/><category term='SQL Server'/><category term='Oracle Discoverer'/><category term='Oracle Generic Connectivity and Gateway'/><category term='Oracle Application Server'/><category term='Hyperion'/><category term='Itanium'/><category term='Oracle Forms'/><category term='Java'/><category term='Oracle BI'/><category term='WebSphere'/><category term='Oracle Enterprise Manager'/><category term='Oracle Warehouse Builder'/><category term='Oracle Reports'/><category term='Ubuntu'/><category term='Tivoli Access Manager'/><category term='AIX'/><title type='text'>The power of knowledge warehousing</title><subtitle type='html'>Work experiences</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default?start-index=101&amp;max-results=100'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>109</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-7407221298144564368</id><published>2010-04-29T16:51:00.002+07:00</published><updated>2010-04-29T16:51:52.362+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSphere'/><title type='text'>Object class violation when creating group in LDAP using WebSphere Portal</title><content type='html'>&lt;h3&gt;&amp;#160;&lt;/h3&gt; &lt;img alt="" src="http://www.ibm.com/i/c.gif" width="1" height="6" /&gt;  &lt;p&gt;&lt;b&gt; Technote (troubleshooting)&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Problem(Abstract)&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When attempting to create a group using IBM® WebSphere® Portal, you receive an &amp;quot;EJPSG0015E: Data Backend Problem&amp;quot; error. The details show that this is caused by the LDAP server returning an error code 65 (object class violation). &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Symptom&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;SystemOut.log will contain: &lt;/p&gt;  &lt;p&gt;.&lt;tt&gt;.. WSMM Message&amp;#160; E com.ibm.ws.wmm.ldap.LdapRepositoryImpl void create(String DN, Attributes attributes) The following Naming Exception occured during processing: &amp;quot;javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - Object Class Violation]; remaining name 'cn=testgroupname,o=ibm'; resolved object com.sun.jndi.ldap.LdapCtx@28da7087&amp;quot;.&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;... CreateGroupCo E com.ibm.wps.command.puma.CreateGroupCommand AbstractCommand.throwCommandFailedException EJPEB0003E: CreateGroupCommand.execute: An exception occurred.&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;com.ibm.wps.util.DataBackendException: EJPSG0015E: Data Backend Problem &lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;...&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;Caused by: com.ibm.websphere.wmm.exception.WMMSystemException: The following Naming Exception occured during processing: &amp;quot;javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - Object Class Violation]; remaining name 'cn=testgroupname,o=ibm'; resolved object com.sun.jndi.ldap.LdapCtx@28da7087&amp;quot;. at com.ibm.ws.wmm.ldap.LdapRepositoryImpl.create(LdapRepositoryImpl.java:107)&lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;&lt;img border="0" alt="" src="http://www-01.ibm.com/support/docview.wss?uid=swg21314636&amp;amp;aid=1" width="1" height="1" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Resolving the problem&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Refer to the 'LDAP: error code ...' technote in the related information below which explains that the LDAP server generates the error code 65. Consult with your LDAP administrator to troubleshoot the failure from an LDAP perspective.    &lt;br /&gt;You may have to update the WebSphere Member Manager (WMM) configuration to resolve the problem. For example, this error can occur when attempting to create a group in IBM Tivoli Directory Server (ITDS) using the objectClass accessGroup. Consider the case where wmm.xml contains: &lt;/p&gt;  &lt;p&gt;&lt;tt&gt;&amp;lt;supportedLdapEntryType name=&amp;quot;Group&amp;quot; rdnAttrTypes=&amp;quot;cn&amp;quot;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; objectClassesForRead=&amp;quot;accessGroup&amp;quot; objectClassesForWrite=&amp;quot;accessGroup&amp;quot; searchBases=&amp;quot;o=ibm&amp;quot;/&amp;gt;&amp;#160;&amp;#160; &lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;and wmmLDAPServerAttributes.xml contains: &lt;/p&gt;  &lt;p&gt;&lt;tt&gt;&amp;lt;attributeMap wmmAttributeName=&amp;quot;groupMember&amp;quot; pluginAttributeName=&amp;quot;uniqueMember&amp;quot; applicableMemberTypes=&amp;quot;Group&amp;quot; dataType=&amp;quot;String&amp;quot; valueLength=&amp;quot;1024&amp;quot; multiValued=&amp;quot;true&amp;quot; defaultValue=&amp;quot;uid=dummy&amp;quot;/&amp;gt;&lt;/tt&gt;    &lt;br /&gt;If you enable the traces recommended in the WebSphere Member Manager MustGather and attempt to create a group in WebSphere Portal, you will see the following in trace.log:    &lt;br /&gt;.&lt;tt&gt;WMM Trace Log &amp;gt; com.ibm.ws.wmm.ldap.LdapConnectionImpl DirContext createSubcontext(Name name,&amp;#160; Attributes attrs) Entry cn=testgroupname,o=ibm {objectclass=objectClass: accessgroup, uniquemember=uniquemember: uid=dummy, cn=cn: testgroupname}&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;...&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;WSMM Message&amp;#160; E com.ibm.ws.wmm.ldap.LdapRepositoryImpl void create(String DN, Attributes attributes) The following Naming Exception occured during processing: &amp;quot;javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - Object Class Violation]; remaining name 'cn=testgroupname,o=ibm'; resolved object com.sun.jndi.ldap.LdapCtx@1faad592&amp;quot;&lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;This failure occurs because the definition of the accessGroup object class does not include uid and uniquemember attributes: &lt;/p&gt;  &lt;p&gt;accessgroup :    &lt;br /&gt;&lt;tt&gt;{&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;1.3.18.0.2.6.75&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;NAME 'accessGroup'&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;DESC 'A group that is used for access control.'&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;SUP top STRUCTURAL&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;MUST cn&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;MAY (businessCategory $ description $ member $ o $ ou $ owner $ seeAlso)&lt;/tt&gt;    &lt;br /&gt;&lt;tt&gt;}&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/tt&gt;    &lt;br /&gt;Therefore, to correct the problem you have two options. If your LDAP server is configured such that a defaultValue is required for member (see &amp;quot;Mapping LDAP Attributes&amp;quot; link below), then you must update wmmLDAPServerAttributes.xml replacing the entry for wmmAttributeName=&amp;quot;groupMember&amp;quot; with (changing pluginAttributeName and defaultValue): &lt;/p&gt;  &lt;p&gt;&lt;tt&gt;&amp;lt;attributeMap wmmAttributeName=&amp;quot;groupMember&amp;quot; pluginAttributeName=&amp;quot;member&amp;quot; applicableMemberTypes=&amp;quot;Group&amp;quot; dataType=&amp;quot;String&amp;quot; valueLength=&amp;quot;1024&amp;quot; multiValued=&amp;quot;true&amp;quot; defaultValue=&amp;quot;cn=dummy&amp;quot;/&amp;gt;&lt;/tt&gt;    &lt;br /&gt;If your LDAP server does not require a defaultValue, you could use the following instead: &lt;/p&gt;  &lt;p&gt;&lt;tt&gt;&amp;lt;attributeMap wmmAttributeName=&amp;quot;groupMember&amp;quot; pluginAttributeName=&amp;quot;member&amp;quot; applicableMemberTypes=&amp;quot;Group&amp;quot; dataType=&amp;quot;String&amp;quot; valueLength=&amp;quot;1024&amp;quot; multiValued=&amp;quot;true&amp;quot;/&amp;gt;&lt;/tt&gt;    &lt;br /&gt;Use the check-out/check-in procedure to update the WMM configuration if running in a cluster. Restart WebSphere Portal to read the updated WMM configuration. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Related information&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.ibm.com/support/docview.wss?rs=688&amp;amp;ca=portall2&amp;amp;uid=swg21295558"&gt;'LDAP: error code ...' messages&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.ibm.com/support/docview.wss?rs=688&amp;amp;ca=portall2&amp;amp;uid=swg21242646"&gt;WMM MustGather&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.ent.doc/wpf/sec_map_ldap.html"&gt;Mapping LDAP Attributes&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-7407221298144564368?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/7407221298144564368/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/object-class-violation-when-creating.html#comment-form' title='32 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7407221298144564368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7407221298144564368'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/object-class-violation-when-creating.html' title='Object class violation when creating group in LDAP using WebSphere Portal'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-7828437573936732394</id><published>2010-04-07T16:29:00.003+07:00</published><updated>2010-05-04T11:04:11.224+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSphere'/><title type='text'>Detailed steps for mapping LDAP attributes in WebSphere Portal 6.1</title><content type='html'>&lt;table border="0" cellspacing="0" cellpadding="0" width="443"&gt;&lt;tbody&gt;     &lt;tr valign="top"&gt;       &lt;td height="80"&gt;         &lt;h1 class="smalltitle"&gt;&amp;#160;&lt;/h1&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;table border="0" cellspacing="0" cellpadding="0" width="598"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td class="docfnt" width="596"&gt;         &lt;table border="0" cellspacing="0" cellpadding="0" width="603"&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width="601"&gt;                 &lt;table border="0" cellspacing="0" cellpadding="0" width="600"&gt;&lt;tbody&gt;                     &lt;tr valign="top"&gt;                       &lt;td width="598"&gt;                         &lt;table border="0" cellspacing="0" cellpadding="0" width="600"&gt;&lt;tbody&gt;                             &lt;tr&gt;                               &lt;td class="v14-header-1efix" height="19" valign="top" width="598"&gt;&lt;b&gt;Technote (FAQ)&lt;/b&gt;&lt;/td&gt;                             &lt;/tr&gt;                              &lt;tr&gt;                               &lt;td width="598"&gt;&amp;#160;&lt;/td&gt;                             &lt;/tr&gt;                              &lt;tr&gt;                               &lt;td height="20" valign="bottom" width="598"&gt;&lt;b&gt;Question&lt;/b&gt;&lt;/td&gt;                             &lt;/tr&gt;                              &lt;tr&gt;                               &lt;td width="598"&gt;How can you map attributes in IBM WebSphere Portal 6.1? It appears that there are unmapped attributes by default when initially configuring WebSphere Portal to an LDAP. WebSphere Portal Information Center does not provide detailed steps to explain the process. &lt;/td&gt;                             &lt;/tr&gt;                              &lt;tr&gt;                               &lt;td width="598"&gt;&amp;#160;&lt;/td&gt;                             &lt;/tr&gt;                           &lt;/tbody&gt;&lt;/table&gt;                       &lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr valign="top"&gt;                       &lt;td width="598"&gt;&amp;#160;&lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr&gt;                       &lt;td height="20" valign="bottom" width="598"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr&gt;                       &lt;td width="598"&gt;                         &lt;br /&gt;The following step-by-step instructions address attribute mapping in WebSphere Portal and should be considered as supplemental information to the WebSphere Portal Information Center page, &lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/index.jsp?topic=/com.ibm.wp.ent.doc/install/stdaln_map_attributes_linux.html"&gt;Mapping attributes&lt;/a&gt;. The instructions in this technote use a stand-alone security setup on Linux with Tivoli Directory Server as the LDAP. However, they can be adjusted to address other LDAPs or operating systems, and can be modified for federated repository setups by using the appropriate properties as outlined on the Information Center page.                           &lt;br /&gt;                          &lt;br /&gt;------------------                           &lt;br /&gt;                          &lt;br /&gt;1. Run &amp;quot;ldapsearch&amp;quot; from the Linux console to determine available attributes in LDAP. If you do not have an ldapsearch tool, refer to the related information at the bottom of this technote for a link to a command-line tool.                           &lt;br /&gt;                          &lt;ul&gt;&lt;b&gt;Command:&lt;/b&gt;                             &lt;br /&gt;ldapsearch -h &amp;lt;ldap_hostname&amp;gt; -x -D uid=wpsadmin,cn=users,dc=raleigh,dc=ibm,dc=ibm -w mypassword -b cn=users,dc=raleigh,dc=ibm,dc=com uid=wpsadmin                             &lt;br /&gt;                            &lt;br /&gt;&lt;b&gt;Results:&lt;/b&gt;                             &lt;br /&gt;dn: uid=wpsadmin,cn=users,dc=raleigh,dc=ibm,dc=com                             &lt;br /&gt;objectclass: organizationalPerson                             &lt;br /&gt;objectclass: person                             &lt;br /&gt;objectclass: top                             &lt;br /&gt;objectclass: inetOrgPerson                             &lt;br /&gt;objectclass: ibm-appuuidaux                             &lt;br /&gt;uid: wpsadmin                             &lt;br /&gt;userpassword:: e1NIQX0zxMQFlWTsNZy1siIH9y/6FDSfGw==                             &lt;br /&gt;sn: admin                             &lt;br /&gt;givenName: wps                             &lt;br /&gt;cn: wps admin                             &lt;br /&gt;ibm-appuuid: f1943b30-dc32-11da-b62a-832d445b4568                             &lt;br /&gt;mail: wpsadmin@us.ibm.com                             &lt;br /&gt;preferredlanguage: en                             &lt;br /&gt;                            &lt;br /&gt;&lt;b&gt;Command:&lt;/b&gt;                             &lt;br /&gt;ldapsearch -h wshasb.rtp.raleigh.ibm.com -x -D uid=wpsadmin,cn=users,dc=raleigh,dc=ibm,dc=com -w mypassword -b dc=raleigh,dc=ibm,dc=com cn=wpsadmins                             &lt;br /&gt;                            &lt;br /&gt;&lt;b&gt;Results:&lt;/b&gt;                             &lt;br /&gt;dn: cn=wpsadmins,cn=groups,dc=raleigh,dc=ibm,dc=com                             &lt;br /&gt;objectclass: groupOfUniqueNames                             &lt;br /&gt;objectclass: top                             &lt;br /&gt;cn: wpsadmins                             &lt;br /&gt;uniquemember: uid=wpsadmin,cn=users,dc=raleigh,dc=ibm,dc=com                             &lt;br /&gt;uniquemember: uid=jeff,cn=users,dc=raleigh,dc=ibm,dc=com                             &lt;br /&gt;&lt;/ul&gt; ------------------                           &lt;br /&gt;                          &lt;br /&gt;2. Run ./ConfigEngine.sh wp-query-attribute-config to produce output similar to the following in the &amp;lt;wp_profile&amp;gt;/ConfigEngine/log/Configtrace.log:                           &lt;br /&gt;                          &lt;ul&gt;[wplc-validate-ldap-attribute-config] Possible problems for PersonAccount:                            &lt;br /&gt;                            &lt;br /&gt;[wplc-validate-ldap-attribute-config] The following attribues are defined in Portal but not in LDAP - You should either flag them as unsupported or define an attribute mapping:                             &lt;br /&gt;[wplc-validate-ldap-attribute-config] [groups, identifier, ibm-jobTitle, entitlementInfo, realm, viewIdentifiers, certificate, stateOrProvinceName, createTimestamp, modifyTimestamp, ibm-primaryEmail, children, parent, c, partyRoles, principalName, countryName, localityName]                             &lt;br /&gt;&lt;/ul&gt; and then use the above information to modify the wkplc.properties file:                           &lt;br /&gt;                          &lt;ul&gt;standalone.ldap.attributes.nonSupported=groups, identifier, ibm-jobTitle, entitlementInfo, realm, viewIdentifiers, certificate, stateOrProvinceName, createTimestamp, modifyTimestamp, children, parent, c, partyRoles, principalName, countryName, localityName                            &lt;br /&gt;                            &lt;br /&gt;standalone.ldap.attributes.mapping.portalName=ibm-primaryEmail                             &lt;br /&gt;standalone.ldap.attributes.mapping.ldapName=mail                             &lt;br /&gt;&lt;/ul&gt; ------------------                           &lt;br /&gt;                          &lt;br /&gt;&lt;b&gt;Additional output in the ConfigTrace.log:&lt;/b&gt;                           &lt;br /&gt;                          &lt;br /&gt;[wplc-validate-ldap-attribute-config] The following attributes are flagged as required in LDAP but not in Portal - You should flag them as required in Portal, too:                           &lt;br /&gt;[wplc-validate-ldap-attribute-config] [sn, cn]                           &lt;br /&gt;                          &lt;br /&gt;Modifiy the wkplc.properties file accordingly:                           &lt;br /&gt;                          &lt;ul&gt;user.attributes.required=sn,cn&lt;/ul&gt;                          &lt;br /&gt;-----------------                           &lt;br /&gt;                          &lt;br /&gt;&lt;b&gt;Additional output in the ConfigTrace.log:&lt;/b&gt;                           &lt;br /&gt;                          &lt;br /&gt;[wplc-validate-ldap-attribute-config] FYI: The following attributes have a diffenrent type in Portal and in LDAP - No action is required:                           &lt;br /&gt;[wplc-validate-ldap-attribute-config] jpegPhoto: Base64Binary &amp;lt;&amp;gt; 1.3.6.1.4.1.1466.115.121.1.5                           &lt;br /&gt;[wplc-validate-ldap-attribute-config] password: Base64Binary &amp;lt;&amp;gt; 1.3.6.1.4.1.1466.115.121.1.5                           &lt;br /&gt;[wplc-validate-ldap-attribute-config] seeAlso: String &amp;lt;&amp;gt; 1.3.6.1.4.1.1466.115.121.1.12                           &lt;br /&gt;                          &lt;br /&gt;No modifications are required in the wkplc.properties file.                           &lt;br /&gt;                          &lt;br /&gt;-------------------                           &lt;br /&gt;                          &lt;br /&gt;&lt;b&gt;Additional output in the ConfigTrace.log:&lt;/b&gt;                           &lt;br /&gt;                          &lt;br /&gt;&lt;tt&gt;[&lt;/tt&gt;wplc-validate-ldap-attribute-config] Possible problems for Group:                           &lt;br /&gt;                          &lt;br /&gt;[wplc-validate-ldap-attribute-config] The following attribues are defined in Portal but not in LDAP - You should either flag them as unsupported or define an attribute mapping:[wplc-validate-ldap-attribute-config] [modifyTimestamp, groups, members, identifier, displayName, parent, children, entitlementInfo, partyRoles, viewIdentifiers, createTimestamp]                           &lt;br /&gt;                          &lt;br /&gt;Modify the wkplc.properties file accordingly:                           &lt;br /&gt;                          &lt;ul&gt;standalone.ldap.attributes.nonSupported=groups, identifier, ibm-jobTitle, entitlementInfo, realm, viewIdentifiers, certificate, stateOrProvinceName, createTimestamp, modifyTimestamp, ibm-primaryEmail, children, parent, c, partyRoles, principalName, countryName, localityName, modifyTimestamp, groups, identifier, displayName, parent, children, entitlementInfo, partyRoles, viewIdentifiers, createTimestamp                            &lt;br /&gt;                            &lt;br /&gt;standalone.ldap.attributes.mapping.ldapName=ibm-primaryEmail,members                             &lt;br /&gt;                            &lt;br /&gt;standalone.ldap.attributes.mapping.portalName=mail,uniquemember&lt;/ul&gt;                          &lt;br /&gt;-----------------                           &lt;br /&gt;                          &lt;br /&gt;&lt;b&gt;Additional output in the ConfigTrace.log:&lt;/b&gt;                           &lt;br /&gt;                          &lt;br /&gt;[wplc-validate-ldap-attribute-config] The following attributes are flagged as required in LDAP but not in Portal - You should flag them as required in Portal, too:                           &lt;br /&gt;[wplc-validate-ldap-attribute-config] []                           &lt;br /&gt;                          &lt;br /&gt;No modifications are required in the wkplc.properties file.                           &lt;br /&gt;                          &lt;br /&gt;-----------------                           &lt;br /&gt;                          &lt;br /&gt;&lt;b&gt;NOTE: &lt;/b&gt;Leave the following line unchanged in the wkplc.properties file:                           &lt;br /&gt;                          &lt;ul&gt;standalone.ldap.attributes.mapping.entityTypes=PersonAccount,Group&lt;/ul&gt;                          &lt;br /&gt;-----------------                           &lt;br /&gt;                          &lt;br /&gt;3. Run ./ConfigEngine.sh wp-update-standalone-ldap-attribute-config and ensure you receive a BUILD SUCCESSFUL message.                           &lt;br /&gt;                          &lt;br /&gt;4. Run ./ConfigEngine.sh wp-query-attribute-config and ensure you receive a BUILD SUCCESSFUL message.                           &lt;br /&gt;                          &lt;br /&gt;5. Once all required attributes are mapped, run the following tasks to propagate the security changes in a standalone (non-clustered) environment:                           &lt;br /&gt;                          &lt;ul&gt;a) ./stopServer.sh server1 -username &lt;i&gt;admin_userid&lt;/i&gt; -password &lt;i&gt;admin_password&lt;/i&gt;, from the &lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/reference/wpsdirstr.html#wpsdirstr__wp_profile_root"&gt;&lt;i&gt;&lt;u&gt;wp_profile_root&lt;/u&gt;&lt;/i&gt;&lt;/a&gt;/bin directory.                             &lt;br /&gt;                            &lt;br /&gt;b) ./stopServer.sh &lt;i&gt;WebSphere_Portal&lt;/i&gt; -username &lt;i&gt;admin_userid&lt;/i&gt; -password &lt;i&gt;admin_password&lt;/i&gt;, from the &lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/reference/wpsdirstr.html#wpsdirstr__wp_profile_root"&gt;&lt;i&gt;&lt;u&gt;wp_profile_root&lt;/u&gt;&lt;/i&gt;&lt;/a&gt;/bin directory.                             &lt;br /&gt;                            &lt;br /&gt;c) ./startServer.sh server1, from the &lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/reference/wpsdirstr.html#wpsdirstr__wp_profile_root"&gt;&lt;i&gt;&lt;u&gt;wp_profile_root&lt;/u&gt;&lt;/i&gt;&lt;/a&gt;/bin directory.                             &lt;br /&gt;                            &lt;br /&gt;d) ./startServer.sh &lt;i&gt;WebSphere_Portal&lt;/i&gt;, from the &lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/reference/wpsdirstr.html#wpsdirstr__wp_profile_root"&gt;&lt;i&gt;&lt;u&gt;wp_profile_root&lt;/u&gt;&lt;/i&gt;&lt;/a&gt;/bin directory.                             &lt;br /&gt;                            &lt;br /&gt;                            &lt;br /&gt;Note that if VMM is not already aware of the attribute (e.g. a custom attribute), you will need to add the attribute before you can map it. Refer to the solution in this technote:                             &lt;br /&gt;                            &lt;br /&gt;&lt;a href="http://www.ibm.com/support/docview.wss?rs=688&amp;amp;ca=portall2&amp;amp;uid=swg21365605"&gt;http://www.ibm.com/support/docview.wss?rs=688&amp;amp;ca=portall2&amp;amp;uid=swg21365605&lt;/a&gt;                             &lt;br /&gt;                            &lt;ul&gt;                             &lt;ul&gt;                               &lt;ul&gt;                                 &lt;ul&gt;                                   &lt;ul&gt;                                     &lt;ul&gt;                                       &lt;ul&gt;                                         &lt;ul&gt;&lt;/ul&gt;                                       &lt;/ul&gt;                                     &lt;/ul&gt;                                   &lt;/ul&gt;                                 &lt;/ul&gt;                               &lt;/ul&gt;                             &lt;/ul&gt;                           &lt;/ul&gt;                         &lt;/ul&gt;                       &lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr&gt;                       &lt;td width="598"&gt;&amp;#160;&lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr valign="top"&gt;                       &lt;td width="598"&gt;&amp;#160;&lt;/td&gt;                     &lt;/tr&gt;                   &lt;/tbody&gt;&lt;/table&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr valign="top"&gt;               &lt;td width="601"&gt;                 &lt;table border="0" cellspacing="0" cellpadding="0" width="443"&gt;&lt;tbody&gt;                     &lt;tr&gt;                       &lt;td height="20" valign="bottom" width="443"&gt;&lt;b&gt;Related information&lt;/b&gt;&lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr&gt;                       &lt;td width="443"&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/index.jsp?topic=/com.ibm.wp.ent.doc/install/stdaln_map_attributes_linux.html"&gt;Mapping Attributes&lt;/a&gt;                           &lt;br /&gt;&lt;a href="http://www-01.ibm.com/support/docview.wss?uid=swg21113384"&gt;Using ldapsearch to debug LDAP configuration problems&lt;/a&gt;                           &lt;br /&gt;&lt;a href="http://www-01.ibm.com/support/docview.wss?rs=688&amp;amp;ca=portall2&amp;amp;uid=swg21365605"&gt;Exception related to attributes&lt;/a&gt;&lt;/td&gt;                     &lt;/tr&gt;                   &lt;/tbody&gt;&lt;/table&gt;               &lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-7828437573936732394?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/7828437573936732394/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/detailed-steps-for-mapping-ldap.html#comment-form' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7828437573936732394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7828437573936732394'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/detailed-steps-for-mapping-ldap.html' title='Detailed steps for mapping LDAP attributes in WebSphere Portal 6.1'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-4704387693465782865</id><published>2010-04-02T10:51:00.002+07:00</published><updated>2010-04-02T11:04:15.301+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Itanium'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle RDBMS'/><title type='text'>Messages In Console: Oracle(9581): Floating-Point Assist Fault At Ip [ID 279456.1]</title><content type='html'>&lt;font face="helvetica"&gt;   &lt;br /&gt;    &lt;table border="0" cellspacing="6" cellpadding="0" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" colspan="4" align="left"&gt;&lt;/td&gt;          &lt;td valign="top" colspan="2"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" colspan="6" align="left"&gt;           &lt;hr size="1" /&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="25%" colspan="2"&gt;&amp;#160;&lt;/td&gt;          &lt;td valign="top" width="50%" colspan="3" nowrap="nowrap"&gt;&lt;em&gt;Modified&lt;/em&gt; 27-JAN-2010&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Type&lt;/em&gt; PROBLEM&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/font&gt;  &lt;p&gt;&lt;b&gt;In this Document&lt;/b&gt;    &lt;br /&gt;&lt;font size="-1"&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=279456.1#SYMPTOM"&gt;Symptoms&lt;/a&gt;      &lt;br /&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=279456.1#CAUSE"&gt;Cause&lt;/a&gt;      &lt;br /&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=279456.1#FIX"&gt;Solution&lt;/a&gt;      &lt;br /&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=279456.1#REF"&gt;References&lt;/a&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;hr size="1" /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;Applies to: &lt;/h2&gt; Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.1.0.2  &lt;br /&gt;Red Hat Enterprise Linux Advanced Server Itanium  &lt;br /&gt;UnitedLinux Itanium  &lt;br /&gt;Oracle Server Enterprise Edition - Version: 10.1.0.2 to 10.1.0.2  &lt;br /&gt;Checked for relevance on 25-Feb-2009  &lt;br /&gt;  &lt;br /&gt;This note is applicable on Itanium Architecture only   &lt;h2 class="km"&gt;&lt;a name="SYMPTOM"&gt;&lt;/a&gt;Symptoms&lt;/h2&gt; In the server console appears messages like  &lt;br /&gt;  &lt;br /&gt;oracle(9581): floating-point assist fault at ip 40000000068c22c2  &lt;br /&gt;...  &lt;br /&gt;oracle(13763): floating-point assist fault at ip 40000000072b8081   &lt;h2 class="km"&gt;&lt;a name="CAUSE"&gt;&lt;/a&gt;Cause&lt;/h2&gt; The messages are not errors,   &lt;br /&gt;just information/warning that the operation being performed by the processor needed a software assist.  &lt;br /&gt;  &lt;br /&gt;As reported on&lt;u&gt;   &lt;br /&gt;&lt;/u&gt;&lt;a href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=62080055abe021100055abe02110275d6e10RCRD"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=62080055abe021100055abe02110275d6e10RCRD   &lt;br /&gt;&lt;/a&gt;&lt;u&gt;   &lt;br /&gt;    &lt;br /&gt;&lt;/u&gt;We reproduce here part of this article titled &lt;strong&gt;What's up with those &amp;quot;floating-point assist fault&amp;quot; messages? - Linux on Itanium&lt;/strong&gt;  &lt;br /&gt;  &lt;br /&gt;When working at the Linux console or looking through the kernel's log file in /var/log/messages,   &lt;br /&gt;you may encounter messages of the form:  &lt;br /&gt;  &lt;br /&gt;test-fpsr(1416): floating-point assist fault at ip 40000000000005d2  &lt;br /&gt;  &lt;br /&gt;This message means that program &amp;quot;test-fpsr&amp;quot; with process id 1416 performed a floating-point   &lt;br /&gt;operation that required software assistance.   &lt;br /&gt;On Itanium, this usually happens when operating on IEEE denormals   &lt;br /&gt;(numbers that cannot be represented in normalized form).  &lt;br /&gt;  &lt;br /&gt;Again, just like for unaligned accesses, these operations are emulated in the kernel,   &lt;br /&gt;so there is nothing to worry from a correctness point of view. However,   &lt;br /&gt;emulating these operations takes time and can slow down a program significantly.   &lt;br /&gt;Since most programs don't need full IEEE-compliance, Itanium Linux   &lt;br /&gt;provides a function to turn on &amp;quot;flush-to-zero&amp;quot; mode in the processor,   &lt;br /&gt;which avoids generating IEEE denormals as a result of ordinary floating-point calculations.   &lt;br /&gt;This mode can be turned on using the following code fragment:  &lt;br /&gt;  &lt;br /&gt;#include &lt;fenv.h&gt;  &lt;br /&gt;:  &lt;br /&gt;fesetenv (FE_NONIEEE_ENV);  &lt;br /&gt;:  &lt;br /&gt;  &lt;br /&gt;Alternatively, compiler option -ffast-math can be used when linking   &lt;br /&gt;the final program to achieve the same effect. For example:  &lt;br /&gt;  &lt;br /&gt;gcc -ffast-math test.o -o test  &lt;br /&gt;  &lt;br /&gt;would build program &amp;quot;test&amp;quot; with flush-to-zero mode turned on.  &lt;br /&gt;  &lt;br /&gt;Note:  &lt;br /&gt;the Oracle code cannot be changed or compiled such that the condition that generates the message is eliminated.  &lt;br /&gt;This because the hardware doesn't support the floating-point operation being reque&lt;/fenv.h&gt;&lt;u&gt;&lt;fenv.h&gt;   &lt;br /&gt;&lt;/fenv.h&gt;&lt;/u&gt;  &lt;h2 class="km"&gt;&lt;a name="FIX"&gt;&lt;/a&gt;Solution&lt;/h2&gt; It is possible to completely turn off the floating-point assist messages from the console (they are still written to /var/log/messages)  &lt;br /&gt;To do this, simply issue the command as &amp;quot;root&amp;quot;:  &lt;blockquote&gt;$ dmesg -n4   &lt;br /&gt;    &lt;br /&gt;&lt;/blockquote&gt; To eliminate them also from /var/log/messages :  &lt;br /&gt;  &lt;br /&gt;1. edit /etc/syslog.conf changing line:  &lt;br /&gt;  &lt;blockquote&gt;&amp;#160;&lt;em&gt;*.info;mail.none;authpriv.none;cron.none&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /var/log/messages&lt;/em&gt;    &lt;br /&gt;&lt;/blockquote&gt;&amp;#160; to   &lt;br /&gt;  &lt;blockquote&gt;&lt;em&gt;*.error;mail.none;authpriv.none;cron.none&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /var/log/messages&lt;/em&gt;    &lt;br /&gt;&lt;/blockquote&gt; This means any facility logging messages below error level will be suppressed  &lt;br /&gt;  &lt;br /&gt;2. restart syslog  &lt;br /&gt;service syslog restart  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;To explain wht is being suppressed:  &lt;br /&gt;From the syslog man page:  &lt;br /&gt;  &lt;br /&gt; Every&amp;#160; text&amp;#160; line&amp;#160; in&amp;#160; a&amp;#160; message&amp;#160; has&amp;#160; its own loglevel.   &lt;br /&gt;This level is&amp;#160; DEFAULT_MESSAGE_LOGLEVEL - 1 (6) unless the line starts with &amp;lt;d&amp;gt;&amp;#160; where&amp;#160; d&amp;#160; is&amp;#160; a digit in the range 1-7,   &lt;br /&gt;in which case the level is d. The conventional meaning of the loglevel is&amp;#160; defined&amp;#160; in&amp;#160; &amp;lt;linux/kernel.h&amp;gt;&amp;#160; as follows:  &lt;br /&gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_EMERG&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;0&amp;gt;&amp;quot;&amp;#160; /* system is unusable&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_ALERT&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;1&amp;gt;&amp;quot;&amp;#160; /* action must be taken immediately */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_CRIT&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;2&amp;gt;&amp;quot;&amp;#160; /* critical conditions&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_ERR&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;3&amp;gt;&amp;quot;&amp;#160; /* error conditions&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_WARNING&amp;#160; &amp;quot;&amp;lt;4&amp;gt;&amp;quot;&amp;#160; /* warning conditions&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_NOTICE&amp;#160;&amp;#160; &amp;quot;&amp;lt;5&amp;gt;&amp;quot;&amp;#160; /* normal but significant condition */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_INFO&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;6&amp;gt;&amp;quot;&amp;#160; /* informational&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #define KERN_DEBUG&amp;#160;&amp;#160;&amp;#160; &amp;quot;&amp;lt;7&amp;gt;&amp;quot;&amp;#160; /* debug-level messages&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */  &lt;br /&gt;  &lt;br /&gt;The n4 in the dmesg command means to filter messages of &amp;quot;warning conditions&amp;quot; of which the floating point software assist messages are.&amp;#160; The *.error in syslog.conf means all levels below e  &lt;br /&gt;  &lt;blockquote&gt;   &lt;br /&gt;&lt;/blockquote&gt;  &lt;h2 class="km"&gt;&lt;a name="REF"&gt;&lt;/a&gt;References&lt;/h2&gt; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=BUG&amp;amp;id=3777000"&gt;BUG:3777000&lt;/a&gt; - FLOATING-POINT ASSIST FAULT(FPSWA) CAUSES POOR PERFORMANCE  &lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=BUG&amp;amp;id=3796598"&gt;BUG:3796598&lt;/a&gt; - KERNEL: ORACLE(570): FLOATING-POINT ASSIST FAULT AT IP CAUSES CONNECTION PROBLEM  &lt;br /&gt;&lt;a href="http://i-cluster2.inrialpes.fr/doc/misc/fpswa.txt" target="_blank"&gt;http://i-cluster2.inrialpes.fr/doc/misc/fpswa.txt&lt;/a&gt;  &lt;br /&gt;&lt;a href="http://bugpriority.oraclecorp.com/pls/bugpriority/DWB_RFA_HTML.RFA_ADMIN?P_RFA_REQUEST_ID=1158" target="_blank"&gt;http://bugpriority.oraclecorp.com/pls/bugpriority/DWB_RFA_HTML.RFA_ADMIN?P_RFA_REQUEST_ID=1158&lt;/a&gt;  &lt;br /&gt;&lt;a href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=62080055abe021100055abe02110275d6e10RCRD" target="_blank"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=62080055abe021100055abe02110275d6e10RCRD&lt;/a&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;table width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td colspan="2"&gt;         &lt;p&gt;&lt;img style="cursor: pointer" id="collapseImg2" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;            &lt;br /&gt;&lt;/p&gt;          &lt;div style="width: 100%; display: inline; margin-left: 20px" id="collapsibleRelatedData"&gt;           &lt;hr size="1" /&gt;&lt;b style="margin-left: 20px"&gt;Products&lt;/b&gt;             &lt;hr style="margin-left: 20px" size="1" /&gt;            &lt;ul&gt;             &lt;li&gt;Oracle Database Products &amp;gt; Oracle Database &amp;gt; Oracle Database &amp;gt; Oracle Server - Enterprise Edition &lt;/li&gt;           &lt;/ul&gt;         &lt;/div&gt;          &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-4704387693465782865?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/4704387693465782865/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/messages-in-console-oracle9581-floating.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4704387693465782865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4704387693465782865'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/04/messages-in-console-oracle9581-floating.html' title='Messages In Console: Oracle(9581): Floating-Point Assist Fault At Ip [ID 279456.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-8377559347300469608</id><published>2010-02-17T00:56:00.002+07:00</published><updated>2010-02-17T00:57:19.833+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>DBCC CHECKDB</title><content type='html'>&lt;form id="aspnetForm" name="aspnetForm" action="http://msdn.microsoft.com/aa258278(SQL.80,printer).aspx" method="post"&gt;   &lt;div&gt;&amp;#160;&amp;#160; &lt;/div&gt;    &lt;div class="PrinterFriendlyBanner" id="ctl00_BannerControl1_MTPS_PrinterFriendlyBanner"&gt;     &lt;table cellspacing="0" cellpadding="0" width="100%" border="0"&gt;&lt;tbody&gt;         &lt;tr&gt;           &lt;td class="PFB_Left"&gt;&amp;#160;&lt;/td&gt;            &lt;td class="PFB_Right"&gt;&amp;#160;&lt;/td&gt;         &lt;/tr&gt;       &lt;/tbody&gt;&lt;/table&gt;   &lt;/div&gt;   &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.vb, .cs, .cpp, .nu, .fs&lt;br /&gt;{&lt;br /&gt; display:none;&lt;br /&gt;}&lt;/style&gt;&lt;style id="LanguageSpecificTextStyle" type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.nu&lt;br /&gt;{&lt;br /&gt;   display:inline;&lt;br /&gt;}&lt;/style&gt;    &lt;div class="ContentArea"&gt;     &lt;div class="topic"&gt;       &lt;div class="majorTitle"&gt;&amp;#160;&lt;/div&gt;        &lt;div class="title"&gt;&amp;#160;&lt;/div&gt;        &lt;div id="nstext" valign="top"&gt;&lt;a name="_dbcc_checkdb"&gt;&lt;/a&gt;          &lt;p&gt;Checks the allocation and structural integrity of all the objects in the specified database.&lt;/p&gt;          &lt;h5&gt;Syntax&lt;/h5&gt;          &lt;p&gt;DBCC CHECKDB            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;b&gt;( '&lt;/b&gt;&lt;i&gt;database_name&lt;/i&gt;&lt;b&gt;'&lt;/b&gt; &lt;b&gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/b&gt;[ &lt;b&gt;,&lt;/b&gt; NOINDEX             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | { REPAIR_ALLOW_DATA_LOSS             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | REPAIR_FAST             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | REPAIR_REBUILD             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;b&gt;)&amp;#160;&amp;#160;&amp;#160; &lt;/b&gt;[ WITH { [ ALL_ERRORMSGS ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ &lt;b&gt;,&lt;/b&gt; [ NO_INFOMSGS ] ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ &lt;b&gt;, &lt;/b&gt;[ TABLOCK ] ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ &lt;b&gt;, &lt;/b&gt;[ ESTIMATEONLY ] ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ &lt;b&gt;,&lt;/b&gt; [ PHYSICAL_ONLY ] ]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ] &lt;/p&gt;          &lt;h5&gt;Arguments&lt;/h5&gt;          &lt;p&gt;&lt;b&gt;'&lt;/b&gt;&lt;i&gt;database_name&lt;/i&gt;&lt;b&gt;'&lt;/b&gt;&lt;/p&gt;          &lt;p class="indent"&gt;Is the database for which to check all object allocation and structural integrity. If not specified, the default is the current database. Database names must conform to the rules for identifiers. For more information, see &lt;a id="ctl00_mainContentContainer_ctl01" href="http://msdn.microsoft.com/en-us/library/aa223962%28SQL.80,printer%29.aspx"&gt;Using Identifiers&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa223962(SQL.80).aspx ] . &lt;/p&gt;          &lt;p&gt;NOINDEX&lt;/p&gt;          &lt;p class="indent"&gt;Specifies that nonclustered indexes for nonsystem tables should not be checked. NOINDEX decreases the overall execution time because it does not check nonclustered indexes for user-defined tables. NOINDEX has no effect on system tables, because DBCC CHECKDB always checks all system table indexes.&lt;/p&gt;          &lt;p&gt;REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST| REPAIR_REBUILD &lt;/p&gt;          &lt;p class="indent"&gt;Specifies that DBCC CHECKDB repair the found errors. The given &lt;i&gt;database_name &lt;/i&gt;must be in single-user mode to use a repair option and can be one of the following.&lt;/p&gt;          &lt;table cols="cols" rules="all" width="563" border="1" frame="box"&gt;&lt;tbody&gt;             &lt;tr valign="top"&gt;               &lt;th class="label" width="36%"&gt;Value&lt;/th&gt;                &lt;th class="label" width="64%"&gt;Description&lt;/th&gt;             &lt;/tr&gt;              &lt;tr valign="top"&gt;               &lt;td width="36%"&gt;REPAIR_ALLOW_DATA_LOSS&lt;/td&gt;                &lt;td width="64%"&gt;Performs all repairs done by REPAIR_REBUILD and includes allocation and deallocation of rows and pages for correcting allocation errors, structural row or page errors, and deletion of corrupted text objects. These repairs can result in some data loss. The repair may be done under a user transaction to allow the user to roll back the changes made. If repairs are rolled back, the database will still contain errors and should be restored from a backup. If a repair for an error has been skipped due to the provided repair level, any repairs that depend on the repair are also skipped. After repairs are completed, back up the database.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr valign="top"&gt;               &lt;td width="36%"&gt;REPAIR_FAST&lt;/td&gt;                &lt;td width="64%"&gt;Performs minor, nontime-consuming repair actions such as repairing extra keys in nonclustered indexes. These repairs can be done quickly and without risk of &lt;yoono-highlight class="yoono-link-hover yoono-link-active-link" keywords="data loss"&gt;data loss&lt;/yoono-highlight&gt;.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr valign="top"&gt;               &lt;td width="36%"&gt;REPAIR_REBUILD&lt;/td&gt;                &lt;td width="64%"&gt;Performs all repairs done by REPAIR_FAST and includes time-consuming repairs such as rebuilding indexes. These repairs can be done without risk of data loss.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;          &lt;br /&gt;          &lt;p&gt;WITH&lt;/p&gt;          &lt;p class="indent"&gt;Specifies options on the number of error messages returned, locks obtained, or estimating &lt;b&gt;tempdb&lt;/b&gt; requirements.&lt;/p&gt;          &lt;p&gt;ALL_ERRORMSGS&lt;/p&gt;          &lt;p class="indent"&gt;Displays an unlimited number of errors per object. If ALL_ERRORMSGS is not specified, displays up to 200 error messages for each object. Error messages are sorted by object ID, except for those messages generated from &lt;b&gt;tempdb&lt;/b&gt;.&lt;/p&gt;          &lt;p&gt;NO_INFOMSGS&lt;/p&gt;          &lt;p class="indent"&gt;Suppresses all informational messages (Severity 10) and the report of space used. &lt;/p&gt;          &lt;p&gt;TABLOCK&lt;/p&gt;          &lt;p class="indent"&gt;Causes DBCC CHECKDB to obtain shared table locks. TABLOCK will cause DBCC CHECKDB to run faster on a database under heavy load, but decreases the concurrency available on the database while DBCC CHECKDB is running.&lt;/p&gt;          &lt;p&gt;ESTIMATE ONLY&lt;/p&gt;          &lt;p class="indent"&gt;Displays the estimated amount of &lt;b&gt;tempdb&lt;/b&gt; space needed to run DBCC CHECKDB with all of the other specified options. The check is not performed.&lt;/p&gt;          &lt;p&gt;PHYSICAL_ONLY&lt;/p&gt;          &lt;p class="indent"&gt;Limits the checking to the integrity of the physical structure of the page and record headers, and to the consistency between the pages' object ID and index ID and the allocation structures. Designed to provide a low overhead check of the physical consistency of the database, this check also detects torn pages and common hardware failures that can compromise a user's data. PHYSICAL_ONLY always implies NO_INFOMSGS and is not allowed with any of the repair options.&lt;/p&gt;          &lt;h5&gt;Remarks&lt;/h5&gt;          &lt;p&gt;DBCC CHECKDB performs a physical consistency check on indexed views. The NOINDEX option, used only for backward compatibility, also applies to any secondary indexes on indexed views.&lt;/p&gt;          &lt;p&gt;DBCC CHECKDB is the safest repair statement because it identifies and repairs the widest possible errors. If only allocation errors are reported for a database, execute DBCC CHECKALLOC with a repair option to repair these errors. However, to ensure that all errors, including allocation errors, are properly repaired, execute DBCC CHECKDB with a repair option rather than DBCC CHECKALLOC with a repair option.&lt;/p&gt;          &lt;p&gt;DBCC CHECKDB validates the integrity of everything in a database. There is no need to run DBCC CHECKALLOC or DBCC CHECKTABLE if DBCC CHECKDB either is currently or has been recently executed.&lt;/p&gt;          &lt;p&gt;DBCC CHECKDB performs the same checking as if both a DBCC CHECKALLOC statement and a DBCC CHECKTABLE statement were executed for each table in the database.&lt;/p&gt;          &lt;p&gt;DBCC CHECKDB does not acquire table locks by default. Instead, it acquires schema locks that prevent meta data changes but allow changes to the data. The schema locks acquired will prevent the user from getting an exclusive table lock required to build a clustered index, drop any index, or truncate the table. &lt;/p&gt;          &lt;p&gt;The DBCC statement collects information, and then scans the log for any additional changes made, merging the two sets of information together to produce a consistent view of the data at the end of the scan. &lt;/p&gt;          &lt;p&gt;When the TABLOCK option is specified, DBCC CHECKDB acquires shared table locks. This allows more detailed error messages for some classes of errors and minimizes the amount of &lt;b&gt;tempdb&lt;/b&gt; space required by avoiding the use of transaction log data. The TABLOCK option will not block the truncation of the log and will allow the command to run faster.&lt;/p&gt;          &lt;p&gt;DBCC CHECKDB checks the linkages and sizes of &lt;b&gt;text&lt;/b&gt;, &lt;b&gt;ntext&lt;/b&gt;, and &lt;b&gt;image&lt;/b&gt; pages for each table, and the allocation of all the pages in the database.&lt;/p&gt;          &lt;p&gt;For each table in the database, DBCC CHECKDB checks that: &lt;/p&gt;          &lt;ul type="disc"&gt;           &lt;li&gt;Index and data pages are correctly linked.             &lt;br /&gt;              &lt;br /&gt;&lt;/li&gt;            &lt;li&gt;Indexes are in their proper sort order.             &lt;br /&gt;              &lt;br /&gt;&lt;/li&gt;            &lt;li&gt;Pointers are consistent.             &lt;br /&gt;              &lt;br /&gt;&lt;/li&gt;            &lt;li&gt;The data on each page is reasonable.             &lt;br /&gt;              &lt;br /&gt;&lt;/li&gt;            &lt;li&gt;Page offsets are reasonable. &lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;Errors indicate potential problems in the database and should be corrected immediately.&lt;/p&gt;          &lt;p&gt;By default, DBCC CHECKDB performs parallel checking of objects.&amp;#160; The degree of parallelism is determined automatically by the query processor. The maximum degree of parallelism is configured in the same manner as that of parallel queries.&amp;#160; Use the sp_configure system stored procedure to restrict the maximum number of processors available for DBCC checking.&amp;#160; For more information, see &lt;a id="ctl00_mainContentContainer_ctl02" href="http://msdn.microsoft.com/en-us/library/aa196725%28SQL.80,printer%29.aspx"&gt;max degree of parallelism Option&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa196725(SQL.80).aspx ] .&lt;/p&gt;          &lt;p&gt;Parallel checking can be disabled by using trace flag 2528.&amp;#160; For more information, see &lt;a id="ctl00_mainContentContainer_ctl03" href="http://msdn.microsoft.com/en-us/library/aa260630%28SQL.80,printer%29.aspx"&gt;Trace Flags&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa260630(SQL.80).aspx ] .&lt;/p&gt;          &lt;h5&gt;Result Sets&lt;/h5&gt;          &lt;p&gt;Whether or not any options (except for the NO_INFOMSGS or NOINDEX options) are specified, DBCC CHECKDB returns this result set for the current database, if no database is specified (values may vary):&lt;/p&gt;          &lt;pre&gt;&lt;code&gt;DBCC results for 'master'.&lt;br /&gt;DBCC results for 'sysobjects'.&lt;br /&gt;There are 862 rows in 13 pages for object 'sysobjects'.&lt;br /&gt;DBCC results for 'sysindexes'.&lt;br /&gt;There are 80 rows in 3 pages for object 'sysindexes'.&lt;br /&gt;'...'&lt;br /&gt;DBCC results for 'spt_provider_types'.&lt;br /&gt;There are 23 rows in 1 pages for object 'spt_provider_types'.&lt;br /&gt;CHECKDB found 0 allocation errors and 0 consistency errors in database 'master'.&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p&gt;IF the NO_INFOMSGS option is specified, DBCC CHECKDB returns this result set (message):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre&gt;&lt;code&gt;The command(s) completed successfully.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p&gt;DBCC CHECKDB returns this result set when the ESTIMATEONLY option is specified.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre&gt;&lt;code&gt;Estimated TEMPDB space needed for CHECKALLOC (KB) &lt;br /&gt;------------------------------------------------- &lt;br /&gt;13&lt;br /&gt;&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;&lt;br /&gt;Estimated TEMPDB space needed for CHECKTABLES (KB) &lt;br /&gt;-------------------------------------------------- &lt;br /&gt;57&lt;br /&gt;&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;h5&gt;Permissions&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p&gt;DBCC CHECKDB permissions default to members of the &lt;b&gt;sysadmin&lt;/b&gt; fixed server role or the &lt;b&gt;db_owner&lt;/b&gt; fixed database role, and are not transferable.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;h5&gt;Examples&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;        &lt;h6&gt;A. Check both the current and the pubs database&lt;/h6&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p&gt;This example executes DBCC CHECKDB for the current database and for the &lt;b&gt;pubs &lt;/b&gt;database.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre&gt;&lt;code&gt;-- Check the current database.&lt;br /&gt;DBCC CHECKDB&lt;br /&gt;GO&lt;br /&gt;-- Check the pubs database without nonclustered indexes.&lt;br /&gt;DBCC CHECKDB ('pubs', NOINDEX)&lt;br /&gt;GO&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;h6&gt;B. Check the current database, suppressing informational messages&lt;/h6&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p&gt;This example checks the current database and suppresses all informational messages.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;pre&gt;&lt;code&gt;DBCC CHECKDB WITH NO_INFOMSGS&lt;br /&gt;GO&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;        &lt;p class="clear-graphic"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;h5&gt;&lt;b&gt;See Also&lt;/b&gt;&lt;/h5&gt;&lt;br /&gt;        &lt;span id="LinKs"&gt;&lt;br /&gt;          &lt;p&gt;&lt;a id="ctl00_mainContentContainer_ctl04" href="http://msdn.microsoft.com/en-us/library/aa175266%28SQL.80,printer%29.aspx"&gt;Features Supported by the Editions of &lt;yoono-highlight class="yoono-link-hover" keywords="SQL Server &amp;#13;&amp;#10;2000"&gt;SQL Server 2000&lt;/yoono-highlight&gt;&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa175266(SQL.80).aspx ] &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;&lt;a id="ctl00_mainContentContainer_ctl05" href="http://msdn.microsoft.com/en-us/library/aa216284%28SQL.80,printer%29.aspx"&gt;How to configure the number of processors available for parallel queries (Enterprise Manager)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa216284(SQL.80).aspx ] &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;&lt;a id="ctl00_mainContentContainer_ctl06" href="http://msdn.microsoft.com/en-us/library/aa174532%28SQL.80,printer%29.aspx"&gt;Physical Database Architecture&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa174532(SQL.80).aspx ] &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;&lt;a id="ctl00_mainContentContainer_ctl07" href="http://msdn.microsoft.com/en-us/library/aa933431%28SQL.80,printer%29.aspx"&gt;sp_helpdb&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa933431(SQL.80).aspx ] &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;&lt;a id="ctl00_mainContentContainer_ctl08" href="http://msdn.microsoft.com/en-us/library/aa260604%28SQL.80,printer%29.aspx"&gt;System Tables&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/aa260604(SQL.80).aspx ] &lt;/p&gt;&lt;br /&gt;        &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="yoono-gateway" style="display: none" tooltip-message="Search with Yoono"&gt;&lt;/div&gt;&lt;br /&gt;&lt;style id="yoono-style"&gt;&lt;br /&gt;.yoono-link-hover{border-bottom:2px #3b5998 dotted;display:inline!important;float:none!important;}.yoono-link-active-link{cursor:pointer;}.yoono-link-icon{position:absolute;visibility:hidden;background-repeat:no-repeat;height:16px;z-index:100000;cursor:pointer;}.yoono-link-icon.smallhint{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_01.png');width:23px;height:29px;}.yoono-link-icon.smallhint.yoono-left{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_02.png');}.yoono-link-icon.smallhint.yoono-bottom{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_03.png');}.yoono-link-icon.forceopaque{opacity:1;filter:alpha(opacity = 100);}.yoono-link-icon.yoono-reminder{position:fixed;right:1px;bottom:1px;border:0;-moz-border-radius:0;height:30px;padding-top:12px;background-image:url('http://www.yoono.com/favicon.ico');background-repeat:none;background-position:2px 10px;padding-left:24px;}#yoono-link-debug{position:fixed;right:10px;bottom:10px;width:210px;border:2px solid black;background:silver;z-index:10000;opacity:.8;filter:alpha(opacity = 80);text-align:center;font-size:14px;color:black;}#yoono-link-debug.yoono-ie{position:absolute;}#yoono-kwe-debug{position:fixed;width:200px;font-size:16px;z-index:1000;text-align:right;color:blue;font-weight:bold;top:10px;right:20px;border:2px solid black;background:silver;opacity:.6;filter:alpha(opacity = 60);color:black;}#yoono-kwe-debug.yoono-ie{position:absolute;}&lt;/style&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-8377559347300469608?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/8377559347300469608/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/dbcc-checkdb.html#comment-form' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8377559347300469608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8377559347300469608'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/dbcc-checkdb.html' title='DBCC CHECKDB'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-7342936435056467519</id><published>2010-02-17T00:54:00.002+07:00</published><updated>2010-02-17T00:56:12.739+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>DBCC CHECKALLOC (Transact-SQL)</title><content type='html'>&lt;form id="aspnetForm" name="aspnetForm" action="http://technet.microsoft.com/ms188422(SQL.90,printer).aspx" method="post"&gt;   &lt;div&gt;   &lt;/div&gt;    &lt;div class="PrinterFriendlyBanner" id="ctl00_BannerControl1_MTPS_PrinterFriendlyBanner"&gt; &lt;/div&gt;   &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.vb, .cs, .cpp, .nu, .fs&lt;br /&gt;{&lt;br /&gt;	display:none;&lt;br /&gt;}&lt;/style&gt;&lt;style id="LanguageSpecificTextStyle" type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.nu&lt;br /&gt;{&lt;br /&gt;   display:inline;&lt;br /&gt;}&lt;/style&gt;    &lt;div class="ContentArea"&gt;     &lt;div class="topic"&gt;       &lt;div class="majorTitle"&gt; &lt;/div&gt;        &lt;div class="title"&gt; &lt;/div&gt;        &lt;div id="mainSection"&gt;         &lt;div id="mainBody"&gt;           &lt;p&gt;&lt;/p&gt;           &lt;span id="changeHistory"&gt;Updated: &lt;strong&gt;17 November 2008&lt;/strong&gt; &lt;/span&gt;            &lt;p&gt;Checks the consistency of disk space allocation structures for a specified database.&lt;/p&gt;            &lt;p&gt;&lt;img alt="Topic link icon" src="http://i.technet.microsoft.com/ms188422.05b1d166-d807-482c-891f-30b3b6b58046%28en-US,SQL.90%29.gif" /&gt; &lt;a id="ctl00_mainContentContainer_ctl02" href="http://technet.microsoft.com/en-us/library/ms177563%28SQL.90,printer%29.aspx"&gt;Transact-SQL Syntax Conventions&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms177563(SQL.90).aspx ] &lt;/p&gt;           &lt;span&gt;             &lt;div class="MTPS_CollapsibleRegion"&gt;               &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Syntax &lt;/div&gt;                &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="syntaxToggle"&gt;&lt;/a&gt;&lt;span id="ctl00_mainContentContainer_ctl29_ctl00_ctl00"&gt;                   &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl29_ctl00_ctl00_"&gt;                     &lt;div class="CodeSnippetTitleBar"&gt;                       &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;                     &lt;/div&gt;                      &lt;div dir="ltr" style="background-color: rgb(221, 221, 221);"&gt;                       &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl29_ctl00_ctl00_code" space="preserve"&gt;DBCC CHECKALLOC&lt;br /&gt;[         ( database_name | database_id | 0       [ , NOINDEX       | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]         )     [ WITH         {           [ ALL_ERRORMSGS ]           [ , NO_INFOMSGS ]           [ , TABLOCK ]           [ , ESTIMATEONLY ]         }     ]&lt;br /&gt;]&lt;/pre&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/div&gt;&lt;br /&gt;               &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Arguments &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="sectionToggle0"&gt;&lt;/a&gt;&lt;dl&gt;&lt;dt&gt;&lt;em&gt;database_name&lt;/em&gt; | &lt;em&gt;database_id&lt;/em&gt; | 0&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Is the name or the ID of the database for which to check allocation and page usage. If not specified, or if 0 is specified, the current database is used. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;p&gt;Database names must follow the rules for &lt;a id="ctl00_mainContentContainer_ctl30_ctl00_ctl00" href="http://technet.microsoft.com/en-us/library/ms175874%28SQL.90,printer%29.aspx"&gt;identifiers&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms175874(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;NOINDEX &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Specifies that nonclustered indexes for user tables should not be checked. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;div class="alert"&gt;&lt;br /&gt;                     &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                         &lt;tr&gt;&lt;br /&gt;                           &lt;th&gt;&lt;img alt="ms188422.note(en-US,SQL.90).gif" src="http://i.technet.microsoft.com/ms188422.note%28en-US,SQL.90%29.gif" /&gt;Note: &lt;/th&gt;&lt;br /&gt;                         &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                         &lt;tr&gt;&lt;br /&gt;                           &lt;td&gt;NOINDEX is maintained for backward compatibility only and does not affect DBCC CHECKALLOC.&lt;br /&gt;                             &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                           &lt;/td&gt;&lt;br /&gt;                         &lt;/tr&gt;&lt;br /&gt;                       &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Specifies that DBCC CHECKALLOC repair the found errors. &lt;em&gt;database_name&lt;/em&gt; must be in single-user mode. &lt;/p&gt;&lt;br /&gt;                   &lt;dl&gt;&lt;dt&gt;REPAIR_ALLOW_DATA_LOSS&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                       &lt;p&gt;Tries to repair any errors that are found. These repairs can cause some data loss. REPAIR_ALLOW_DATA_LOSS is the only option that allows for allocation errors to be repaired.&lt;/p&gt;&lt;br /&gt;                     &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_FAST&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                       &lt;p&gt;Syntax is maintained for backward compatibility only. No repair actions are performed.&lt;/p&gt;&lt;br /&gt;                     &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_REBUILD&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                       &lt;p&gt;Not applicable.&lt;/p&gt;&lt;br /&gt;                     &lt;/dd&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;div class="alert"&gt;&lt;br /&gt;                     &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                         &lt;tr&gt;&lt;br /&gt;                           &lt;th&gt;&lt;img alt="ms188422.note(en-US,SQL.90).gif" src="http://i.technet.microsoft.com/ms188422.note%28en-US,SQL.90%29.gif" /&gt;Important: &lt;/th&gt;&lt;br /&gt;                         &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                         &lt;tr&gt;&lt;br /&gt;                           &lt;td&gt;Use the REPAIR options only as a last resort. To repair errors, we recommend restoring from a backup. Repair operations do not consider any of the constraints that may exist on or between tables. If the specified table is involved in one or more constraints, we recommend running DBCC CHECKCONSTRAINTS after a repair operation. If you must use REPAIR, run DBCC CHECKDB without a repair option to find the repair level to use. If you use the REPAIR_ALLOW_DATA_LOSS level, we recommend that you back up the database before you run DBCC CHECKDB with this option.&lt;br /&gt;                             &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                           &lt;/td&gt;&lt;br /&gt;                         &lt;/tr&gt;&lt;br /&gt;                       &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;WITH &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Enables options to be specified.&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;ALL_ERRORMSGS &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Displays all error messages. In SQL Server 2005 Service Pack 3 (SP3), all error messages are displayed by default. Specifying or omitting this option has no effect. In earlier versions of SQL Server, only the first 200 error messages for each object are displayed if ALL_ERRORMSGS is not specified.&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;NO_INFOMSGS &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Suppresses all informational messages and the report of space used.&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;TABLOCK &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Causes the DBCC command to obtain an exclusive database lock.&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;ESTIMATE ONLY &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                   &lt;p&gt;Displays the estimated amount of &lt;strong&gt;tempdb&lt;/strong&gt; space that is required to run DBCC CHECKALLOC when all the other options are specified.&lt;/p&gt;&lt;br /&gt;                 &lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Result Sets &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="sectionToggle1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;The following tables describe the information that DBCC CHECKALLOC returns.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;th&gt;Item &lt;/th&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;th&gt;Description &lt;/th&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;FirstIAM&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Internal use only.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Root&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Internal use only.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Dpages&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Data page count.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages used&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Allocated pages.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Dedicated extents&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Extents allocated to the object.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;p&gt;If mixed allocation pages are used, there might be pages allocated without extents.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;                 &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;DBCC CHECKALLOC also reports an allocation summary for each index and partition in each file. This summary describes the distribution of the data.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;th&gt;Item &lt;/th&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;th&gt;Description &lt;/th&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Reserved pages&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages allocated to the index and the unused pages in allocated extents.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Used pages&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages allocated and being used by the index.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Partition ID&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Internal use only.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Alloc unit ID&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Internal use only.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;In-row data&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages contain index or heap data.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;LOB data&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages contain &lt;strong&gt;varchar(max)&lt;/strong&gt;, &lt;strong&gt;nvarchar(max)&lt;/strong&gt;, &lt;strong&gt;varbinary(max)&lt;/strong&gt;, &lt;strong&gt;text&lt;/strong&gt;, &lt;strong&gt;ntext&lt;/strong&gt;, &lt;strong&gt;&lt;yoono-highlight class="yoono-link-hover yoono-link-active-link" keywords="xml"&gt;xml&lt;/yoono-highlight&gt;&lt;/strong&gt;, and &lt;strong&gt;image&lt;/strong&gt; data.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Row-overflow data&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;Pages contain variable-length column data that has been pushed off-row.&lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;                 &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;DBCC CHECKALLOC returns the following result set (values may vary), except when ESTIMATEONLY or NO_INFOMSGS is specified.&lt;/p&gt;&lt;br /&gt;               &lt;span id="ctl00_mainContentContainer_ctl31_ctl00_ctl00"&gt;&lt;br /&gt;                 &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl31_ctl00_ctl00_"&gt;&lt;br /&gt;                   &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                     &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;div dir="ltr" style="background-color: rgb(221, 221, 221);"&gt;&lt;br /&gt;                     &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl31_ctl00_ctl00_code" space="preserve"&gt;DBCC results for 'master'.&lt;br /&gt;***************************************************************&lt;br /&gt;Table sysobjects                Object ID 1.&lt;br /&gt;Index ID 1         FirstIAM (1:11)   Root (1:12)    Dpages 22.&lt;br /&gt;   Index ID 1. 24 pages used in 5 dedicated extents.&lt;br /&gt;Index ID 2         FirstIAM (1:1368)   Root (1:1362)    Dpages 10.&lt;br /&gt;   Index ID 2. 12 pages used in 2 dedicated extents.&lt;br /&gt;Index ID 3         FirstIAM (1:1392)   Root (1:1408)    Dpages 4.&lt;br /&gt;   Index ID 3. 6 pages used in 0 dedicated extents.&lt;br /&gt;Total number of extents is 7.&lt;br /&gt;***************************************************************&lt;br /&gt;'...'&lt;br /&gt;***************************************************************&lt;br /&gt;Table spt_server_info                Object ID 1938105945.&lt;br /&gt;Index ID 1         FirstIAM (1:520)   Root (1:508)    Dpages 1.&lt;br /&gt;   Index ID 1. 3 pages used in 0 dedicated extents.&lt;br /&gt;Total number of extents is 0.&lt;br /&gt;***************************************************************&lt;br /&gt;Processed 52 entries in sysindexes for database ID 1.&lt;br /&gt;File 1. Number of extents = 210, used pages = 1126, reserved pages = 1280.&lt;br /&gt;          File 1 (number of mixed extents = 73, mixed pages = 184).&lt;br /&gt;   Object ID 1, Index ID 0, data extents 5, pages 24, mixed extent pages 9.&lt;br /&gt;'...'&lt;br /&gt;   Object ID 1938105945, Index ID 0, data extents 0, pages 3, mixed extent pages 3.&lt;br /&gt;Total number of extents = 210, used pages = 1126, reserved pages = 1280 in this database.&lt;br /&gt;      (number of mixed extents = 73, mixed pages = 184) in this database.&lt;br /&gt;CHECKALLOC found 0 allocation errors and 0 consistency errors in database 'master'.&lt;br /&gt;DBCC results for 'master'.&lt;br /&gt;***************************************************************&lt;br /&gt;Table sys.sysrowsetcolumns                Object ID 4.&lt;br /&gt;Index ID 1, partition ID 262144, alloc unit ID 262144 (type In-row data). FirstIAM (1:98). Root (1:94). Dpages 7.&lt;br /&gt;Index ID 1, partition ID 262144, alloc unit ID 262144 (type In-row data). 9 pages used in 1 dedicated extents.&lt;br /&gt;Index ID 1, partition ID 262144, alloc unit ID 262398 (type Row-overflow data). FirstIAM (0:0). Root (0:0). Dpages 0.&lt;br /&gt;Index ID 1, partition ID 262144, alloc unit ID 262398 (type Row-overflow data). 0 pages used in 0 dedicated extents.&lt;br /&gt;Total number of extents is 1.&lt;br /&gt;...&lt;br /&gt;***************************************************************&lt;br /&gt;Processed 201 entries in system catalog for database ID 1.&lt;br /&gt;File 1. Number of extents = 44, used pages = 300, reserved pages = 345.&lt;br /&gt;          File 1 (number of mixed extents = 29, mixed pages = 225).&lt;br /&gt;   Object ID 4, index ID 1, partition ID 262144, alloc unit ID 262144 (type In-row data), data extents 1, pages 9, mixed extent pages 8.&lt;br /&gt;   Object ID 5, index ID 1, partition ID 327680, alloc unit ID 327680 (type In-row data), data extents 0, pages 2, mixed extent pages 2.&lt;br /&gt;   Object ID 7, index ID 1, partition ID 458752, alloc unit ID 458752 (type In-row data), data extents 0, pages 5, mixed extent pages 5.&lt;br /&gt;   Object ID 8, index ID 0, partition ID 524288, alloc unit ID 524288 (type In-row data), data extents 0, pages 2, mixed extent pages 2.&lt;br /&gt;   Object ID 13, index ID 1, partition ID 851968, alloc unit ID 851968 (type In-row data), data extents 1, pages 9, mixed extent pages 8.&lt;br /&gt;   Object ID 15, index ID 1, partition ID 983040, alloc unit ID 983040 (type In-row data), data extents 0, pages 2, mixed extent pages 2.&lt;br /&gt;   Object ID 26, index ID 1, partition ID 281474978414592, alloc unit ID 1703937 (type In-row data), data extents 0, pages 3, mixed extent pages 3.&lt;br /&gt;   Object ID 27, index ID 1, partition ID 281474978480128, alloc unit ID 1769473 (type In-row data), data extents 0, pages 3, mixed extent pages 3.&lt;br /&gt;   Object ID 27, index ID 2, partition ID 562949955190784, alloc unit ID 1769474 (type In-row data), index extents 0, pages 3, mixed extent pages 3.&lt;br /&gt;...&lt;br /&gt;   Object ID 1179151246, index ID 1, partition ID 72057594038845440, alloc unit ID 13435136 (type In-row data), data extents 2, pages 18, mixed extent pages 8.&lt;br /&gt;   Object ID 1179151246, index ID 2, partition ID 72057594038910976, alloc unit ID 13566208 (type In-row data), index extents 1, pages 16, mixed extent pages 8.&lt;br /&gt;   Object ID 1911677858, index ID 0, partition ID 72057594039631872, alloc unit ID 15073536 (type In-row data), data extents 0, pages 2, mixed extent pages 2.&lt;br /&gt;Total number of extents = 41, used pages = 289, reserved pages = 323 in this database.&lt;br /&gt;      (number of mixed extents = 27, mixed pages = 211) in this database.&lt;br /&gt;CHECKALLOC found 0 allocation errors and 0 consistency errors in database 'master'.&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/pre&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/div&gt;&lt;br /&gt;               &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;When ESTIMATEONLY is specified, DBCC CHECKALLOC returns the following result set.&lt;/p&gt;&lt;br /&gt;               &lt;span id="ctl00_mainContentContainer_ctl31_ctl00_ctl01"&gt;&lt;br /&gt;                 &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl31_ctl00_ctl01_"&gt;&lt;br /&gt;                   &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                     &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;div dir="ltr" style="background-color: rgb(221, 221, 221);"&gt;&lt;br /&gt;                     &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl31_ctl00_ctl01_code" space="preserve"&gt;Estimated TEMPDB space needed for CHECKALLOC (KB)&lt;br /&gt;-------------------------------------------------&lt;br /&gt;34&lt;br /&gt;&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/pre&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/div&gt;&lt;br /&gt;               &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Remarks &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="remarksToggle"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;DBCC CHECKALLOC checks the allocation of all pages in the database, regardless of the type of page or type of object to which they belong. It also validates the various internal structures that are used to keep track of these pages and the relationships between them.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;If NO_INFOMSGS is not specified, DBCC CHECKALLOC collects space usage information for all objects in the database. This information will then be printed together with any errors that are found.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;               &lt;div class="alert"&gt;&lt;br /&gt;                 &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;th&gt;&lt;img alt="ms188422.note(en-US,SQL.90).gif" src="http://i.technet.microsoft.com/ms188422.note%28en-US,SQL.90%29.gif" /&gt;Note: &lt;/th&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;The DBCC CHECKALLOC functionality is included in &lt;a id="ctl00_mainContentContainer_ctl32_ctl00_ctl01" href="http://technet.microsoft.com/en-us/library/ms176064%28SQL.90,printer%29.aspx"&gt;DBCC CHECKDB&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms176064(SQL.90).aspx ] and &lt;a id="ctl00_mainContentContainer_ctl32_ctl00_ctl02" href="http://technet.microsoft.com/en-us/library/ms187332%28SQL.90,printer%29.aspx"&gt;DBCC CHECKFILEGROUP&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms187332(SQL.90).aspx ] . This means that you do not have to run DBCC CHECKALLOC separately from these statements.&lt;br /&gt;&lt;br /&gt;                         &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;                   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;p&gt;&lt;/p&gt;&lt;br /&gt;               &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;Internal Database Snapshot&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;div class="subSection"&gt;&lt;br /&gt;                 &lt;p&gt;DBCC CHECKALLOC uses an internal database snapshot to provide the transactional consistency that it needs to perform these checks. If a snapshot cannot be created, or TABLOCK is specified, DBCC CHECKALLOC tries to acquire an exclusive (X) lock on the database to obtain the required consistency. For more information about locks, see &lt;a id="ctl00_mainContentContainer_ctl32_ctl00_ctl03" href="http://technet.microsoft.com/en-us/library/ms175519%28SQL.90,printer%29.aspx"&gt;Lock Modes&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms175519(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;div class="alert"&gt;&lt;br /&gt;                   &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                       &lt;tr&gt;&lt;br /&gt;                         &lt;th&gt;&lt;img alt="ms188422.note(en-US,SQL.90).gif" src="http://i.technet.microsoft.com/ms188422.note%28en-US,SQL.90%29.gif" /&gt;Note: &lt;/th&gt;&lt;br /&gt;                       &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;tr&gt;&lt;br /&gt;                         &lt;td&gt;In SQL Server 2005, running DBCC CHECKALLOC against &lt;strong&gt;tempdb&lt;/strong&gt; does not perform any checks. This is because, for performance reasons, database snapshots are not available on &lt;strong&gt;tempdb&lt;/strong&gt;. This means that the required transactional consistency cannot be obtained. Stop and start the MSSQLSERVER service to resolve any &lt;strong&gt;tempdb&lt;/strong&gt; allocation issues. This action drops and re-creates the &lt;strong&gt;tempdb&lt;/strong&gt; database.&lt;br /&gt;&lt;br /&gt;                           &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                         &lt;/td&gt;&lt;br /&gt;                       &lt;/tr&gt;&lt;br /&gt;                     &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                 &lt;/div&gt;&lt;br /&gt;               &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;Understanding DBCC Error Messages&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;div class="subSection"&gt;&lt;br /&gt;                 &lt;p&gt;After the DBCC CHECKALLOC command finishes, a message is written to the SQL Server error log. If the DBCC command successfully executes, the message indicates a successful completion and the amount of time that the command ran. If the DBCC command stops before completing the check because of an error, the message indicates the command was terminated, a state value, and the amount of time the command ran. The following table lists and describes the state values that can be included in the message.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;h3 class="subHeading"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;th&gt;State &lt;/th&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;th&gt;Description &lt;/th&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;0&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;Error number 8930 was raised. This indicates a metadata corruption that caused the DBCC command to terminate.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;1&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;Error number 8967 was raised. There was an internal DBCC error.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;2&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;A failure occurred during emergency mode database repair.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;3&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;This indicates a metadata corruption that caused the DBCC command to terminate.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;4&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;An assert or access violation was detected.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;tr&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;5&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                       &lt;td&gt;&lt;br /&gt;                         &lt;p&gt;An unknown error occurred that terminated the DBCC command.&lt;/p&gt;&lt;br /&gt;                       &lt;/td&gt;&lt;br /&gt;                     &lt;/tr&gt;&lt;br /&gt;                   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;               &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;Error Reporting&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;div class="subSection"&gt;&lt;br /&gt;                 &lt;p&gt;In &lt;yoono-highlight class="yoono-link-hover yoono-link-active-link" keywords="SQL Server"&gt;SQL Server&lt;/yoono-highlight&gt; 2005 Service Pack 1 (SP1), a mini-dump file (SQLDUMP&lt;em&gt;nnnn&lt;/em&gt;.txt) is created in the SQL Server LOG directory whenever DBCC CHECKALLOC detects a corruption error. When the Feature Usage data collection and Error Reporting features are enabled for the instance of SQL Server, the file is automatically forwarded to Microsoft. The collected data is used to improve SQL Server functionality. For more information, see &lt;a id="ctl00_mainContentContainer_ctl32_ctl00_ctl05" href="http://technet.microsoft.com/en-us/library/ms144283%28SQL.90,printer%29.aspx"&gt;Error and Usage Report Settings&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms144283(SQL.90).aspx ] . &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;p&gt;The dump file contains the results of the DBCC CHECKALLOC command and additional diagnostic output. The file has restricted discretionary access-control lists (DACLs). Access is limited to the SQL Server service account and members of the &lt;strong&gt;sysadmin&lt;/strong&gt; role. By default, the &lt;strong&gt;sysadmin&lt;/strong&gt; role contains all members of the Windows BUILTIN\Administrators group and the local administrator's group. The DBCC command does not fail if the data collection process fails.&lt;/p&gt;&lt;br /&gt;               &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;Resolving Errors&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;div class="subSection"&gt;&lt;br /&gt;                 &lt;p&gt;If DBCC CHECKALLOC reports any errors, we recommend that you restore the database from the database backup instead of running a repair. If a backup does not exist, running a repair can correct the reported errors; however, correcting the errors might require some pages, and therefore data, to be deleted.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;                 &lt;p&gt;A repair can be performed in a user transaction. This allows for changes to be rolled back. If changes are rolled back, the database will still contain errors and must be restored from a backup. After the repairs finish, back up the database.&lt;/p&gt;&lt;br /&gt;               &lt;/div&gt;&lt;br /&gt;             &lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Permissions &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="sectionToggle2"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;Requires membership in the &lt;strong&gt;sysadmin&lt;/strong&gt; fixed server role or the &lt;strong&gt;db_owner&lt;/strong&gt; fixed database role.&lt;/p&gt;&lt;br /&gt;             &lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Examples &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="sectionToggle3"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;p&gt;The following example executes &lt;code&gt;DBCC CHECKALLOC&lt;/code&gt; for the current database and for the &lt;code&gt;AdventureWorks&lt;/code&gt; database.&lt;/p&gt;&lt;br /&gt;               &lt;span id="ctl00_mainContentContainer_ctl34_ctl00_ctl00"&gt;&lt;br /&gt;                 &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl34_ctl00_ctl00_"&gt;&lt;br /&gt;                   &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                     &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;div dir="ltr" style="background-color: rgb(221, 221, 221);"&gt;&lt;br /&gt;                     &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl34_ctl00_ctl00_code" space="preserve"&gt;-- Check the current database.&lt;br /&gt;DBCC CHECKALLOC;&lt;br /&gt;GO&lt;br /&gt;-- Check the AdventureWorks database.&lt;br /&gt;DBCC CHECKALLOC (AdventureWorks);&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;                   &lt;/div&gt;&lt;br /&gt;                 &lt;/div&gt;&lt;br /&gt;               &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  See Also &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="seeAlsoToggle"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h4 class="subHeading"&gt;Reference&lt;/h4&gt;&lt;br /&gt;               &lt;a id="ctl00_mainContentContainer_ctl35_ctl00_ctl00" href="http://technet.microsoft.com/en-us/library/ms188796%28SQL.90,printer%29.aspx"&gt;DBCC (Transact-SQL)&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms188796(SQL.90).aspx ]&lt;br /&gt;&lt;br /&gt;              &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h4 class="subHeading"&gt;Other Resources&lt;/h4&gt;&lt;br /&gt;               &lt;a id="ctl00_mainContentContainer_ctl35_ctl00_ctl01" href="http://technet.microsoft.com/en-us/library/ms189051%28SQL.90,printer%29.aspx"&gt;Table and Index Organization&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms189051(SQL.90).aspx ]&lt;br /&gt;&lt;br /&gt;              &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl35_ctl00_ctl02" href="http://technet.microsoft.com/en-us/library/ms187501%28SQL.90,printer%29.aspx"&gt;Managing Space Used by Objects&lt;/a&gt; [ http://technet.microsoft.com/en-us/library/ms187501(SQL.90).aspx ]&lt;br /&gt;&lt;br /&gt;              &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;              &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h4 class="subHeading"&gt;Help and Information &lt;/h4&gt;&lt;br /&gt;               &lt;a id="ctl00_mainContentContainer_ctl35_ctl00_ctl03" href="http://technet.microsoft.com/en-us/library/ms166016%28SQL.90,printer%29.aspx"&gt;Getting SQL Server 2005 Assistance &lt;/a&gt;[ http://technet.microsoft.com/en-us/library/ms166016(SQL.90).aspx ] &lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;span&gt;&lt;br /&gt;           &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;             &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-width: 0px; vertical-align: middle;" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;  Change History &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;             &lt;div class="MTPS_CollapsibleSection" style="display: block;"&gt;&lt;a id="sectionToggleRH"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               &lt;h3 class="subHeading"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;               &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;th&gt;Release &lt;/th&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;th&gt;History &lt;/th&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;&lt;strong&gt;17 November 2008&lt;/strong&gt; &lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;New content:&lt;/strong&gt; &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                           &lt;ul&gt;&lt;br /&gt;                             &lt;li&gt;In the definition of ALL_ERRORMSGS, described new functionality in SP3.&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;                           &lt;/ul&gt;&lt;br /&gt;                         &lt;/dd&gt;&lt;/dl&gt;&lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;&lt;strong&gt;14 April 2006&lt;/strong&gt; &lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;New content:&lt;/strong&gt; &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                           &lt;ul&gt;&lt;br /&gt;                             &lt;li&gt;In the Remarks section, added the subsection "Error Reporting." This section describes new functionality in SP1.&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;                           &lt;/ul&gt;&lt;br /&gt;                         &lt;/dd&gt;&lt;/dl&gt;&lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                   &lt;tr&gt;&lt;br /&gt;                     &lt;td&gt;&lt;br /&gt;                       &lt;p&gt;&lt;strong&gt;5 December 2005&lt;/strong&gt; &lt;/p&gt;&lt;br /&gt;                     &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                     &lt;td&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;Changed content:&lt;/strong&gt; &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                           &lt;ul&gt;&lt;br /&gt;                             &lt;li&gt;Corrected the syntax.&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;                             &lt;li&gt;Added &lt;strong&gt;xml&lt;/strong&gt; to the list of data types in "LOB Data."&lt;br /&gt;&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;                             &lt;li&gt;Corrected the REPAIR_FAST definition. The option does not perform repair actions.&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;                             &lt;li&gt;Added to the Remarks section information about messages that are written to the SQL Server error log and descriptions of state values.&lt;br /&gt;                              &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;                           &lt;/ul&gt;&lt;br /&gt;                         &lt;/dd&gt;&lt;/dl&gt;&lt;/td&gt;&lt;br /&gt;                   &lt;/tr&gt;&lt;br /&gt;                 &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;             &lt;/div&gt;&lt;br /&gt;           &lt;/div&gt;&lt;br /&gt;         &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;     &lt;/div&gt;&lt;br /&gt;   &lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;div class="wv_cc" id="ctl00_WikiViewer1_cc"&gt;&lt;br /&gt;   &lt;div id="ctl00_WikiViewer1_ccContainer"&gt;&lt;br /&gt;     &lt;div class="wv_ccTopicTags"&gt;&lt;span class="wv_ccTitle"&gt;Tags: &lt;/span&gt;&lt;span&gt;&lt;/span&gt; &lt;/div&gt;   &lt;div class="wv_cclogo"&gt;&lt;img id="ctl00_WikiViewer1_WikiLogo" style="border-width: 0px;" src="http://i.technet.microsoft.com/Global/Images/wiki.gif" /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;     &lt;div class="wv_cch"&gt;&lt;span id="ctl00_WikiViewer1_CC_Title"&gt;Community Content&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;   &lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;div id="ctl00_WikiViewer1_wikiItems"&gt;&lt;/div&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="yoono-gateway" style="display: none;" message="Search with Yoono"&gt;&lt;/div&gt;&lt;br /&gt;&lt;style id="yoono-style"&gt;&lt;br /&gt;.yoono-link-hover{border-bottom:2px #3b5998 dotted;display:inline!important;float:none!important;}.yoono-link-active-link{cursor:pointer;}.yoono-link-icon{position:absolute;visibility:hidden;background-repeat:no-repeat;height:16px;z-index:100000;cursor:pointer;}.yoono-link-icon.smallhint{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_01.png');width:23px;height:29px;}.yoono-link-icon.smallhint.yoono-left{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_02.png');}.yoono-link-icon.smallhint.yoono-bottom{background-image:url('http://cache.yoono.com/static/sb/yoonolinks/yoolink_icon_bulle_03.png');}.yoono-link-icon.forceopaque{opacity:1;filter:alpha(opacity = 100);}.yoono-link-icon.yoono-reminder{position:fixed;right:1px;bottom:1px;border:0;-moz-border-radius:0;height:30px;padding-top:12px;background-image:url('http://www.yoono.com/favicon.ico');background-repeat:none;background-position:2px 10px;padding-left:24px;}#yoono-link-debug{position:fixed;right:10px;bottom:10px;width:210px;border:2px solid black;background:silver;z-index:10000;opacity:.8;filter:alpha(opacity = 80);text-align:center;font-size:14px;color:black;}#yoono-link-debug.yoono-ie{position:absolute;}#yoono-kwe-debug{position:fixed;width:200px;font-size:16px;z-index:1000;text-align:right;color:blue;font-weight:bold;top:10px;right:20px;border:2px solid black;background:silver;opacity:.6;filter:alpha(opacity = 60);color:black;}#yoono-kwe-debug.yoono-ie{position:absolute;}&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-7342936435056467519?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/7342936435056467519/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/dbcc-checkalloc-transact-sql.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7342936435056467519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/7342936435056467519'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/dbcc-checkalloc-transact-sql.html' title='DBCC CHECKALLOC (Transact-SQL)'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-8233729266491746397</id><published>2010-02-16T11:57:00.001+07:00</published><updated>2010-02-16T11:57:16.923+07:00</updated><title type='text'>NLS Guide for Generic Connectivity and Gateways [ID 230239.1]</title><content type='html'>&lt;font face="helvetica"&gt;   &lt;br /&gt;    &lt;table cellspacing="6" cellpadding="0" width="100%" border="0"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" align="left" colspan="4"&gt;&lt;/td&gt;          &lt;td valign="top" colspan="2"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" align="left" colspan="6"&gt;           &lt;hr size="1" /&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="25%" colspan="2"&gt;&amp;#160;&lt;/td&gt;          &lt;td valign="top" nowrap="nowrap" width="50%" colspan="3"&gt;&lt;em&gt;Modified&lt;/em&gt; 18-DEC-2008&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Type&lt;/em&gt; BULLETIN&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/font&gt;  &lt;pre&gt;&lt;font face="Courier New, Courier, mono"&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;Analysing NLS issues when HS or Gateways are involved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SCOPE &amp;amp; APPLICATION&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;How to analyse NLS related issues with Gateways or Generic Connectivity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to solve NLS related problems with generic connectivity or gateways&lt;br /&gt;-----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;This note is devided into four parts. The first part is some useful&lt;br /&gt;background information. Part two is a description of the language &lt;br /&gt;parameter, part three is a guide how to solve decimal &lt;br /&gt;separator or lost decimal issues and part four describes steps&lt;br /&gt;to check why characters are not displayed correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I. Background Information&lt;br /&gt;#########################&lt;br /&gt;Each database works with a special character set, language and &lt;br /&gt;territory setting.&lt;br /&gt;&lt;br /&gt;Ideally, the character set of the Oracle database server&lt;br /&gt;and the non-Oracle data source are the same. Then no &lt;br /&gt;conversion during data transfer is needed.&lt;br /&gt;If the character set differs, Heterogeneous Services / Gateways must&lt;br /&gt;translate the character set of the non-Oracle data source&lt;br /&gt;to the Oracle database character set and back again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To be able to translate between two kind of things, you must know&lt;br /&gt;the source and the target data. This is true for translating from&lt;br /&gt;one language to another as well as for currency ...&lt;br /&gt;&lt;br /&gt;The Generic connectivity/Gateway translates characters and&lt;br /&gt;territory settings from the remote database to the Oracle database&lt;br /&gt;and vice versa.&lt;br /&gt;To do so, it must be aware of the remote character and territory settings.&lt;br /&gt;A parameter called HS_LANGUAGE could be set in the initialisation file&lt;br /&gt;of the gateway to reflect the REMOTE settings.&lt;br /&gt;HS_LANGUAGE provides Heterogeneous Services / Gateways with character set,&lt;br /&gt;language and territory information of the non-Oracle data source.&lt;br /&gt;While the remote settings are specified in the initialisation file&lt;br /&gt;and the local settings are defined with the NLS_LANG parameter a&lt;br /&gt;conversation should be successful. &lt;br /&gt;&lt;br /&gt;HS_LANGUAGE=language[_territory.character_set]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;II. Language settings and their relationship&lt;br /&gt;############################################&lt;br /&gt;&lt;br /&gt;The language part of the HS_LANGUAGE initialization parameter &lt;br /&gt;determines: &lt;br /&gt;&lt;br /&gt;Day and month names of dates &lt;br /&gt;AD, BC, PM, and AM symbols for date and time &lt;br /&gt;Default sorting mechanism &lt;br /&gt;&lt;br /&gt;Note: HS_LANGUAGE does not determine the language for error messages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;III. Truncated number columns or lost decimals&lt;br /&gt;##############################################&lt;br /&gt;&lt;br /&gt;Decimal delimiters depend on country specific settings. Some&lt;br /&gt;countries use a comma, others a point to separate decimals.&lt;br /&gt;Local and remote databases can work with different decimal delimiters.&lt;br /&gt;Without being aware of the remote decimal delimiter it might happen&lt;br /&gt;that decimals are lost during conversation.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;- Microsoft SQL Server with American NLS settings&lt;br /&gt;- Oracle Server 9.2.0.1 with German NLS settings&lt;br /&gt;- GERMAN_GERMANY.WE8MSWIN1252.&lt;br /&gt;- Derived NLS_NUMERIC_CHARACTERS from German NLS_TERRITORY is &amp;quot;, .&amp;quot;&lt;br /&gt;&lt;br /&gt;MS SQL Server with a table num and 2 columns:&lt;br /&gt;           a as numeric with a value 8.5&lt;br /&gt;       and b as char with a string 'd'&lt;br /&gt;       in it&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;select * from num@sql7;&lt;br /&gt;&lt;br /&gt;         a b&lt;br /&gt;---------- ---------------&lt;br /&gt;         8 d&lt;br /&gt;&lt;br /&gt;In this sample everything beyond the decimal point is truncated.&lt;br /&gt;The reason is that the SQL*Plus session works with GERMAN&lt;br /&gt;territory settings, and inherits this setting to the HS.&lt;br /&gt;MS SQL Server works with American settings. Both regions use&lt;br /&gt;different decimal delimiters - German schema uses ','; American&lt;br /&gt;schema '.'-.&lt;br /&gt; &lt;br /&gt;To resolve this issue the parameter HS_LANGUAGE in&lt;br /&gt;the initialisation file of the gateway must be&lt;br /&gt;changed to AMERICAN_AMERICA.WE8MSWIN1252 to reflect the&lt;br /&gt;REMOTE NLS settings.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;select * from num@sql7;&lt;br /&gt;&lt;br /&gt;         a b&lt;br /&gt;---------- ---------------&lt;br /&gt;       8,5 d&lt;br /&gt;&lt;br /&gt;Sometimes it's hard to figure out the real Territory of the&lt;br /&gt;foreign database; in might be changed due to the client settings.&lt;br /&gt;So another simple approach is to vary the HS_LANGUAGE parameter&lt;br /&gt;and try it:&lt;br /&gt;For the first try set the HS_Language to &lt;br /&gt;AMERICAN_AMERICA.we8iso8859p1. This will work for foreign data stores&lt;br /&gt;having a POINT as decimal delimeter. After changing any HS parameter,&lt;br /&gt;please make sure you close the old connection. The new parameter will be&lt;br /&gt;picked up only during the connection phase. &lt;br /&gt;If you still won't be able to get the correct values back, now try &lt;br /&gt;HS_LANGUAGE with an European character set like GERMAN_GERMANY.we8iso8859p1&lt;br /&gt;&lt;br /&gt;In almost all cases the decimals could be displayed with method 1 or 2&lt;br /&gt;correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IV. Characters are not displayed correctly&lt;br /&gt;##########################################&lt;br /&gt;&lt;br /&gt;A) Single Byte characters&lt;br /&gt;A code page, also known as character set, is a set of 256&lt;br /&gt;uppercase and lowercase letters, numbers and symbols. The printable&lt;br /&gt;characters of the first 128 values are the same for all character set&lt;br /&gt;choices. The last 128 characters differ from set to set. All those 256&lt;br /&gt;characters are single byte characters (0x00-0xFF).&lt;br /&gt;&lt;br /&gt;Before analysing any details, make sure that the operating system&lt;br /&gt;is capable of dealing with these characters:&lt;br /&gt;Microsoft Windows NT contains an ASCII table.&lt;br /&gt;The program is called   charmap.exe   and located   %SystemRoot%\System32\.&lt;br /&gt;&lt;br /&gt;Let's check out the ARIAL font; it contains for example a character&lt;br /&gt; 'Ã„' (0xC4).&lt;br /&gt;To make sure, that the operating system can display this character 'Ã„',&lt;br /&gt;copy it from this Ascii table and paste it into NOTEPAD.&lt;br /&gt;&lt;br /&gt;Is it displayed correctly?&lt;br /&gt;If not, you have to figure out the language YOUR character belongs to&lt;br /&gt;and the Windows environment must be changed accordingly.&lt;br /&gt;This is done by changing the regional settings of the operating system&lt;br /&gt;( -&amp;gt; Start -&amp;gt; Settings -&amp;gt; Control Panel -&amp;gt; Regional Settings).&lt;br /&gt;&lt;br /&gt;Once you figured out the correct settings, proceed to the next step. Do NOT&lt;br /&gt;proceed until you're able to display YOUR character correctly in NOTEPAD!&lt;br /&gt;If you have problems to figure out the correct settings, please contact&lt;br /&gt;Microsoft Support.&lt;br /&gt;&lt;br /&gt;The next step is to verify that SQL*Plus is capable displaying the&lt;br /&gt;characters.&lt;br /&gt;&lt;br /&gt;SQL*PLUS GUI (sqlplusw):&lt;br /&gt;------------------------&lt;br /&gt;At this stage we don't need a connection to the database. Start a GUI&lt;br /&gt;SQL*Plus session with the nolog option.&lt;br /&gt;sqlplusw /nolog&lt;br /&gt;&lt;br /&gt;Side Note: Everything is done with the GUI based SQL*Plus.&lt;br /&gt;Inserting from the Windows command line tool and selecting the &lt;br /&gt;inserted characters from the GUI based SQL*Plus could cause problems,&lt;br /&gt;because the DOS Box character set ( 437 or 850...) differs from the GUI &lt;br /&gt;character set and characters might be interpreted wrongly. &lt;br /&gt;&lt;br /&gt;From the ASCII table choose again YOUR character and copy paste it now into&lt;br /&gt;the SQL*Plus session. Does it display correctly?&lt;br /&gt;&lt;br /&gt;If not, there are a few parameters to change the FONT and CHARACTER set&lt;br /&gt;of SQL*Plus:&lt;br /&gt;The most important registry values are&lt;br /&gt;                 SQLPLUS_FONT and SQLPLUS_FONT_CHARSET. &lt;br /&gt;Both are string values (REG_SZ) and&lt;br /&gt;must be added manually to the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOMEx key&lt;br /&gt;where x is the number of your Oracle_Home installation associated with&lt;br /&gt;SQL*Plus was called from. These values are read each time SQL*Plus starts.&lt;br /&gt;&lt;br /&gt;SQLPLUS_FONT:&lt;br /&gt;Any fixed-pitch TrueType font available in Windows system such as&lt;br /&gt;Courier New or Lucida Console can be used. Choosing a proportional&lt;br /&gt;pitch font like Arial or Times New Roman, or entering an unavailable&lt;br /&gt;font, the registry entry is ignored and the default font&lt;br /&gt;Fixedsys 16, is used.&lt;br /&gt;&lt;br /&gt;Prior Oracle 9iR2 this was hard work: A capable font that is used &lt;br /&gt;by SQL*Plus and that also contains the character that should be&lt;br /&gt;displayed must be figured out.&lt;br /&gt;&lt;br /&gt;Oracle 9iR2 introduced the SQLPLUS_FONT_CHARSET and with this value it&lt;br /&gt;becomes easier. The SQLPLUS_FONT can now be the default value and the&lt;br /&gt;character set is managed by the&lt;br /&gt;                     SQLPLUS_FONT_CHARSET &lt;br /&gt;registry entry.&lt;br /&gt;It defines the font subset used in the SQL*Plus Windows GUI.&lt;br /&gt;The following values are valid:&lt;br /&gt;	DEFAULT&lt;br /&gt;	SYMBOL&lt;br /&gt;	SHIFTJIS&lt;br /&gt;	HANGEUL&lt;br /&gt;	GB2312&lt;br /&gt;	CHINESEBIG5&lt;br /&gt;	OEM&lt;br /&gt;	JOHAB&lt;br /&gt;	HEBREW&lt;br /&gt;	ARABIC&lt;br /&gt;	GREEK&lt;br /&gt;	TURKISH&lt;br /&gt;	VIETNAMESE&lt;br /&gt;	THAI&lt;br /&gt;	EASTEUROPE&lt;br /&gt;	RUSSIAN&lt;br /&gt;	MAC&lt;br /&gt;	BALTIC&lt;br /&gt;&lt;br /&gt;While choosing one of those from the list, it should be possible to&lt;br /&gt;display the character in SQL*Plus.&lt;br /&gt;This step is also a preleminary step and you must not proceed before this&lt;br /&gt;works.&lt;br /&gt;&lt;br /&gt;SQL*Plus COMMAND LINE (sqlplus):&lt;br /&gt;To configure the command line version of SQL*Plus please open a DOS command line &lt;br /&gt;window and check out the PROPERTIES of this window. The font needs to be a TRUE &lt;br /&gt;TYPE  font like &amp;quot;Lucida Console&amp;quot;, the default RASTER FONT is not able to display&lt;br /&gt;any foreign character.&lt;br /&gt;&lt;br /&gt;Next step is to check out the CODE PAGE of the shell by typing&lt;br /&gt;&amp;quot;chcp&amp;quot; (chcp =&amp;gt;change codepage and it will display the active code page).&lt;br /&gt;Please make sure that this code page is able to display your characters; else&lt;br /&gt;change the code page to a code page that covers your characters. More&lt;br /&gt;details can be found at Microsoft's Web site.&lt;br /&gt;Last step is now to set NLS_LANG correctly in this COMMAND Line window.&lt;br /&gt;There is NO need to change the registry key at all.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;By now, the OS and SQL*Plus can display the character.&lt;br /&gt;The next questions are:&lt;br /&gt;	Is the character inserted correctly in the remote database?&lt;br /&gt;	Is the Oracle database capable to deal with this character?&lt;br /&gt;	Is HS/Gateway capable to deal with this character?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figuring out the correct ASCII value for a character in the remote table&lt;br /&gt;depends on the database vendor:&lt;br /&gt;&lt;br /&gt;AS/400 servers for example:&lt;br /&gt;'DSPFFD' to get the codepage of the column/table and use&lt;br /&gt;select hex(&amp;lt;col&amp;gt;) from table to get the dump values.&lt;br /&gt;To insert dediacted hex values into an AS400 table the function char(X'&amp;lt;hex value&amp;gt;')&lt;br /&gt;like char(X'b8') can be used.&lt;br /&gt;&lt;br /&gt;MS SQL Server for example provides the ASCII function:&lt;br /&gt;select ascii(&amp;lt;column name&amp;gt;) from &amp;lt;table&amp;gt;&lt;br /&gt;&lt;br /&gt;Demonstration of the ASCII function of MS SQL Server:&lt;br /&gt;	select ascii('T')&lt;br /&gt;reports&lt;br /&gt;	84&lt;br /&gt;This output is the decimal value for this character 'T'; 84 decimal is the&lt;br /&gt;same as 54 hexadecimal and this is accoring to the charmap.exe the capital&lt;br /&gt;T.&lt;br /&gt;&lt;br /&gt;While the inserted characters correspond to the correct values in the&lt;br /&gt;charmap, the next step is to verify the capability of the Oracle database:&lt;br /&gt;&lt;br /&gt;select dump('T') from dual;&lt;br /&gt;results in:&lt;br /&gt;DUMP('T')&lt;br /&gt;----------------&lt;br /&gt;Typ=96 Len=1: 84&lt;br /&gt;&lt;br /&gt;The important infomation is '84'. This is decimal and represents the &lt;br /&gt;'T' letter.&lt;br /&gt;&lt;br /&gt;Both methods (dumping the remote and the Oracle side) to verify the&lt;br /&gt;decimal value for a character resolve the same result. &lt;br /&gt;&lt;br /&gt;Side Note:&lt;br /&gt;Sometimes also the application might insert characters incorrectly. Thus insert the&lt;br /&gt;character with SQL*Plus into a test table and afterwards again with the &lt;br /&gt;application. Then compare both dumps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The last step now is to verify the HS sub system:&lt;br /&gt;Only after all the steps above are successful, the HS system should be&lt;br /&gt;checked. HS depends on a well configured remote and local database.&lt;br /&gt;&lt;br /&gt;The simplest way to verify the HS is again a test table at the remote&lt;br /&gt;database with test characters inserted. Especially use one character&lt;br /&gt;out of the first 128 characters from the character map. They are the&lt;br /&gt;same for all character maps and this can be very helpful.&lt;br /&gt;Then also insert the characters that are not being displayed correctly.&lt;br /&gt;&lt;br /&gt;Then create the same table in the Oracle database and fill it with the&lt;br /&gt;same records.&lt;br /&gt;&lt;br /&gt;Now dump the characters of the Oracle db and also from the remote db.&lt;br /&gt;select dump(&amp;lt;column&amp;gt;) from &amp;lt;table&amp;gt;@&amp;lt;db_link&amp;gt;;&lt;br /&gt;select dump(&amp;lt;column&amp;gt;) from &amp;lt;table&amp;gt;; &lt;br /&gt;&lt;br /&gt;Are the decimal values the same?&lt;br /&gt;If the dumped value is the same, but the SQL*Plus output differs,&lt;br /&gt;then it looks like HS is wrongly initialized.&lt;br /&gt;Check out the initialisation file of the HS/Gateway and verify&lt;br /&gt;the settings of HS_LANGUAGE:&lt;br /&gt;The HS_LANGUAGE initialization parameter provides Heterogeneous &lt;br /&gt;Services with character set, language and territory information &lt;br /&gt;of the non-Oracle data source. The value of the HS_LANGUAGE &lt;br /&gt;initialization parameter has to be of the following format: &lt;br /&gt;&lt;br /&gt;&amp;lt;language&amp;gt;[_&amp;lt;territory&amp;gt;.&amp;lt;character_set&amp;gt;]&lt;br /&gt;&lt;br /&gt;Character_set:&lt;br /&gt;         This should be set to the REMOTE DATABASE CHARACTER SET or &lt;br /&gt;         to a super set of the remote database character set. &lt;br /&gt;&lt;br /&gt;While the character set specifies the remote database character set,&lt;br /&gt;all parameters (language and territory) must be initialized!&lt;br /&gt;&lt;br /&gt;Language:&lt;br /&gt;         Day and month names of dates &lt;br /&gt;         AD, BC, PM, and AM symbols for date and time &lt;br /&gt;         Default sorting mechanism &lt;br /&gt;&lt;br /&gt;Territory:&lt;br /&gt;          The territory clause of the HS_LANGUAGE initialization &lt;br /&gt;          parameter specifies the conventions for day and week numbering, &lt;br /&gt;          default date format, decimal character and group separator, &lt;br /&gt;          and ISO and local currency symbols. &lt;br /&gt;&lt;br /&gt;Important:&lt;br /&gt;The level of National Language Support between the Oracle server &lt;br /&gt;and the non-Oracle data source depends on how the driver is implemented. &lt;br /&gt;See the installation and users' guide for your platform for more &lt;br /&gt;information about the level of National Language Support. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;B)MULTI BYTE Characters:&lt;br /&gt;The same from above is also valid for MULTI BYTE as well as UNICODE&lt;br /&gt;characters.&lt;br /&gt;The only difference is that the dump will differ:&lt;br /&gt;&lt;br /&gt;Example for dumping unicode characters of a MS SQL Server:&lt;br /&gt;insert into &amp;lt;table&amp;gt; values (nchar(30333)...)&lt;br /&gt;select unicode(&amp;lt;column&amp;gt;) from table&lt;br /&gt;&lt;br /&gt;This value belongs to a chinese character set; thus setting the &lt;br /&gt;NLS_LANG of the client to ZHT16BIG5 and dumping now this remote table&lt;br /&gt;with SQL*Plus and Oracle 9i onwards:&lt;br /&gt;select asciistr(&amp;lt;column&amp;gt;) from &amp;lt;table&amp;gt;@&amp;lt;db_link&amp;gt;;&lt;br /&gt;results in:&lt;br /&gt;ASCIISTR(&amp;quot;B&amp;quot;)&lt;br /&gt;----------------------&lt;br /&gt;\767D&lt;br /&gt;&lt;br /&gt;The Hex value 767D is equivalent to decimal 30333 we have inserted.&lt;br /&gt;&lt;br /&gt;To verify the retrieved value matches the same character in an Oracle db a&lt;br /&gt;select unistr('\767D') from dual; should show up the same character as&lt;br /&gt;it is stored in the foreign database. &lt;br /&gt;&lt;br /&gt;If the dump values differ between the source and the target database,&lt;br /&gt;make sure the NLS_LANG is set to at least a character set that contains&lt;br /&gt;the remote character. If the character set match, the next reason could be&lt;br /&gt;the HS subsytem not being aware of the UNICODE characters.&lt;br /&gt;The initialisation file of the gateway/hs knows a parameter called:&lt;br /&gt;&lt;br /&gt;HS_NLS_NCHAR &lt;br /&gt;and this parameter must refelct the REMOTE NATIONAL CHARACTER SET;&lt;br /&gt;for MS SQL Server for example: UCS2&lt;br /&gt;=&amp;gt; HS_NLS_NCHAR=UCS2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Additional comment:&lt;br /&gt;Instead of configuring SQL*Plus another approach would be to use Microsoft &lt;br /&gt;Word (if installed on the machine) and use the MS Word unicode support.&lt;br /&gt;&lt;br /&gt;There is NO need to configure SQL*Plus at all. The following procedure will&lt;br /&gt;perform a select using the gateway or HSODBC and write the output directly into&lt;br /&gt;a file using the unicode compliant utl_file function.&lt;br /&gt;Then just open the DOC file output using MS Word and the preview will display&lt;br /&gt;the characters within the DOC:&lt;br /&gt;&lt;br /&gt;Make sure the following directory exists or adapt it according to your &lt;br /&gt;preferences:&lt;br /&gt;d:\test_utf8&lt;br /&gt;&lt;br /&gt;Now log into the database and prepare UTL_FILE function:&lt;br /&gt;&lt;br /&gt;create or replace directory TEST_UTF8 as 'd:\test_utf8';&lt;br /&gt;grant read, write on directory TEST_UTF8 to public;&lt;br /&gt;&lt;br /&gt;Assuming now we have a table at the SQL Server database called &lt;br /&gt;&amp;quot;russian&amp;quot; and &amp;quot;col3&amp;quot; conatins the russian characters:&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE procedure testUTF8_4 as&lt;br /&gt;         v_file UTL_FILE.FILE_TYPE;&lt;br /&gt;         line_org  varchar2(2000);&lt;br /&gt;         line_conv varchar2(2000);&lt;br /&gt;         v_datensatz varchar2(20000);&lt;br /&gt;           Cursor c1 is&lt;br /&gt;            Select &amp;quot;col3&amp;quot; from &amp;quot;russia&amp;quot;@sqlserver;&lt;br /&gt;    &lt;br /&gt;      begin&lt;br /&gt;         v_file := UTL_FILE.FOPEN_nchar('TEST_UTF8','RUSSIAN.doc', 'w');&lt;br /&gt;            open c1;&lt;br /&gt;         LOOP&lt;br /&gt;            fetch c1 into v_datensatz;&lt;br /&gt;           Exit when c1%notFOUND;&lt;br /&gt;    &lt;br /&gt;           UTL_FILE.PUT_LINE_nchar(v_file, v_datensatz);&lt;br /&gt;           UTL_FILE.NEW_LINE (v_file);&lt;br /&gt;         end loop;&lt;br /&gt;         close c1;&lt;br /&gt;         UTL_FILE.FClose(v_file);&lt;br /&gt;       DBMS_OUTPUT.PUT_LINE('DONE!');&lt;br /&gt;      End;&lt;br /&gt;&lt;br /&gt;This procedure does not depend on the SQL*Plus settings. So there is no&lt;br /&gt;need to change the registry keys. It is using the database settings and writes a&lt;br /&gt;file to d:\test_utf8 called RUSSIAN.doc. Now open this doc file using MS Word &lt;br /&gt;and MS Word is displaying a preview Window where you can choose the correct &lt;br /&gt;character set by simply selecting it from a list and depending on the selection&lt;br /&gt;the preview window will change.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To get rid of the UTL_FILE_DIR configuration please execute:&lt;br /&gt;drop directory TEST_UTF8;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;Manual: SQL*Plus, Getting Started, Release 9.2 for Windows&lt;br /&gt;Note 199926.1 NLS_LANG Explained (How does Client-Server Character Conversion Work?)&lt;br /&gt;Note 226558.1 An example inserting cyrillic data into a database on west european windows&lt;br /&gt;Note 69518.1 Storing and Checking Character Codepoints in a UTF8/AL32UTF8 (Unicode) database&lt;br /&gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td colspan="2"&gt;&lt;br /&gt;        &lt;p&gt;&lt;img id="collapseImg2" style="cursor: pointer" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div id="collapsibleRelatedData" style="display: inline; margin-left: 20px; width: 100%"&gt;&lt;br /&gt;          &lt;hr size="1" /&gt;&lt;b style="margin-left: 20px"&gt;Products&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;          &lt;hr style="margin-left: 20px" size="1" /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;ul&gt;&lt;/ul&gt;&lt;br /&gt;          &lt;b style="margin-left: 20px"&gt;Keywords&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;          &lt;hr style="margin-left: 20px" size="1" /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;table style="margin-left: 30px" cellspacing="2" cellpadding="0" border="0"&gt;&lt;tbody&gt;&lt;br /&gt;              &lt;tr&gt;&lt;br /&gt;                &lt;td valign="top"&gt;CONNECTIVITY; DECIMAL; HETEROGENEOUS; TG4MSQL; TG4SYBS&lt;/td&gt;&lt;br /&gt;              &lt;/tr&gt;&lt;br /&gt;            &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-8233729266491746397?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/8233729266491746397/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/nls-guide-for-generic-connectivity-and.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8233729266491746397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8233729266491746397'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/nls-guide-for-generic-connectivity-and.html' title='NLS Guide for Generic Connectivity and Gateways [ID 230239.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-8976365258160008415</id><published>2010-02-16T11:47:00.001+07:00</published><updated>2010-02-16T11:47:42.114+07:00</updated><title type='text'>How to setup HSODBC on HP-UX [ID 270395.1]</title><content type='html'>&lt;font face="helvetica"&gt;   &lt;br /&gt;    &lt;table cellspacing="6" cellpadding="0" width="100%" border="0"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" align="left" colspan="4"&gt;&lt;/td&gt;          &lt;td valign="top" colspan="2"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" align="left" colspan="6"&gt;           &lt;hr size="1" /&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="25%" colspan="2"&gt;&amp;#160;&lt;/td&gt;          &lt;td valign="top" nowrap="nowrap" width="50%" colspan="3"&gt;&lt;em&gt;Modified&lt;/em&gt; 28-JUL-2008&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Type&lt;/em&gt; BULLETIN&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Status&lt;/em&gt; ARCHIVED&lt;/td&gt;          &lt;td valign="top"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/font&gt;  &lt;pre&gt;&lt;font face="Courier New, Courier, mono"&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;-----------------------------------------------------------------&lt;br /&gt;PLEASE BE AWARE THAT THERE IS NO PORTING OF GENERIC CONNECTIVITY&lt;br /&gt;FOR HP-UX ITANIUM.&lt;br /&gt;&lt;br /&gt;This note describes only setting up HSODBC on HP-UX RISC platforms.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;SCOPE &amp;amp; APPLICATION&lt;br /&gt;-------------------&lt;br /&gt;This note describes how to set up HSODBC (heterogeneous services) for&lt;br /&gt;HP-UX 11.0 using Oracle 9.2 release. It is similar for 9.1 release, but&lt;br /&gt;the directory structure changed between 8i and 9i, so while using this note&lt;br /&gt;for 8i, please keep in mind to change the directories of the libraries.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to Setup HSODBC (heterogeneous services) on HP-UX&lt;br /&gt;-----------------------------------------------------&lt;br /&gt; &lt;br /&gt;This note is divided into five different parts:&lt;br /&gt;Part I describes how to set up the ODBC driver&lt;br /&gt;Part II describes how to relink the HSODBC executable&lt;br /&gt;Part III describes the configuration process of HSODBC&lt;br /&gt;Part IV is a summary of how to set it up for Oracle 8i on HP-UX&lt;br /&gt;Part V Comments&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part I: Setting up the ODBC driver&lt;br /&gt;----------------------------------&lt;br /&gt;There are several ODBC vendors for UNIX platforms.&lt;br /&gt;This note describes the settings of the ODBC driver from&lt;br /&gt;Data Direct Technologies. They also provide a 15 day trial &lt;br /&gt;license for HP-UX platforms. More information is available at &lt;br /&gt;the following URL:&lt;br /&gt;http://www.datadirect-technologies.com&lt;br /&gt;&lt;br /&gt;HSODBC is a 32 bit libray and thus it needs a 32 bit ODBC driver.&lt;br /&gt;The libraries of other ODBC vendors will vary; so please make sure &lt;br /&gt;to change the libraries to the libraries of your odbc vendor.&lt;br /&gt;&lt;br /&gt;As mentioned, Data Direct Technologies provide a trial version. &lt;br /&gt;If you download this trial version, please make sure that you download&lt;br /&gt;also the service pack for the odbc driver -if it exists-.&lt;br /&gt;Another feature of this driver is, that it also provides some mechanism&lt;br /&gt;to check the ODBC connectivity. &lt;br /&gt;&lt;br /&gt;Install the ODBC driver into a separate home directory. Let's call this &lt;br /&gt;home directory ODBC_HOME (i.e. /u05/odbc) directory.&lt;br /&gt;To install the driver, you can create a new user called odbc who owns &lt;br /&gt;the software.&lt;br /&gt;Install the ODBC driver as mentioned in the documentation.&lt;br /&gt;&lt;br /&gt;- Configuring the odbc.ini file:&lt;br /&gt;  The odbc.ini file is similar to an address book for the odbc driver. &lt;br /&gt;  It is located by default in the ODBC_HOME directory, but can be &lt;br /&gt;  placed anywhere you like it.&lt;br /&gt;  &lt;br /&gt;  A side note how odbc works: The odbc driver (nothing else than a library)&lt;br /&gt;  gets a request to connect to a server described in the odbc.ini file. &lt;br /&gt;  The alias for the description of the server is called:&lt;br /&gt;   Data Source Name (=DSN).&lt;br /&gt;  Then the driver reads the information from the odbc.ini file according to the specified&lt;br /&gt;  DSN and connects to the server.&lt;br /&gt;   &lt;br /&gt;  The prerequisite for the odbc driver to connect to the the server is the &lt;br /&gt;  configured odbc.ini.&lt;br /&gt;  It is divided into 3 different sections:&lt;br /&gt;  [ODBC Data Sources]&lt;br /&gt;  [&amp;lt;DSN&amp;gt;]&lt;br /&gt;  [ODBC]&lt;br /&gt;  &lt;br /&gt;  [ODBC Data Source] is the section that contains all the available DSNs.&lt;br /&gt;  [&amp;lt;DSN&amp;gt;] contains the different names of the DSNs.&lt;br /&gt;  [ODBC] is the general section for the odbc driver &lt;br /&gt;  &lt;br /&gt;  A very simple file of the odbc.ini file looks like:&lt;br /&gt;   [ODBC Data Sources]&lt;br /&gt;   mssql=DataDirect 4.10 SQL Server Wire Protocol&lt;br /&gt;&lt;br /&gt;   [mssql]&lt;br /&gt;   Driver=/u05/odbc/lib/ivmsss18.sl&lt;br /&gt;   Database=PCS&lt;br /&gt;   LogonID=&amp;lt;UID like:sa&amp;gt;&lt;br /&gt;   Password=&amp;lt;password for the user&amp;gt;&lt;br /&gt;   Address=&amp;lt;hostname of the SQL Server&amp;gt;,1433&lt;br /&gt;   QuotedId=No&lt;br /&gt;   AnsiNPW=No&lt;br /&gt;&lt;br /&gt;   [ODBC]&lt;br /&gt;   Trace=0&lt;br /&gt;   TraceFile=/tmp/odbc.trc&lt;br /&gt;   TraceDll=/u05/odbc/lib/odbctrac.sl&lt;br /&gt;   InstallDir=/u05/odbc&lt;br /&gt;   ConversionTableLocation=/u05/odbc/tables&lt;br /&gt;   UseCursorLib=0&lt;br /&gt;&lt;br /&gt;   The section [ODBC Data Sources] contains one datasource called mssql.&lt;br /&gt;   The configuration behind the data source mssql is found in the section&lt;br /&gt;   [mssql].&lt;br /&gt;   It contains the address (and port) of the server to contact, the driver &lt;br /&gt;   that should be used while connecting to the remote server and the &lt;br /&gt;   user id and password of the remote server.&lt;br /&gt;   The [ODBC] section contains general paremeters like tracing &lt;br /&gt;   (Trace=1 enables tracing, Trace=0 disables it).&lt;br /&gt;   &lt;br /&gt;After configuring the odbc.ini file, the first step is to check out if the&lt;br /&gt;ODBC configuration works. Data Direct Technologies provides a demo program to &lt;br /&gt;test the connectivity and fetches some data from the remote server.&lt;br /&gt;The directory $ODBC_HOME/demo contains some sql scripts to create on the foreign&lt;br /&gt;database a demo table called EMP. &lt;br /&gt;For the Microsoft SQL Server for example the script is called empsqlsrv.sql.&lt;br /&gt;Run this script on the SQL Server to create the EMP table. (Please make sure,&lt;br /&gt;that you don't overwrite/delete any tables you need).&lt;br /&gt;&lt;br /&gt;Before calling the program demoodbc, you need to set two environment variables:&lt;br /&gt;a) SHLIB_PATH must contain the odbc library path&lt;br /&gt;          export SHLIB_PATH=$ODBC_HOME/lib:$SHLIB_PATH&lt;br /&gt;b) ODBCINI &lt;br /&gt;          export ODBCINI=$ODBC_HOME/odbc.ini&lt;br /&gt;The odbc driver is a 32 bit program and thus the library must be added to the &lt;br /&gt;SHLIB_PATH. The ODBCINI parameter will guarantee, that the newly configured &lt;br /&gt;odbc.ini file from above is used.&lt;br /&gt;&lt;br /&gt;Now calling the odbc demo program to query the remote MS SQL Server:&lt;br /&gt;demoodbc -uid &amp;lt;user of the MS SQL Server&amp;gt; -pwd &amp;lt;appropriated password&amp;gt; &amp;lt;DSN&amp;gt;&lt;br /&gt;like&lt;br /&gt;demoodbc -uid sa -pwd sa mssql&lt;br /&gt;should connect to the server and query the EMP table.&lt;br /&gt;&lt;br /&gt;Please make sure, that you can successfully query the table AND don't proceed &lt;br /&gt;if this configuration fails!&lt;br /&gt;If you have problems configuring the odbc driver, please contact the vendor &lt;br /&gt;of the driver.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part II: How to relink the HSODBC executable&lt;br /&gt;-------------------------------------------&lt;br /&gt;(Everything done in this section is done as ORACLE user)&lt;br /&gt;&lt;br /&gt;Most ODBC drivers are linked with a C++ compiler, but Oracle is still&lt;br /&gt;compiled with a C compiler.&lt;br /&gt;the HP homepage conatisn an article  &lt;br /&gt;Mixing C++ with other Languages for information on linking HP aC++ modules &lt;br /&gt;with HP C&lt;br /&gt;that describes in detail why the following steps are required. Please refer to&lt;br /&gt;it if you need more background information.&lt;br /&gt;&lt;br /&gt;The procedure for Oracle 9i with aC++ runtime version below A.03.30 is&lt;br /&gt;&lt;br /&gt;Check out, if the following file exists:&lt;br /&gt;/opt/aCC/lib/cpprt0_stub.o&lt;br /&gt;&lt;br /&gt;If not, please follow this instruction to create it:&lt;br /&gt;Create a file called cpprt0_stub.s with the following contents:&lt;br /&gt;&lt;br /&gt;--- cut here ---&lt;br /&gt;        .code&lt;br /&gt;; stubs for static constructors in a.out&lt;br /&gt;        .export __StaticCtorTable_Start,data&lt;br /&gt;        .export __StaticCtorTable_End,data&lt;br /&gt;__StaticCtorTable_Start&lt;br /&gt;__StaticCtorTable_End&lt;br /&gt;&lt;br /&gt;        .data&lt;br /&gt;; stubs for static constructors in a.out, compiled with +z/+Z&lt;br /&gt;        .export __ZStaticCtorTable_Start,data&lt;br /&gt;        .export __ZStaticCtorTable_End,data&lt;br /&gt;__ZStaticCtorTable_Start&lt;br /&gt;__ZStaticCtorTable_End&lt;br /&gt;--- cut here ---&lt;br /&gt;&lt;br /&gt;(If you created the file on a PC, don't forget to transfer&lt;br /&gt;the file in ASCII mode!)&lt;br /&gt;Then compile it with the following command:&lt;br /&gt;as cpprt0_stub.s -o ./cpprt0_stub.o&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now back to the relinking issue:&lt;br /&gt;First rename the files hsodbc and hsodbc0 in the directory&lt;br /&gt;$ORACLE_HOME/bin. Then change to the directory &lt;br /&gt;$ORACLE_HOME/rdbms/lib and copy the file cpprt0_stub.o to &lt;br /&gt;this directory.&lt;br /&gt;&lt;br /&gt;According to HP this procedure is not longer necessary for newer aCC&lt;br /&gt;versions.&lt;br /&gt; A description for Oracle 8i can be found in Note:150458.1 &lt;br /&gt;Relinking Heterogeneous Service on HP-UX.&lt;br /&gt;&lt;br /&gt;Then the environment variable HSA_ODBC_SYSLIBS must be set:&lt;br /&gt;export HSA_ODBC_SYSLIBS=&amp;quot;cpprt0_stub.o -lstd -lstream -lCsup -lcl -ldld&amp;quot; &lt;br /&gt;and then the relink of the hsodbc library is done as follows:&lt;br /&gt;/usr/ccs/bin/make -f ins_rdbms.mk ihsodbc&lt;br /&gt;&lt;br /&gt;The linking should proceed without any error and create the hsodbc file in&lt;br /&gt;the $ORACLE_HOME/bin directory.&lt;br /&gt;&lt;br /&gt;To make sure, that the linking worked, simply type hsodbc and press enter.&lt;br /&gt;For Oracle 9.2 hsodbc executable a similar screen to the following will&lt;br /&gt;appear:&lt;br /&gt;ora920 @ hsodbc&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Oracle Corporation --- TUESDAY   OCT 15 2002 09:31:32.746&lt;br /&gt; &lt;br /&gt;Heterogeneous Agent Release 9.2.0.1.0 - Production  Built with&lt;br /&gt;   Driver for ODBC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This will indicate, that the relinking was successfully. &lt;br /&gt;Please don't proceed with the next part, if this part was unsuccessful !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Part III: How to configure HSODBC&lt;br /&gt;---------------------------------&lt;br /&gt;(This section assumes that everything is done in the Oracle user account&lt;br /&gt;that starts the listener!)&lt;br /&gt;&lt;br /&gt;In general the following things must be configured:&lt;br /&gt;1) listener&lt;br /&gt;2) tnsnames&lt;br /&gt;3) init&amp;lt;SID&amp;gt;.ora of the hs subsystem&lt;br /&gt;4) environment&lt;br /&gt;5) Oracle database&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1) The listener needs a new SID entry like the following:&lt;br /&gt;    (SID_DESC =&lt;br /&gt;      (SID_NAME = hsodbc)&lt;br /&gt;      (ORACLE_HOME = /u01/app/oracle/product/9.2.0)&lt;br /&gt;      (PROGRAM = hsodbc)&lt;br /&gt;      (ENVS=SHLIB_PATH=/u05/odbc/lib:/u01/app/oracle/product/9.2.0/lib32)&lt;br /&gt;    )&lt;br /&gt;&lt;br /&gt;Please correct the ORACLE_HOME entry and the ENVS entry.&lt;br /&gt;ORACLE_HOME must point to your ORACLE_HOME directory and the ENVS&lt;br /&gt;string contains entries for the SHLIB_PATH.&lt;br /&gt;The minimum of the SHLIB_PATH setting must contain the Oracle library and &lt;br /&gt;the odbc library path. If the odbc driver requires the foreign data store &lt;br /&gt;client libraries (like the Progress ODBC driver), the SHLIP_PATH must contain &lt;br /&gt;this library path as well:&lt;br /&gt;...&lt;br /&gt;  (ENVS=SHLIB_PATH=/u05/odbc/lib:&lt;br /&gt;                  /u01/app/oracle/product/9.2.0/lib32:/progress/dcl/lib)&lt;br /&gt;...&lt;br /&gt;(Differing from 8i releases, the 32 bit Oracle libraries are now located in the &lt;br /&gt;lib32 directory while for 8i the 32 bit library was located in the lib &lt;br /&gt;directory. So please pay attention to this while using older configuration &lt;br /&gt;files. More details can be found in Note: &amp;lt;109621.1&amp;gt;).&lt;br /&gt;&lt;br /&gt;So a listener.ora file can look like:&lt;br /&gt;SID_LIST_LISTENER920 =&lt;br /&gt;  (SID_LIST =&lt;br /&gt;    (SID_DESC =&lt;br /&gt;      (SID_NAME = hsodbc)&lt;br /&gt;      (ORACLE_HOME = /u01/app/oracle/product/9.2.0)&lt;br /&gt;      (PROGRAM = hsodbc)&lt;br /&gt;      (ENVS=SHLIB_PATH=/u05/odbc/lib:/u01/app/oracle/product/9.2.0/lib32)&lt;br /&gt;    )&lt;br /&gt;  )&lt;br /&gt;&lt;br /&gt;LISTENER920 =&lt;br /&gt;  (DESCRIPTION_LIST =&lt;br /&gt;    (DESCRIPTION =&lt;br /&gt;      (ADDRESS_LIST =&lt;br /&gt;        (ADDRESS = (PROTOCOL = TCP)(HOST = &amp;lt;hostname of the Oracle Server&amp;gt;)&lt;br /&gt;         (PORT = 1921))&lt;br /&gt;      )&lt;br /&gt;      (ADDRESS_LIST =&lt;br /&gt;        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))&lt;br /&gt;      )&lt;br /&gt;    )&lt;br /&gt;  )  &lt;br /&gt;&lt;br /&gt;The listener.ora file contains a listener called LISTENER920 instead of the &lt;br /&gt;default name LISTENER.&lt;br /&gt;To stop/start the listener from above, don't forget to set the current_listener to&lt;br /&gt;listener920.&lt;br /&gt;&lt;br /&gt;The listener must be restarted after changing the listener.ora!&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;2) The tnsnames.ora needs an entry for the HSODBC alias:&lt;br /&gt;hsodbc.DE.ORACLE.COM =&lt;br /&gt;  (DESCRIPTION =&lt;br /&gt;    (ADDRESS_LIST =&lt;br /&gt;      (ADDRESS = (PROTOCOL = TCP)(HOST = &amp;lt;hostname of the Oracle Server&amp;gt;)&lt;br /&gt;       (PORT = 1921))&lt;br /&gt;    )&lt;br /&gt;    (CONNECT_DATA =&lt;br /&gt;      (SID= hsodbc))&lt;br /&gt;    (HS=OK)  &lt;br /&gt;  )   &lt;br /&gt;&lt;br /&gt;The domain of the tns alias can differ from the one used above (de.oracle.com),&lt;br /&gt;depending on the parameter in the sqlnet.ora:&lt;br /&gt;NAMES.DEFAULT_DOMAIN = de.oracle.com&lt;br /&gt;&lt;br /&gt;But the important entry is the (HS=OK) key word. This key word must be added &lt;br /&gt;manually and opening the Net Configuration Assistants will remove this &lt;br /&gt;entries from your tnsnames.ora file!&lt;br /&gt;The (HS=OK) parameter must be outside the SID section and specifies that this &lt;br /&gt;connector uses the Oracle Heterogeneous Service Option.&lt;br /&gt;&lt;br /&gt;After adding the tnsnames alias and restarting the listener, a &lt;br /&gt;connectivity check is to use tnsping &amp;lt;alias&amp;gt;. &lt;br /&gt;tnsping hsodbc&lt;br /&gt;should come back with a successfull message.&lt;br /&gt;&lt;br /&gt;3) init.ora of the gateway:&lt;br /&gt;The SID to use HS functionality is called in this example hsodbc. There are &lt;br /&gt;some restrictions how to name the SID (described in the Net Administrators &lt;br /&gt;Guide in detail).&lt;br /&gt;At this place only a short note: don't use dots in the SID and keep it short!&lt;br /&gt;&lt;br /&gt;The SID is also relevant for the init.ora file of the gateway. The name of the &lt;br /&gt;file is init&amp;lt;SID&amp;gt;.ora.  In this example it is called inithsodbc.ora.&lt;br /&gt;The file is located at $ORACLE_HOME/hs/admin.&lt;br /&gt;It should contain the following entries:&lt;br /&gt;#&lt;br /&gt;# HS init parameters&lt;br /&gt;#&lt;br /&gt;HS_FDS_CONNECT_INFO = mssql&lt;br /&gt;HS_FDS_TRACE_LEVEL = off&lt;br /&gt;HS_FDS_SHAREABLE_NAME=/u05/odbc/lib/libodbc.sl&lt;br /&gt;#&lt;br /&gt;# ODBC specific environment variables&lt;br /&gt;#&lt;br /&gt;set ODBCINI=/u05/odbc/odbc.ini&lt;br /&gt;#&lt;br /&gt;# Environment variables required for the non-Oracle system&lt;br /&gt;#&lt;br /&gt;#set &amp;lt;envvar&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Short explanation of the parameters:&lt;br /&gt;HS_FDS_CONNECT_INFO points to the ODBC DSN configured in PART I of this note.&lt;br /&gt;HS_FDS_SHAREABLE_NAME points to the ODBC Driver Manager library at &lt;br /&gt;$ODBC_HOME/lib/&amp;lt;ODBC_Driver_MANAGER_LIB&amp;gt;.&lt;br /&gt;For the Data Direct Technologies odbc driver the generic odbc library is&lt;br /&gt;called libodbc.sl. This library checks the ODBC DSN configuration and loads the&lt;br /&gt;driver to the foreign database server. The name of this library may differ&lt;br /&gt;from odbc vendor to vendor. Please check out the driver documentation to&lt;br /&gt;figure out the generic odbc library. Also some ODBC driver vendors do not&lt;br /&gt;require an ODBC Driver Manager; then the ODBC driver library itself can be&lt;br /&gt;specified here. To determine if an ODBC Driver Manager is required, please &lt;br /&gt;contact the ODBC driver vendor.&lt;br /&gt;(As not each ODBC Driver vendor documents its ODBC Driver Manager library and&lt;br /&gt;the library name might differ from Driver Manager to Driver Manager a possible &lt;br /&gt;way to figure out the Driver Manager library name could be to check for&lt;br /&gt;the existence of SQLAllocConnect ODBC function within this library:&lt;br /&gt;     strings &amp;lt;library name&amp;gt; |grep -i sqlalloc&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The set ODBCINI=/u05/odbc/odbc.ini points to the location of an odbc.ini&lt;br /&gt;file you want to use with this hsodbc configuration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4) Configuring the environment:&lt;br /&gt;Normally there is nothing to configure anymore. But to test the odbc &lt;br /&gt;connectivity for the Oracle user the following should be performed:&lt;br /&gt;Set the ODBCINI and ODBC_HOME environment variable and add the &lt;br /&gt;$ODBC_HOME/lib directory to the SHLIB_PATH.&lt;br /&gt;(The details how to do it are described in Part I.)&lt;br /&gt;&lt;br /&gt;Now execute as the ORACLE User (who starts the listener) &lt;br /&gt;the demoodbc program:&lt;br /&gt;$ODBC_HOME/demo/demoodbc -uid sa -pwd sa mssql&lt;br /&gt;A similar output should be generated:&lt;br /&gt;DataDirect Technologies, Inc. ODBC Sample Application.&lt;br /&gt;will connect to data source 'mssql' as user 'sa/sa'.&lt;br /&gt; &lt;br /&gt;First Name      Last Name       Hire Date            Salary          Dept&lt;br /&gt;----------      ---------       ---------            ------          ----&lt;br /&gt;Tyler           Bennett         1977-01-06 00:00:00.000 32000.0         D101&lt;br /&gt;George          Woltman         1982-07-08 00:00:00.000 53500.0         D101&lt;br /&gt;Rich            Holcomb         1983-01-06 00:00:00.000 49500.0         D202&lt;br /&gt;Richard         Potter          1986-12-04 00:00:00.000 15900.0         D101&lt;br /&gt;David           Motsinger       1985-05-05 00:00:00.000 19250.0         D202&lt;br /&gt;Tim             Sampair         1987-02-12 00:00:00.000 27000.0         D101&lt;br /&gt;SQLFetch returns: SQL_NO_DATA_FOUND&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5)Configuring the Oracle database&lt;br /&gt;The only thing that must be done here is to create a database link:&lt;br /&gt;connect with the username/password that has sufficient rights to create a &lt;br /&gt;database link (i.e. system).&lt;br /&gt;The syntax is:&lt;br /&gt;create [public] database link &amp;lt;name&amp;gt; &lt;br /&gt;  connect to &amp;lt;UID&amp;gt; identified by &amp;lt;pwd&amp;gt; using '&amp;lt;tnsalias&amp;gt;';&lt;br /&gt;&lt;br /&gt;In other words, to connect to the MS SQL Server configured in the last steps, &lt;br /&gt;the syntax must be:&lt;br /&gt;CREATE DATABASE LINK sqlserver&lt;br /&gt; CONNECT TO &amp;quot;sa&amp;quot; IDENTIFIED BY &amp;quot;sa&amp;quot; USING 'hsodbc';&lt;br /&gt;&lt;br /&gt;The db link name is sqlserver. Username and password must be in double quotes,&lt;br /&gt;because the username and password are case sensitive. 'hsodbc' points to &lt;br /&gt;the alias in the tnsnames.ora file that calls the HS subsystem.&lt;br /&gt;&lt;br /&gt;If everything is configured well, a select of the EMP table -created for the&lt;br /&gt;demoodbc program- should be successful:&lt;br /&gt;&lt;br /&gt;select * from &amp;quot;EMP&amp;quot;@sqlserver;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;(Side note: The EMP table at the MS SQL Server is in capital letters. Because&lt;br /&gt;the MS SQL Server is case sensitive the EMP table must be surrounded &lt;br /&gt;by double quotes). @sqlserver points to the name of the database link to the &lt;br /&gt;MS SQL Server.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part IV How to set it up for Oracle 8i on HP-UX&lt;br /&gt;-----------------------------------------------&lt;br /&gt;&lt;br /&gt;Because ODBC is independent from the Oracle version being used,&lt;br /&gt;Part I of this note (setting up odbc driver) is the same for &lt;br /&gt;8i and 9i Oracle database releases.&lt;br /&gt;&lt;br /&gt;Part III is almost the same:&lt;br /&gt;The description of the tnsnames.ora and init.ora of the HS subsystem is also &lt;br /&gt;valid for 8i. Also the create database statement...&lt;br /&gt;Only the listener.ora differs a little bit in the ENVS setting:&lt;br /&gt;In release 9i the 32 bit libraries are stored at:&lt;br /&gt;$ORACLE_HOME/lib32&lt;br /&gt;in 8i the 32 bit libraries are stored in:&lt;br /&gt;$ORACLE_HOME/lib&lt;br /&gt;!! lib instead of lib32 !!&lt;br /&gt;and the Oracle_Home is the home directory of 8i release.&lt;br /&gt;So the SID section looks like:&lt;br /&gt;    (SID_DESC =&lt;br /&gt;      (SID_NAME = hsodbc)&lt;br /&gt;      (ORACLE_HOME = /u01/app/oracle/product/8.1.7)&lt;br /&gt;      (PROGRAM = hsodbc)&lt;br /&gt;      (ENVS=SHLIB_PATH=/u05/odbc/lib:/u01/app/oracle/product/8.1.7/lib)&lt;br /&gt;    )    &lt;br /&gt;&lt;br /&gt;The conclusion about the directory difference is, that in 8i the environment&lt;br /&gt;SHLIB_PATH misses the 32 appendix:&lt;br /&gt;(export SHLIB_PATH=$ODBC_HOME/lib:$SHLIB_PATH&lt;br /&gt;  echo $SHLIB_PATH&lt;br /&gt;  SHLIB_PATH=/u05/odbc/lib:/u01/app/oracle/product/8.1.7/lib)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Relinking as described in Part II is completely different:&lt;br /&gt;Check out for the /opt/aCC/lib/cpprt0_stub.o file again.&lt;br /&gt;If it does not exist, create it as described in Part II above.&lt;br /&gt;&lt;br /&gt;Copy this file to $ORACLE_HOME/rdbms/lib directory.&lt;br /&gt;Change to $ORACLE_HOME/rdbms/lib directory.&lt;br /&gt;&lt;br /&gt;To relink the HS executable use the following command. &lt;br /&gt;Copy/paste the command into a script on the HP-UX machine, make&lt;br /&gt;it executable (chmod +x) and run it.&lt;br /&gt;&lt;br /&gt;--- cut here ---&lt;br /&gt;cc -Wl,+s -Wl,+n                               \&lt;br /&gt;        -o $ORACLE_HOME/rdbms/lib/hsodbc       \&lt;br /&gt;        -L $ORACLE_HOME/rdbms/lib              \&lt;br /&gt;        -L $ORACLE_HOME/lib                    \&lt;br /&gt;        -o $ORACLE_HOME/rdbms/lib/hsodbc       \&lt;br /&gt;        $ORACLE_HOME/hs/lib/hsodbc.o           \&lt;br /&gt;        $ORACLE_HOME/rdbms/lib/defopt.o        \&lt;br /&gt;        $ORACLE_HOME/rdbms/lib/homts.o         \&lt;br /&gt;        $ORACLE_HOME/rdbms/lib/ssdbaed.o       \&lt;br /&gt;        $ORACLE_HOME/rdbms/lib/cpprt0_stub.o   \&lt;br /&gt;        -L $ORACLE_HOME/hs/lib/                \&lt;br /&gt;        -lnavhoa                               \&lt;br /&gt;        -lnavshr                               \&lt;br /&gt;        -lnvbaseshr                            \&lt;br /&gt;        -lagtsh                                \&lt;br /&gt;        -lpls8                                 \&lt;br /&gt;        -lplp8                                 \&lt;br /&gt;        -lclntsh                               \&lt;br /&gt;        -lnls8                                 \&lt;br /&gt;        -lcore8                                \&lt;br /&gt;        -lnls8                                 \&lt;br /&gt;        -lcore8                                \&lt;br /&gt;        -lnls8                                 \&lt;br /&gt;        `cat $ORACLE_HOME/lib/sysliblist`      \&lt;br /&gt;        -lm                                    \&lt;br /&gt;        -lstd -lstream -lCsup -lcl -ldld&lt;br /&gt;--- cut here ---&lt;br /&gt;&lt;br /&gt;The new hsodbc executable is built in the $ORACLE_HOME/rdbms/lib directory.&lt;br /&gt;Rename the old hsodbc library $ORACLE_HOME/bin/hsodbc and then move&lt;br /&gt;the new hsodbc to the $ORACLE_HOME/bin location.&lt;br /&gt;Test again while entering hsodbc and pressing enter key.&lt;br /&gt;A message like the following should appear:&lt;br /&gt;ora817 @ /u01/app/oracle/product/8.1.7/rdbms/lib hsodbc&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Oracle Corporation --- TUESDAY   OCT 15 2002 16:35:03.439&lt;br /&gt; &lt;br /&gt;Heterogeneous Agent based on the following module(s):&lt;br /&gt;   - External Procedure Module&lt;br /&gt;   - Transaction Module&lt;br /&gt;   - SQL/PLSQL Module&lt;br /&gt; &lt;br /&gt;A select in SQL*Plus via the db link should be possible now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part V: Comments&lt;br /&gt;----------------&lt;br /&gt;Please be aware, that after each patch set install, the RELINK process must&lt;br /&gt;be executed again manually.&lt;br /&gt;Repeat the steps described in Part II after a successfull patch installation.&lt;br /&gt;Else the following error occures:&lt;br /&gt;SQL&amp;gt; select * from all_catalog@hsodbc;&lt;br /&gt;select * from all_catalog@hsodbc&lt;br /&gt;                          *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-28500: connection from ORACLE to a non-Oracle system returned this message:&lt;br /&gt;[Generic Connectivity Using ODBC]Bad file number; at FIND_IMAGE_SYMBOL&lt;br /&gt;[C079] Failed to load dynamic library '/u05/odbc/lib/libodbc.sl'&lt;br /&gt;ORA-02063: preceding 3 lines from HSODBC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=150458.1&amp;amp;type=NOT"&gt;NOTE:150458.1&lt;/a&gt;, &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=109621.1&amp;amp;type=NOT"&gt;Note:109621.1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td colspan="2"&gt;&lt;br /&gt;        &lt;p&gt;&lt;img id="collapseImg2" style="cursor: pointer" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div id="collapsibleRelatedData" style="display: inline; margin-left: 20px; width: 100%"&gt;&lt;br /&gt;          &lt;hr size="1" /&gt;&lt;b style="margin-left: 20px"&gt;Products&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;          &lt;hr style="margin-left: 20px" size="1" /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;ul&gt;&lt;br /&gt;            &lt;li&gt;Oracle Database Products &amp;gt; Oracle Database &amp;gt; Oracle Database &amp;gt; Oracle Server - Enterprise Edition &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;            &lt;li&gt;Oracle Transparent Gateway for ODBC &lt;/li&gt;&lt;br /&gt;          &lt;/ul&gt;&lt;br /&gt;          &lt;b style="margin-left: 20px"&gt;Keywords&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;          &lt;hr style="margin-left: 20px" size="1" /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;table style="margin-left: 30px" cellspacing="2" cellpadding="0" border="0"&gt;&lt;tbody&gt;&lt;br /&gt;              &lt;tr&gt;&lt;br /&gt;                &lt;td valign="top"&gt;HETEROGENEOUS; HP-UX; HSODBC&lt;/td&gt;&lt;br /&gt;              &lt;/tr&gt;&lt;br /&gt;            &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-8976365258160008415?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/8976365258160008415/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-setup-hsodbc-on-hp-ux-id-2703951.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8976365258160008415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8976365258160008415'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-setup-hsodbc-on-hp-ux-id-2703951.html' title='How to setup HSODBC on HP-UX [ID 270395.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-5532338893637884033</id><published>2010-02-16T11:44:00.002+07:00</published><updated>2010-02-16T11:47:05.321+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Generic Connectivity and Gateway'/><title type='text'>How To Setup Generic Connectivity - HSODBC - on Linux [ID 264567.1]</title><content type='html'>&lt;span style="font-family:helvetica;"&gt;  &lt;br /&gt;   &lt;table border="0" cellpadding="0" cellspacing="6" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td colspan="4" align="left" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;          &lt;td colspan="2" valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="6" align="left" valign="top"&gt;           &lt;hr size="1"&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="2" valign="top" width="25%"&gt; &lt;/td&gt;          &lt;td colspan="3" nowrap="nowrap" valign="top" width="50%"&gt;&lt;em&gt;Modified&lt;/em&gt; 23-JUN-2008     &lt;em&gt;Type&lt;/em&gt; FAQ     &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;pre&gt;&lt;span style="font-family:Courier New, Courier, mono;"&gt;&lt;br /&gt;Checked for relevance on 17-Oct-2007&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;Starting with database release 10g Oracle provides generic connectivity for&lt;br /&gt;Linux.&lt;br /&gt;&lt;br /&gt;PLEASE PAY ATTENTION: CURRENTLY (UP TO 10gR2) HSODBC IS ONLY PORTED TO&lt;br /&gt;LINUX X86; NOT TO Linux X86-64bit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SCOPE &amp;amp; APPLICATION&lt;br /&gt;-------------------&lt;br /&gt;Below is a description of setting up HSODBC (generic connectivity) for&lt;br /&gt;Linux using Oracle 10g release.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to Setup HSODBC (generic connectivity) on LINUX&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;This note is divided into two different parts:&lt;br /&gt;Part I describes how to set up the ODBC driver&lt;br /&gt;Part II describes the configuration process of HSODBC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part I: Setting up the ODBC driver&lt;br /&gt;----------------------------------&lt;br /&gt;There are several ODBC vendors for UNIX platforms.&lt;br /&gt;Below a description with the ODBC driver from&lt;br /&gt;Data Direct Technologies. They also provide a 15 day trial&lt;br /&gt;license for Linux based platforms. More information is available&lt;br /&gt;at the following URL:&lt;br /&gt; &amp;lt;&amp;lt;http://www.datadirect.com&amp;gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;The libraries of other ODBC vendors will vary; so please make sure&lt;br /&gt;to change the libraries to the libraries of your odbc vendor.&lt;br /&gt;&lt;br /&gt;As mentioned, Data Direct Technologies provides a trial version.&lt;br /&gt;If you download this trial version, please make sure that you download&lt;br /&gt;also the service pack for the odbc driver -if it exists-.&lt;br /&gt;&lt;br /&gt;Another feature of this driver is, that it also contains&lt;br /&gt;some mechanism to check the ODBC connectivity.&lt;br /&gt;&lt;br /&gt;Install the ODBC driver into a separate home directory. Let's call this&lt;br /&gt;home directory ODBC_HOME (i.e. /home/odbc/dd) directory.&lt;br /&gt;To install the driver, you can create a new user called odbc who owns&lt;br /&gt;the software.&lt;br /&gt;Install the ODBC driver as mentioned in the documentation.&lt;br /&gt;&lt;br /&gt;- Configuring the odbc.ini file:&lt;br /&gt; The odbc.ini file is similar to an address book for the odbc driver.&lt;br /&gt; It is located by default in the ODBC_HOME directory, but can be&lt;br /&gt; placed anywhere you like it.&lt;br /&gt;&lt;br /&gt; A side note how odbc works: The odbc driver (nothing else than a library)&lt;br /&gt; gets a request to connect to a server described in the odbc.ini file.&lt;br /&gt; The alias for the description of the server is called:&lt;br /&gt;  Data Source Name (=DSN).&lt;br /&gt; Then the driver reads the information from the odbc.ini file according to&lt;br /&gt; the specified DSN and connects to the server.&lt;br /&gt; &lt;br /&gt; The prerequisite for the odbc driver to connect to the server is the&lt;br /&gt; configured odbc.ini.&lt;br /&gt; It is divided into 3 different sections:&lt;br /&gt; [ODBC Data Sources]&lt;br /&gt; [&amp;lt;DSN&amp;gt;]&lt;br /&gt; [ODBC]&lt;br /&gt;&lt;br /&gt; [ODBC Data Source] is the section that contains all the available DSNs.&lt;br /&gt; [&amp;lt;DSN&amp;gt;] contains the different names of the DSNs and specifies the connect&lt;br /&gt;         details.&lt;br /&gt; [ODBC] is the general section for the odbc driver&lt;br /&gt;&lt;br /&gt; A very simple file of the odbc.ini file may look like:&lt;br /&gt;  [ODBC Data Sources]&lt;br /&gt;  mssql=MS SQL Server&lt;br /&gt;&lt;br /&gt;  [mssql]&lt;br /&gt;  Driver=/home/odbc/dd/lib/ivmsss22.so&lt;br /&gt;  Description=DataDirect 5.2 SQL Server Wire Protocol&lt;br /&gt;  Database=&amp;lt;SQL Server Database&amp;gt;&lt;br /&gt;  LogonID=&amp;lt;UID like:sa&amp;gt;&lt;br /&gt;  Password=&amp;lt;password for the user&amp;gt;&lt;br /&gt;  Address=&amp;lt;hostname of the SQL Server&amp;gt;,&amp;lt;port; default is 1433&amp;gt;&lt;br /&gt;  QuotedId=No&lt;br /&gt;  AnsiNPW=No&lt;br /&gt;&lt;br /&gt;  [ODBC]&lt;br /&gt;  IANAAppCodePage=4&lt;br /&gt;  InstallDir=/home/odbc/dd&lt;br /&gt;  Trace=0&lt;br /&gt;  TraceDll=/home/odbc/dd/lib/odbctrac.so&lt;br /&gt;  TraceFile=odbctrace.out&lt;br /&gt;  UseCursorLib=0&lt;br /&gt;  UseCursorLib=0&lt;br /&gt;&lt;br /&gt;  The section [ODBC Data Sources] contains one datasource called mssql.&lt;br /&gt;  The configuration behind the data source mssql is found in the section&lt;br /&gt;  [mssql].&lt;br /&gt;  It contains the address (and port) of the server to contact, the driver&lt;br /&gt;  that should be used while connecting to the remote server and the&lt;br /&gt;  user id and password of the remote server.&lt;br /&gt;  The [ODBC] section contains general paremeters like tracing&lt;br /&gt;  (Trace=1 enables tracing, Trace=0 disables it).&lt;br /&gt; &lt;br /&gt;After configuring the odbc.ini file, the first step is to check if the&lt;br /&gt;ODBC configuration works. Data Direct Technologies provides a demo program to&lt;br /&gt;test the connectivity and fetches some data from the remote server.&lt;br /&gt;The directory $ODBC_HOME/demo contains some sql scripts to create on the foreign&lt;br /&gt;database a demo table called EMP.&lt;br /&gt;For the Microsoft SQL Server for example the script is called empsqlsrv.sql.&lt;br /&gt;Run this script on the SQL Server to create the EMP table. (Please make sure,&lt;br /&gt;that you don't overwrite/delete any tables you need).&lt;br /&gt;&lt;br /&gt;Before calling the program demoodbc, you need to set two environment variables:&lt;br /&gt;a) LD_LIBRARY_PATH must contain the odbc library path&lt;br /&gt;         export LD_LIBRARY_PATH=$ODBC_HOME/lib:$LD_LIBRARY_PATH&lt;br /&gt;b) ODBCINI&lt;br /&gt;         export ODBCINI=$ODBC_HOME/odbc.ini&lt;br /&gt;The ODBCINI parameter will guarantee, that the newly configured&lt;br /&gt;odbc.ini file from above is used.&lt;br /&gt;&lt;br /&gt;Now calling the odbc demo program to query the remote MS SQL Server:&lt;br /&gt;demoodbc -uid &amp;lt;user of the MS SQL Server&amp;gt; -pwd &amp;lt;appropriated password&amp;gt; &amp;lt;DSN&amp;gt;&lt;br /&gt;like&lt;br /&gt;demoodbc -uid sa -pwd sa mssql&lt;br /&gt;should connect to the server and query the EMP table.&lt;br /&gt;&lt;br /&gt;Please make sure that you can successfully query the table AND don't proceed&lt;br /&gt;if this configuration fails!&lt;br /&gt;If you have problems configuring the odbc driver, please contact the vendor&lt;br /&gt;of the driver.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Part II: How to configure HSODBC&lt;br /&gt;---------------------------------&lt;br /&gt;(This section assumes that everything is done in the Oracle user account&lt;br /&gt;that starts the listener!)&lt;br /&gt;&lt;br /&gt;In general the following things must be configured:&lt;br /&gt;1) listener&lt;br /&gt;2) tnsnames&lt;br /&gt;3) init&amp;lt;SID&amp;gt;.ora of the hs subsystem&lt;br /&gt;4) environment&lt;br /&gt;5) Oracle database&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1) The listener needs a new SID entry like the following:&lt;br /&gt;  (SID_DESC =&lt;br /&gt;     (SID_NAME = hsodbc)&lt;br /&gt;     (ORACLE_HOME = /home/oracle/server/10.2.0/)&lt;br /&gt;     (PROGRAM = hsodbc)&lt;br /&gt;     (ENVS=LD_LIBRARY_PATH=/home/oracle/server/10.2.0/lib:/home/odbc/dd/lib)&lt;br /&gt;   )&lt;br /&gt;&lt;br /&gt;Please correct the ORACLE_HOME entry and the ENVS entry according to your&lt;br /&gt;installation.&lt;br /&gt;If the odbc driver requires the foreign data store&lt;br /&gt;client libraries (like the Progress ODBC driver), the LD_LIBRARY_PATH must&lt;br /&gt;contain this library path as well:&lt;br /&gt;...&lt;br /&gt; (ENVS=LD_LIBRARY_PATH=/home/oracle/server/10.2.0/lib:/home/odbc/dd/lib:&lt;br /&gt;                       /progress/dcl/lib)&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;ORACLE_HOME must point to your ORACLE_HOME directory and the ENVS&lt;br /&gt;string contains entries for the LD_LIBRARY_PATH.&lt;br /&gt;The minimum of the LD_LIBRARY_PATH setting must contain the Oracle library&lt;br /&gt;and the odbc library path; both 32 bit.&lt;br /&gt;HSODBC is a 32 bit libray and thus it needs a 32 bit ODBC driver.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A correct setting of the path can be verified by typing&lt;br /&gt;&lt;br /&gt;hsodbc&lt;br /&gt;&lt;br /&gt;then pressing &amp;lt;ENTER&amp;gt; at the console. If the LD_LIBRARY_PATH contains&lt;br /&gt;the correct libraries, the version number of HSODBC should be displayed.&lt;br /&gt;&lt;br /&gt;So a listener.ora file can look like:&lt;br /&gt;SID_LIST_LISTENER =&lt;br /&gt; (SID_LIST =&lt;br /&gt;  (SID_DESC =&lt;br /&gt;     (SID_NAME = hsodbc)&lt;br /&gt;     (ORACLE_HOME = /home/oracle/server/10.2.0/)&lt;br /&gt;     (PROGRAM = hsodbc)&lt;br /&gt;     (ENVS=LD_LIBRARY_PATH=/home/oracle/server/10.2.0/lib:/home/odbc/dd/lib)&lt;br /&gt;   )&lt;br /&gt; )&lt;br /&gt;&lt;br /&gt;LISTENER =&lt;br /&gt; (DESCRIPTION_LIST =&lt;br /&gt;   (DESCRIPTION =&lt;br /&gt;     (ADDRESS_LIST =&lt;br /&gt;       (ADDRESS = (PROTOCOL = TCP)(HOST = &amp;lt;hostname of the Oracle Server&amp;gt;)&lt;br /&gt;        (PORT = 1921))&lt;br /&gt;     )&lt;br /&gt;   )&lt;br /&gt; ) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The listener must be restarted (use stop and start) after changing the&lt;br /&gt;listener.ora file!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) The tnsnames.ora needs an entry for the HSODBC alias:&lt;br /&gt;HSODBC.DE.ORACLE.COM =&lt;br /&gt; (DESCRIPTION =&lt;br /&gt;   (ADDRESS_LIST =&lt;br /&gt;     (ADDRESS = (PROTOCOL = tcp)(HOST = &amp;lt;hostname of the Oracle Server)(PORT = 1521))&lt;br /&gt;   )&lt;br /&gt;   (CONNECT_DATA =&lt;br /&gt;     (SID = hsodbc)&lt;br /&gt;   )&lt;br /&gt;   (HS=OK)&lt;br /&gt; )&lt;br /&gt;&lt;br /&gt;The domain of the tns alias can differ from the one used above (de.oracle.com),&lt;br /&gt;depending on the parameter in the sqlnet.ora:&lt;br /&gt;NAMES.DEFAULT_DOMAIN = de.oracle.com&lt;br /&gt;&lt;br /&gt;But the important entry is the (HS=)or (HS=OK) key word. This key word must&lt;br /&gt;be added manually and opening the Net Configuration Assistants will&lt;br /&gt;remove this entries from your tnsnames.ora file!&lt;br /&gt;The (HS=OK) parameter must be outside the SID section and specifies that this&lt;br /&gt;connector uses the Oracle Heterogeneous Service Option.&lt;br /&gt;&lt;br /&gt;After adding the tnsnames alias and restarting the listener, a&lt;br /&gt;connectivity check is to use tnsping &amp;lt;alias&amp;gt;.&lt;br /&gt;tnsping hsodbc&lt;br /&gt;should come back with a successfull message.&lt;br /&gt;&lt;br /&gt;3) init.ora of the gateway:&lt;br /&gt;The SID to use HS functionality is called in this example hsodbc. There are&lt;br /&gt;some restrictions how to name the SID (described in the Net Administrators&lt;br /&gt;Guide in detail).&lt;br /&gt;At this place only a short note: don't use dots in the SID and keep it short!&lt;br /&gt;&lt;br /&gt;The SID is also relevant for the init.ora file of the gateway. The name of the&lt;br /&gt;file is init&amp;lt;SID&amp;gt;.ora.  In this example it is called inithsodbc.ora.&lt;br /&gt;The file is located at $ORACLE_HOME/hs/admin.&lt;br /&gt;It should contain the following entries:&lt;br /&gt;#&lt;br /&gt;# HS init parameters&lt;br /&gt;#&lt;br /&gt;HS_FDS_CONNECT_INFO = mssql&lt;br /&gt;HS_FDS_TRACE_LEVEL = off&lt;br /&gt;HS_FDS_SHAREABLE_NAME = /home/odbc/dd/lib/libodbc.so&lt;br /&gt;#&lt;br /&gt;# ODBC specific environment variables&lt;br /&gt;#&lt;br /&gt;set ODBCINI=/home/odbc/dd/odbc.ini&lt;br /&gt;#&lt;br /&gt;# Environment variables required for the non-Oracle system&lt;br /&gt;#&lt;br /&gt;#set &amp;lt;envvar&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Short explanation of the parameters:&lt;br /&gt;HS_FDS_CONNECT_INFO points to the ODBC DSN configured in PART I of this note.&lt;br /&gt;HS_FDS_SHAREABLE_NAME points to the ODBC Driver Manager library at&lt;br /&gt;$ODBC_HOME/lib/&amp;lt;ODBC_Driver_MANAGER_LIB&amp;gt;.&lt;br /&gt;For the Data Direct Technologies odbc driver the generic odbc library on Linux is&lt;br /&gt;called libodbc.so. This library checks the ODBC DSN configuration and loads the&lt;br /&gt;driver to the foreign database server. The name of this library may differ&lt;br /&gt;from odbc vendor to vendor. Please check out the driver documentation to&lt;br /&gt;figure out the generic odbc library. Also some ODBC driver vendors do not&lt;br /&gt;require an ODBC Driver Manager; then the ODBC driver library itself can be&lt;br /&gt;specified here. To determine if an ODBC Driver Manager is required, please&lt;br /&gt;contact the ODBC driver vendor.&lt;br /&gt;(As not each ODBC Driver vendor documents its ODBC Driver Manager library and&lt;br /&gt;the library name might differ from Driver Manager to Driver Manager a possible&lt;br /&gt;way to figure out the Driver Manager library name could be to check for&lt;br /&gt;the existence of SQLAllocConnect ODBC function within this library:&lt;br /&gt;    strings &amp;lt;library name&amp;gt; |grep -i sqlalloc&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;The set ODBCINI=/home/odbc/dd/odbc.ini points to the location of an odbc.ini&lt;br /&gt;file you want to use with this hsodbc configuration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4) Configuring the environment:&lt;br /&gt;Normally there is nothing to configure anymore. But to test the odbc&lt;br /&gt;connectivity for the Oracle user the following should be performed:&lt;br /&gt;Set the ODBCINI and ODBC_HOME environment variable and add the&lt;br /&gt;$ODBC_HOME/lib directory to the $LD_LIBRARY_PATH.&lt;br /&gt;(The details how to do it are described in Part I.)&lt;br /&gt;&lt;br /&gt;Now execute as the ORACLE User (who starts the listener)&lt;br /&gt;the demoodbc program:&lt;br /&gt;$ODBC_HOME/demo/demoodbc -uid sa -pwd sa mssql&lt;br /&gt;A similar output should be generated:&lt;br /&gt;DataDirect Technologies, Inc. ODBC Sample Application.&lt;br /&gt;will connect to data source 'mssql' as user 'sa/sa'.&lt;br /&gt;&lt;br /&gt;First Name      Last Name       Hire Date            Salary          Dept&lt;br /&gt;----------      ---------       ---------            ------          ----&lt;br /&gt;Tyler           Bennett         1977-01-06 00:00:00.000 32000.0         D101&lt;br /&gt;George          Woltman         1982-07-08 00:00:00.000 53500.0         D101&lt;br /&gt;Rich            Holcomb         1983-01-06 00:00:00.000 49500.0         D202&lt;br /&gt;Richard         Potter          1986-12-04 00:00:00.000 15900.0         D101&lt;br /&gt;David           Motsinger       1985-05-05 00:00:00.000 19250.0         D202&lt;br /&gt;Tim             Sampair         1987-02-12 00:00:00.000 27000.0         D101&lt;br /&gt;SQLFetch returns: SQL_NO_DATA_FOUND&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5)Configuring the Oracle database&lt;br /&gt;The only thing that must be done here is to create a database link:&lt;br /&gt;connect with the username/password that has sufficient rights to create a&lt;br /&gt;database link (i.e. system).&lt;br /&gt;The syntax is:&lt;br /&gt;create [public] database link &amp;lt;name&amp;gt;&lt;br /&gt; connect to &amp;lt;UID&amp;gt; identified by &amp;lt;pwd&amp;gt; using '&amp;lt;tnsalias&amp;gt;';&lt;br /&gt;&lt;br /&gt;In other words, to connect to the MS SQL Server configured in the last steps,&lt;br /&gt;the syntax must be:&lt;br /&gt;CREATE DATABASE LINK sqlserver&lt;br /&gt;CONNECT TO "sa" IDENTIFIED BY "sa" USING 'hsodbc';&lt;br /&gt;&lt;br /&gt;The db link name is sqlserver. Username and password must be in double quotes,&lt;br /&gt;because the username and password are case sensitive. 'hsodbc' points to&lt;br /&gt;the alias in the tnsnames.ora file that calls the HS subsystem.&lt;br /&gt;&lt;br /&gt;If everything is configured well, a select of the EMP table -created for the&lt;br /&gt;demoodbc program- should be successful:&lt;br /&gt;&lt;br /&gt;select * from "EMP"@sqlserver;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;(Side note: The EMP table at the MS SQL Server is in capital letters. Because&lt;br /&gt;the MS SQL Server is case sensitive the EMP table must be surrounded&lt;br /&gt;by double quotes). @sqlserver points to the name of the database link to the&lt;br /&gt;MS SQL Server.&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;The relevant manuals are :-&lt;br /&gt;Heterogeneous Connectivity Administrator’s Guide 10g Release 2 (10.2)&lt;br /&gt;&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=261726.1&amp;amp;type=NOT"&gt;Note:261726.1&lt;/a&gt; -  Generic Connectivity Available on Linux with 10g&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;br /&gt;   &lt;tr&gt;&lt;br /&gt;     &lt;td colspan="2"&gt;&lt;br /&gt;       &lt;p&gt;&lt;img id="collapseImg2" style="cursor: pointer;" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;       &lt;div id="collapsibleRelatedData" style="display: inline; margin-left: 20px; width: 100%;"&gt;&lt;br /&gt;         &lt;hr size="1"&gt;&lt;b style="margin-left: 20px;"&gt;Products&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;         &lt;hr style="margin-left: 20px;" size="1"&gt;&lt;br /&gt;&lt;br /&gt;         &lt;ul&gt;&lt;br /&gt;           &lt;li&gt;Oracle Database Products &amp;gt; Oracle Database &amp;gt; Oracle Database &amp;gt; Oracle Server - Enterprise Edition &lt;/li&gt;&lt;br /&gt;         &lt;/ul&gt;&lt;br /&gt;         &lt;b style="margin-left: 20px;"&gt;Keywords&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;         &lt;hr style="margin-left: 20px;" size="1"&gt;&lt;br /&gt;&lt;br /&gt;         &lt;table style="margin-left: 30px;" border="0" cellpadding="0" cellspacing="2"&gt;&lt;tbody&gt;&lt;br /&gt;             &lt;tr&gt;&lt;br /&gt;               &lt;td valign="top"&gt;CONFIGURATION; CONNECTIVITY; HSODBC; ODBC&lt;/td&gt;&lt;br /&gt;             &lt;/tr&gt;&lt;br /&gt;           &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;       &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;   &lt;/tr&gt;&lt;br /&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-5532338893637884033?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/5532338893637884033/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-setup-generic-connectivity.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/5532338893637884033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/5532338893637884033'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-setup-generic-connectivity.html' title='How To Setup Generic Connectivity - HSODBC - on Linux [ID 264567.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-4506511170093570607</id><published>2010-02-16T11:20:00.002+07:00</published><updated>2010-02-16T11:43:23.563+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Generic Connectivity and Gateway'/><title type='text'>Tuning Generic Connectivity And Gateways [ID 230543.1]</title><content type='html'>&lt;span style="font-family:helvetica;"&gt;  &lt;br /&gt;   &lt;table border="0" cellpadding="0" cellspacing="6" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td colspan="4" align="left" valign="top"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;          &lt;td colspan="2" valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="6" align="left" valign="top"&gt;           &lt;hr size="1"&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="2" valign="top" width="25%"&gt; &lt;/td&gt;          &lt;td colspan="3" nowrap="nowrap" valign="top" width="50%"&gt;&lt;em&gt;Modified&lt;/em&gt; 26-OCT-2009     &lt;em&gt;Type&lt;/em&gt; BULLETIN     &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;pre&gt;&lt;br /&gt;Checked for relevance on 26-Oct-2009&lt;br /&gt;Checked for relevance on 20-Feb-2008&lt;br /&gt;Checked for relevance on 08-Aug-2006&lt;br /&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;General tips tuning HS/Gateways&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SCOPE &amp;amp; APPLICATION&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;This bulletin will give some hints how to tune&lt;br /&gt;generic connectivity or open gateways.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tips tuning generic connectivity/gateways&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;br /&gt;There are no real parameters to tune generic connectivity or the&lt;br /&gt;open gateways. Everything in the following article is to demonstrate&lt;br /&gt;the behaviour of heterogeneous services, to explain the working mechanism and&lt;br /&gt;what can be done to improve the performance.&lt;br /&gt;&lt;br /&gt;Background information: HS connects from an Oracle database to a foreign&lt;br /&gt;data source and fetches records. The amount of the fetched records&lt;br /&gt;reflects the time needed to transfer them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The simplest way to improve performance is to reduce the amount&lt;br /&gt;of fetched data.&lt;br /&gt;&lt;br /&gt;But how to achive this?&lt;br /&gt;&lt;br /&gt;- RULE 1:&lt;br /&gt;         AVOID select * from remote table&lt;br /&gt;&lt;br /&gt;That's a very important statement!&lt;br /&gt;&lt;br /&gt;But fetching all records from the remote database can sometimes&lt;br /&gt;occur without wanting to fetch all the records. The cause is&lt;br /&gt;called POST PROCESSING:&lt;br /&gt;The Transparent Gateways tell the Oracle database during connect time&lt;br /&gt;which functions and operators they support. If the remote database does&lt;br /&gt;not support this function or operator, then the Oracle database must&lt;br /&gt;execute the function or operand. But to do this ALL records from&lt;br /&gt;the remote database must be fetched and processed locally in the Oracle&lt;br /&gt;database.&lt;br /&gt;&lt;br /&gt;- RULE 2:&lt;br /&gt;        pay attention to which functions/operands are supported by HS.&lt;br /&gt;        Unsupported functions are post processed!&lt;br /&gt;&lt;br /&gt;How to determine what's going on and how many records are fetched:&lt;br /&gt;The IBM gateways support explain plan. With this feature you're able&lt;br /&gt;to see the statements passed and processed.&lt;br /&gt;But this feature is not yet implemented in the generic connectivity&lt;br /&gt;or open gateways.&lt;br /&gt;So the only way to figure out what statements are passed between the&lt;br /&gt;Oracle database and the remote database is to verify the HS traces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One option to solve this issue is to CREATE VIEWS.&lt;br /&gt;&lt;br /&gt;   With access to the remote database:&lt;br /&gt;       it is possible to create a view at the remote database that&lt;br /&gt;       pre selects the records.&lt;br /&gt;       HS now performs its own query only to this view and processes only&lt;br /&gt;       the pre selected records.&lt;br /&gt;   With no access to the remote database:&lt;br /&gt;       the whole operation could be used in conjunction with&lt;br /&gt;       DBMS_HS_PASSTHROUGH packages. &lt;br /&gt;       DBMS_HS_PASSTHROUGH allows the creation of views at the remote database&lt;br /&gt;       as well as the sending of select statements as they are&lt;br /&gt;       to the foreign database without being pre prosssed.&lt;br /&gt;&lt;br /&gt;Another option is to use the COST-BASED optimizer.&lt;br /&gt;The cost-based optimizer uses indexes on remote tables and considers&lt;br /&gt;more execution plans then the rule based optimizer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="color:#008000;"&gt;The real performance tuning is to reduce the amount of data fetched by&lt;br /&gt;the HS agent.&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But sometimes adapting the interface might improve performance as well.&lt;br /&gt;By default, an agent fetches data from the non-Oracle system until&lt;br /&gt;it has enough data retrieved to send back to the HS related part in the&lt;br /&gt;Oracle database. The agent reblocks the data between the agent and the&lt;br /&gt;Oracle database server in sizes defined by the value of &lt;u&gt;&lt;span style="color:#008000;"&gt;HS_RPC_FETCH_SIZE&lt;/span&gt;&lt;/u&gt;.&lt;br /&gt;&lt;br /&gt;The other part is the transfer of the foreign database related interface&lt;br /&gt;like odbc and the agent.&lt;br /&gt;This transfer can be manipulated by setting the parameter&lt;br /&gt;              &lt;u&gt;&lt;span style="color:#008000;"&gt;HS_FDS_FETCH_ROWS&lt;/span&gt;&lt;/u&gt;.&lt;br /&gt;The default value is 20, but it makes sense to increase this value by&lt;br /&gt;adapting it to the fetched rows of the remote database.&lt;br /&gt;While some ODBC drivers initialize the SQL_FETCH_ROWS to 100 the&lt;br /&gt;&lt;u&gt;&lt;span style="color:#008000;"&gt;HS_FDS_FETCH_ROWS should be set to 100 or even to n*SQL_FETCH_ROWS&lt;/span&gt;&lt;/u&gt;.&lt;br /&gt;&lt;br /&gt;For example, assume that you set HS_RPC_FETCH_SIZE to 64K and HS_FDS_FETCH_ROWS&lt;br /&gt;to 100 rows. Assume that each row is approximately 600 bytes in size,&lt;br /&gt;so that the 100 rows are approximately 60K.&lt;br /&gt;The agent starts fetching 100 rows from the non-Oracle system.&lt;br /&gt;Because there is only 60K bytes of data in the agent, the agent does not&lt;br /&gt;send the data to the Oracle database server. Instead, the agent&lt;br /&gt;fetches the next 100 rows from the non-Oracle system.&lt;br /&gt;Now the agent is filled with 120K of data and the first 64K can be sent&lt;br /&gt;to the Oracle database server.&lt;br /&gt;There is 56K of data left in the agent. The agent fetches another 100 rows&lt;br /&gt;from the non-Oracle system before sending the next 64K of data to the Oracle&lt;br /&gt;database server....&lt;br /&gt;&lt;br /&gt;From the description above it looks like the agent is a bottle neck. It only&lt;br /&gt;sends data after a buffer is filled. So a better idea would be to STREAM the&lt;br /&gt;data.&lt;br /&gt;If the hs agent supports array fetching (please check out the documentation for&lt;br /&gt;a specific type of agent) the blocking can be switched of. Set the&lt;br /&gt;initialization parameter&lt;br /&gt;                   &lt;u&gt;&lt;span style="color:#008000;"&gt;HS_RPC_FETCH_REBLOCKING&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;to OFF.&lt;br /&gt;&lt;br /&gt;According to the sample from above this means that the first 100 rows are&lt;br /&gt;immediately sent to the Oracle server.&lt;br /&gt;&lt;br /&gt;So in theory a performance improvement will take place by setting&lt;br /&gt;HS_RPC_FETCH_REBLOCKING to OFF and HS_FDS_FETCH_ROWS to a value of&lt;br /&gt;n*SQL_FETCH_ROWS.&lt;br /&gt;&lt;br /&gt;KEEP IN MIND:&lt;br /&gt;All these parameters manipulate the DATA TRANSFER. While each fetched&lt;br /&gt;record depends on networking capacity, on CPU usage..., the best tuning&lt;br /&gt;mechanism is still to reduce the amount of transferred data.&lt;br /&gt;&lt;br /&gt;And this can be achieved by CREATING VIEWS to preselect&lt;br /&gt;the fetched records as described at the beginning of this document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;-----------------&lt;br /&gt;Note.234996.1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;br /&gt;   &lt;tr&gt;&lt;br /&gt;     &lt;td colspan="2"&gt;&lt;br /&gt;       &lt;p&gt;&lt;img id="collapseImg2" style="cursor: pointer;" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;       &lt;div id="collapsibleRelatedData" style="display: inline; margin-left: 20px; width: 100%;"&gt;&lt;br /&gt;         &lt;hr size="1"&gt;&lt;b style="margin-left: 20px;"&gt;Products&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;         &lt;hr style="margin-left: 20px;" size="1"&gt;&lt;br /&gt;&lt;br /&gt;         &lt;ul&gt;&lt;br /&gt;           &lt;li&gt;Oracle Database Products &amp;gt; Oracle Database &amp;gt; Oracle Database &amp;gt; Oracle Server - Enterprise Edition &lt;/li&gt;&lt;br /&gt;         &lt;/ul&gt;&lt;br /&gt;       &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/td&gt;&lt;br /&gt;   &lt;/tr&gt;&lt;br /&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-4506511170093570607?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/4506511170093570607/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/tuning-generic-connectivity-and.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4506511170093570607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4506511170093570607'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/tuning-generic-connectivity-and.html' title='Tuning Generic Connectivity And Gateways [ID 230543.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-6598754068724449233</id><published>2010-02-15T16:56:00.001+07:00</published><updated>2010-02-15T16:56:17.689+07:00</updated><title type='text'>SQL Server 2005 Books Online (November 2008) DBCC CHECKDB (Transact-SQL)</title><content type='html'>&lt;div class="majorTitle"&gt;&amp;#160;&lt;/div&gt;  &lt;div id="mainSection"&gt;   &lt;div id="mainBody"&gt;     &lt;p&gt;&lt;/p&gt;     &lt;span id="changeHistory"&gt;Updated: &lt;strong&gt;17 November 2008&lt;/strong&gt; &lt;/span&gt;      &lt;p&gt;Checks the logical and physical integrity of all the objects in the specified database by performing the following operations: &lt;/p&gt;      &lt;ul&gt;       &lt;li&gt;Runs &lt;a id="ctl00_mainContentContainer_ctl01" href="http://msdn.microsoft.com/en-us/library/ms188422%28SQL.90,printer%29.aspx"&gt;DBCC CHECKALLOC&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188422(SQL.90).aspx ] on the database.          &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;Runs &lt;a id="ctl00_mainContentContainer_ctl02" href="http://msdn.microsoft.com/en-us/library/ms174338%28SQL.90,printer%29.aspx"&gt;DBCC CHECKTABLE&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms174338(SQL.90).aspx ] on every table and view in the database.          &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;Runs &lt;a id="ctl00_mainContentContainer_ctl03" href="http://msdn.microsoft.com/en-us/library/ms186720%28SQL.90,printer%29.aspx"&gt;DBCC CHECKCATALOG&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms186720(SQL.90).aspx ] on the database.          &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;Validates the contents of every indexed view in the database.         &lt;br /&gt;&lt;/li&gt;        &lt;li&gt;Validates the Service Broker data in the database.         &lt;br /&gt;&lt;/li&gt;     &lt;/ul&gt;      &lt;p&gt;This means that the DBCC CHECKALLOC, DBCC CHECKTABLE, or DBCC CHECKCATALOG commands do not have to be run separately from DBCC CHECKDB. For more detailed information about the checks that these commands perform, see the descriptions of these commands.&lt;/p&gt;      &lt;p&gt;&lt;img alt="Topic link icon" src="http://i.msdn.microsoft.com/ms176064.05b1d166-d807-482c-891f-30b3b6b58046%28en-US,SQL.90%29.gif" /&gt; &lt;a id="ctl00_mainContentContainer_ctl05" href="http://msdn.microsoft.com/en-us/library/ms177563%28SQL.90,printer%29.aspx"&gt;Transact-SQL Syntax Conventions&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms177563(SQL.90).aspx ] &lt;/p&gt;     &lt;span&gt;       &lt;div class="MTPS_CollapsibleRegion"&gt;         &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Syntax &lt;/div&gt;          &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="syntaxToggle"&gt;&lt;/a&gt;&lt;span id="ctl00_mainContentContainer_ctl56_ctl00_ctl00"&gt;             &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl56_ctl00_ctl00_"&gt;               &lt;div class="CodeSnippetTitleBar"&gt;                 &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;               &lt;/div&gt;                &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;                 &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl56_ctl00_ctl00_code" space="preserve"&gt;DBCC CHECKDB &lt;br /&gt;[&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ ( database_name | database_id | 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ , NOINDEX&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ) ]&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ WITH&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ ALL_ERRORMSGS ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ , NO_INFOMSGS ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ , TABLOCK ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ , ESTIMATEONLY ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ , { PHYSICAL_ONLY | DATA_PURITY } ]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&amp;#160;&amp;#160;&amp;#160;&amp;#160; ]&lt;br /&gt;]&lt;/pre&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;          &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Arguments &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="sectionToggle0"&gt;&lt;/a&gt;&lt;dl&gt;&lt;dt&gt;&lt;em&gt;database_name&lt;/em&gt; | &lt;em&gt;database_id&lt;/em&gt; | 0&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Is the name or ID of the database for which to run integrity checks. If not specified, or if 0 is specified, the current database is used. Database names must comply with the rules for &lt;a id="ctl00_mainContentContainer_ctl57_ctl00_ctl00" href="http://msdn.microsoft.com/en-us/library/ms175874%28SQL.90,printer%29.aspx"&gt;identifiers&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms175874(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;NOINDEX&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Specifies that intensive checks of nonclustered indexes for user tables should not be performed. This decreases the overall execution time. NOINDEX does not affect system tables because integrity checks are always performed on system table indexes.&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Specifies that DBCC CHECKDB repair the found errors. The specified database&lt;em&gt; &lt;/em&gt;must be in single-user mode to use one of the following repair options.&lt;/p&gt;&lt;br /&gt;              &lt;dl&gt;&lt;dt&gt;REPAIR_ALLOW_DATA_LOSS&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                  &lt;p&gt;Tries to repair all reported errors. These repairs can cause some data loss.&lt;/p&gt;&lt;br /&gt;                &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_FAST&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                  &lt;p&gt;Maintains syntax for backward compatibility only. No repair actions are performed.&lt;/p&gt;&lt;br /&gt;                &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;REPAIR_REBUILD&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;                  &lt;p&gt;Performs both minor, quick repairs, such as repairing extra keys in nonclustered indexes, and time-consuming repairs such as rebuilding indexes. These repairs can be performed without risk of data loss.&lt;/p&gt;&lt;br /&gt;                &lt;/dd&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;              &lt;div class="alert"&gt;&lt;br /&gt;                &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                    &lt;tr&gt;&lt;br /&gt;                      &lt;th&gt;&lt;img alt="ms176064.note(en-US,SQL.90).gif" src="http://i.msdn.microsoft.com/ms176064.note%28en-US,SQL.90%29.gif" /&gt;Important: &lt;/th&gt;&lt;br /&gt;                    &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                    &lt;tr&gt;&lt;br /&gt;                      &lt;td&gt;Use the REPAIR options only as a last resort. To repair errors, we recommend restoring from a backup. Repair operations do not consider any of the constraints that may exist on or between tables. If the specified table is involved in one or more constraints, we recommend running DBCC CHECKCONSTRAINTS after a repair operation. If you must use REPAIR, run DBCC CHECKDB without a repair option to find the repair level to use. If you use the REPAIR_ALLOW_DATA_LOSS level, we recommend that you back up the database before you run DBCC CHECKDB with this option.&lt;br /&gt;                        &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                      &lt;/td&gt;&lt;br /&gt;                    &lt;/tr&gt;&lt;br /&gt;                  &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;                &lt;p&gt;&lt;/p&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;ALL_ERRORMSGS &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Displays all reported errors per object. In SQL Server 2005 Service Pack 3 (SP3), all error messages are displayed by default. Specifying or omitting this option has no effect. In earlier versions of SQL Server, only the first 200 error messages for each object are displayed if ALL_ERRORMSGS is not specified. Error messages are sorted by object ID, except for those messages generated from &lt;a id="ctl00_mainContentContainer_ctl57_ctl00_ctl02" href="http://msdn.microsoft.com/en-us/library/ms190768%28SQL.90,printer%29.aspx"&gt;tempdb database&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms190768(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;In SQL Server Management Studio, the maximum number of error messages returned is 1000. Using Management Studio, you may need to run DBCC CHECKDB multiple times to get a complete list of errors when ALL_ERRORMSGS is specified. We recommend that you run the DBCC command by using the &lt;a id="ctl00_mainContentContainer_ctl57_ctl00_ctl03" href="http://msdn.microsoft.com/en-us/library/ms162773%28SQL.90,printer%29.aspx"&gt;sqlcmd utility&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms162773(SQL.90).aspx ] or by scheduling a SQL Server Agent job to run the command and direct the output to a file. Either of these methods will ensure that running the command once will report all error messages.&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;NO_INFOMSGS &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Suppresses all informational messages. &lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;TABLOCK &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Causes DBCC CHECKDB to obtain locks instead of using an internal database snapshot. This includes a short-term exclusive (X) lock on the database. TABLOCK will cause DBCC CHECKDB to run faster on a database under heavy load, but decreases the concurrency available on the database while DBCC CHECKDB is running. For more information about locks, see &lt;a id="ctl00_mainContentContainer_ctl57_ctl00_ctl04" href="http://msdn.microsoft.com/en-us/library/ms175519%28SQL.90,printer%29.aspx"&gt;Lock Modes&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms175519(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;TABLOCK limits the checks that are performed; DBCC CHECKCATALOG is not run on the database, and Service Broker data is not validated.&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;ESTIMATEONLY &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Displays the estimated amount of &lt;strong&gt;tempdb&lt;/strong&gt; space that is required to run DBCC CHECKDB with all the other specified options. The actual database check is not performed.&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;PHYSICAL_ONLY &lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Limits the checking to the integrity of the physical structure of the page and record headers, the physical structure of B-trees, and the allocation consistency of the database. This check is designed to provide a small overhead check of the physical consistency of the database, but it can also detect torn pages, checksum failures, and common hardware failures that can compromise a user's data. PHYSICAL_ONLY always implies NO_INFOMSGS and is not allowed with any one of the repair options.&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;dl&gt;&lt;dt&gt;DATA_PURITY&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;              &lt;p&gt;Causes DBCC CHECKDB to check the database for column values that are not valid or out-of-range. For example, DBCC CHECKDB detects columns with date and time values that are larger than or less than the acceptable range for the &lt;strong&gt;datetime&lt;/strong&gt; data type; or &lt;strong&gt;decimal&lt;/strong&gt; or approximate-numeric data type columns with scale or precision values that are not valid.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;For databases created in SQL Server 2005, column-value integrity checks are enabled by default and do not require the DATA_PURITY option. For databases upgraded from earlier versions of SQL Server, column-value checks are not enabled by default until DBCC CHECKDB WITH DATA_PURITY has been run error free on the database. After this, DBCC CHECKDB checks column-value integrity by default. For more information about how CHECKDB might be affected by upgrading database from earlier versions of SQL Server, see the Remarks section later in this topic.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;If PHYSICAL_ONLY is specified, column-integrity checks are not performed.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;Validation errors reported by this option cannot be fixed by using DBCC repair options. For information about manually correcting these errors, see Knowledge Base article 923247: &lt;a id="ctl00_mainContentContainer_ctl57_ctl00_ctl05" href="http://support.microsoft.com/kb/923247"&gt;Troubleshooting DBCC error 2570 in &lt;yoono-highlight class="yoono-link-hover" keywords="SQL Server"&gt;SQL Server&lt;/yoono-highlight&gt; 2005&lt;/a&gt; [ http://support.microsoft.com/kb/923247.aspx ] .&lt;/p&gt;&lt;br /&gt;            &lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Result Sets &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="sectionToggle1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;DBCC CHECKDB returns the following result set. The values might vary except when the ESTIMATEONLY, PHYSICAL_ONLY, or NO_INFOMSGS options are specified:&lt;/p&gt;&lt;br /&gt;          &lt;span id="ctl00_mainContentContainer_ctl58_ctl00_ctl00"&gt;&lt;br /&gt;            &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl00_"&gt;&lt;br /&gt;              &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;              &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl00_code" space="preserve"&gt;DBCC results for 'model'.&lt;br /&gt;Service Broker Msg 9675, Level 10, State 1: Message Types analyzed: 13.&lt;br /&gt;Service Broker Msg 9676, Level 10, State 1: Service Contracts analyzed: 5.&lt;br /&gt;Service Broker Msg 9667, Level 10, State 1: Services analyzed: 3.&lt;br /&gt;Service Broker Msg 9668, Level 10, State 1: Service Queues analyzed: 3.&lt;br /&gt;Service Broker Msg 9669, Level 10, State 1: Conversation Endpoints analyzed: 0.&lt;br /&gt;Service Broker Msg 9674, Level 10, State 1: Conversation Groups analyzed: 0.&lt;br /&gt;Service Broker Msg 9670, Level 10, State 1: Remote Service Bindings analyzed: 0.&lt;br /&gt;DBCC results for 'sys.sysrowsetcolumns'.&lt;br /&gt;There are 630 rows in 7 pages for object 'sys.sysrowsetcolumns'.&lt;br /&gt;DBCC results for 'sys.sysrowsets'.&lt;br /&gt;There are 97 rows in 1 pages for object 'sys.sysrowsets'.&lt;br /&gt;DBCC results for 'sysallocunits'.&lt;br /&gt;There are 195 rows in 3 pages for object 'sysallocunits'.&lt;br /&gt;There are 0 rows in 0 pages for object &amp;quot;sys.sysasymkeys&amp;quot;.&lt;br /&gt;DBCC results for 'sys.syssqlguides'.&lt;br /&gt;There are 0 rows in 0 pages for object &amp;quot;sys.syssqlguides&amp;quot;.&lt;br /&gt;DBCC results for 'sys.queue_messages_1977058079'.&lt;br /&gt;There are 0 rows in 0 pages for object &amp;quot;sys.queue_messages_1977058079&amp;quot;.&lt;br /&gt;DBCC results for 'sys.queue_messages_2009058193'.&lt;br /&gt;There are 0 rows in 0 pages for object &amp;quot;sys.queue_messages_2009058193&amp;quot;.&lt;br /&gt;DBCC results for 'sys.queue_messages_2041058307'.&lt;br /&gt;There are 0 rows in 0 pages for object &amp;quot;sys.queue_messages_2041058307&amp;quot;.&lt;br /&gt;CHECKDB found 0 allocation errors and 0 consistency errors in database 'model'.&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/pre&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;DBCC CHECKDB returns the following result set (message) when NO_INFOMSGS is specified:&lt;/p&gt;&lt;br /&gt;          &lt;span id="ctl00_mainContentContainer_ctl58_ctl00_ctl01"&gt;&lt;br /&gt;            &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl01_"&gt;&lt;br /&gt;              &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;              &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl01_code" space="preserve"&gt;The command(s) completed successfully.&lt;/pre&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;DBCC CHECKDB returns the following result set when PHYSICAL_ONLY is specified:&lt;/p&gt;&lt;br /&gt;          &lt;span id="ctl00_mainContentContainer_ctl58_ctl00_ctl02"&gt;&lt;br /&gt;            &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl02_"&gt;&lt;br /&gt;              &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;              &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl02_code" space="preserve"&gt;DBCC results for 'model'.&lt;br /&gt;CHECKDB found 0 allocation errors and 0 consistency errors in database 'master'.&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/pre&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;DBCC CHECKDB returns the following result set when ESTIMATEONLY is specified.&lt;/p&gt;&lt;br /&gt;          &lt;span id="ctl00_mainContentContainer_ctl58_ctl00_ctl03"&gt;&lt;br /&gt;            &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl03_"&gt;&lt;br /&gt;              &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;              &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl58_ctl00_ctl03_code" space="preserve"&gt;Estimated TEMPDB space needed for CHECKALLOC (KB) &lt;br /&gt;------------------------------------------------- &lt;br /&gt;13&lt;br /&gt;&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;&lt;br /&gt;Estimated TEMPDB space needed for CHECKTABLES (KB) &lt;br /&gt;-------------------------------------------------- &lt;br /&gt;57&lt;br /&gt;&lt;br /&gt;(1 row(s) affected)&lt;br /&gt;&lt;br /&gt;DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/pre&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;          &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Remarks &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="remarksToggle"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;In earlier versions of SQL Server, the values for the per-table and per-index row count and page counts can become incorrect. Under certain circumstances, one or more of these values might even become negative. In SQL Server 2005, these values are always maintained correctly. Therefore, databases that are created on SQL Server 2005 should never contain incorrect counts; however, databases that are upgraded to SQL Server 2005 might. This is not a corruption of any data stored in the database. DBCC CHECKDB has been enhanced to detect when any one of these counts becomes negative. When negative counts are detected, the DBCC CHECKDB output contains a warning and a recommendation to run &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl00" href="http://msdn.microsoft.com/en-us/library/ms188414%28SQL.90,printer%29.aspx"&gt;DBCC UPDATEUSAGE&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188414(SQL.90).aspx ] to correct the issue. Although it may appear as if upgrading the database to SQL Server 2005 has caused this issue, the incorrect counts were present before the upgrade procedure. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;DBCC CHECKDB does not examine disabled indexes. For more information about disabled indexes, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl01" href="http://msdn.microsoft.com/en-us/library/ms177406%28SQL.90,printer%29.aspx"&gt;Disabling Indexes&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms177406(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;If a user-defined type is marked as being byte ordered, there must only be one serialization of the user-defined type. Not having a consistent serialization of byte-ordered user-defined types causes error 2537 when DBCC CHECKDB is run. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl02" href="http://msdn.microsoft.com/en-us/library/ms131082%28SQL.90,printer%29.aspx"&gt;User-Defined Type Requirements&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms131082(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;Because the &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl03" href="http://msdn.microsoft.com/en-us/library/ms190940%28SQL.90,printer%29.aspx"&gt;Resource database&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms190940(SQL.90).aspx ] is modifiable only in single-user mode, the DBCC CHECKDB command cannot be run on it directly. However, when DBCC CHECKDB is executed against the &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl04" href="http://msdn.microsoft.com/en-us/library/ms187837%28SQL.90,printer%29.aspx"&gt;master database&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms187837(SQL.90).aspx ] , a second CHECKDB is also run internally on the &lt;strong&gt;Resource&lt;/strong&gt; database. This means that DBCC CHECKDB can return extra results. The command returns extra result sets when no options are set, or when either the PHYSICAL_ONLY or ESTIMATEONLY option is set.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;In versions of SQL Server 2005 before SP2, executing DBCC CHECKDB clears the plan cache for the instance of SQL Server. Clearing the plan cache causes recompilation of all later execution plans and may cause a sudden, temporary decrease in query performance. In SP2, executing DBCC CHECKDB does not clear the plan cache.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Internal Database Snapshot&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;DBCC CHECKDB uses an internal database snapshot for the transactional consistency needed to perform these checks. This prevents blocking and concurrency problems when these commands are executed. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl05" href="http://msdn.microsoft.com/en-us/library/ms175823%28SQL.90,printer%29.aspx"&gt;Understanding Sparse File Sizes in Database Snapshots&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms175823(SQL.90).aspx ] and the DBCC Internal Database Snapshot Usage section in &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl06" href="http://msdn.microsoft.com/en-us/library/ms188796%28SQL.90,printer%29.aspx"&gt;DBCC (Transact-SQL)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188796(SQL.90).aspx ] . If a snapshot cannot be created, or TABLOCK is specified, DBCC CHECKDB acquires locks to obtain the required consistency. In this case, an exclusive database lock is required to perform the allocation checks, and shared table locks are required to perform the table checks.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;DBCC CHECKDB fails when run against &lt;strong&gt;master&lt;/strong&gt; if an internal database snapshot cannot be created.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;Running DBCC CHECKDB against &lt;strong&gt;tempdb&lt;/strong&gt; does not perform any allocation or catalog checks and must acquire shared table locks to perform table checks. This is because, for performance reasons, database snapshots are not available on &lt;strong&gt;tempdb&lt;/strong&gt;. This means that the required transactional consistency cannot be obtained.&lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Best Practices&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;In SQL Server 2005, running DBCC CHECKDB with no options may take considerably longer than in earlier versions. This behavior occurs for the following reasons:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;              &lt;li&gt;The logical checks introduced are more comprehensive.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;Some of the underlying structures to be checked are more complex.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;Many new checks have been introduced to include the new features in SQL Server 2005. &lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;Therefore, we recommend that you use the PHYSICAL_ONLY option for frequent use on production systems. Using PHYSICAL_ONLY can greatly shorten run-time for DBCC CHECKDB on large databases. We also recommend that you periodically run DBCC CHECKDB with no options. How frequently you should perform these runs depends on individual businesses and their production environments. &lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Checking Objects in Parallel&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;By default, DBCC CHECKDB performs parallel checking of objects. The degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like parallel queries. To restrict the maximum number of processors available for DBCC checking, use &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl07" href="http://msdn.microsoft.com/en-us/library/ms188787%28SQL.90,printer%29.aspx"&gt;sp_configure&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188787(SQL.90).aspx ] . For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl08" href="http://msdn.microsoft.com/en-us/library/ms181007%28SQL.90,printer%29.aspx"&gt;max degree of parallelism Option&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms181007(SQL.90).aspx ] . Parallel checking can be disabled by using trace flag 2528. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl09" href="http://msdn.microsoft.com/en-us/library/ms188396%28SQL.90,printer%29.aspx"&gt;Trace Flags (Transact-SQL)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188396(SQL.90).aspx ] .&lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Understanding DBCC Error Messages&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;After the DBCC CHECKDB command finishes, a message is written to the SQL Server error log. If the DBCC command successfully executes, the message indicates success and the amount of time that the command ran. If the DBCC command stops before completing the check because of an error, the message indicates that the command was terminated, a state value, and the amount of time the command ran. The following table lists and describes the state values that can be included in the message.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;h3 class="subHeading"&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;            &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;th&gt;State &lt;/th&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;th&gt;Description &lt;/th&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;0&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;Error number 8930 was raised. This indicates a corruption in metadata that terminated the DBCC command.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;1&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;Error number 8967 was raised. There was an internal DBCC error.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;2&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;A failure occurred during emergency mode database repair.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;3&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;This indicates a corruption in metadata that terminated the DBCC command.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;4&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;An assert or access violation was detected.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                &lt;tr&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;5&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;td&gt;&lt;br /&gt;                    &lt;p&gt;An unknown error occurred that terminated the DBCC command.&lt;/p&gt;&lt;br /&gt;                  &lt;/td&gt;&lt;br /&gt;                &lt;/tr&gt;&lt;br /&gt;              &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Error Reporting&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;In SQL Server 2005 Service Pack 1, a dump file (SQLDUMP&lt;em&gt;nnnn&lt;/em&gt;.txt) is created in the SQL Server LOG directory whenever DBCC CHECKDB detects a corruption error. When the Feature Usage data collection and Error Reporting features are enabled for the instance of SQL Server, the file is automatically forwarded to Microsoft. The collected data is used to improve SQL Server functionality. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl10" href="http://msdn.microsoft.com/en-us/library/ms144283%28SQL.90,printer%29.aspx"&gt;Error and Usage Report Settings&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms144283(SQL.90).aspx ] . &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;The dump file contains the results of the DBCC CHECKDB command and additional diagnostic output. Access is limited to the SQL Server service account and members of the &lt;strong&gt;sysadmin&lt;/strong&gt; role. By default, the &lt;strong&gt;sysadmin&lt;/strong&gt; role contains all members of the Windows BUILTIN\Administrators group and the local administrator's group. The DBCC command does not fail if the data collection process fails.&lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Resolving Errors&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;If any errors are reported by DBCC CHECKDB, we recommend restoring the database from the database backup instead of running REPAIR with one of the REPAIR options. If no backup exists, running repair corrects the errors reported. The repair option to use is specified at the end of the list of reported errors. However, correcting the errors by using the REPAIR_ALLOW_DATA_LOSS option might require deleting some pages, and therefore some data.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;Under some circumstances, values might be entered into the database that are not valid or out-of-range based on the data type of the column. In SQL Server 2000, DBCC CHECKDB does not perform range or integrity checks on these column values. However, in SQL Server 2005, DBCC CHECKDB can detect column values that are not valid for all column data types. Therefore, running DBCC CHECKDB with the DATA_PURITY option on databases that have been upgraded from earlier versions of SQL Server might reveal preexisting column-value errors. Because SQL Server 2005 cannot automatically repair these errors, the column value must be manually updated. If CHECKDB detects such an error, CHECKDB returns a warning, the error number 2570, and information to identify the affected row and manually correct the error. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;The repair can be performed under a user transaction to let the user roll back the changes that were made. If repairs are rolled back, the database will still contain errors and must be restored from a backup. After repairs are completed, back up the database.&lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Resolving Errors in Database Emergency Mode&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;When a database has been set to emergency mode by using the &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl11" href="http://msdn.microsoft.com/en-us/library/ms174269%28SQL.90,printer%29.aspx"&gt;ALTER DATABASE&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms174269(SQL.90).aspx ] statement, DBCC CHECKDB can perform some special repairs on the database if the REPAIR_ALLOW_DATA_LOSS option is specified. These repairs may allow for ordinarily unrecoverable databases to be brought back online in a physically consistent state. These repairs should be used as a last resort and only when you cannot restore the database from a backup. When the database is set to emergency mode, the database is marked READ_ONLY, logging is disabled, and access is limited to members of the &lt;strong&gt;sysadmin&lt;/strong&gt; fixed server role.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;div class="alert"&gt;&lt;br /&gt;              &lt;table&gt;&lt;tbody&gt;&lt;br /&gt;                  &lt;tr&gt;&lt;br /&gt;                    &lt;th&gt;&lt;img alt="ms176064.note(en-US,SQL.90).gif" src="http://i.msdn.microsoft.com/ms176064.note%28en-US,SQL.90%29.gif" /&gt;Note: &lt;/th&gt;&lt;br /&gt;                  &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;tr&gt;&lt;br /&gt;                    &lt;td&gt;You cannot run the DBCC CHECKDB command in emergency mode inside a user transaction and roll back the transaction after execution.&lt;br /&gt;                      &lt;p&gt;&lt;/p&gt;&lt;br /&gt;                    &lt;/td&gt;&lt;br /&gt;                  &lt;/tr&gt;&lt;br /&gt;                &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;              &lt;p&gt;&lt;/p&gt;&lt;br /&gt;            &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;When the database is in emergency mode and DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS clause is run, the following actions are taken:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;              &lt;li&gt;DBCC CHECKDB uses pages that have been marked inaccessible because of I/O or checksum errors, as if the errors have not occurred. Doing this increases the chances for &lt;yoono-highlight class="yoono-link-hover yoono-link-active-link" keywords="data recovery"&gt;data recovery&lt;/yoono-highlight&gt; from the database.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;DBCC CHECKDB attempts to recover the database using regular log-based recovery techniques.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;If, because of transaction log corruption, database recovery is unsuccessful, the transaction log is rebuilt. Rebuilding the transaction log may result in the loss of transactional consistency.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;If the DBCC CHECKDB command succeeds, the database is in a physically consistent state and the database status is set to ONLINE. However, the database may contain one or more transactional inconsistencies. We recommend that you run&lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl13" href="http://msdn.microsoft.com/en-us/library/ms189496%28SQL.90,printer%29.aspx"&gt; DBCC CHECKCONSTRAINTS&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms189496(SQL.90).aspx ] to identify any business logic flaws and immediately back up the database.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;If the DBCC CHECKDB command fails, the database cannot be repaired. &lt;/p&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;Running DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS in Replicated Databases&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;Running the DBCC CHECKDB command with the REPAIR_ALLOW_DATA_LOSS option can affect user databases (publication and subscription databases) and the distribution database used by replication. Publication and subscription databases include published tables and replication metadata tables. Be aware of the following potential issues in these databases:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;ul&gt;&lt;br /&gt;              &lt;li&gt;Published tables. Actions performed by the CHECKDB process to repair corrupt user data might not be replicated:&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                &lt;ul&gt;&lt;br /&gt;                  &lt;li&gt;Merge replication uses triggers to track changes to published tables. If rows are inserted, updated, or deleted by the CHECKDB process, triggers do not fire; therefore, the change is not replicated.&lt;br /&gt;                    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;                  &lt;li&gt;Transactional replication uses the transaction log to track changes to published tables. The Log Reader Agent then moves these changes to the distribution database. Some DBCC repairs, although logged, cannot be replicated by the Log Reader Agent. For example, if a data page is deallocated by the CHECKDB process, the Log Reader Agent does not translate this to a DELETE statement; therefore, the change is not replicated.&lt;br /&gt;                    &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;                &lt;/ul&gt;&lt;br /&gt;              &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;Replication metadata tables. Actions performed by the CHECKDB process to repair corrupt replication metadata tables require removing and reconfiguring replication.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;            &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;            &lt;p&gt;If you have to run the DBCC CHECKDB command with the REPAIR_ALLOW_DATA_LOSS option on a user database or distribution database:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;            &lt;ol&gt;&lt;br /&gt;              &lt;li&gt;Quiesce the system: Stop activity on the database and at all other databases in the replication topology, and then try to synchronize all nodes. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl14" href="http://msdn.microsoft.com/en-us/library/ms147385%28SQL.90,printer%29.aspx"&gt;How to: Quiesce a Replication Topology (Replication Transact-SQL Programming)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms147385(SQL.90).aspx ] .&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;Execute DBCC CHECKDB.&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;If the DBCC CHECKDB report includes repairs for any tables in the distribution database or any replication metadata tables in a user database, remove and reconfigure replication. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl15" href="http://msdn.microsoft.com/en-us/library/ms152757%28SQL.90,printer%29.aspx"&gt;Removing Replication&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms152757(SQL.90).aspx ] .&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;              &lt;li&gt;If the DBCC CHECKDB report includes repairs for any replicated tables, perform data validation to determine whether there are differences between the data in the publication and subscription databases. For more information, see &lt;a id="ctl00_mainContentContainer_ctl59_ctl00_ctl16" href="http://msdn.microsoft.com/en-us/library/ms151272%28SQL.90,printer%29.aspx"&gt;Data at the Publisher and Subscriber Do Not Match&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms151272(SQL.90).aspx ] .&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;            &lt;/ol&gt;&lt;br /&gt;          &lt;/div&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Permissions &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="sectionToggle2"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          &lt;p&gt;Requires membership in the &lt;strong&gt;sysadmin&lt;/strong&gt; fixed server role or the &lt;strong&gt;db_owner&lt;/strong&gt; fixed database role.&lt;/p&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; Examples &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="sectionToggle3"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;A. Checking both the current and the AdventureWorks databases&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;The following example executes &lt;code&gt;DBCC CHECKDB&lt;/code&gt; for the current database and for the &lt;code&gt;AdventureWorks&lt;/code&gt; database.&lt;/p&gt;&lt;br /&gt;            &lt;span id="ctl00_mainContentContainer_ctl61_ctl00_ctl00"&gt;&lt;br /&gt;              &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl61_ctl00_ctl00_"&gt;&lt;br /&gt;                &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                  &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;                &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;                &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                  &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl61_ctl00_ctl00_code" space="preserve"&gt;-- Check the current database.&lt;br /&gt;DBCC CHECKDB;&lt;br /&gt;GO&lt;br /&gt;-- Check the AdventureWorks database without nonclustered indexes.&lt;br /&gt;DBCC CHECKDB (AdventureWorks, NOINDEX);&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;                &lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h3 class="subHeading"&gt;B. Checking the current database, suppressing informational messages&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;          &lt;div class="subSection"&gt;&lt;br /&gt;            &lt;p&gt;The following example checks the current database and suppresses all informational messages.&lt;/p&gt;&lt;br /&gt;            &lt;span id="ctl00_mainContentContainer_ctl61_ctl00_ctl01"&gt;&lt;br /&gt;              &lt;div class="libCScode" id="ctl00_mainContentContainer_ctl61_ctl00_ctl01_"&gt;&lt;br /&gt;                &lt;div class="CodeSnippetTitleBar"&gt;&lt;br /&gt;                  &lt;div class="CodeDisplayLanguage"&gt;&lt;/div&gt;&lt;br /&gt;                &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;                &lt;div dir="ltr" style="background-color: rgb(221,221,221)"&gt;&lt;br /&gt;                  &lt;pre class="libCScode" id="ctl00_mainContentContainer_ctl61_ctl00_ctl01_code" space="preserve"&gt;DBCC CHECKDB WITH NO_INFOMSGS;&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;                &lt;/div&gt;&lt;br /&gt;              &lt;/div&gt;&lt;br /&gt;            &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;        &lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span&gt;&lt;br /&gt;      &lt;div class="MTPS_CollapsibleRegion"&gt;&lt;br /&gt;        &lt;div class="CollapseRegionLink"&gt;&lt;img class="LibC_o" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" src="http://i.msdn.microsoft.com/Global/Images/clear.gif" /&gt;&amp;#160; See Also &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;        &lt;div class="MTPS_CollapsibleSection" style="display: block"&gt;&lt;a id="seeAlsoToggle"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h4 class="subHeading"&gt;Reference&lt;/h4&gt;&lt;br /&gt;          &lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl00" href="http://msdn.microsoft.com/en-us/library/ms188796%28SQL.90,printer%29.aspx"&gt;DBCC (Transact-SQL)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms188796(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl01" href="http://msdn.microsoft.com/en-us/library/ms178568%28SQL.90,printer%29.aspx"&gt;sp_helpdb (Transact-SQL)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms178568(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl02" href="http://msdn.microsoft.com/en-us/library/ms179932%28SQL.90,printer%29.aspx"&gt;System Tables (Transact-SQL)&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms179932(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h4 class="subHeading"&gt;Other Resources&lt;/h4&gt;&lt;br /&gt;          &lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl03" href="http://msdn.microsoft.com/en-us/library/ms179276%28SQL.90,printer%29.aspx"&gt;Physical Database Architecture&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms179276(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl04" href="http://msdn.microsoft.com/en-us/library/ms175823%28SQL.90,printer%29.aspx"&gt;Understanding Sparse File Sizes in Database Snapshots&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms175823(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl05" href="http://msdn.microsoft.com/en-us/library/ms189274%28SQL.90,printer%29.aspx"&gt;Troubleshooting DBCC Errors on Indexed Views&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms189274(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl06" href="http://msdn.microsoft.com/en-us/library/ms175515%28SQL.90,printer%29.aspx"&gt;Optimizing DBCC CHECKDB Performance&lt;/a&gt; [ http://msdn.microsoft.com/en-us/library/ms175515(SQL.90).aspx ] &lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          &lt;h4 class="subHeading"&gt;Help and Information &lt;/h4&gt;&lt;br /&gt;          &lt;a id="ctl00_mainContentContainer_ctl62_ctl00_ctl07" href="http://msdn.microsoft.com/en-us/library/ms166016%28SQL.90,printer%29.aspx"&gt;Getting &lt;yoono-highlight class="yoono-link-hover" keywords="SQL Server"&gt;SQL Server&lt;/yoono-highlight&gt; 2005 Assistance &lt;/a&gt;[ http://msdn.microsoft.com/en-us/library/ms166016(SQL.90).aspx ] &lt;/div&gt;&lt;br /&gt;      &lt;/div&gt;&lt;br /&gt;    &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-6598754068724449233?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/6598754068724449233/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/sql-server-2005-books-online-november.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/6598754068724449233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/6598754068724449233'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/sql-server-2005-books-online-november.html' title='SQL Server 2005 Books Online (November 2008) DBCC CHECKDB (Transact-SQL)'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-388220509866505802</id><published>2010-02-15T15:42:00.001+07:00</published><updated>2010-02-15T15:42:04.958+07:00</updated><title type='text'>How to Configure Generic Connectivity (HSODBC) on Linux 32 bit using DB2Connect [ID 375624.1]</title><content type='html'>&lt;font face="helvetica"&gt;   &lt;br /&gt;    &lt;table cellspacing="6" cellpadding="0" width="100%" border="0"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" align="left" colspan="4"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;          &lt;td valign="top" colspan="2"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" align="left" colspan="6"&gt;           &lt;hr size="1" /&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign="top" width="25%" colspan="2"&gt;&amp;#160;&lt;/td&gt;          &lt;td valign="top" nowrap="nowrap" width="50%" colspan="3"&gt;&lt;em&gt;Modified&lt;/em&gt; 07-DEC-2009&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Type&lt;/em&gt; HOWTO&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/font&gt;  &lt;p&gt;&lt;b&gt;In this Document&lt;/b&gt;    &lt;br /&gt;&lt;font size="-1"&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=375624.1#GOAL"&gt;Goal&lt;/a&gt;      &lt;br /&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=375624.1#FIX"&gt;Solution&lt;/a&gt;      &lt;br /&gt;&amp;#160; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=375624.1#REF"&gt;References&lt;/a&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;hr size="1" /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;Applies to: &lt;/h2&gt; Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.5 - Release: to 10.2  &lt;br /&gt;Linux x86  &lt;br /&gt;***Checked for relevance on 07-Dec-2009***   &lt;h2 class="km"&gt;&lt;a name="GOAL"&gt;&lt;/a&gt;Goal&lt;/h2&gt;  &lt;p&gt;This note describes the setup of generic connectivity on Linux (32 bit) using DB2Connect and IBM ODBC driver to connect to a DB2 database. &lt;/p&gt;  &lt;p&gt;Please be aware that&amp;#160; HSODBC for Oracle on Linux 64bit is not available. You need to use Database Gateway for ODBC (DG4ODBC) 11g on this platform   &lt;br /&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;&lt;a name="FIX"&gt;&lt;/a&gt;Solution&lt;/h2&gt;  &lt;p&gt;How to Setup HSODBC (generic connectivity) on Linux using IBM ODBC driver included in DB2Connect.   &lt;br /&gt;    &lt;br /&gt;This note is divided into three different parts:     &lt;br /&gt;Part I describes how to set up the DBConnect and IBM's ODBC driver     &lt;br /&gt;Part II describes the configuration process of HSODBC     &lt;br /&gt;Part III describes dedicated HSODBC/ DB2 ODBC errors     &lt;br /&gt;    &lt;br /&gt;Part I: Setting up the ODBC driver     &lt;br /&gt;The odbc driver being used in this note is part of the DB2Connect package release 8.1 fixpack 12. The required ODBC Driver Manager is the driver manager from UnixODBC.    &lt;br /&gt;    &lt;br /&gt;Please install the DB2Connect package according to the installation instructions from IBM.    &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;The first step now is to configure the ODBC driver.    &lt;br /&gt;    &lt;br /&gt;- Configuring the odbc.ini file:     &lt;br /&gt;The ODBC.INI file for the IBM ODBC driver included in DB2 Connect is very simple and requires ONLY the Driver path:&lt;/p&gt;  &lt;p&gt;[toolsdb]    &lt;br /&gt;Driver = /home/db2inst1/sqllib/lib/libdb2.so&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;The ODBC DSN [toolsdb] refers to the database alias defined in the instance refered by by DB2INSTANCE parameter:    &lt;br /&gt;For example DB2INSTANCE environment variable is pointing to db2inst1, then connect as DB2 user (db2inst1) to this instance db2inst1 using utility &amp;quot;db2&amp;quot; and query the database aliases -&amp;gt; list database directory    &lt;br /&gt;db2 =&amp;gt; list database directory     &lt;br /&gt;System Database Directory     &lt;br /&gt;Number of entries in the directory = 2     &lt;br /&gt;Database 1 entry:     &lt;br /&gt;    &lt;br /&gt;Database alias = TOOLSDB     &lt;br /&gt;Database name = TOOLSDB     &lt;br /&gt;Node name = ZKU118     &lt;br /&gt;Database release level = a.00     &lt;br /&gt;Comment =     &lt;br /&gt;Directory entry type = Remote     &lt;br /&gt;Catalog database partition number = -1     &lt;br /&gt;Alternate server hostname =     &lt;br /&gt;Alternate server port number =    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;The Driver Manager unixODBC provides a test utility to test the ODBC connection to the DB2 database.   &lt;br /&gt;Make sure you have set DB2INSTANCE as environment variable to the DB2 database storing the network alias being refered in the ODBC.INI file.    &lt;br /&gt;In addition make sure environment variable ODBCINI is set and pointing to an odbc.ini file containing the db2 DSN.&lt;/p&gt;  &lt;p&gt;Then test: isql -v &amp;lt;username&amp;gt; &amp;lt;password&amp;gt; &amp;lt;DSN&amp;gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Part II: How to configure HSODBC     &lt;br /&gt;(This section assumes that everything is done in the Oracle user account     &lt;br /&gt;that starts the listener!)     &lt;br /&gt;    &lt;br /&gt;In general the following things must be configured:     &lt;br /&gt;1) listener     &lt;br /&gt;2) tnsnames     &lt;br /&gt;3) init&amp;lt;SID&amp;gt;.ora of the hs subsystem     &lt;br /&gt;4) environment     &lt;br /&gt;5) Oracle database     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;1) The listener needs a new SID entry like the following:     &lt;br /&gt;(SID_DESC =     &lt;br /&gt;(ORACLE_HOME = /oracle/product/10.2.0.1.0)     &lt;br /&gt;(SID_NAME = hsdb2udb)     &lt;br /&gt;(PROGRAM = hsodbc)     &lt;br /&gt;(ENVS=LD_LIBRARY_PATH=/oracle/product/10.2.0.1.0/lib:/home/db2inst1/sqllib/lib:/usr/lib)    &lt;br /&gt;    &lt;br /&gt;Please correct the ORACLE_HOME entry and the ENVS entry according to your installation.     &lt;br /&gt;    &lt;br /&gt;The LD_LIBRARY_PATH in the listener.ora contains the Oracle library directory (32 bit), the location of the ODBC Driver Manager (/usr/lib) and the DB2 library path.    &lt;br /&gt;    &lt;br /&gt;The listener must be STOPPED and STARTED after changing the listener.ora! Please do not perform a restart of the listener.     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;2) The tnsnames.ora needs an entry for the HSODBC alias:     &lt;br /&gt;db2.de.oracle.com=     &lt;br /&gt;&amp;#160; (DESCRIPTION =     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (ADDRESS_LIST =     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (ADDRESS = (PROTOCOL = TCP)(HOST = kgronau-pc)(PORT = 15102))     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; )     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (CONNECT_DATA =     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (SERVICE_NAME = hsdb2udb)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; )     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (HS = OK)     &lt;br /&gt;&amp;#160;&amp;#160; )     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;The domain of the tns alias can differ from the one used above (de.oracle.com),     &lt;br /&gt;depending on the parameter in the sqlnet.ora:     &lt;br /&gt;NAMES.DEFAULT_DOMAIN = de.oracle.com     &lt;br /&gt;    &lt;br /&gt;But the important entry is the (HS=OK) key word. The (HS=OK) parameter must be outside the SID section and specifies that this connector uses the Oracle Heterogeneous Service Option.     &lt;br /&gt;Net Configuration Assistant/ Database Creation Assistant might remove entries like (HS=) from your tnsnames.ora file; so please make sure (HS=OK) is used!     &lt;br /&gt;    &lt;br /&gt;After adding the tnsnames alias and stopping/starting the listener, a connectivity check is to use tnsping &amp;lt;alias&amp;gt;.     &lt;br /&gt;tnsping hsodbc     &lt;br /&gt;should come back with a successfull message.     &lt;br /&gt;    &lt;br /&gt;3) init.ora of the gateway:     &lt;br /&gt;The SID to use HS functionality is called in this example hsdb2udb. There are some restrictions how to name the SID (described in the Net Administrators Guide in detail).     &lt;br /&gt;At this place only a short note: don't use dots in the SID and keep it short!     &lt;br /&gt;    &lt;br /&gt;The SID is also relevant for the init.ora file of the gateway. The name of the     &lt;br /&gt;file is init&amp;lt;SID&amp;gt;.ora. In this example it is called inithsdb2udb.ora.     &lt;br /&gt;The file is located at $ORACLE_HOME/hs/admin.     &lt;br /&gt;It should contain the following entries:     &lt;br /&gt;#     &lt;br /&gt;# HS init parameters     &lt;br /&gt;#     &lt;br /&gt;#     &lt;br /&gt;# HS init parameters     &lt;br /&gt;#     &lt;br /&gt;HS_FDS_CONNECT_INFO = toolsdb     &lt;br /&gt;HS_FDS_TRACE_LEVEL = debug     &lt;br /&gt;HS_FDS_SHAREABLE_NAME = /usr/lib/libodbc.so     &lt;br /&gt;    &lt;br /&gt;#     &lt;br /&gt;# ODBC specific environment variables     &lt;br /&gt;#     &lt;br /&gt;set ODBCINI=/etc/odbc.ini     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;#     &lt;br /&gt;# Environment variables required for the non-Oracle system     &lt;br /&gt;#     &lt;br /&gt;set DB2INSTANCE=db2inst1     &lt;br /&gt;    &lt;br /&gt;Short explanation of the parameters:     &lt;br /&gt;HS_FDS_CONNECT_INFO points to the ODBC DSN configured in PART I of this note.     &lt;br /&gt;HS_FDS_SHAREABLE_NAME points to the ODBC Driver Manager library; in our case the unixODBC Driver Manager    &lt;br /&gt;&amp;#160; &lt;br /&gt;The set ODBCINI=/InformixSDK/etc/odbc.ini points to the location of an odbc.ini file you want to use with this hsodbc configuration.     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;set DB2INSTANCE=db2inst1 points to the DB2 instance containing the database alias for the DB2 database.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;4) Configuring the Oracle database     &lt;br /&gt;The only thing that must be done here is to create a database link:     &lt;br /&gt;connect with the username/password that has sufficient rights to create a     &lt;br /&gt;database link (i.e. system).     &lt;br /&gt;The syntax is:     &lt;br /&gt;create [public] database link &amp;lt;name&amp;gt;     &lt;br /&gt;connect to &amp;lt;UID&amp;gt; identified by &amp;lt;pwd&amp;gt; using '&amp;lt;tnsalias&amp;gt;';     &lt;br /&gt;    &lt;br /&gt;In other words, to connect to the DB2 database the syntax must be:     &lt;br /&gt;CREATE DATABASE LINK db2     &lt;br /&gt;CONNECT TO &amp;quot;&amp;lt;valid DB2 user name&amp;gt;&amp;quot; IDENTIFIED BY &amp;quot;&amp;lt;valid password for this DB2 user&amp;gt;&amp;quot; USING 'db2.de.oracle.com';     &lt;br /&gt;    &lt;br /&gt;The db link name is db2. Username and password must be in double quotes, because the username and password of the DB2 database might be case sensitive. 'db2.de.oracle.com' points to the alias in the tnsnames.ora file that calls the HS subsystem.     &lt;br /&gt;    &lt;br /&gt;If everything is configured well, a select of a DB2 table or the DUAL table which is then translated by HSODBC should be successful:     &lt;br /&gt;    &lt;br /&gt;select user from &lt;a href="mailto:dual@db2"&gt;dual@db2&lt;/a&gt;;     &lt;br /&gt;...     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Part III: Informix/HSODBC related errors     &lt;br /&gt;Common errors are coverd in a separate note:'     &lt;br /&gt;Note.234517.1 Ext/Pub How to Resolve Common Errors Encountered while using Transparent Gateways or Generic Connectivity     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Problems that might occur using DB2 ODBC driver: &lt;/p&gt;  &lt;p&gt;&lt;u&gt;Problem 1:     &lt;br /&gt;&lt;/u&gt;Enabling ODBC tracing:&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Solution 1:     &lt;br /&gt;&lt;/u&gt;ODBC tracing for the IBM ODBC driver is enabled by adding into the COMMON section of the db2cli.ini file:    &lt;br /&gt;[COMMON]     &lt;br /&gt;Trace=1     &lt;br /&gt;TraceFileName=/tmp/db2_odbc.trc&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Problem 2:     &lt;br /&gt;&lt;/u&gt;ORA-28500: connection from ORACLE to a non-Oracle system returned this message:     &lt;br /&gt;[Generic Connectivity Using ODBC]DRV_GetRows: errors.h (1094): ;     &lt;br /&gt;[unixODBC][IBM][CLI Driver] CLI0165E Error in row.     &lt;br /&gt;SQLSTATE=01S01[unixODBC][IBM][CLI Driver] CLI0002W Data truncated.     &lt;br /&gt;SQLSTATE=01004[unixODBC][IBM][CLI Driver] CLI0002W Data truncated.     &lt;br /&gt;SQLSTATE=01004 (SQL State: 01004; SQL Code: -99999)     &lt;br /&gt;ORA-02063: preceding 2 lines from HSDB2UDB&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;The Oracle database is using a UNICODE character set, the column content matches the column precison&amp;#160; and the table contains at least one character, for example&amp;#160; German letters with diaeresis like ÜÖÄ.     &lt;br /&gt;For example the column is defined as a char(2) and it contains for example the value 'ÖB'     &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Solution 2:&lt;/u&gt;    &lt;br /&gt;The DB2 ODBC driver is per default using the character set of the application for the connection; see ODBC trace file:    &lt;br /&gt;SQLDriverConnect( hDbc=0:1, hwnd=0:0, szConnStrIn=&amp;quot;DSN=toolsdb;UID=db2;PWD=***&amp;quot;,     &lt;br /&gt;cbConnStrIn=-3, szConnStrOut=&amp;amp;bfffd0e0, cbConnStrOutMax=1020, pcbConnStrOut=&amp;amp;bf     &lt;br /&gt;ffd0de, fDriverCompletion=SQL_DRIVER_NOPROMPT )     &lt;br /&gt;---&amp;gt; Time elapsed - +5.600000E-005 seconds     &lt;br /&gt;( DBMS NAME=&amp;quot;DB2/NT&amp;quot;, Version=&amp;quot;08.02.0000&amp;quot;, Fixpack=&amp;quot;0x23010106&amp;quot; )     &lt;br /&gt;( Application Codepage=1208, Database Codepage=1252, Char Send/Recv Codepage=12     &lt;br /&gt;08, Graphic Send/Recv Codepage=1200 )&lt;/p&gt;  &lt;p&gt;Codepage 1208 is a unicode codepage.    &lt;br /&gt;HSODBC uses the BYTE NLS_LENGTH_SEMANTICS to transfer values from the foreign database to Oracle; a char(2) is then represented by char (2 bytes).     &lt;br /&gt;In a unicode codepage the 'Ö' is represented by 2 bytes, 'B' in one byte = 3 bytes.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;To avoid this behaviour the environment variable&amp;#160; DB2CODEPAGE can be set to any 8 bit character set which will then intialize the ODBC connection using the character set specified by&amp;#160; DB2CODEPAGE.&lt;/p&gt;  &lt;p&gt;As HSODBC does not know how to interprete the characters fetched from the DB2 database, in addition to the DB2CODEPAGE the HS_LANGUAGE must be set in the init&amp;lt;hsodbc&amp;gt;.ora file:&lt;/p&gt;  &lt;p&gt;...   &lt;br /&gt;set DB2INSTANCE=db2inst1     &lt;br /&gt;set DB2CODEPAGE=819     &lt;br /&gt;HS_LANGUAGE=american_america.we8iso8859P1&lt;/p&gt;  &lt;p&gt;HS_LANGUAGE must be set to a character set which matches the DB2CODEPAGE character set. An overview of those matching characters can be found at:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.borgendale.com/codepage/j2conv.htm"&gt;http://www.borgendale.com/codepage/j2conv.htm&lt;/a&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;&lt;a name="REF"&gt;&lt;/a&gt;References&lt;/h2&gt; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=234517.1&amp;amp;type=NOT"&gt;NOTE:234517.1&lt;/a&gt; - How to Resolve Common Errors Encountered while using Transparent Gateways or Generic Connectivity  &lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=374744.1&amp;amp;type=NOT"&gt;NOTE:374744.1&lt;/a&gt; - Using a Gateway with a Unicode Oracle Database Increases the Column Precision Three Times for Certain Data Types  &lt;br /&gt;  &lt;br /&gt;  &lt;table width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td colspan="2"&gt;         &lt;p&gt;&lt;img id="collapseImg2" style="cursor: pointer" alt="Show Related Information" src="https://support.oracle.com/CSP/images/collapse_white.png" /&gt; &lt;b&gt;Related&lt;/b&gt;            &lt;br /&gt;&lt;/p&gt;          &lt;div id="collapsibleRelatedData" style="display: inline; margin-left: 20px; width: 100%"&gt;           &lt;hr size="1" /&gt;&lt;b style="margin-left: 20px"&gt;Products&lt;/b&gt;             &lt;hr style="margin-left: 20px" size="1" /&gt;            &lt;ul&gt;             &lt;li&gt;Oracle Database Products &amp;gt; Oracle Database &amp;gt; Oracle Database &amp;gt; Oracle Server - Enterprise Edition &lt;/li&gt;           &lt;/ul&gt;           &lt;b style="margin-left: 20px"&gt;Errors&lt;/b&gt;             &lt;hr style="margin-left: 20px" size="1" /&gt;            &lt;table style="margin-left: 30px" cellspacing="2" cellpadding="0" border="0"&gt;&lt;tbody&gt;               &lt;tr&gt;                 &lt;td valign="top"&gt;ORA-2063; ORA-28500&lt;/td&gt;               &lt;/tr&gt;             &lt;/tbody&gt;&lt;/table&gt;         &lt;/div&gt;          &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-388220509866505802?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/388220509866505802/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-configure-generic-connectivity.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/388220509866505802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/388220509866505802'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/02/how-to-configure-generic-connectivity.html' title='How to Configure Generic Connectivity (HSODBC) on Linux 32 bit using DB2Connect [ID 375624.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-4423772720103229729</id><published>2010-01-14T17:04:00.002+07:00</published><updated>2010-01-14T17:09:08.270+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Discoverer'/><title type='text'>How To Use The Discoverer 'collectlogs' Utility [ID 259815.1]</title><content type='html'>&lt;span style="font-family:helvetica;"&gt;  &lt;br /&gt;   &lt;table border="0" cellpadding="0" cellspacing="6" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td colspan="4" align="left" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;          &lt;td colspan="2" valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="6" align="left" valign="top"&gt;           &lt;hr size="1"&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="2" valign="top" width="25%"&gt; &lt;/td&gt;          &lt;td colspan="3" nowrap="nowrap" valign="top" width="50%"&gt;&lt;em&gt;Modified&lt;/em&gt; 16-OCT-2008     &lt;em&gt;Type&lt;/em&gt; TROUBLESHOOTING     &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;p&gt;&lt;b&gt;In this Document&lt;/b&gt;   &lt;br /&gt;&lt;span style="font-size:-1;"&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=259815.1#PURPOSE"&gt;Purpose&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=259815.1#LASTREVIEW"&gt;Last Review Date&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=259815.1#ADDINFO"&gt;&lt;span class="OraTipLabel"&gt;&lt;em&gt;Instructions for the Reader&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=259815.1#TRBLSHOOT"&gt;Troubleshooting Details&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=259815.1#REF"&gt;References&lt;/a&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;hr size="1"&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;Applies to: &lt;/h2&gt; Oracle Discoverer - Version: 4.1.48.06 to 10.1.2.3 &lt;br /&gt;MS Windows 2000 &lt;br /&gt;Solaris Operating System (SPARC) &lt;br /&gt;Microsoft Windows 2000Solaris Operating System (SPARC 32-bit)   &lt;h2 class="km"&gt;&lt;a name="PURPOSE"&gt;&lt;/a&gt;Purpose&lt;/h2&gt; This document is intended for Discoverer Administrators and proxies (DBA, Application Server Administrators) to explain how to run the Collect Logs Utility for Discoverer and provide additional details to the documentation. &lt;br /&gt;&lt;br /&gt;http://download-west.oracle.com/docs/html/B13918_03/tshoot.htm#i1028801 &lt;br /&gt;D.2.9 How to copy Discoverer log files &lt;br /&gt;&lt;br /&gt;* The tool is present in $ORACLE_HOME/discoverer/util/ and is called collectlogs.sh in Unix/Linux or collectLogs.bat in the case of MS Windows. &lt;br /&gt;* The tool will collect the middle tier Discoverer diagnostics and environment information and can useful for Oracle Support investigations. &lt;br /&gt; &lt;h2 class="km"&gt;&lt;a name="LASTREVIEW"&gt;&lt;/a&gt;Last Review Date&lt;/h2&gt; May 29, 2004   &lt;h2 class="km"&gt;&lt;a name="ADDINFO"&gt;&lt;/a&gt;&lt;span class="OraTipLabel"&gt;&lt;em&gt;Instructions for the Reader&lt;/em&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;div id="troubleshootingDescr" class="OraTipText"&gt;&lt;em&gt;A Troubleshooting Guide is provided to assist in debugging a specific issue. When possible, diagnostic tools are included in the document to assist in troubleshooting.&lt;/em&gt;&lt;/div&gt;  &lt;h2 class="km"&gt;&lt;a name="TRBLSHOOT"&gt;&lt;/a&gt;Troubleshooting Details&lt;/h2&gt; &lt;strong&gt;How to run CollectLogs on Discoverer 10g (10.1.2):&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;1. Connect to the Discoverer middle-tier. &lt;br /&gt;2. Navigate to: $OH/discoverer &lt;br /&gt;3. For Linux/Unix, set your environment by running: . discwb.sh &lt;br /&gt;Not relevant for Windows. &lt;br /&gt;4. Navigate to $OH/discoverer/util &lt;br /&gt;5. For Linux/Unix run: collectlogs.sh &amp;lt;disco_logs.tar&amp;gt; &lt;br /&gt;The &amp;lt;disco_logs.tar&amp;gt; parameter will be the output name of the file produced by the script. &lt;br /&gt;6. For Windows run: collectlogs.bat &lt;br /&gt;&lt;br /&gt;Additional information about how the script operates: &lt;br /&gt;&lt;br /&gt;* Linux/Unix: A temporary folder called "discologs" is created in the util folder, all the files in this folder and its subfolders are merged into discologs.tar and the folder is removed. &lt;br /&gt;* Windows a folder called collectlogs is created in the util folder and it contains all the files collected. &lt;br /&gt;* Collectlogs will prompt asking for the EUL owner connect string and system TNS connect string. This is required to connect the database and collect database and EUL specific information. &lt;br /&gt;* The tool collects: &lt;br /&gt;o Discoverer log and configuration files &lt;br /&gt;o Application Server log and configuration files &lt;br /&gt;o Operating System server and environment information (CPU, memory, environment variables etc.) &lt;br /&gt;o database and EUL information (db version, parameters, EUL objects export etc.).  &lt;br /&gt;* When collectlogs finishes, there is a file called &amp;lt;tarfile&amp;gt;.tar or on Windows a folder called collectlogs in the $ORACLE_HOME/discoverer/util directory. &lt;br /&gt;&lt;br /&gt;It could have a larg size,so it is recommended zip the file before uploading to support. &lt;br /&gt;For example, on Unix run: zip &amp;lt;zipfile&amp;gt;.zip &amp;lt;tarfile&amp;gt;.tar &lt;br /&gt;* The file 'loglist.txt' file is an index of all the collected files listed by folder. &lt;br /&gt;For example: &lt;br /&gt;&lt;br /&gt; &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;&amp;lt;Day Name&amp;gt; &amp;lt;Month&amp;gt; &amp;lt;day number&amp;gt; &amp;lt;timestamp&amp;gt; &lt;br /&gt;    &lt;br /&gt;collectlogs tool has collected the following files in     &lt;br /&gt;&amp;lt;$OH&amp;gt;/discoverer/util/discologs.tar     &lt;br /&gt;    &lt;br /&gt;-rw-r----- 1 ias904 dba 159 Sep 5 17:42 loglist.txt     &lt;br /&gt;    &lt;br /&gt;Apache:     &lt;br /&gt;total 124     &lt;br /&gt;-rwxr-x--x 1 ias904 dba 348 Sep 5 17:36 access.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 491 Sep 5 17:36 aqxml.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 1749 Sep 5 17:36 dms.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 40704 Sep 5 17:36 httpd.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 2534 Sep 5 17:36 mod_oc4j.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 906 Sep 5 17:36 mod_osso.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 1078 Sep 5 17:36 oracle_apache.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 407 Sep 5 17:36 setupinfo.txt     &lt;br /&gt;-rwxr-x--x 1 ias904 dba 357 Sep 5 17:36 srm.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 8047 Sep 5 17:36 ssl.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 ssl_engine_log     &lt;br /&gt;-rw-r----- 1 ias904 dba 259 Sep 5 17:36 wireless_modrewrite.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 940 Sep 5 17:36 wireless_ohs.conf     &lt;br /&gt;    &lt;br /&gt;checkdiscoverer:     &lt;br /&gt;total 2     &lt;br /&gt;-rw-r----- 1 ias904 dba 434 Sep 5 17:36 diag.log     &lt;br /&gt;    &lt;br /&gt;config:     &lt;br /&gt;total 134     &lt;br /&gt;-rw-r----- 1 ias904 dba 466 Sep 5 17:36 application.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 14540 Sep 5 17:36 blaf.css     &lt;br /&gt;-rw-r----- 1 ias904 dba 6047 Sep 5 17:36 blaf.htm     &lt;br /&gt;-rw-r----- 1 ias904 dba 3217 Sep 5 17:36 configuration.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 2967 Sep 5 17:36 discoverer.xsl     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 1376 Sep 5 17:36 discwb.sh     &lt;br /&gt;-rw-r----- 1 ias904 dba 2719 Sep 5 17:36 graphproperties.xss     &lt;br /&gt;-rw-r----- 1 ias904 dba 428 Sep 5 17:36 impl_rep     &lt;br /&gt;-rw-r----- 1 ias904 dba 612 Sep 5 17:36 oadutil.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 1938 Sep 5 17:36 orion-application.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 1515 Sep 5 17:36 osfind.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 8710 Sep 5 17:36 plus_config.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 13119 Sep 5 17:36 ui_config.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 2179 Sep 5 17:36 Versions.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 1524 Sep 5 17:36 web.xml     &lt;br /&gt;    &lt;br /&gt;db:     &lt;br /&gt;total 1310     &lt;br /&gt;-rw-r----- 1 ias904 dba 69766 Sep 5 17:42 dbinfo.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 574778 Sep 5 17:37 eul.eex     &lt;br /&gt;-rw-r----- 1 ias904 dba 2459 Sep 5 17:37 eul.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 6844 Sep 5 17:38 eulinfo.txt     &lt;br /&gt;    &lt;br /&gt;dcm:     &lt;br /&gt;total 4     &lt;br /&gt;-rw-r----- 1 ias904 dba 180 Sep 5 17:36 dcm.conf     &lt;br /&gt;drwxr-x--- 6 ias904 dba 512 Sep 5 17:36 logs     &lt;br /&gt;    &lt;br /&gt;dcm/logs:     &lt;br /&gt;total 8     &lt;br /&gt;drwxr-x--- 2 ias904 dba 512 Sep 5 17:36 busrule_logs     &lt;br /&gt;drwxr-x--- 2 ias904 dba 512 Sep 5 17:36 daemon_logs     &lt;br /&gt;drwxr-x--x 2 ias904 dba 512 Sep 5 17:36 dcmctl_logs     &lt;br /&gt;drwxr-x--x 2 ias904 dba 512 Sep 5 17:36 emd_logs     &lt;br /&gt;    &lt;br /&gt;dcm/logs/busrule_logs:     &lt;br /&gt;total 0     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 clustermanagement_busrule.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 deployment_busrule.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 localEdit_busrule.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 smi_busrule.log     &lt;br /&gt;    &lt;br /&gt;dcm/logs/daemon_logs:     &lt;br /&gt;total 20     &lt;br /&gt;-rw-r----- 1 ias904 dba 9666 Sep 5 17:36 log.xml     &lt;br /&gt;    &lt;br /&gt;dcm/logs/dcmctl_logs:     &lt;br /&gt;total 6     &lt;br /&gt;-rw-r----- 1 ias904 dba 2139 Sep 5 17:36 log.xml     &lt;br /&gt;    &lt;br /&gt;dcm/logs/emd_logs:     &lt;br /&gt;total 0     &lt;br /&gt;    &lt;br /&gt;ldap:     &lt;br /&gt;total 10     &lt;br /&gt;-rw-r----- 1 ias904 dba 66 Sep 5 17:36 das.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 159 Sep 5 17:36 groupattrs.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 33 Sep 5 17:36 groupobjclasses.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 181 Sep 5 17:36 oiddas.conf     &lt;br /&gt;-rw-r----- 1 ias904 dba 178 Sep 5 17:36 oiddas.properties     &lt;br /&gt;    &lt;br /&gt;midtier:     &lt;br /&gt;total 178     &lt;br /&gt;-rw-r----- 1 ias904 dba 2967 Sep 5 17:36 env.txt     &lt;br /&gt;-r--r----- 1 ias904 dba 136 Sep 5 17:36 hosts     &lt;br /&gt;-rw-r----- 1 ias904 dba 1121 Sep 5 17:36 ias.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 373 Sep 5 17:36 infratool.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 16255 Sep 5 17:36 install.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 2551 Sep 5 17:36 midtier.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 1203 Sep 5 17:36 portlist.ini     &lt;br /&gt;-rw-r----- 1 ias904 dba 48639 Sep 5 17:36 showrev.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 265 Sep 5 17:36 sqlnet.ora     &lt;br /&gt;-rw-r----- 1 ias904 dba 12271 Sep 5 17:36 tnsnames.ora     &lt;br /&gt;    &lt;br /&gt;OC4J_BI_Forms:     &lt;br /&gt;total 302     &lt;br /&gt;-rw-r----- 1 ias904 dba 125411 Sep 5 17:36 application.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 3217 Sep 5 17:36 configuration.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 969 Sep 5 17:36 data-sources.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 default-web-access.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 2113 Sep 5 17:36 global-application.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 508 Sep 5 17:36 jms.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 403 Sep 5 17:36 oc4j.properties     &lt;br /&gt;-rw-r----- 1 ias904 dba 1016 Sep 5 17:36 rmi.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 1637 Sep 5 17:36 server.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 1524 Sep 5 17:36 web.xml     &lt;br /&gt;    &lt;br /&gt;OC4J_Portal:     &lt;br /&gt;total 28     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 default-web-access.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 9980 Sep 5 17:36 global-application.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 508 Sep 5 17:36 jms.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 1016 Sep 5 17:36 rmi.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 1631 Sep 5 17:36 server.log     &lt;br /&gt;    &lt;br /&gt;opmn:     &lt;br /&gt;total 220     &lt;br /&gt;-rw-r----- 1 ias904 dba 25942 Sep 5 17:36 Discoverer~OAD~1     &lt;br /&gt;-rw-r----- 1 ias904 dba 153 Sep 5 17:36 Discoverer~OSAgent~1     &lt;br /&gt;-rw-r----- 1 ias904 dba 597 Sep 5 17:36 Discoverer~PreferenceServer~1     &lt;br /&gt;-rw-r----- 1 ias904 dba 20589 Sep 5 17:36 ipm.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 6810 Sep 5 17:36 OC4J~OC4J_BI_Forms~default_island~1     &lt;br /&gt;-rw-r----- 1 ias904 dba 23645 Sep 5 17:36 OC4J~OC4J_Portal~default_island~1     &lt;br /&gt;-rw-r----- 1 ias904 dba 14731 Sep 5 17:36 ons.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 378 Sep 5 17:36 opmn.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 13370 Sep 5 17:36 opmn.xml     &lt;br /&gt;    &lt;br /&gt;server:     &lt;br /&gt;total 0     &lt;br /&gt;    &lt;br /&gt;util:     &lt;br /&gt;total 144     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 375 Sep 5 17:36 applypreferences.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 749 Sep 5 17:36 checkdiscoverer.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 7797 Sep 5 17:36 collectlogs.sh     &lt;br /&gt;-rw-r----- 1 ias904 dba 366 Sep 5 17:36 core.txt     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 12088 Sep 5 17:36 defaults.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 434 Sep 5 17:36 diag.log     &lt;br /&gt;-rw-r----- 1 ias904 dba 0 Sep 5 17:36 error.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 571 Sep 5 17:36 exportDiscovererPortlet.sh     &lt;br /&gt;-rw-r----- 1 ias904 dba 898 Sep 5 17:36 importDiscovererPortlet.sh     &lt;br /&gt;-rw-r----- 1 ias904 dba 9877 Sep 5 17:36 loglist.txt     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 863 Sep 5 17:36 logparam.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 570 Sep 5 17:36 migrateprefs.sh     &lt;br /&gt;-rw-r----- 1 ias904 dba 468 Sep 5 17:36 oadj.ior     &lt;br /&gt;-rw-r----- 1 ias904 dba 488 Sep 5 17:36 oadj_ior.txt     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 454 Sep 5 17:36 oadlist.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 516 Sep 5 17:36 osfind.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 12088 Sep 5 17:36 pref.txt     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 788 Sep 5 17:36 registerall.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 1368 Sep 5 17:36 registersession.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 550 Sep 5 17:36 restartoad.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 429 Sep 5 17:36 runses.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 210 Sep 5 17:36 ServerLogParams.txt     &lt;br /&gt;-rw-r----- 1 ias904 dba 1272 Sep 5 17:36 sqlnet.log     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 366 Sep 5 17:36 startall.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 1716 Sep 5 17:36 startoad.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 990 Sep 5 17:36 startosagent.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 1010 Sep 5 17:36 startpreference.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 683 Sep 5 17:36 stopall.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 921 Sep 5 17:36 stopoad.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 810 Sep 5 17:36 stoposagent.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 772 Sep 5 17:36 stoppreference.sh     &lt;br /&gt;-rwxr-x--- 1 ias904 dba 747 Sep 5 17:36 unregistersession.sh     &lt;br /&gt;    &lt;br /&gt;webcache:     &lt;br /&gt;total 3000     &lt;br /&gt;-rw-r----- 1 ias904 dba 1493512 Sep 5 17:36 access_log     &lt;br /&gt;-rw-r----- 1 ias904 dba 12030 Sep 5 17:36 event_log     &lt;br /&gt;-rw------- 1 ias904 dba 1665 Sep 5 17:36 internal.xml     &lt;br /&gt;-rw------- 1 ias904 dba 11454 Sep 5 17:36 webcache.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 500 Sep 5 17:36 webcache_opmn.xml     &lt;br /&gt;-rw-r----- 1 ias904 dba 1015 Sep 5 17:36 webcachetargets.xml     &lt;br /&gt;    &lt;br /&gt;xsl:     &lt;br /&gt;total 528     &lt;br /&gt;-rw-r----- 1 ias904 dba 12227 Sep 5 17:36 export.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 30947 Sep 5 17:36 lov_param_multiple_select.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 15119 Sep 5 17:36 lov_param_single_select.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 20023 Sep 5 17:36 parameters.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 40051 Sep 5 17:36 preferences.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 34172 Sep 5 17:36 presentation_options.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 5427 Sep 5 17:36 responsibility_list.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 14219 Sep 5 17:36 run_query_confirmation.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 10724 Sep 5 17:36 sorting.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 16186 Sep 5 17:36 workbook_list.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 51423 Sep 5 17:36 worksheet_display.xsl     &lt;br /&gt;-rw-r----- 1 ias904 dba 13858 Sep 5 17:36 worksheet_layout.xsl&lt;/code&gt;&lt;/div&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How To Run CollectLogs on Desupported Discoverer versions:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Note: Since the following versions are desupported, the following information is provided for information only. The information may or may not be updated or reviewed by Oracle Support for relevancy or accuracy. &lt;br /&gt;&lt;br /&gt;* Discoverer 10g r1 (9.0.4): Run the same as 10g (10.1.2) &lt;br /&gt;* Discoverer 9i (9.0.2): The script did not ship with the product. You may run the script below on Linux/Unix the same as 10g for your own review since the product is desupported. &lt;br /&gt;* Discoverer 4i (4.1.48.08): This tool is shipped with 4.1.48 patch set and later, but works with any Discoverer 4.1 version. These are run in the same manner as the 10g scripts above; however, the script names are different: &lt;br /&gt;1. Connect to the Discoverer middle-tier. &lt;br /&gt;2. Navigate to: $OH/discwb4 &lt;br /&gt;3. For Linux/Unix, set your environment by running: . discwb.sh &lt;br /&gt;Not relevant for Windows. &lt;br /&gt;4. Navigate to $OH/discwb4/util &lt;br /&gt;5. For Linux/Unix run: collectlogs4i.sh &amp;lt;disco_logs.tar&amp;gt; &lt;br /&gt;The &amp;lt;disco_logs.tar&amp;gt; parameter will be the output name of the file produced by the script. &lt;br /&gt;6. For Windows a working collectlogs script does not exist. &lt;br /&gt;&lt;br /&gt; &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;[script begins below line] - Discoverer 9i (9.0.2)    &lt;br /&gt;===============================================================================     &lt;br /&gt;#!/bin/ksh     &lt;br /&gt;# Copyright (c) 2002 by Oracle Corporation. All Rights Reserved     &lt;br /&gt;#     &lt;br /&gt;#     &lt;br /&gt;#     &lt;br /&gt;# NAME     &lt;br /&gt;# collectlogs.sh     &lt;br /&gt;# FUNCTION     &lt;br /&gt;# collect system info, iAS and Discoverer configutation and log files     &lt;br /&gt;# NOTES     &lt;br /&gt;#     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;CURR_DIR=$PWD     &lt;br /&gt;    &lt;br /&gt;. $ORACLE_HOME/discoverer902/discwb.sh     &lt;br /&gt;OH=$ORACLE_HOME     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;if [ $# -le 0 ]     &lt;br /&gt;then     &lt;br /&gt;echo "Usage:collectlogs.sh &amp;lt;tarname&amp;gt;"     &lt;br /&gt;echo " specify the tar file name to put the log files into"     &lt;br /&gt;exit -1     &lt;br /&gt;fi     &lt;br /&gt;    &lt;br /&gt;COLLECT_DIR_NAME=$1     &lt;br /&gt;mkdir -p $COLLECT_DIR_NAME     &lt;br /&gt;cd $COLLECT_DIR_NAME     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;echo "Collecting FND Log Files"     &lt;br /&gt;if test "$FND_DEBUG_DIR" = ""     &lt;br /&gt;then     &lt;br /&gt;echo "Unable to find FND_DEBUG_DIR "     &lt;br /&gt;else     &lt;br /&gt;mkdir fnd     &lt;br /&gt;cd fnd     &lt;br /&gt;cp $FND_DEBUG_DIR/* .     &lt;br /&gt;cd ..     &lt;br /&gt;fi     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting util folder files"     &lt;br /&gt;mkdir util     &lt;br /&gt;cd util     &lt;br /&gt;cp $OH/discoverer902/util/*.sh .     &lt;br /&gt;cp $OH/discoverer902/util/*.log .     &lt;br /&gt;cp $OH/discoverer902/util/*.txt .     &lt;br /&gt;cp $OH/discoverer902/util/*.ior .     &lt;br /&gt;$OH/vbroker4/bin/printIOR oadj.ior &amp;gt; oadj_ior.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "Core file in the $ORACLE_HOME/discoverer902/util " "\n" &amp;gt; core.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ ls -l $OH/discoverer902/util/core" &amp;gt;&amp;gt; core.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;ls -l $OH/discoverer902/util/core &amp;gt;&amp;gt; core.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ file $OH/discoverer902/util/core" &amp;gt;&amp;gt; core.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;file $OH/discoverer902/util/core &amp;gt;&amp;gt; core.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;echo "Collecting other discoverer config files"     &lt;br /&gt;mkdir config     &lt;br /&gt;cd config     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/common/xsl/blaf.css .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/common/xsl/blaf.htm .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/WEB-INF/configuration.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/common/xsl/discoverer.xsl .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/plus_files/xsl/plus_config.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/common/xsl/ui_config.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/WEB-INF/web.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/application-deployments/discoverer/orion-application.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/META-INF/application.xml .     &lt;br /&gt;cp $OH/discoverer902/discwb.sh .     &lt;br /&gt;cp $OH/discoverer902/bin/.reg/.reg* .     &lt;br /&gt;cp $OH/vbroker4/adm/impl_dir/impl_rep .     &lt;br /&gt;echo "Discoverer Versions - Binaries and Libraries" "\n" &amp;gt; Versions.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;strings $OH/discoverer902/bin/dis51?? |grep "Discoverer Version" &amp;gt;&amp;gt; Versions.txt     &lt;br /&gt;strings $OH/discoverer902/lib/lib*.so |grep "Discoverer Version" &amp;gt;&amp;gt; Versions.txt     &lt;br /&gt;echo "\n" "$ ls -l $OH/discoverer902/bin/dis51* " &amp;gt;&amp;gt; Versions.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;ls -l $OH/discoverer902/bin/dis51* &amp;gt;&amp;gt; Versions.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ ls -l $OH/discoverer902/lib " &amp;gt;&amp;gt; Versions.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;ls -l $OH/discoverer902/lib &amp;gt;&amp;gt; Versions.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "Running Command oadutil list -VBJprop vbroker.agent.port=$OSAGENT_PORT"     &lt;br /&gt;oadutil list -VBJprop vbroker.agent.port=$OSAGENT_PORT &amp;gt; oadutil.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "Running Command osfind -VBJprop vbroker.agent.port=$OSAGENT_PORT"     &lt;br /&gt;osfind -VBJprop vbroker.agent.port=$OSAGENT_PORT &amp;gt; osfind.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting xsl discoverer config files"     &lt;br /&gt;mkdir xsl     &lt;br /&gt;cd xsl     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/viewer_files/xsl/* .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting Middle Tier environment info"     &lt;br /&gt;mkdir midtier     &lt;br /&gt;cd midtier     &lt;br /&gt;env &amp;gt; env.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;cp $OH/install/portlist.ini .     &lt;br /&gt;cp $OH/assistants/opca/install.log .     &lt;br /&gt;cp $OH/config/ias.properties .     &lt;br /&gt;cp $OH/config/infratool.properties .     &lt;br /&gt;echo "Middle Tier Server" "\n" &amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "$ uname -a" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;uname -a &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ /usr/sbin/psrinfo -v" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;/usr/sbin/psrinfo -v &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ /usr/sbin/prtconf | grep Memory" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;/usr/sbin/prtconf | grep Memory &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ df -k $OH" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;df -k $OH &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ ulimit -a" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;ulimit -a &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ umask" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;umask &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "PATH = "$PATH &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "LD_LIBRARY_PATH = " $LD_LIBRARY_PATH &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "$ /usr/sbin/ifconfig -a" &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;/usr/sbin/ifconfig -a &amp;gt;&amp;gt; midtier.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;    &lt;br /&gt;showrev -p &amp;gt;&amp;gt; showrev.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;    &lt;br /&gt;if test "$TNS_ADMIN" = ""     &lt;br /&gt;then     &lt;br /&gt;cp $OH/network/admin/sqlnet.ora .     &lt;br /&gt;cp $OH/network/admin/tnsnames.ora .     &lt;br /&gt;else     &lt;br /&gt;cp $TNS_ADMIN/sqlnet.ora .     &lt;br /&gt;cp $TNS_ADMIN/tnsnames.ora .     &lt;br /&gt;fi     &lt;br /&gt;    &lt;br /&gt;echo "Copying /etc/hosts "     &lt;br /&gt;cp /etc/hosts .     &lt;br /&gt;    &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting Apache config and log files"     &lt;br /&gt;mkdir Apache     &lt;br /&gt;cd Apache     &lt;br /&gt;cp $OH/Apache/Apache/logs/*_log .     &lt;br /&gt;cp $OH/Apache/Apache/conf/*.conf .     &lt;br /&gt;cp $OH/Apache/Apache/setupinfo.txt .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting OC4J_BI_Forms config and log files"     &lt;br /&gt;mkdir OC4J_BI_Forms     &lt;br /&gt;cd OC4J_BI_Forms     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/log/OC4J_BI_Forms_default_island_1/* .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/application-deployments/discoverer/OC4J_BI_Forms_default_island_1/* .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/config/data-sources.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/WEB-INF/configuration.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/applications/discoverer/web/WEB-INF/web.xml .     &lt;br /&gt;cp $OH/j2ee/OC4J_BI_Forms/config/oc4j.properties .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting OC4J_Portal log files"     &lt;br /&gt;mkdir OC4J_Portal     &lt;br /&gt;cd OC4J_Portal     &lt;br /&gt;cp $OH/j2ee/OC4J_Portal/log/OC4J_Portal_default_island_1/*.log .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting OPMN config and log files"     &lt;br /&gt;mkdir opmn     &lt;br /&gt;cd opmn     &lt;br /&gt;cp $OH/opmn/conf/opmn.xml .     &lt;br /&gt;cp $OH/opmn/logs/*.log .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting WebCache config and log files"     &lt;br /&gt;mkdir webcache     &lt;br /&gt;cd webcache     &lt;br /&gt;cp $OH/webcache/*.xml .     &lt;br /&gt;cp $OH/webcache/logs/*_log .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting DCM config file"     &lt;br /&gt;mkdir dcm     &lt;br /&gt;cd dcm     &lt;br /&gt;cp $OH/dcm/config/dcm.conf .     &lt;br /&gt;cp -rf $OH/dcm/logs/ .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;echo "Collecting LDAP config file"     &lt;br /&gt;mkdir ldap     &lt;br /&gt;cd ldap     &lt;br /&gt;cp $OH/ldap/das/*.properties .     &lt;br /&gt;cp $OH/ldap/das/*.conf .     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;clear     &lt;br /&gt;echo "Collecting Database and EUL info"     &lt;br /&gt;echo "Insert EUL owner connect string: "     &lt;br /&gt;echo "Username: \c"     &lt;br /&gt;read eulowner     &lt;br /&gt;echo "Password: \c"     &lt;br /&gt;stty -echo     &lt;br /&gt;read password     &lt;br /&gt;stty echo     &lt;br /&gt;echo "\nDatabase: \c"     &lt;br /&gt;read database     &lt;br /&gt;echo "\n"     &lt;br /&gt;mkdir db     &lt;br /&gt;cd db     &lt;br /&gt;echo "Getting EUL and db info..."     &lt;br /&gt;$OH/bin/sqlplus $eulowner/$password@$database @$OH/discoverer902/util/dbinfo.sql     &lt;br /&gt;cd ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;echo "Listing all the collected logs into loglist.txt"     &lt;br /&gt;date &amp;gt; loglist.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo "\n" "collectlogs tool has collected the following files in " &amp;gt;&amp;gt; loglist.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;echo $CURR_DIR/$COLLECT_DIR_NAME.tar "\n" &amp;gt;&amp;gt; loglist.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;ls -lR * &amp;gt;&amp;gt; loglist.txt 2&amp;gt;&amp;amp;1     &lt;br /&gt;cp loglist.txt ..     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;cd ..     &lt;br /&gt;    &lt;br /&gt;tar cvf $COLLECT_DIR_NAME.tar $COLLECT_DIR_NAME     &lt;br /&gt;echo "Removing the temp directory $COLLECT_DIR_NAME"     &lt;br /&gt;rm -rf $COLLECT_DIR_NAME     &lt;br /&gt;echo "ALL the informations are available in "     &lt;br /&gt;echo $CURR_DIR/$COLLECT_DIR_NAME.tar     &lt;br /&gt;echo "loglist.txt lists the collected files"     &lt;br /&gt;echo "Done."     &lt;br /&gt;    &lt;br /&gt;===============================================================================     &lt;br /&gt;[script ends above line] &lt;br /&gt;&lt;/code&gt;&lt;/div&gt; &lt;br /&gt; &lt;h2 class="km"&gt;&lt;a name="REF"&gt;&lt;/a&gt;References&lt;/h2&gt; &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=228524.1&amp;amp;type=NOT"&gt;NOTE:228524.1&lt;/a&gt; - How To Use Discoverer 'checkdiscoverer' Utility in 4.1 release &lt;br /&gt; &lt;hr /&gt; &lt;br /&gt;&lt;br /&gt; &lt;table width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td colspan="2"&gt;         &lt;p&gt;&lt;/p&gt;      &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-4423772720103229729?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/4423772720103229729/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-use-discoverer-utility-id.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4423772720103229729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/4423772720103229729'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-use-discoverer-utility-id.html' title='How To Use The Discoverer &amp;#39;collectlogs&amp;#39; Utility [ID 259815.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-8458833915309199756</id><published>2010-01-14T17:00:00.002+07:00</published><updated>2010-01-14T17:01:13.725+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Discoverer'/><title type='text'>How To Enable Tracing For Discoverer 10g (10.1) Portlet Issues [ID 370337.1]</title><content type='html'>&lt;span style="font-family:helvetica;"&gt;  &lt;br /&gt;   &lt;table border="0" cellpadding="0" cellspacing="6" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td colspan="4" align="left" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;          &lt;td colspan="2" valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="6" align="left" valign="top"&gt;           &lt;hr size="1"&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="2" valign="top" width="25%"&gt; &lt;/td&gt;          &lt;td colspan="3" nowrap="nowrap" valign="top" width="50%"&gt;&lt;em&gt;Modified&lt;/em&gt; 09-OCT-2008     &lt;em&gt;Type&lt;/em&gt; TROUBLESHOOTING     &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;p&gt;&lt;b&gt;In this Document&lt;/b&gt;   &lt;br /&gt;&lt;span style="font-size:-1;"&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=370337.1#GOAL"&gt;Goal&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=370337.1#FIX"&gt;Solution&lt;/a&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;hr size="1"&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;Applies to: &lt;/h2&gt; Oracle Discoverer - Version: 10.1.2 to 10.1.2 &lt;br /&gt;Information in this document applies to any platform. &lt;br /&gt; &lt;h2 class="km"&gt;&lt;a name="GOAL"&gt;&lt;/a&gt;Goal&lt;/h2&gt; Explain in simple steps, how to create a diagnostic trace for Discoverer 10g (10.1.2) PortletProvider to diagnost portlet issues or provide to Oracle Support.   &lt;h2 class="km"&gt;&lt;a name="FIX"&gt;&lt;/a&gt;Solution&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;Stop the middle-tier (opmnctl stopall) or OC4J_BI_Forms and Discoverer at a minimum.    &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Delete (or rename and delete if you prefer to keep) the applicaion.log file:    &lt;br /&gt;$ORACLE_HOME/j2ee/OC4J_BI_Forms/application-deployments/discoverer/OC4J_BI_Forms_default_island_1/application.log     &lt;br /&gt;    &lt;br /&gt;Note: you will have one applicaton.log for each JVM you have configured.     &lt;br /&gt;For example:OC4J_BI_Forms_default_island_1, OC4J_BI_Forms_default_island_2     &lt;br /&gt;    &lt;br /&gt;Use the following command to find all the Discoverer application.log(s).     &lt;br /&gt;    &lt;br /&gt;cd $ORACLE_HOME     &lt;br /&gt;find . -name 'application.log' | grep discoverer     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Set the PortletProvider logLevel to "trace" and diagnostic framework logkey to "disco.portlet.debug".    &lt;br /&gt;Edit: $ORACLE_HOME/discoverer/config/configuration.xml     &lt;br /&gt;    &lt;br /&gt;     &lt;div class="kmcodeblock"&gt;&lt;code class="km"&gt;change line:        &lt;br /&gt;FROM:         &lt;br /&gt;&amp;lt;!-- Portlet Provider configuration. --&amp;gt;         &lt;br /&gt;&amp;lt;portlet logKey="disco.portlet.fatal" logLevel="error" pickerCompatibleVersions="10.1.2" maxDataRows="1000"&amp;gt;         &lt;br /&gt;        &lt;br /&gt;TO:         &lt;br /&gt;&amp;lt;!-- Portlet Provider configuration. --&amp;gt;         &lt;br /&gt;&amp;lt;portlet logKey="disco.portlet.&lt;u&gt;&lt;strong&gt;debug&lt;/strong&gt;&lt;/u&gt;" logLevel="&lt;u&gt;&lt;strong&gt;trace&lt;/strong&gt;&lt;/u&gt;" pickerCompatibleVersions="10.1.2" maxDataRows="1000"&amp;gt;         &lt;br /&gt;        &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;Start the middle-tier (opmnctl startall) or stopped components.    &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Immediately reproduce the problem.    &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Review or upload the application.log    &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;hr /&gt; &lt;br /&gt;&lt;br /&gt; &lt;table width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td colspan="2"&gt;         &lt;p&gt; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-8458833915309199756?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/8458833915309199756/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-enable-tracing-for-discoverer.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8458833915309199756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/8458833915309199756'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-enable-tracing-for-discoverer.html' title='How To Enable Tracing For Discoverer 10g (10.1) Portlet Issues [ID 370337.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-2200934051413807376</id><published>2010-01-14T16:57:00.002+07:00</published><updated>2010-01-14T16:59:34.700+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Discoverer'/><title type='text'>How To Verify Your Discoverer 10g Session (dis51ws) and Preference (dis51pr) Executables Respond Properly [ID 561165.1]</title><content type='html'>&lt;span style="font-family:helvetica;"&gt;  &lt;br /&gt;   &lt;table border="0" cellpadding="0" cellspacing="6" width="100%"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td colspan="4" align="left" valign="top"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/td&gt;          &lt;td colspan="2" valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="6" align="left" valign="top"&gt;           &lt;hr size="1"&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td colspan="2" valign="top" width="25%"&gt; &lt;/td&gt;          &lt;td colspan="3" nowrap="nowrap" valign="top" width="50%"&gt;&lt;em&gt;Modified&lt;/em&gt; 19-MAR-2009     &lt;em&gt;Type&lt;/em&gt; TROUBLESHOOTING     &lt;em&gt;Status&lt;/em&gt; PUBLISHED&lt;/td&gt;          &lt;td valign="top"&gt; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/span&gt;  &lt;p&gt;&lt;b&gt;In this Document&lt;/b&gt;   &lt;br /&gt;&lt;span style="font-size:-1;"&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=561165.1#PURPOSE"&gt;Purpose&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=561165.1#LASTREVIEW"&gt;Last Review Date&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=561165.1#ADDINFO"&gt;&lt;span class="OraTipLabel"&gt;&lt;em&gt;Instructions for the Reader&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;     &lt;br /&gt;  &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=NOT&amp;amp;id=561165.1#TRBLSHOOT"&gt;Troubleshooting Details&lt;/a&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;hr size="1"&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2 class="km"&gt;Applies to: &lt;/h2&gt; Oracle Discoverer - Version: 10.1.2.0.0 to 10.1.2.3 &lt;br /&gt;Information in this document applies to any platform. &lt;br /&gt; &lt;h2 class="km"&gt;&lt;a name="PURPOSE"&gt;&lt;/a&gt;Purpose&lt;/h2&gt; This document describes how to check your Discoverer 10g (10.1.2) middle-tier session (di51ws) and preference (dis51pr) executables to ensure they are responding properly. &lt;br /&gt;&lt;br /&gt;This is a helpful check if you get errors when starting the Discoverer components via the Oracle Process Manager Notification (OPMN) service or you receive errors when accessing Discoverer Plus or Viewer (possibly after a patch application or some other system change). &lt;br /&gt; &lt;h2 class="km"&gt;&lt;a name="LASTREVIEW"&gt;&lt;/a&gt;Last Review Date&lt;/h2&gt; April 7, 2008   &lt;h2 class="km"&gt;&lt;a name="ADDINFO"&gt;&lt;/a&gt;&lt;span class="OraTipLabel"&gt;&lt;em&gt;Instructions for the Reader&lt;/em&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;div id="troubleshootingDescr" class="OraTipText"&gt;&lt;em&gt;A Troubleshooting Guide is provided to assist in debugging a specific issue. When possible, diagnostic tools are included in the document to assist in troubleshooting.&lt;/em&gt;&lt;/div&gt;  &lt;h2 class="km"&gt;&lt;a name="TRBLSHOOT"&gt;&lt;/a&gt;Troubleshooting Details&lt;/h2&gt; &lt;strong&gt;Unix / Linux:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt; &lt;ol&gt;   &lt;li&gt;Set your environment middle-tier environment ($ORACLE_HOME)    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;export ORACLE_HOME=&amp;lt;middle-tier path&amp;gt;        &lt;br /&gt;To verify: echo $ORACLE_HOME &lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Type: &lt;span class="kmfixedwidthfont"&gt;cd $ORACLE_HOME/discoverer      &lt;br /&gt;      &lt;br /&gt;&lt;/span&gt;&lt;span class="kmfixedwidthfont"&gt;&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;Set the Discoverer environment by running:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;$. ./discwb.sh  (notice: dot&amp;lt;space&amp;gt;dot&amp;lt;slash&amp;gt;scriptname        &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Type: &lt;span class="kmfixedwidthfont"&gt;cd $ORACLE_HOME/bin&lt;/span&gt;      &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Check the permissions with the following command:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;$ ls -ltr dis51*        &lt;br /&gt;        &lt;br /&gt;-rwxr-x---   1 oracle   oinstall   44372603 Feb 13 17:49 dis51ws         &lt;br /&gt;-rwxr-x---   1 oracle   oinstall    1540376 Feb 13 17:49 dis51pr         &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;Ensure that dis51ws and dis51pr both have proper execute permissions.  If they do not, then grant them with:     &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;chmod 750 dis51ws        &lt;br /&gt;chmod 750 dis51pr         &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Check that the Discoverer session server responds with the following command:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;Type: ./dis51ws&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;    &lt;br /&gt;You should see an output similar to the following:     &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;$ ./dis51ws        &lt;br /&gt;Registering SessionManager         &lt;br /&gt;Setting up the Operation Mode and Application Name         &lt;br /&gt;Setting the creator of DCSThreadMonitor         &lt;br /&gt;Starting the memory manager&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;The executable will appear to hang at this point. This is normal since we are not passing it any further parameters.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;To exit the test, type:  &lt;span class="kmfixedwidthfont"&gt;Control + C&lt;/span&gt; on the keyboard.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Check that the Discoverer preference server responds with the following command:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;Type: ./dis51pr        &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;You should see an output similar to the following:     &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;$ ./dis51pr        &lt;br /&gt;Creating Preference Repository:         &lt;br /&gt;Activating Preference Repository         &lt;br /&gt;Preference Repository is ready...         &lt;br /&gt;IOR:000000000000001a49444c3a444349434f524241496e746572666163653a312e30000000000000010000000000000090000102000000001b6f726c6473732d61697830312e75732e6f7261636c652e636f6d000094ee00000000003114010f004e555000000014000000000000000100446973636f7665726572000000000000000001507265666572656e63650000000000000200000000000000080000000054414f0000000001000000140000000000010001000000000001010900000000&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;The executable will appear to hang at this point. This is normal since we are not passing it any further parameters.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;To exit the test, type: &lt;span class="kmfixedwidthfont"&gt;Control + C&lt;/span&gt; on the keyboard.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;You have verified the executables are responding properly.&lt;/li&gt; &lt;/ol&gt; &lt;br /&gt;&lt;strong&gt;Windows:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt; &lt;ol&gt;   &lt;li&gt;Open a DOS prompt.    &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Set the ORACLE_HOME    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;set oracle_home=&amp;lt;middle-tier path&amp;gt;        &lt;br /&gt;To verify: echo %oracle_home%         &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Type: &lt;span class="kmfixedwidthfont"&gt;cd %oracle_home%\bin&lt;/span&gt;      &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Check that the Discoverer session server responds with the following command:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;prompt&amp;gt;dis51ws.exe&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;    &lt;br /&gt;You should see an output similar to the following:     &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;C:\bihome\bin&amp;gt;dis51ws        &lt;br /&gt;Registering SessionManager         &lt;br /&gt;Setting up the Operation Mode and Application Name         &lt;br /&gt;Setting the creator of DCSThreadMonitor         &lt;br /&gt;Starting the memory manager         &lt;br /&gt;&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;To exit the test, type: &lt;span class="kmfixedwidthfont"&gt;Control + C&lt;/span&gt; on the keyboard.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Check that the Discoverer preference server responds with the following command:    &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;promt&amp;gt;dis51pr.exe&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;You should see an output similar to the following:     &lt;br /&gt;    &lt;br /&gt;     &lt;div style="width: 95%;" class="kmcodeblock"&gt;&lt;code class="km"&gt;C:\bihome\bin&amp;gt;dis51pr        &lt;br /&gt;Creating Preference Repository:         &lt;br /&gt;Activating Preference Repository         &lt;br /&gt;Preference Repository is ready...         &lt;br /&gt;IOR:010000001a00000049444c3a444349434f524241496e746572666163653a312e3000000001000000000000008c000000010102001a0000006f72         &lt;br /&gt;6c6473732d323030332e75732e6f7261636c652e636f6d009a083100000014010f004e555000000014000000000100000000446973636f7665726572         &lt;br /&gt;000000000001000000507265666572656e636500000002000000000000000800000001000000004f4154010000001400000001000000010001000000         &lt;br /&gt;00000901010000000000&lt;/code&gt;&lt;/div&gt;     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;To exit the test, type: &lt;span class="kmfixedwidthfont"&gt;Control + C&lt;/span&gt; on the keyboard.     &lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;You have verified the executables are responding properly.    &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt; &lt;br /&gt; &lt;hr /&gt; &lt;br /&gt;&lt;br /&gt; &lt;table width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td colspan="2"&gt;         &lt;p&gt;&lt;/p&gt;      &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-2200934051413807376?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/2200934051413807376/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-verify-your-discoverer-10g.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/2200934051413807376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/2200934051413807376'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-verify-your-discoverer-10g.html' title='How To Verify Your Discoverer 10g Session (dis51ws) and Preference (dis51pr) Executables Respond Properly [ID 561165.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-5691933976871652095</id><published>2010-01-13T16:31:00.002+07:00</published><updated>2010-01-13T16:34:32.939+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle RDBMS'/><title type='text'>How to Relink Oracle Database Software on UNIX [ID 131321.1]</title><content type='html'>&lt;font face="helvetica"&gt;   &lt;br /&gt;&lt;/font&gt;  &lt;pre&gt;&lt;font face="Courier New, Courier, mono"&gt;&lt;br /&gt;PURPOSE&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;Provide relinking instructions for Oracle Database software&lt;br /&gt;on UNIX platforms.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;SCOPE &amp;amp; APPLICATION&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;Anyone who maintains Oracle RDBMS software on a UNIX platform.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Relinking Oracle&lt;br /&gt;================&lt;br /&gt;&lt;br /&gt;Background:&lt;br /&gt;Applications for UNIX are generally not distributed as complete executables.  &lt;br /&gt;Oracle, like many application vendors who create products for UNIX, distribute &lt;br /&gt;individual object files, library archives of object files, and some source &lt;br /&gt;files which then get &amp;quot;relinked&amp;quot; at the operating system level during &lt;br /&gt;installation to create usable executables.  This guarantees a reliable&lt;br /&gt;integration with functions provided by the OS system libraries.&lt;br /&gt;&lt;br /&gt;Relinking occurs automatically under these circumstances:&lt;br /&gt;&lt;br /&gt; - An Oracle product has been installed with an Oracle provided installer.&lt;br /&gt; - An Oracle patch set has been applied via an Oracle provided installer.  &lt;br /&gt;&lt;br /&gt;The following information has been added to the 'Certify' section of Metalink:&lt;br /&gt;&lt;br /&gt;   General Notes For Oracle Database - Enterprise Edition:&lt;br /&gt;   O/S Information: &lt;br /&gt;   The vendors guarantee operating system binary compatibility; therefore, no &lt;br /&gt;   reinstall or relink of the Oracle software is required when upgrading these&lt;br /&gt;   operating systems unless specifically stated otherwise.&lt;br /&gt;&lt;br /&gt;Relinking Oracle manually is suggested under the following circumstances&lt;br /&gt;(even though the OS vendor may not require it):&lt;br /&gt;&lt;br /&gt; - An OS upgrade has occurred.&lt;br /&gt; - A change has been made to the OS system libraries.  This can occur during &lt;br /&gt;   the application of an OS patch.&lt;br /&gt; - A new install failed during the relinking phase.&lt;br /&gt; - Individual Oracle executables core dump during initial startup.&lt;br /&gt; - An individual Oracle patch has been applied (however, explicit relink &lt;br /&gt;   instructions are usually either included in the README or integrated into &lt;br /&gt;   the patch install script) &lt;br /&gt;&lt;br /&gt;Customers who want to (or have been advised to) manually relink should follow &lt;br /&gt;the procedure below.&lt;br /&gt;&lt;br /&gt;[Step 1] Log into the UNIX system as the Oracle software owner&lt;br /&gt;==============================================================================&lt;br /&gt;Typically this is the user 'oracle'.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;[STEP 2] Verify that your $ORACLE_HOME is set correctly:&lt;br /&gt;===============================================================================&lt;br /&gt;For all Oracle Versions and Platforms, perform this basic environment check &lt;br /&gt;first:&lt;br /&gt; &lt;br /&gt; % cd $ORACLE_HOME&lt;br /&gt; % pwd    &lt;br /&gt;&lt;br /&gt; ...Doing this will ensure that $ORACLE_HOME is set correctly in your current &lt;br /&gt;    environment.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;[Step 3] Verify and/or Configure the UNIX Environment for Proper Relinking:&lt;br /&gt;===============================================================================&lt;br /&gt;For all Oracle Versions and UNIX Platforms:&lt;br /&gt; The Platform specific environment variables LIBPATH, LD_LIBRARY_PATH, &amp;amp; &lt;br /&gt; SHLIB_PATH typically are already set to include system library locations like&lt;br /&gt; '/usr/lib'.  In most cases, you need only check what they are set to first, &lt;br /&gt; then add the $ORACLE_HOME/lib directory to them where appropriate.&lt;br /&gt; i.e.:  % setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}&lt;br /&gt; (see &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=131207.1&amp;amp;type=NOT"&gt;Note:131207.1&lt;/a&gt; How to Set UNIX Environment Variables for help with &lt;br /&gt; setting UNIX environment variables)&lt;br /&gt;&lt;br /&gt;If on AIX with:&lt;br /&gt;--------------&lt;br /&gt;    &lt;br /&gt;    NOTE: Before relinking, after stopping all required processes, issue the&lt;br /&gt;    following as root to detach all files from memory that are not attached &lt;br /&gt;    to an active process:&lt;br /&gt;&lt;br /&gt;         # /usr/sbin/slibclean&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X:&lt;br /&gt;       - Set LIBPATH to include $ORACLE_HOME/lib&lt;br /&gt;    &lt;br /&gt;    Oracle 8.0.X:&lt;br /&gt;       - Set LIBPATH to include $ORACLE_HOME/lib&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib and &lt;br /&gt;         $ORACLE_HOME/network/lib (Required when using Oracle products that &lt;br /&gt;         use Java)&lt;br /&gt;       - Set LINK_CNTRL to L_PTHREADS_D7 if using AIX 4.3. ('oslevel' verifies &lt;br /&gt;         OS version)&lt;br /&gt;    &lt;br /&gt;    Oracle 8.1.X, 9.X.X, 10.X.X or 11.x.x:&lt;br /&gt;       - For 8.1.5, set LINK_CNTRL to L_PTHREADS_D7&lt;br /&gt;       - If not 8.1.5, ensure that LINK_CNTRL is not set&lt;br /&gt;       - Set LIBPATH to include $ORACLE_HOME/lib&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;If on DATA GENERAL AVIION (DG) with:&lt;br /&gt;-----------------------------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X or 8.0.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib&lt;br /&gt;       - ensure TARGET_BINARY_INTERFACE is unset&lt;br /&gt;    &lt;br /&gt;    Oracle 8.1.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include &lt;br /&gt;         $ORACLE_HOME/lib:$ORACLE_HOME/JRE/lib/PentiumPro/native_threads&lt;br /&gt;&lt;br /&gt;If on HP-UX with:&lt;br /&gt;----------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X, 8.0.X, 8.1.X;&lt;br /&gt;       - Set SHLIB_PATH to $ORACLE_HOME/lib&lt;br /&gt;       If using 64bit 8i Oracle, also&lt;br /&gt;       - Set LD_LIBRARY_PATH to $ORACLE_HOME/lib64&lt;br /&gt;       - ensure LPATH is unset&lt;br /&gt; &lt;br /&gt;    Oracle 9.X.X, 10.X.X or 11.x.x;&lt;br /&gt;       - ensure LPATH is unset&lt;br /&gt;&lt;br /&gt;If on NCR with:&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X, 8.0.X or 8.1.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib:/usr/ccs/lib&lt;br /&gt;&lt;br /&gt;If on SCO UNIXware with:&lt;br /&gt;-----------------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X or 8.0.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib&lt;br /&gt;    &lt;br /&gt;    Oracle 8.1.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include &lt;br /&gt;         $ORACLE_HOME/lib:$ORACLE_HOME/JRE/lib/x86at/native_threads&lt;br /&gt;&lt;br /&gt;If on SGI with:&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;    32bit Oracle 7.3.X or 8.0.X:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib&lt;br /&gt;       - Set SGI_ABI to -32  &lt;br /&gt;&lt;br /&gt;    64bit Oracle 8.0.X or 8.1.X (8i is only available in 64bit):&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib&lt;br /&gt;       - Set SGI_ABI to -64&lt;br /&gt;       - If one does not already exist, create the file compiler.defaults and &lt;br /&gt;         set the COMPILER_DEFAULTS_PATH variable:&lt;br /&gt;&lt;br /&gt;     In the Oracle software owner's $HOME directory, create a file called&lt;br /&gt;     'compiler.defaults':&lt;br /&gt;  &lt;br /&gt;        % cd $HOME&lt;br /&gt;        % echo &amp;quot;-DEFAULT:abi=64:isa=mips3:proc=r10k&amp;quot; &amp;gt; compiler.defaults&lt;br /&gt;&lt;br /&gt;     Then set the environment variable COMPILER_DEFAULTS_PATH to point to the&lt;br /&gt;     $HOME directory.&lt;br /&gt;  &lt;br /&gt;        % setenv COMPILER_DEFAULTS_PATH $HOME&lt;br /&gt;  &lt;br /&gt;     If this is not set, relinking will fail because the compiler defaults to&lt;br /&gt;     MIPS4 objects although Oracle requires MIPS3.&lt;br /&gt;       - Set LD_LIBRARY64_PATH to include the $ORACLE_HOME/lib and the &lt;br /&gt;         $ORACLE_HOME/javavm/admin directories. &lt;br /&gt;       - Set LD_LIBRARYN32_PATH to include the $ORACLE_HOME/lib32 directory. &lt;br /&gt;         NOTE: LD_LIBRARY64_PATH &amp;amp; LD_LIBRARYN32_PATH must be undefined when &lt;br /&gt;         installing software with Oracle Universal Installer. &lt;br /&gt;&lt;br /&gt;If on SOLARIS (Sparc or Intel) with:&lt;br /&gt;------------------------------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X, 8.0.X, or 8.1.X:&lt;br /&gt;       - Ensure that /usr/ccs/bin is before /usr/ucb in $PATH  &lt;br /&gt;         % which ld   ....should return '/usr/ccs/bin/ld'&lt;br /&gt;&lt;br /&gt;       If using 32bit(pre 9i) Oracle, &lt;br /&gt;       - Set LD_LIBRARY_PATH=$ORACLE_HOME/lib&lt;br /&gt;&lt;br /&gt;       If using 64bit(pre 9i) Oracle, &lt;br /&gt;       - Set LD_LIBRARY_PATH=$ORACLE_HOME/lib&lt;br /&gt;       - Set LD_LIBRARY_PATH_64=$ORACLE_HOME/lib64&lt;br /&gt;&lt;br /&gt;    Oracle 9.X.X or higher:&lt;br /&gt;       - LD_LIBRARY_PATH &amp;amp; LD_LIBRARY_PATH_64 do not need to be set to include&lt;br /&gt;         a reference to $ORACLE_HOME/lib or $ORACLE_HOME/lib64 for a generic database&lt;br /&gt;         software installation. &lt;br /&gt;         (However they should not contain a reference to the ORACLE_HOME of another Oracle version)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If on Digital/Tru64, IBM/Sequent PTX, Linux or any other UNIX Platform not &lt;br /&gt;mentioned above with:&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;    Oracle 7.3.X, 8.0.X, 8.1.X, 9.X.X, 10.X.X or 11.x.x:&lt;br /&gt;       - Set LD_LIBRARY_PATH to include $ORACLE_HOME/lib&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Step 4] For all Oracle Versions and UNIX Platforms: &lt;br /&gt;===============================================================================&lt;br /&gt;Verify that you performed Step 2 correctly:&lt;br /&gt;&lt;br /&gt; % env|pg  ....make sure that you see the correct absolute path for &lt;br /&gt;   $ORACLE_HOME in the variable definitions.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;[Step 5] For all Oracle Versions and UNIX Platforms: &lt;br /&gt;===============================================================================&lt;br /&gt;Verify umask is set correctly:&lt;br /&gt;&lt;br /&gt; % umask&lt;br /&gt;&lt;br /&gt;This must return 022.  If it does not, set umask to 022.&lt;br /&gt;&lt;br /&gt; % umask 022&lt;br /&gt; % umask&lt;br /&gt;&lt;br /&gt;[Step 6] Run the OS Commands to Relink Oracle: &lt;br /&gt;===============================================================================&lt;br /&gt;Important Note:  Before relinking Oracle, shut down both the database and the &lt;br /&gt;                 listener.&lt;br /&gt;Important Note:  The following commands will output a lot of text to your &lt;br /&gt;                 session window.  To capture this output for upload to support,&lt;br /&gt;                 redirect the output to a file.&lt;br /&gt;Important Note:  If relinking a client installation, it's expected that some &lt;br /&gt;                 aspects of the following commands will fail if the components&lt;br /&gt;                 were not originally installed.&lt;br /&gt;&lt;br /&gt;For all UNIX platforms:&lt;br /&gt;&lt;br /&gt;Oracle 7.3.x &lt;br /&gt;------------&lt;br /&gt; For executables:  oracle, exp, imp, sqlldr, tkprof &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/rdbms/lib &lt;br /&gt;      % make -f ins_rdbms.mk install&lt;br /&gt;&lt;br /&gt; For executables:  svrmgrl, svrmgrm &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/svrmgr/lib &lt;br /&gt;      % make -f ins_svrmgr.mk linstall minstall      &amp;lt;- linstall is for svrmgrl, &lt;br /&gt;                                                        minstall is for svrmgrm&lt;br /&gt;&lt;br /&gt; For executables:  sqlplus &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/sqlplus/lib &lt;br /&gt;      % make -f ins_sqlplus.mk install&lt;br /&gt;&lt;br /&gt; For executables:  dbsnmp, oemevent, oratclsh &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_agent.mk install&lt;br /&gt;&lt;br /&gt; For executables:  names, namesctl &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_names.mk install&lt;br /&gt;&lt;br /&gt; For executables:  tnslsnr, lsnrctl, tnsping, csmnl, trceval, trcroute &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_network.mk install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle 8.0.x &lt;br /&gt;------------&lt;br /&gt; For executables:  oracle, exp, imp, sqlldr, tkprof, mig, dbv, orapwd, rman, &lt;br /&gt;                   svrmgrl, ogms, ogmsctl &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/rdbms/lib &lt;br /&gt;      % make -f ins_rdbms.mk install&lt;br /&gt;&lt;br /&gt; For executables:  sqlplus &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/sqlplus/lib &lt;br /&gt;      % make -f ins_sqlplus.mk install&lt;br /&gt;&lt;br /&gt; For executables:  dbsnmp, oemevent, oratclsh, libosm.so &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_oemagent.mk install&lt;br /&gt;&lt;br /&gt; For executables:  tnslsnr, lsnrctl, namesctl, names, osslogin, trcasst, &lt;br /&gt;                   trcroute &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_network.mk install&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle 8.1.X, 9.X.X, 10.X.X or 11.X.X&lt;br /&gt;-------------------------------------&lt;br /&gt;  *** NEW IN 8i AND ABOVE ***&lt;br /&gt;&lt;br /&gt;   A 'relink' script is provided in the $ORACLE_HOME/bin directory.&lt;br /&gt;     % cd $ORACLE_HOME/bin&lt;br /&gt;     % relink      ...this will display all of the command's options.&lt;br /&gt;       usage: relink &amp;lt;parameter&amp;gt;&lt;br /&gt;       accepted values for parameter: all, oracle, network, client, &lt;br /&gt;       client_sharedlib, interMedia, precomp, utilities, oemagent, ldap &lt;br /&gt;  &lt;br /&gt;  Note: ldap option is available only from 9i. In 8i, you would have to manually relink&lt;br /&gt;  ldap.&lt;br /&gt;&lt;br /&gt;  You can relink most of the executables associated with an Oracle Server Installation&lt;br /&gt;  by running the following command:&lt;br /&gt;     % relink all    &lt;br /&gt;  This will not relink every single executable Oracle provides(you can&lt;br /&gt;  discern which executables were relinked by checking their timestamp with&lt;br /&gt;  'ls -l' in the $ORACLE_HOME/bin directory).  However, 'relink all' will &lt;br /&gt;  recreate the shared libraries that most executables rely on and thereby&lt;br /&gt;  resolve most issues that require a proper relink. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;11.2.X special instructions&lt;br /&gt;--------------------------------------&lt;br /&gt;   In 11.2 relink script will only accept &amp;quot;all&amp;quot; as argument&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; -or-&lt;br /&gt;&lt;br /&gt;  Since the 'relink' command merely calls the traditional 'make' commands, you &lt;br /&gt;  still have the option of running the 'make' commands independently:&lt;br /&gt;&lt;br /&gt; For executables:  oracle, exp, imp, sqlldr, tkprof, mig, dbv, orapwd, rman, &lt;br /&gt;                   svrmgrl, ogms, ogmsctl &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/rdbms/lib &lt;br /&gt;      % make -f ins_rdbms.mk install&lt;br /&gt;&lt;br /&gt;      NOTE: After relinking the oracle executable, make sure that the &lt;br /&gt;      permissions on the executable are 6751 (-rwsr-s--x). If they are&lt;br /&gt;      not, run the following command as the Oracle software owner:&lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/bin&lt;br /&gt;      % chmod 6751 oracle&lt;br /&gt;&lt;br /&gt; For executables:  sqlplus &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/sqlplus/lib &lt;br /&gt;      % make -f ins_sqlplus.mk install&lt;br /&gt;&lt;br /&gt; For executables:  isqlplus   (Oracle9i and higher versions)&lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/sqlplus/lib &lt;br /&gt;      % make -f ins_sqlplus.mk install_isqlplus&lt;br /&gt;&lt;br /&gt; For executables:  dbsnmp, oemevent, oratclsh &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_oemagent.mk install&lt;br /&gt;&lt;br /&gt;      NOTE: After relinking the dbsnmp executable, it is necessary to run&lt;br /&gt;      the following commands as root (so that the ownership/permissions on&lt;br /&gt;      the executable are correct):&lt;br /&gt;&lt;br /&gt;      # cd $ORACLE_HOME/bin&lt;br /&gt;      # chown root dbsnmp&lt;br /&gt;      # chmod 6750 dbsnmp&lt;br /&gt;&lt;br /&gt;      @ References: &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=233559.1&amp;amp;type=NOT"&gt;Note:233559.1&lt;/a&gt; and &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=BUG&amp;amp;id=2858326"&gt;Bug:2858326&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; For executables:  names, namesctl &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_names.mk install&lt;br /&gt;&lt;br /&gt; For executables:  osslogin, trcasst, trcroute, onrsd, tnsping &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_net_client.mk install&lt;br /&gt;&lt;br /&gt; For executables:  tnslsnr, lsnrctl &lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/network/lib &lt;br /&gt;      % make -f ins_net_server.mk install&lt;br /&gt;&lt;br /&gt; For executables related to ldap (for example Oracle Internet Directory):&lt;br /&gt;&lt;br /&gt;      % cd $ORACLE_HOME/ldap/lib&lt;br /&gt;      % make -f ins_ldap.mk install&lt;br /&gt;&lt;br /&gt;How to Tell if Relinking Was Successful:&lt;br /&gt;===============================================================================&lt;br /&gt;If relinking was successful, the make command will eventually return to the OS &lt;br /&gt;prompt without an error. There will NOT be a 'Relinking Successful' type&lt;br /&gt;message.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If You Receive an Error Message During Relinking:&lt;br /&gt;===============================================================================&lt;br /&gt;Confirm that the message you received is an actual fatal error and not a &lt;br /&gt;warning. Relinking errors usually terminate the relinking process and contain &lt;br /&gt;verbage similar to the following:&lt;br /&gt;'Fatal error', 'Ld: fatal', 'Exit Code 1'&lt;br /&gt;While warnings will look similar to: 'ld: warning: option -YP appears more than&lt;br /&gt;once, first setting taken' and can most often be ignored.&lt;br /&gt;&lt;br /&gt;If you receive an error that terminates the relinking process, your first step &lt;br /&gt;should be to extract the relevant information about the error from the make &lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;This can be broken down into three basic steps:&lt;br /&gt; 1. Identify the OS utility that is returning the error.&lt;br /&gt;    'ld', 'make', 'cc', 'mv', 'cp', 'ar' are common sources.&lt;br /&gt; 2. Identify the type of error:&lt;br /&gt;    'Permission Denied', 'Undefined Symbol', 'File Not Found' are common types.&lt;br /&gt; 3. Identify the files or symbols involved.&lt;br /&gt;&lt;br /&gt;Using the information from above as keywords, search Oracle's Metalink &lt;br /&gt;repository ( http://metaLink.oracle.com ) for previous occurrences of the same &lt;br /&gt;error. If no previous occurances are found or a solution is not provided, &lt;br /&gt;generate an iTAR that includes the complete error text.&lt;br /&gt;&lt;br /&gt;Help setting environment variables.&lt;br /&gt;==============================================================================&lt;br /&gt;See &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=131207.1&amp;amp;type=NOT"&gt;Note:131207.1&lt;/a&gt; How to Set UNIX Environment Variables &lt;br /&gt;for help with setting UNIX environment variables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Relinking with Orainst:&lt;br /&gt;===============================================================================&lt;br /&gt;For Oracle7 &amp;amp; Oracle8 only, the following document illustrates how to relink &lt;br /&gt;with the 'orainst' utility:&lt;br /&gt;   &lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=1032747.6&amp;amp;type=NOT"&gt;Note:1032747.6&lt;/a&gt; HOW TO RELINK ORACLE USING THE 7.3.X INSTALLER&lt;br /&gt;While 'orainst' will run the same commands as [Step 4], performing [Step 4] &lt;br /&gt;manually from a UNIX shell is the preferred approach.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELATED DOCUMENTS&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=131207.1&amp;amp;type=NOT"&gt;Note:131207.1&lt;/a&gt;   How to Set UNIX Environment Variables&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=109621.1&amp;amp;type=NOT"&gt;Note:109621.1&lt;/a&gt;   HP/UX: LD_LIBRARY_PATH and SHLIB_PATH&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;id=1032747.6&amp;amp;type=NOT"&gt;Note:1032747.6&lt;/a&gt;  HOW TO RELINK ORACLE USING THE 7.3.X INSTALLER&lt;br /&gt;&lt;a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;amp;type=BUG&amp;amp;id=1337908"&gt;Bug:1337908&lt;/a&gt;     THE $ORACLE_HOME/BIN/RELINK SCRIPT DOES NOT RELINK EXP, IMP &lt;br /&gt;                  SQLLOADER&lt;br /&gt;&lt;/font&gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-5691933976871652095?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/5691933976871652095/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-relink-oracle-database-software.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/5691933976871652095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/5691933976871652095'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/how-to-relink-oracle-database-software.html' title='How to Relink Oracle Database Software on UNIX [ID 131321.1]'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-6423352977934708666</id><published>2010-01-06T11:04:00.002+07:00</published><updated>2010-01-06T11:12:43.719+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iis'/><title type='text'>Client Requests Error Out or Time Out (IIS 6.0)</title><content type='html'>&lt;p&gt;In IIS 6.0, settings are set to aggressive and secure defaults to minimize attacks due to timeouts and limits that were previously too generous. IIS enforces the following timeouts at the connection level: &lt;/p&gt;  &lt;p&gt;•Limits on response buffering. The metabase property &lt;b&gt;ASPBufferingLimit&lt;/b&gt; is 4 MB, by default. If ASP scripts buffer more than this, they generate an error. Prior to IIS 6.0, there was no limit to buffering. &lt;/p&gt;  &lt;p&gt;•Limits on posts. The metabase property &lt;b&gt;AspMaxRequestEntityAllowed&lt;/b&gt; enforces a maximum ASP POST size of 204800 bytes, with each individual field limited to 100 KB. Prior to IIS 6.0, there was no limit to posts. &lt;/p&gt;  &lt;p&gt;•The &lt;b&gt;ServerListenTimeout&lt;/b&gt;property is no longer available&lt;b&gt;. &lt;/b&gt;The metabase property &lt;b&gt;ServerListenTimeout&lt;/b&gt; has been replaced by the following metabase properties: &lt;/p&gt;  &lt;p&gt;•&lt;b&gt;ConnectionTimeout&lt;/b&gt;. This property specifies the amount of time, in seconds, that the server waits before disconnecting an inactive connection. &lt;/p&gt;  &lt;p&gt;•&lt;b&gt;MinFileBytesPerSec&lt;/b&gt;. When IIS responds to a client request, the &lt;b&gt;MinFileBytesPerSec&lt;/b&gt; property determines the length of time that the client has to receive the entire response. If the client computer takes too long to receive the entire response, the kernel-mode driver, HTTP.sys, terminates the connection according to the timeout value. &lt;/p&gt;  &lt;p&gt;•&lt;b&gt;HeaderWaitTimeout&lt;/b&gt;. When a client connects to the Web server, the client computer is given a time limit to send in all headers for the request (demarked by a final double \r\n). If the complete header set for the request is not received within the time period indicated by &lt;b&gt;HeaderWaitTimeout&lt;/b&gt;, HTTP.sys resets the connection. You can configure the value of &lt;b&gt;HeaderWaitTimeout&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;•&lt;b&gt;Header size limitation&lt;/b&gt;. By default, HTTP.sys accepts only requests where the size of the request header is less than 16 KB. This means that if HTTP.sys does not receive the terminating carriage return/line feed (CRLF) pair sequence within 16 KB, HTTP.sys considers the request malicious and terminates the connection. You can change the header size limitation by adjusting the value of the registry entry MaxRequestBytes. Note that this entry does not exist in the registry by default. To add it to the registry, use the registry editor, Regedit.exe.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-6423352977934708666?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/6423352977934708666/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/client-requests-error-out-or-time-out.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/6423352977934708666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/6423352977934708666'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2010/01/client-requests-error-out-or-time-out.html' title='Client Requests Error Out or Time Out (IIS 6.0)'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-3561450660038751751</id><published>2009-11-27T13:22:00.006+07:00</published><updated>2009-12-16T13:46:55.857+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning</title><content type='html'>&lt;a name="top"&gt;&lt;/a&gt;  &lt;div class="vnv1sunlogo"&gt; &lt;/div&gt; &lt;span class="sp20"&gt;&lt;/span&gt;  &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;img alt=" " src="http://java.sun.com/im/a.gif" border="0" height="1" width="10" /&gt;&lt;/td&gt;        &lt;td&gt;&lt;span class="sp10"&gt; &lt;/span&gt;      &lt;br /&gt;&lt;a name="skip2content"&gt;&lt;/a&gt;          &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td class="smaller" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;                &lt;td width="10"&gt;&lt;br /&gt;&lt;/td&gt;                &lt;td align="right" valign="bottom"&gt;                 &lt;div style="padding: 0px;" class="sitelinks"&gt;                   &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;                       &lt;tr&gt;                         &lt;td align="right" valign="bottom"&gt;&lt;br /&gt;&lt;/td&gt;                          &lt;td class="smaller" valign="bottom" nowrap="nowrap"&gt;&lt;a href="http://java.sun.com/jsp_utils/PrintPage.jsp" target="printFriendlyView"&gt;&lt;/a&gt;                     &lt;br /&gt;&lt;/td&gt;                       &lt;/tr&gt;                     &lt;/tbody&gt;&lt;/table&gt;                 &lt;/div&gt;               &lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;         &lt;a name="skip2content"&gt;&lt;/a&gt;          &lt;div class="contentdivider"&gt;           &lt;table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;               &lt;tr&gt;                 &lt;td&gt;&lt;br /&gt;&lt;/td&gt;               &lt;/tr&gt;             &lt;/tbody&gt;&lt;/table&gt;         &lt;/div&gt;          &lt;div dir="ltr" id="Table of Contents"&gt;           &lt;h2&gt;Table of Contents&lt;/h2&gt;            &lt;ol&gt;             &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#introduction"&gt;Introduction&lt;/a&gt; &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#ergonomics"&gt;Ergonomics&lt;/a&gt; &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generations"&gt;Generations&lt;/a&gt;                 &lt;ul&gt;                 &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generations.performance"&gt;Performance Considerations&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generations.measurement"&gt;Measurement&lt;/a&gt; &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generation_sizing"&gt;Sizing the Generations&lt;/a&gt;                 &lt;ul&gt;                 &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generation_sizing.total_heap"&gt;Total Heap&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generation_sizing.young_gen"&gt;The Young Generation&lt;/a&gt;                     &lt;ul&gt;                     &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#generation_sizing.young_gen.survivors"&gt;Survivor Space Sizing&lt;/a&gt; &lt;/li&gt;                   &lt;/ul&gt;                 &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#available_collectors"&gt;Available Collectors&lt;/a&gt;                 &lt;ul&gt;                 &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#available_collectors.selecting"&gt;Selecting a Collector&lt;/a&gt; &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc"&gt;The Parallel Collector&lt;/a&gt;                 &lt;ul&gt;                 &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.generations"&gt;Generations&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.ergonomics"&gt;Ergonomics&lt;/a&gt;                     &lt;ul&gt;                     &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.ergonomics.goals"&gt;Priority of goals&lt;/a&gt; &lt;/li&gt;                      &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.ergonomics.adjustments"&gt;Generation Size Adjustments&lt;/a&gt; &lt;/li&gt;                      &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.ergonomics.default_size"&gt;Default Heap Size&lt;/a&gt; &lt;/li&gt;                   &lt;/ul&gt;                 &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.oom"&gt;Excessive GC Time and OutOfMemoryError&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.measurements"&gt;Measurements&lt;/a&gt; &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms"&gt;The Concurrent Collector&lt;/a&gt;                 &lt;ul&gt;                 &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.overhead"&gt;Overhead of Concurrency&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.concurrent_mode_failure"&gt;Concurrent Mode Failure&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.oom"&gt;Excessive GC Time and OutOfMemoryError&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.floating_garbage"&gt;Floating Garbage&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.pauses"&gt;Pauses&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.concurrent_phases"&gt;Concurrent Phases&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.starting_a_cycle"&gt;Starting a Concurrent Collection Cycle&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.scheduling_pauses"&gt;Scheduling Pauses&lt;/a&gt; &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms"&gt;Incremental Mode&lt;/a&gt;                     &lt;ul&gt;                     &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms.available_options"&gt;Command Line Options&lt;/a&gt; &lt;/li&gt;                      &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms.recommended_options"&gt;Recommended Options&lt;/a&gt; &lt;/li&gt;                      &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms.troubleshooting"&gt;Basic Troubleshooting&lt;/a&gt; &lt;/li&gt;                   &lt;/ul&gt;                 &lt;/li&gt;                  &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.measurements"&gt;Measurements&lt;/a&gt; &lt;/li&gt;               &lt;/ul&gt;             &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#other_considerations"&gt;Other Considerations&lt;/a&gt; &lt;/li&gt;              &lt;li&gt;&lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#resources"&gt;Resources&lt;/a&gt; &lt;/li&gt;           &lt;/ol&gt;         &lt;/div&gt;          &lt;h1&gt;&lt;a name="introduction"&gt;1. Introduction&lt;/a&gt;&lt;/h1&gt;          &lt;p&gt;The Java™ Platform, Standard Edition (Java SE™) is used for a wide variety of applications, from small applets on desktops to web services on large servers. In support of this diverse range of deployments, the Java HotSpot™ virtual machine implementation (Java HotSpot™ VM) provides multiple garbage collectors, each designed to satisfy different requirements. This is an important part of meeting the demands of both large and small applications. However, users, developers and administrators that need high performance are burdened with the extra step of selecting the garbage collector that best meets their needs. A significant step toward removing this burden was made in J2SE™ 5.0: the garbage collector is selected based on the class of the machine on which the application is run. &lt;/p&gt;          &lt;p&gt;This &lt;q&gt;better choice&lt;/q&gt; of the garbage collector is generally an improvement, but is by no means always the best choice for every application. Users with strict performance goals or other requirements may need to explicitly select the garbage collector and tune certain parameters to achieve the desired level of performance. This document provides information to help with those tasks. First, the general features of a garbage collector and basic tuning options are described in the context of the serial, stop-the-world collector. Then specific features of the other collectors are presented along with factors to consider when selecting a collector. &lt;/p&gt;          &lt;p&gt;When does the choice of a garbage collector matter? For some applications, the answer is never. That is, the application can perform well in the presence of garbage collection with pauses of modest frequency and duration. However, this is not the case for a large class of applications, particularly those with large amounts of data (multiple gigabytes), many threads and high transaction rates. &lt;/p&gt;          &lt;p&gt;Amdahl observed that most workloads cannot be perfectly parallelized; some portion is always sequential and does not benefit from parallelism. This is also true for the Java™ platform. In particular, virtual machines from Sun Microsystems for the Java platform prior to J2SE 1.4 do not support parallel garbage collection, so the impact of garbage collection on a multiprocessor system grows relative to an otherwise parallel application. &lt;/p&gt;          &lt;p&gt;The graph below models an ideal system that is perfectly scalable with the exception of garbage collection. The red line is an application spending only 1% of the time in garbage collection on a uniprocessor system. This translates to more than a 20% loss in throughput on 32 processor systems. At 10% of the time in garbage collection (not considered an outrageous amount of time in garbage collection in uniprocessor applications) more than 75% of throughput is lost when scaling up to 32 processors. &lt;/p&gt;          &lt;p&gt;&lt;img style="width: 592px; height: 505px;" name="Graphic21" alt="GC vs. Amdahl&amp;amp;apos;s law" src="http://java.sun.com/javase/technologies/hotspot/gc/fig5.gif" align="bottom" border="0" /&gt; &lt;/p&gt;          &lt;p&gt;This shows that negligible speed issues when developing on small systems may become principal bottlenecks when scaling up to large systems. However, small improvements in reducing such a bottleneck can produce large gains in performance. For a sufficiently large system it becomes well worthwhile to select the right garbage collector and to tune it if necessary. &lt;/p&gt;          &lt;p&gt;The serial collector is usually adequate for most "small" applications (those requiring heaps of up to approximately 100MB on modern processors). The other collectors have additional overhead and/or complexity which is the price for specialized behavior. If the application doesn't need the specialized behavior of an alternate collector, use the serial collector. An example of a situation where the serial collector is not expected to be the best choice is a large application that is heavily threaded and run on a machine with a large amount of memory and two or more processors. When applications are run on such server-class machines, the parallel collector is selected by default (see &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#ergonomics"&gt;Ergonomics&lt;/a&gt; below). &lt;/p&gt;          &lt;p&gt;This document was developed using Java SE 6 on the Solaris™ Operating System (SPARC&lt;span style="font-size:78%;"&gt;&lt;sup&gt;(R)&lt;/sup&gt;&lt;/span&gt; Platform Edition) as the reference. However, the concepts and recommendations presented here apply to all supported platforms, including Linux, Microsoft Windows and the Solaris Operating System (x86 Platform Edition). In addition, the command line options mentioned are available on all supported platforms, although the default values of some options may be different on each platform. &lt;/p&gt;          &lt;h1&gt;&lt;a name="ergonomics"&gt;2. Ergonomics&lt;/a&gt;&lt;/h1&gt;          &lt;p&gt;A feature referred to here as &lt;i&gt;ergonomics&lt;/i&gt; was introduced in J2SE 5.0. The goal of ergonomics is to provide good performance with little or no tuning of command line options by selecting the &lt;/p&gt;          &lt;ul&gt;           &lt;li&gt;garbage collector, &lt;/li&gt;            &lt;li&gt;heap size, &lt;/li&gt;            &lt;li&gt;and runtime compiler &lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;at JVM startup, instead of using fixed defaults. This selection assumes that the class of the machine on which the application is run is a hint as to the characteristics of the application (i.e., large applications run on large machines). In addition to these selections is a simplified way of tuning garbage collection. With the parallel collector the user can specify goals for a maximum pause time and a desired throughput for an application. This is in contrast to specifying the size of the heap that is needed for good performance. This is intended to particularly improve the performance of large applications that use large heaps. The more general ergonomics is described in the document entitled “Ergonomics in the 5.0 Java Virtual Machine”. It is recommended that the ergonomics as presented in this latter document be tried before using the more detailed controls explained in this document. &lt;/p&gt;          &lt;p&gt;Included in this document are the ergonomics features provided as part of the adaptive size policy for the parallel collector. This includes the options to specify goals for the performance of garbage collection and additional options to fine tune that performance. &lt;/p&gt;          &lt;h1&gt;&lt;a name="generations"&gt;3. Generations&lt;/a&gt;&lt;/h1&gt;          &lt;p&gt;One strength of the J2SE platform is that it shields the developer from the complexity of memory allocation and garbage collection. However, once garbage collection is the principal bottleneck, it is worth understanding some aspects of this hidden implementation. Garbage collectors make assumptions about the way applications use objects, and these are reflected in tunable parameters that can be adjusted for improved performance without sacrificing the power of the abstraction. &lt;/p&gt;          &lt;p&gt;An object is considered garbage when it can no longer be reached from any pointer in the running program. The most straightforward garbage collection algorithms simply iterate over every reachable object. Any objects left over are then considered garbage. The time this approach takes is proportional to the number of live objects, which is prohibitive for large applications maintaining lots of live data. &lt;/p&gt;          &lt;p&gt;Beginning with the J2SE 1.2, the virtual machine incorporated a number of different garbage collection algorithms that are combined using &lt;i&gt;generational collection&lt;/i&gt;. While naive garbage collection examines every live object in the heap, generational collection exploits several empirically observed properties of most applications to minimize the work required to reclaim unused ("garbage") objects. The most important of these observed properties is the &lt;i&gt;weak generational hypothesis&lt;/i&gt;, which states that most objects survive for only a short period of time. &lt;/p&gt;          &lt;p&gt;The blue area in the diagram below is a typical distribution for the lifetimes of objects. The X axis is object lifetimes measured in bytes allocated. The byte count on the Y axis is the total bytes in objects with the corresponding lifetime. The sharp peak at the left represents objects that can be reclaimed (i.e., have "died") shortly after being allocated. Iterator objects, for example, are often alive for the duration of a single loop. &lt;/p&gt;          &lt;p&gt;    &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;          &lt;p&gt;&lt;img style="width: 590px; height: 332px;" name="Graphic31" alt="histogram with collections" src="http://java.sun.com/javase/technologies/hotspot/gc/fig2.gif" align="bottom" border="0" /&gt; &lt;/p&gt;          &lt;p&gt;Some objects do live longer, and so the distribution stretches out to the the right. For instance, there are typically some objects allocated at initialization that live until the process exits. Between these two extremes are objects that live for the duration of some intermediate computation, seen here as the lump to the right of the initial peak. Some applications have very different looking distributions, but a surprisingly large number possess this general shape. Efficient collection is made possible by focusing on the fact that a majority of objects "die young." &lt;/p&gt;          &lt;p&gt;To optimize for this scenario, memory is managed in &lt;i&gt;generations&lt;/i&gt;, or memory pools holding objects of different ages. Garbage collection occurs in each generation when the generation fills up. The vast majority of objects are allocated in a pool dedicated to young objects (the &lt;i&gt;young generation&lt;/i&gt;), and most objects die there. When the young generation fills up it causes a &lt;i&gt;minor collection&lt;/i&gt; in which only the young generation is collected; garbage in other generations is not reclaimed. Minor collections can be optimized assuming the weak generational hypothesis holds and most objects in the young generation are garbage and can be reclaimed. The costs of such collections are, to the first order, proportional to the number of live objects being collected; a young generation full of dead objects is collected very quickly. Typically some fraction of the surviving objects from the young generation are moved to the &lt;i&gt;tenured generation&lt;/i&gt; during each minor collection. Eventually, the tenured generation will fill up and must be collected, resulting in a &lt;i&gt;major collection&lt;/i&gt;, in which the entire heap is collected. Major collections usually last much longer than minor collections because a significantly larger number of objects are involved. &lt;/p&gt;          &lt;p&gt;As noted above, &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#ergonomics"&gt;ergonomics&lt;/a&gt; selects the garbage collector dynamically in order to provide good performance on a variety of applications. The serial garbage collector is designed for applications with small data sets and its default parameters were chosen to be effective for most small applications. The throughput garbage collector is meant to be used with applications that have medium to large data sets. The heap size parameters selected by ergonomics plus the features of the adaptive size policy are meant to provide good performance for server applications. These choices work well in most, but not all, cases. Which leads to the central tenet of this document: &lt;/p&gt;          &lt;table class="grey3" align="center" border="0" cellpadding="5" cellspacing="0" width="80%"&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td&gt;If garbage collection becomes a bottleneck, you will most likely have to customize the total heap size as well as the sizes of the individual generations. Check the verbose garbage collector output and then explore the sensitivity of your individual performance metric to the garbage collector parameters. &lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;         &lt;span class="sp10"&gt; &lt;/span&gt;   &lt;br /&gt;   &lt;p&gt;The default arrangement of generations (for all collectors with the exception of the parallel collector) looks something like this. &lt;/p&gt;          &lt;p&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;img style="width: 536px; height: 333px;" name="Graphic41" alt="space usage by generations" src="http://java.sun.com/javase/technologies/hotspot/gc/fig3.gif" align="bottom" border="1" /&gt;&lt;/span&gt; &lt;/p&gt;          &lt;p&gt;At initialization, a maximum address space is virtually reserved but not allocated to physical memory unless it is needed. The complete address space reserved for object memory can be divided into the young and tenured generations. &lt;/p&gt;          &lt;p&gt;The young generation consists of &lt;dfn&gt;eden&lt;/dfn&gt; and two &lt;dfn&gt;survivor spaces&lt;/dfn&gt;. Most objects are initially allocated in eden. One survivor space is empty at any time, and serves as the destination of any live objects in eden and the other survivor space during the next copying collection. Objects are copied between survivor spaces in this way until they are old enough to be &lt;dfn&gt;tenured&lt;/dfn&gt; (copied to the tenured generation). &lt;/p&gt;          &lt;p&gt;A third generation closely related to the tenured generation is the &lt;dfn&gt;permanent generation&lt;/dfn&gt; which holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level. For example objects describing classes and methods are stored in the permanent generation. &lt;/p&gt;          &lt;h2&gt;&lt;a name="generations.performance"&gt;Performance Considerations&lt;/a&gt; &lt;/h2&gt;          &lt;p&gt;There are two primary measures of garbage collection performance: &lt;/p&gt;          &lt;ol&gt;           &lt;li&gt;&lt;dfn&gt;Throughput&lt;/dfn&gt; is the percentage of total time not spent in garbage collection, considered over long periods of time. Throughput includes time spent in allocation (but tuning for speed of allocation is generally not needed). &lt;/li&gt;            &lt;li&gt;&lt;dfn&gt;Pauses&lt;/dfn&gt; are the times when an application appears unresponsive because garbage collection is occurring. &lt;/li&gt;         &lt;/ol&gt;          &lt;p&gt;Users have different requirements of garbage collection. For example, some consider the right metric for a web server to be throughput, since pauses during garbage collection may be tolerable, or simply obscured by network latencies. However, in an interactive graphics program even short pauses may negatively affect the user experience. &lt;/p&gt;          &lt;p&gt;Some users are sensitive to other considerations. &lt;dfn&gt;Footprint&lt;/dfn&gt; is the working set of a process, measured in pages and cache lines. On systems with limited physical memory or many processes, footprint may dictate scalability. &lt;dfn&gt;Promptness&lt;/dfn&gt; is the time between when an object becomes dead and when the memory becomes available, an important consideration for distributed systems, including remote method invocation (RMI). &lt;/p&gt;          &lt;p&gt;In general, a particular generation sizing chooses a trade-off between these considerations. For example, a very large young generation may maximize throughput, but does so at the expense of footprint, promptness and pause times. young generation pauses can be minimized by using a small young generation at the expense of throughput. To a first approximation, the sizing of one generation does not affect the collection frequency and pause times for another generation. &lt;/p&gt;          &lt;p&gt;There is no one right way to size generations. The best choice is determined by the way the application uses memory as well as user requirements. Thus the virtual machine's choice of a garbage collectior is not always optimal and may be overridden with command line options described below. &lt;/p&gt;          &lt;h2&gt;&lt;a name="generations.measurement"&gt;Measurement&lt;/a&gt; &lt;/h2&gt;          &lt;p&gt;Throughput and footprint are best measured using metrics particular to the application. For example, throughput of a web server may be tested using a client load generator, while footprint of the server might be measured on the Solaris Operating System using the &lt;code&gt;pmap&lt;/code&gt; command. On the other hand, pauses due to garbage collection are easily estimated by inspecting the diagnostic output of the virtual machine itself. &lt;/p&gt;          &lt;p&gt;The command line option &lt;code&gt;-verbose:gc&lt;/code&gt; causes information about the heap and garbage collection to be printed at each collection. For example, here is output from a large server application: &lt;/p&gt;          &lt;pre&gt;&lt;code&gt;&lt;br /&gt;[GC 325407K-&amp;gt;83000K(776768K), 0.2300771 secs]&lt;br /&gt;[GC 325816K-&amp;gt;83372K(776768K), 0.2454258 secs]&lt;br /&gt;[Full GC 267628K-&amp;gt;83769K(776768K), 1.8479984 secs]&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Here we see two minor collections followed by one major collection. The numbers before and after the arrow (e.g., &lt;code&gt;325407K-&amp;gt;83000K&lt;/code&gt; from the first line) indicate the combined size of live objects before and after garbage collection, respectively. After minor collections the size includes some objects that are garbage (no longer alive) but that cannot be reclaimed. These objects are either contained in the tenured generation, or referenced from the tenured or permanent generations. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The next number in parentheses (e.g., &lt;code&gt;(776768K)&lt;/code&gt; again from the first line) is the committed size of the heap: the amount of space usable for java objects without requesting more memory from the operating system. Note that this number does not include one of the survivor spaces, since only one can be used at any given time, and also does not include the permanent generation, which holds metadata used by the virtual machine. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The last item on the line (e.g., &lt;code&gt;0.2300771 secs&lt;/code&gt;) indicates the time taken to perform the collection; in this case approximately a quarter of a second. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The format for the major collection in the third line is similar. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table class="grey3" align="center" border="0" cellpadding="5" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;The format of the output produced by &lt;code&gt;-verbose:gc&lt;/code&gt; is subject to change in future releases. &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The option &lt;code&gt;-XX:+PrintGCDetails&lt;/code&gt; causes additional information about the collections to be printed. An example of the output with &lt;code&gt;-XX:+PrintGCDetails&lt;/code&gt; using the serial garbage collector is shown here. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;pre&gt;&lt;code&gt;&lt;br /&gt;[GC [DefNew: 64575K-&amp;gt;959K(64576K), 0.0457646 secs] 196016K-&amp;gt;133633K(261184K), 0.0459067 secs]&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;indicates that the minor collection recovered about 98% of the young generation, &lt;code&gt;DefNew: 64575K-&amp;gt;959K(64576K)&lt;/code&gt; and took &lt;code&gt;0.0457646 secs&lt;/code&gt; (about 45 milliseconds). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The usage of the entire heap was reduced to about 51% &lt;code&gt;196016K-&amp;gt;133633K(261184K)&lt;/code&gt; and that there was some slight additional overhead for the collection (over and above the collection of the young generation) as indicated by the final time of &lt;code&gt;0.0459067 secs&lt;/code&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The option &lt;code&gt;-XX:+PrintGCTimeStamps&lt;/code&gt; will add a time stamp at the start of each collection. This is useful to see how frequently garbage collections occur. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;&lt;code&gt;111.042: [GC 111.042: [DefNew: 8128K-&amp;gt;8128K(8128K), 0.0000505 secs]111.042: [Tenured: 18154K-&amp;gt;2311K(24576K), 0.1290354 secs] 26282K-&amp;gt;2311K(32704K), 0.1293306 secs] &lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The collection starts about 111 seconds into the execution of the application. The minor collection starts at about the same time. Additionally the information is shown for a major collection delineated by Tenured. The tenured generation usage was reduced to about 10% &lt;code&gt;18154K-&amp;gt;2311K(24576K)&lt;/code&gt; and took &lt;code&gt;0.1290354 secs&lt;/code&gt; (approximately 130 milliseconds). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table class="grey3" align="center" border="0" cellpadding="5" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;As was the case with &lt;code&gt;-verbose:gc&lt;/code&gt;, the format of the output produced by &lt;code&gt;-XX:+PrintGCDetails&lt;/code&gt; is subject to change in future releases. &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="generation_sizing"&gt;4. Sizing the Generations&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;A number of parameters affect generation size. The following diagram illustrates the difference between committed space and virtual space in the heap. At initialization of the virtual machine, the entire space for the heap is reserved. The size of the space reserved can be specified with the &lt;code&gt;-Xmx&lt;/code&gt; option. If the value of the &lt;code&gt;-Xms&lt;/code&gt; parameter is smaller than the value of the &lt;code&gt;-Xmx&lt;/code&gt; parameter, not all of the space that is reserved is immediately committed to the virtual machine. The uncommitted space is labeled "virtual" in this figure. The different parts of the heap (permanent generation, tenured generation and young generation) can grow to the limit of the virtual space as needed.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Some of the parameters are ratios of one part of the heap to another. For example the parameter &lt;code&gt;NewRatio&lt;/code&gt; denotes the relative size of the tenured generation to the young generation. These parameters are discussed below. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;&lt;img style="width: 576px; height: 336px;" name="Graphic51" alt="options affecting sizing" src="http://java.sun.com/javase/technologies/hotspot/gc/fig4.gif" align="bottom" border="1" /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="generation_sizing.total_heap"&gt;Total Heap&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Note that the following discussion regarding growing and shrinking of the heap and default heap sizes does not apply to the parallel collector. (See the &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc.ergonomics"&gt;section on ergonomics&lt;/a&gt; for details on heap resizing and default heap sizes with the parallel collector.) However, the parameters that control the total size of the heap and the sizes of the generations do apply to the parallel collector. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Since collections occur when generations fill up, throughput is inversely proportional to the amount of memory available. Total available memory is the most important factor affecting garbage collection performance. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;By default, the virtual machine grows or shrinks the heap at each collection to try to keep the proportion of free space to live objects at each collection within a specific range. This target range is set as a percentage by the parameters &lt;code&gt;-XX:MinHeapFreeRatio=&amp;lt;minimum&amp;gt;&lt;/code&gt; and &lt;code&gt;-XX:MaxHeapFreeRatio=&amp;lt;maximum&amp;gt;&lt;/code&gt;, and the total size is bounded below by &lt;code&gt;-Xms&amp;lt;min&amp;gt;&lt;/code&gt; and above by &lt;code&gt;-Xmx&amp;lt;max&amp;gt;&lt;/code&gt;. The default parameters for the 32-bit Solaris Operating System (SPARC Platform Edition) are shown in this table: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table style="margin-left: 10%;"&gt;&lt;thead&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;th&gt;Parameter&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th&gt;Default Value&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr valign="top"&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;MinHeapFreeRatio&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;40&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;MaxHeapFreeRatio&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;70&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr valign="top"&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;-Xms&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;3670k&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr valign="top"&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;-Xmx&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;64m&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Default values of heap size parameters on 64-bit systems have been scaled up by approximately 30%. This increase is meant to compensate for the larger size of objects on a 64-bit system. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;With these parameters, if the percent of free space in a generation falls below 40%, the generation will be expanded to maintain 40% free space, up to the maximum allowed size of the generation. Similarly, if the free space exceeds 70%, the generation will be contracted so that only 70% of the space is free, subject to the minimum size of the generation. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Large server applications often experience two problems with these defaults. One is slow startup, because the initial heap is small and must be resized over many major collections. A more pressing problem is that the default maximum heap size is unreasonably small for most server applications. The rules of thumb for server applications are: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;   &lt;li&gt;Unless you have problems with pauses, try granting as much memory as possible to the virtual machine. The default size (64MB) is often too small. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Setting &lt;code&gt;-Xms&lt;/code&gt; and &lt;code&gt;-Xmx&lt;/code&gt; to the same value increases predictability by removing the most important sizing decision from the virtual machine. However, the virtual machine is then unable to compensate if you make a poor choice. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;In general, increase the memory as you increase the number of processors, since allocation can be parallelized. &lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;For reference, there is a separate page explaining some of the available &lt;a href="http://java.sun.com/docs/hotspot/VMOptions.html"&gt;command-line options&lt;/a&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="generation_sizing.young_gen"&gt;The Young Generation&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The second most influential knob is the proportion of the heap dedicated to the young generation. The bigger the young generation, the less often minor collections occur. However, for a bounded heap size a larger young generation implies a smaller tenured generation, which will increase the frequency of major collections. The optimal choice depends on the lifetime distribution of the objects allocated by the application. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;By default, the young generation size is controlled by &lt;code&gt;NewRatio&lt;/code&gt;. For example, setting &lt;code&gt;-XX:NewRatio=3&lt;/code&gt; means that the ratio between the young and tenured generation is 1:3. In other words, the combined size of the eden and survivor spaces will be one fourth of the total heap size. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The parameters &lt;code&gt;NewSize&lt;/code&gt; and &lt;code&gt;MaxNewSize&lt;/code&gt; bound the young generation size from below and above. Setting these to the same value fixes the young generation, just as setting &lt;code&gt;-Xms&lt;/code&gt; and &lt;code&gt;-Xmx&lt;/code&gt; to the same value fixes the total heap size. This is useful for tuning the young generation at a finer granularity than the integral multiples allowed by &lt;code&gt;NewRatio&lt;/code&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="generation_sizing.young_gen.survivors"&gt;Survivor Space Sizing&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If desired, the parameter &lt;code&gt;SurvivorRatio&lt;/code&gt; can be used to tune the size of the survivor spaces, but this is often not as important for performance. For example, &lt;code&gt;-XX:SurvivorRatio=6&lt;/code&gt; sets the ratio between eden and a survivor space to 1:6. In other words, each survivor space will be one sixth the size of eden, and thus one eighth the size of the young generation (not one seventh, because there are two survivor spaces). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If survivor spaces are too small, copying collection overflows directly into the tenured generation. If survivor spaces are too large, they will be uselessly empty. At each garbage collection the virtual machine chooses a threshold number of times an object can be copied before it is tenured. This threshold is chosen to keep the survivors half full. The command-line option &lt;code&gt;-XX:+PrintTenuringDistribution&lt;/code&gt; can be used to show this threshold and the ages of objects in the new generation. It is also useful for observing the lifetime distribution of an application. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Here are the default values for the 32-bit Solaris Operating System (SPARC Platform Edition); the default values on other platforms are different. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table style="margin-left: 10%;"&gt;&lt;thead&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;th&gt;&lt;br /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th colspan="2"&gt;Default Value&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;th&gt;Parameter&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th&gt;Client JVM&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th&gt;Server JVM&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr valign="top"&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;NewRatio&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;8&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;2&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;NewSize&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;2228K&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;2228K&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;MaxNewSize&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;not limited&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;not limited&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;SurvivorRatio&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;32&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="text-align: right;"&gt;&lt;code&gt;32&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The maximum size of the young generation will be calculated from the maximum size of the total heap and &lt;code&gt;NewRatio&lt;/code&gt;. The "not limited" default value for &lt;code&gt;MaxNewSize&lt;/code&gt; means that the calculated value is not limited by &lt;code&gt;MaxNewSize&lt;/code&gt; unless a value for &lt;code&gt;MaxNewSize&lt;/code&gt; is specified on the command line. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The rules of thumb for server applications are: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;   &lt;li&gt;First decide the maximum heap size you can afford to give the virtual machine. Then plot your performance metric against young generation sizes to find the best setting.&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;Note that the maximum heap size should always be smaller than the amount of memory installed on the machine, to avoid excessive page faults and thrashing. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;If the total heap size is fixed, increasing the young generation size requires reducing the tenured generation size. Keep the tenured generation large enough to hold all the live data used by the application at any given time, plus some amount of slack space (10-20% or more). &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Subject to the above constraint on the tenured generation:&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;Grant plenty of memory to the young generation. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;       &lt;li&gt;Increase the young generation size as you increase the number of processors, since allocation can be parallelized. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="available_collectors"&gt;5. Available Collectors&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The discussion to this point has been about the serial collector. The Java HotSpot VM includes three different collectors, each with different performance characteristics. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;   &lt;li&gt;The &lt;em&gt;serial collector&lt;/em&gt; uses a single thread to perform all garbage collection work, which makes it relatively efficient since there is no communication overhead between threads. It is best-suited to single processor machines, since it cannot take advantage of multiprocessor hardware, although it can be useful on multiprocessors for applications with small data sets (up to approximately 100MB). The serial collector is selected by default on certain hardware and operating system configurations, or can be explicitly enabled with the option &lt;code&gt;-XX:+UseSerialGC&lt;/code&gt;. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;The &lt;em&gt;parallel collector&lt;/em&gt; (also known as the &lt;em&gt;throughput collector&lt;/em&gt;) performs minor collections in parallel, which can significantly reduce garbage collection overhead. It is intended for applications with medium- to large-sized data sets that are run on multiprocessor or multi-threaded hardware. The parallel collector is selected by default on certain hardware and operating system configurations, or can be explicitly enabled with the option &lt;code&gt;-XX:+UseParallelGC&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;&lt;b&gt;New&lt;/b&gt;: &lt;em&gt;parallel compaction&lt;/em&gt; is a feature introduced in J2SE 5.0 update 6 and enhanced in Java SE 6 that allows the parallel collector to perform major collections in parallel. Without parallel compaction, major collections are performed using a single thread, which can significantly limit scalability. Parallel compaction is enabled by adding the option &lt;code&gt;-XX:+UseParallelOldGC&lt;/code&gt; to the command line. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;The &lt;i&gt;concurrent collector&lt;/i&gt; performs most of its work concurrently (i.e., while the application is still running) to keep garbage collection pauses short. It is designed for applications with medium- to large-sized data sets for which response time is more important than overall throughput, since the techniques used to minimize pauses can reduce application performance. The concurrent collector is enabled with the option &lt;code&gt;-XX:+UseConcMarkSweepGC&lt;/code&gt;. &lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="available_collectors.selecting"&gt;Selecting a Collector&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Unless your application has rather strict pause time requirements, first run your application and allow the VM to select a collector. If necessary, adjust the heap size to improve performance. If the performance still does not meet your goals, then use the following guidelines as a starting point for selecting a collector. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;   &lt;li&gt;If the application has a small data set (up to approximately 100MB), then&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;select the serial collector with &lt;code&gt;-XX:+UseSerialGC&lt;/code&gt;. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;If the application will be run on a single processor and there are no pause time requirements, then&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;let the VM select the collector, or &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;       &lt;li&gt;select the serial collector with &lt;code&gt;-XX:+UseSerialGC&lt;/code&gt;. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;If (a) peak application performance is the first priority and (b) there are no pause time requirements or pauses of one second or longer are acceptable, then&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;let the VM select the collector, or &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;       &lt;li&gt;select the parallel collector with &lt;code&gt;-XX:+UseParallelGC&lt;/code&gt; and (optionally) enable parallel compaction with &lt;code&gt;-XX:+UseParallelOldGC&lt;/code&gt;. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;If response time is more important than overall throughput and garbage collection pauses must be kept shorter than approximately one second, then&lt;br /&gt;     &lt;ul&gt;&lt;br /&gt;       &lt;li&gt;select the concurrent collector with &lt;code&gt;-XX:+UseConcMarkSweepGC&lt;/code&gt;. If only one or two processors are available, consider using &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms"&gt;incremental mode&lt;/a&gt;, described below. &lt;/li&gt;&lt;br /&gt;     &lt;/ul&gt;&lt;br /&gt;   &lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt; &lt;table class="grey3" align="center" border="0" cellpadding="5" cellspacing="0" width="80%"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;These guidelines provide only a starting point for selecting a collector because performance is dependent on the size of the heap, the amount of live data maintained by the application and the number and speed of available processors. Pause times are particularly sensitive to these factors, so the threshold of one second mentioned above is only approximate: the parallel collector will experience pause times longer than one second on many data size and hardware combinations; conversely, the concurrent collector may not be able to keep pauses shorter than one second on some combinations. &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If the recommended collector does not achieve the desired performance, first attempt to adjust the heap and generation sizes to meet the desired goals. If still unsuccessful, then try a different collector: use the concurrent collector to reduce pause times and use the parallel collector to increase overall throughput on multiprocessor hardware. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="par_gc"&gt;The Parallel Collector&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The parallel collector (also referred to here as the throughput collector) is a generational collector similar to the serial collector; the primary difference is that multiple threads are used to speed up garbage collection. The parallel collector is enabled with the command line option &lt;code&gt;-XX:+UseParallelGC&lt;/code&gt;. By default, only minor collections are executed in parallel; major collections are performed with a single thread. However, parallel compaction can be enabled with the option &lt;code&gt;-XX:+UseParallelOldGC&lt;/code&gt; so that both minor and major collections are executed in parallel, to further reduce garbage collection overhead. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;On a machine with &lt;i&gt;N&lt;/i&gt; processors the parallel collector uses &lt;i&gt;N&lt;/i&gt; garbage collector threads; however, this number can be adjusted with a command line option (see below). On a host with one processor, the parallel collector will likely not perform as well as the serial collector because of the overhead required for parallel execution (e.g., synchronization). However, when running applications with medium- to large-sized heaps, it generally outperforms the serial collector by a modest amount on machines with two processors, and usually performs significantly better than the serial collector when more than two processors are available. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The number of garbage collector threads can be controlled with the command line option &lt;code&gt;-XX:ParallelGCThreads=&amp;lt;N&amp;gt;&lt;/code&gt;. If explicit tuning of the heap is being done with command line options, the size of the heap needed for good performance with the parallel collector is to first order the same as needed with the serial collector. Enabling the parallel collector should just make the minor collection pauses shorter. Because there are multiple garbage collector threads participating in the minor collection there is a small possibility of fragmentation due to promotions from the young generation to the tenured generation during the collection. Each garbage collection thread reserves a part of the tenured generation for promotions and the division of the available space into these "promotion buffers" can cause a fragmentation effect. Reducing the number of garbage collector threads will reduce this fragmentation effect as will increasing the size of the tenured generation. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="par_gc.generations"&gt;Generations&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;As mentioned earlier, the arrangement of the generations is different in the parallel collector. That arrangement is shown in the figure below. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;img style="width: 488px; height: 306px;" name="Graphic27" src="http://java.sun.com/javase/technologies/hotspot/gc/ps_generations.gif" align="left" border="1" /&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="par_gc.ergonomics"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2&gt;&lt;a name="par_gc.ergonomics"&gt;Ergonomics&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Starting in J2SE 5.0, the parallel collector is selected by default on server-class machines as detailed in the document &lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html"&gt;Garbage Collector Ergonomics&lt;/a&gt;. In addition, the parallel collector uses a method of automatic tuning that allows desired behaviors to be specified instead of generation sizes and other low-level tuning details. The behaviors that can be specified are: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;   &lt;li&gt;Maximum garbage collection pause time&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Throughput&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Footprint (i.e., heap size)&lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The maximum pause time goal is specified with the command line option &lt;code&gt;-XX:MaxGCPauseMillis=&amp;lt;N&amp;gt;&lt;/code&gt;. This is interpreted as a hint that pause times of &amp;lt;N&amp;gt; milliseconds or less are desired; by default there is no maximum pause time goal. If a pause time goal is specified, the heap size and other garbage collection related parameters are adjusted in an attempt to keep garbage collection pauses shorter than the specified value. Note that these adjustments may cause the garbage collector to reduce the overall throughput of the application and in some cases the desired pause time goal cannot be met. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The throughput goal is measured in terms of the time spent doing garbage collection vs. the time spent outside of garbage collection (referred to as application time). The goal is specified by the command line option &lt;code&gt;-XX:GCTimeRatio=&amp;lt;N&amp;gt;&lt;/code&gt;, which sets the ratio of garbage collection time to application time to &lt;code&gt;1 / (1 + &amp;lt;N&amp;gt;)&lt;/code&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;For example, &lt;code&gt;-XX:GCTimeRatio=19&lt;/code&gt; sets a goal of 1/20 or 5% of the total time in garbage collection. The default value is 99, resulting in a goal of 1% of the time in garbage collection. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Maxmimum heap footprint is specified using the existing option &lt;code&gt;-Xmx&amp;lt;N&amp;gt;&lt;/code&gt;. In addition, the collector has an implicit goal of minimizing the size of the heap as long as the other goals are being met. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="par_gc.ergonomics.goals"&gt;Priority of goals&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The goals are addressed in the following order&lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;   &lt;li&gt;Maximum pause time goal&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Throughput goal&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;Minimum footprint goal&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The maximum pause time goal is met first. Only after it is met is the throughput goal addressed. Similarly, only after the first two goals have been met is the footprint goal considered. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="par_gc.ergonomics.adjustments"&gt;Generation Size Adjustments&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The statistics such as average pause time kept by the collector are updated at the end of each collection. The tests to determine if the goals have been met are then made and any needed adjustments to the size of a generation is made. The exception is that explicit garbage collections (e.g., calls to &lt;code&gt;System.gc()&lt;/code&gt;) are ignored in terms of keeping statistics and making adjustments to the sizes of generations. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Growing and shrinking the size of a generation is done by increments that are a fixed percentage of the size of the generation so that a generation steps up or down toward its desired size. Growing and shrinking are done at different rates. By default a generation grows in increments of 20% and shrinks in increments of 5%. The percentage for growing is controlled by the command line flag &lt;code&gt;-XX:YoungGenerationSizeIncrement=&amp;lt;Y&amp;gt;&lt;/code&gt; for the young generation and &lt;code&gt;-XX:TenuredGenerationSizeIncrement=&amp;lt;T&amp;gt;&lt;/code&gt; for the tenured generation. The percentage by which a generation shrinks is adjusted by the command line flag &lt;code&gt;-XX:AdaptiveSizeDecrementScaleFactor=&amp;lt;D&amp;gt;&lt;/code&gt;. If the growth increment is &lt;code&gt;X&lt;/code&gt; percent, the decrement for shrinking is &lt;code&gt;X / D&lt;/code&gt; percent. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If the collector decides to grow a generation at startup, there is a supplemental percentage added to the increment. This supplement decays with the number of collections and there is no long term affect of this supplement. The intent of the supplement is to increase startup performance. There is no supplement to the percentage for shrinking. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If the maximum pause time goal is not being met, the size of only one generation is shrunk at a time. If the pause times of both generations are above the goal, the size of the generation with the larger pause time is shrunk first. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If the throughput goal is not being met, the sizes of both generations are increased. Each is increased in proportion to its respective contribution to the total garbage collection time. For example, if the garbage collection time of the young generation is 25% of the total collection time and if a full increment of the young generation would be by 20%, then the young generation would be increased by 5%. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="par_gc.ergonomics.default_size"&gt;Default Heap Size&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;If not otherwise set on the command line, the initial and maximum heap sizes are calculated based on the amount of memory on the machine. The proportion of memory to use for the heap is controlled by the command line options &lt;code&gt;DefaultInitialRAMFraction&lt;/code&gt; and &lt;code&gt;DefaultMaxRAMFraction&lt;/code&gt;, as shown in the table below. (In the table, &lt;code&gt;memory&lt;/code&gt; represents the amount of memory on the machine.) &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table style="margin-left: 0.5in;"&gt;&lt;thead&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;th&gt;&lt;br /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th style="padding: 0pt 2em 0pt 0pt;"&gt;Formula&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th style="padding: 0pt;"&gt;Default&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td style="padding: 0pt 2em 0pt 0pt;"&gt;initial heap size &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="padding: 0pt 2em 0pt 0pt;"&gt;&lt;code&gt;memory / DefaultInitialRAMFraction&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="padding: 0pt;"&gt;&lt;code&gt;memory / 64&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td style="padding: 0pt 2em 0pt 0pt;"&gt;maximum heap size &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="padding: 0pt 2em 0pt 0pt;"&gt;&lt;code&gt;MIN(memory / DefaultMaxRAMFraction, 1GB)&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="padding: 0pt;"&gt;&lt;code&gt;MIN(memory / 4, 1GB)&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Note that the default maximum heap size will not exceed &lt;code&gt;1GB&lt;/code&gt;, regardless of how much memory is installed on the machine. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="par_gc.oom"&gt;Excessive GC Time and OutOfMemoryError&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option &lt;code&gt;-XX:-UseGCOverheadLimit&lt;/code&gt; to the command line. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="par_gc.measurements"&gt;Measurements&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The verbose garbage collector output from the parallel collector is essentially the same as that from the serial collector. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="cms"&gt;7. The Concurrent Collector&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector is designed for applications that prefer shorter garbage collection pauses and that can afford to share processor resources with the garbage collector while the application is running. Typically applications which have a relatively large set of long-lived data (a large tenured generation), and run on machines with two or more processors tend to benefit from the use of this collector. However, this collector should be considered for any application with a low pause time requirement; for example, good results have been observed for interactive applications with tenured generations of a modest size on a single processor, especially if using &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms"&gt;incremental mode&lt;/a&gt;. The concurrent collector is enabled with the command line option &lt;code&gt;-XX:+UseConcMarkSweepGC&lt;/code&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Similar to the other available collectors, the concurrent collector is generational; thus both minor and major collections occur. The concurrent collector attempts to reduce pause times due to major collections by using separate garbage collector threads to trace the reachable objects concurrently with the execution of the application threads. During each major collection cycle, the concurrent collector will pause all the application threads for a brief period at the beginning of the collection and again toward the middle of the collection. The second pause tends to be the longer of the two pauses and multiple threads are used to do the collection work during that pause. The remainder of the collection including the bulk of the tracing of live objects and sweeping of unreachable objects is done with one or more garbage collector threads that run concurrently with the application. Minor collections can interleave with an on-going major cycle, and are done in a manner similar to the &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#par_gc"&gt;parallel collector&lt;/a&gt; (in particular, the application threads are stopped during minor collections). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The basic algorithms used by the concurrent collector are described in the technical report &lt;a href="http://research.sun.com/techrep/2000/abstract-88.html"&gt;A Generational Mostly-concurrent Garbage Collector&lt;/a&gt;. Note that precise implementation details may, however, differ slightly as the collector is enhanced from one release to another. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.overhead"&gt;Overhead of Concurrency&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector trades processor resources (which would otherwise be available to the application) for shorter major collection pause times. The most visible overhead is the use of one or more processors during the concurrent parts of the collection. On an &lt;i&gt;N&lt;/i&gt; processor system, the concurrent part of the collection will use &lt;i&gt;K/N&lt;/i&gt; of the available processors, where &lt;i&gt;1 &amp;lt;= K &amp;lt;= ceiling{N/4}&lt;/i&gt;. (Note that the precise choice of and bounds on &lt;i&gt;K&lt;/i&gt; are subject to change.) In addition to the use of processors during concurrent phases, additional overhead is incurred to enable concurrency. Thus while garbage collection pauses are typically much shorter with the concurrent collector, application throughput also tends to be slightly lower than with the other collectors. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;On a machine with more than one processing core, there are processors available for application threads during the concurrent part of the collection, so the concurrent garbage collector thread does not "pause" the application. This usually results in shorter pauses, but again fewer processor resources are available to the application and some slowdown should be expected, especially if the application utilizes all of the processing cores maximally. Up to a limit, as &lt;i&gt;N&lt;/i&gt; increases the reduction in processor resources due to concurrent garbage collection becomes smaller, and the benefit from concurrent collection increases. The following section, &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.concurrent_mode_failure"&gt;concurrent mode failure&lt;/a&gt;, discusses potential limits to such scaling. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Since at least one processor is utilized for garbage collection during the concurrent phases, the concurrent collector does not normally provide any benefit on a uniprocessor (single-core) machine. However, there is a separate mode available that can achieve low pauses on systems with only one or two processors; see &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#icms"&gt;incremental mode&lt;/a&gt; below for details. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.concurrent_mode_failure"&gt;Concurrent Mode Failure&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector uses one or more garbage collector threads that run simultaneously with the application threads with the goal of completing the collection of the tenured and permanent generations before either becomes full. As described above, in normal operation, the concurrent collector does most of its tracing and sweeping work with the application threads still running, so only brief pauses are seen by the application threads. However, if the concurrent collector is unable to finish reclaiming the unreachable objects before the tenured generation fills up, or if an allocation cannot be satisfied with the available free space blocks in the tenured generation, then the application is paused and the collection is completed with all the application threads stopped. The inability to complete a collection concurrently is referred to as &lt;dfn&gt;concurrent mode failure&lt;/dfn&gt; and indicates the need to adjust the concurrent collector parameters. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.oom"&gt;Excessive GC Time and OutOfMemoryError&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option &lt;code&gt;-XX:-UseGCOverheadLimit&lt;/code&gt; to the command line. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table class="grey3" align="center" border="0" cellpadding="5" cellspacing="0" width="80%"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;The policy is the same as that in the parallel collector, except that time spent performing concurrent collections is not counted toward the 98% time limit. In other words, only collections performed while the application is stopped count toward excessive GC time. Such collections are typically due to a concurrent mode failure or an explicit collection request (e.g., a call to &lt;code&gt;System.gc()&lt;/code&gt;). &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.floating_garbage"&gt;Floating Garbage&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector, like all the other collectors in HotSpot, is a tracing collector that identifies at least all the reachable objects in the heap. In the parlance of &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#resources.jones_lins_book"&gt;Jones and Lins&lt;/a&gt; it is an &lt;dfn&gt;incremental update&lt;/dfn&gt; collector. Because application threads and the garbage collector thread run concurrently during a major collection, objects that are traced by the garbage collector thread may subsequently become unreachable by the time collection finishes. Such unreachable objects that have not yet been reclaimed are referred to as &lt;dfn&gt;floating garbage&lt;/dfn&gt;. The amount of floating garbage depends on the duration of the concurrent collection cycle and on the frequency of reference updates, also known as &lt;dfn&gt;mutations&lt;/dfn&gt;, by the application. Furthermore, since the young generation and the tenured generation are collected independently, each acts a source of roots to the other. As a rough rule of thumb, try increasing the size of the tenured generation by 20% to account for the floating garbage. Floating garbage in the heap at the end of one concurrent collection cycle is collected during the next collection cycle. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.pauses"&gt;Pauses&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector pauses an application twice during a concurrent collection cycle. The first pause is to mark as live the objects directly reachable from the roots (e.g., object references from application thread stacks and registers, static objects and so on) and from elsewhere in the heap (e.g., the young generation). This first pause is referred to as the &lt;dfn&gt;initial mark pause&lt;/dfn&gt;. The second pause comes at the end of the concurrent tracing phase and finds objects that were missed by the concurrent tracing due to updates by the application threads of references in an object after the concurrent collector had finished tracing that object. This second pause is referred to as the &lt;dfn&gt;remark pause&lt;/dfn&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.concurrent_phases"&gt;Concurrent Phases&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent tracing of the reachable object graph occurs between the initial mark pause and the remark pause. During this concurrent tracing phase one or more concurrent garbage collector threads may be using processor resources that would otherwise have been available to the application and, as a result, compute-bound applications may see a commensurate fall in application throughput during this and other concurrent phases even though the application threads are not paused. After the remark pause, there is a concurrent sweeping phase which collects the objects identified as unreachable. Once a collection cycle completes, the concurrent collector will wait, consume almost no computational resources, until the start of the next major collection cycle. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.starting_a_cycle"&gt;Starting a Concurrent Collection Cycle&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;With the serial collector a major collection occurs whenever the tenured generation becomes full and all application threads are stopped while the collection is done. In contrast, a concurrent collection needs to be started at a time such that the collection can finish before the tenured generation becomes full; otherwise the application would observe longer pauses due to &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#cms.concurrent_mode_failure"&gt;concurrent mode failure&lt;/a&gt;. There are several ways a concurrent collection can be started. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Based on recent history, the concurrent collector maintains estimates of the time remaining before the tenured generation will be exhausted and of the time needed for a concurrent collection cycle. Based on these dynamic estimates, a concurrent collection cycle will be started with the aim of completing the collection cycle before the tenured generation is exhausted. These estimates are padded for safety, since the concurrent mode failure can be very costly. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;A concurrent collection will also start if the occupancy of the tenured generation exceeds an &lt;dfn&gt;initiating occupancy&lt;/dfn&gt;, a percentage of the tenured generation. The default value of this initiating occupancy threshold is approximately 92%, but the value is subject to change from release to release. This value can be manually adjusted using the command line option &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;img src="http://java.sun.com/im/a.gif" height="1" width="40" /&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;br /&gt;         &lt;pre&gt;-XX:CMSInitiatingOccupancyFraction=&amp;lt;N&amp;gt;&lt;/pre&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;where &amp;lt;N&amp;gt; is an integral percentage (0-100) of the tenured generation size. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.scheduling_pauses"&gt;Scheduling Pauses&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The pauses for the young generation collection and the tenured generation collection occur independently. They do not overlap, but may occur in quick succession such that the pause from one collection, immediately followed by one from the other collection, can appear to be a single, longer pause. To avoid this, the concurrent collector attempts to schedule the remark pause roughly midway between the previous and next young generation pauses. This scheduling is currently not done for the initial mark pause, which is usually much shorter than the remark pause. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="icms"&gt;Incremental Mode&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collector can be used in a mode in which the concurrent phases are done incrementally. Recall that during a concurrent phase the garbage collector thread is using one or more processors. The incremental mode is meant to lessen the impact of long concurrent phases by periodically stopping the concurrent phase to yield back the processor to the application. This mode, referred to here as “i-cms,” divides the work done concurrently by the collector into small chunks of time which are scheduled between young generation collections. This feature is useful when applications that need the low pause times provided by the concurrent collector are run on machines with small numbers of processors (e.g., 1 or 2). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The concurrent collection cycle typically includes the following steps: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;   &lt;li&gt;stop all application threads and identify the set of objects reachable from roots, then resume all application threads &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;concurrently trace the reachable object graph, using one or more processors, while the application threads are executing &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;concurrently retrace sections of the object graph that were modified since the tracing in the previous step, using one processor &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;stop all application threads and retrace sections of the roots and object graph that may have been modified since they were last examined, then resume all application threads &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;concurrently sweep up the unreachable objects to the free lists used for allocation, using one processor &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;concurrently resize the heap and prepare the support data structures for the next collection cycle, using one processor &lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Normally, the concurrent collector uses one or more processors during the entire concurrent tracing phase, without voluntarily relinquishing them. Similarly, one processor is used for the entire concurrent sweep phase, again without relinquishing it. This overhead can be too much of a disruption for applications with response time constraints that might otherwise have utilized the processing cores, particularly when run on systems with just one or two processors. Incremental mode solves this problem by breaking up the concurrent phases into short bursts of activity, which are scheduled to occur mid-way between minor pauses. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;i-cms uses a &lt;dfn&gt;duty cycle&lt;/dfn&gt; to control the amount of work the concurrent collector is allowed to do before voluntarily giving up the processor. The duty cycle is the percentage of time between young generation collections that the concurrent collector is allowed to run. i-cms can automatically compute the duty cycle based on the behavior of the application (the recommended method, known as &lt;dfn&gt;automatic pacing&lt;/dfn&gt;), or the duty cycle can be set to a fixed value on the command line. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="icms.available_options"&gt;Command Line Options&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The following command-line options control i-cms (see below for recommendations for an initial set of options): &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table&gt;&lt;thead&gt;&lt;br /&gt;     &lt;tr style="vertical-align: bottom;"&gt;&lt;br /&gt;       &lt;th rowspan="2"&gt;Option&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th rowspan="2"&gt;Description&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th colspan="2"&gt;Default Value&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: bottom;"&gt;&lt;br /&gt;       &lt;th&gt;J2SE 5.0 and earlier&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th&gt;Java SE 6 and later&lt;br /&gt;         &lt;hr /&gt;&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:+CMSIncrementalMode&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;Enables incremental mode. Note that the concurrent collector must also be enabled (with -XX:+UseConcMarkSweepGC) for this option to work. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;disabled&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;disabled&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:+CMSIncrementalPacing&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;Enables automatic pacing. The incremental mode duty cycle is automatically adjusted based on statistics collected while the JVM is running. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;disabled&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;enabled&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalDutyCycle=&amp;lt;N&amp;gt;&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;The percentage (0-100) of time between minor collections that the concurrent collector is allowed to run. If CMSIncrementalPacing is enabled, then this is just the initial value. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;50&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;10&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalDutyCycleMin=&amp;lt;N&amp;gt;&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;The percentage (0-100) which is the lower bound on the duty cycle when CMSIncrementalPacing is enabled. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;10&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;0&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalSafetyFactor=&amp;lt;N&amp;gt;&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;The percentage (0-100) used to add conservatism when computing the duty cycle. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;10&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;10&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalOffset=&amp;lt;N&amp;gt;&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;The percentage (0-100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;0&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;0&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr style="vertical-align: top;"&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSExpAvgFactor=&amp;lt;N&amp;gt;&lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;The percentage (0-100) used to weight the current sample when computing exponential averages for the concurrent collection statistics. &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;25&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td align="right"&gt;25&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="icms.recommended_options"&gt;Recommended Options&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;To use i-cms in Java SE 6, use the following command line options: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;img src="http://java.sun.com/im/a.gif" height="1" width="40" /&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;br /&gt;         &lt;pre&gt;-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode \&lt;br /&gt;&lt;br /&gt;-XX:+PrintGCDetails -XX:+PrintGCTimeStamps&lt;/pre&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The first two options enable the concurrent collector and i-cms, respectively. The last two options are not required; they simply cause diagnostic information about garbage collection to be written to stdout, so that garbage collection behavior can be seen and later analyzed. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Note that in J2SE 5.0 and earlier releases, we recommend the following as an initial set of command line options for i-cms: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;img src="http://java.sun.com/im/a.gif" height="1" width="40" /&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;br /&gt;         &lt;pre&gt;-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode \&lt;br /&gt;&lt;br /&gt;-XX:+PrintGCDetails -XX:+PrintGCTimeStamps \&lt;br /&gt;&lt;br /&gt;-XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0&lt;br /&gt;&lt;br /&gt;-XX:CMSIncrementalDutyCycle=10&lt;/pre&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;These are the same as recommended for Java SE 6, with the addition of three options that control i-cms automatic pacing. The additional options simply specify the values that became the default in Java SE 6. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;&lt;a name="icms.troubleshooting"&gt;Basic Troubleshooting&lt;/a&gt; &lt;/h3&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The i-cms automatic pacing feature uses statistics gathered while the program is running to compute a duty cycle so that concurrent collections complete before the heap becomes full. However, past behavior is not a perfect predictor of future behavior and the estimates may not always be accurate enough to prevent the heap from becoming full. If too many full collections occur, try the following steps, one at a time: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table&gt;&lt;thead&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;th&gt;Step&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;       &lt;th&gt;Options&lt;/th&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/thead&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;1. Increase the safety factor: &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalSafetyFactor=&amp;lt;N&amp;gt; &lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;2. Increase the minimum duty cycle: &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:CMSIncrementalDutyCycleMin=&amp;lt;N&amp;gt; &lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;3. Disable automatic pacing and use a fixed duty cycle: &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;kbd&gt;-XX:-CMSIncrementalPacing -XX:CMSIncrementalDutyCycle=&amp;lt;N&amp;gt; &lt;/kbd&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;&lt;a name="cms.measurements"&gt;Measurements&lt;/a&gt; &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Below is the output from the concurrent collector with the options &lt;kbd&gt;-verbose:gc -XX:+PrintGCDetails&lt;/kbd&gt;, with a few minor details removed. Note that the output for the concurrent collector is interspersed with the output from the minor collections; typically many minor collections occur during a concurrent collection cycle. The &lt;samp&gt;CMS-initial-mark:&lt;/samp&gt; indicates the start of the concurrent collection cycle. The &lt;samp&gt;CMS-concurrent-mark:&lt;/samp&gt; indicates the end of the concurrent marking phase and &lt;samp&gt;CMS-concurrent-sweep:&lt;/samp&gt; marks the end of the concurrent sweeping phase. Not discussed before is the precleaning phase indicated by &lt;samp&gt;CMS-concurrent-preclean:&lt;/samp&gt;. Precleaning represents work that can be done concurrently in preparation for the remark phase &lt;samp&gt;CMS-remark&lt;/samp&gt;. The final phase is indicated by the &lt;samp&gt;CMS-concurrent-reset:&lt;/samp&gt; and is in preparation for the next concurrent collection. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;pre&gt;&lt;samp&gt;&lt;br /&gt;[GC [1 CMS-initial-mark: 13991K(20288K)] 14103K(22400K), 0.0023781 secs]&lt;br /&gt;[GC [DefNew: 2112K-&amp;gt;64K(2112K), 0.0837052 secs] 16103K-&amp;gt;15476K(22400K), 0.0838519 secs]&lt;br /&gt;...&lt;br /&gt;[GC [DefNew: 2077K-&amp;gt;63K(2112K), 0.0126205 secs] 17552K-&amp;gt;15855K(22400K), 0.0127482 secs]&lt;br /&gt;[CMS-concurrent-mark: 0.267/0.374 secs]&lt;br /&gt;[GC [DefNew: 2111K-&amp;gt;64K(2112K), 0.0190851 secs] 17903K-&amp;gt;16154K(22400K), 0.0191903 secs]&lt;br /&gt;[CMS-concurrent-preclean: 0.044/0.064 secs]&lt;br /&gt;[GC [1 CMS-remark: 16090K(20288K)] 17242K(22400K), 0.0210460 secs]&lt;br /&gt;[GC [DefNew: 2112K-&amp;gt;63K(2112K), 0.0716116 secs] 18177K-&amp;gt;17382K(22400K), 0.0718204 secs]&lt;br /&gt;[GC [DefNew: 2111K-&amp;gt;63K(2112K), 0.0830392 secs] 19363K-&amp;gt;18757K(22400K), 0.0832943 secs]&lt;br /&gt;...&lt;br /&gt;[GC [DefNew: 2111K-&amp;gt;0K(2112K), 0.0035190 secs] 17527K-&amp;gt;15479K(22400K), 0.0036052 secs]&lt;br /&gt;[CMS-concurrent-sweep: 0.291/0.662 secs]&lt;br /&gt;[GC [DefNew: 2048K-&amp;gt;0K(2112K), 0.0013347 secs] 17527K-&amp;gt;15479K(27912K), 0.0014231 secs]&lt;br /&gt;[CMS-concurrent-reset: 0.016/0.016 secs]&lt;br /&gt;[GC [DefNew: 2048K-&amp;gt;1K(2112K), 0.0013936 secs] 17527K-&amp;gt;15479K(27912K), 0.0014814 secs]&lt;br /&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The initial mark pause is typically short relative to the minor collection pause time. The concurrent phases (concurrent mark, concurrent preclean and concurrent sweep) normally last significantly longer than a minor collection pause, as indicated by the example output above. Note, however, that the application is not paused during these concurrent phases. The remark pause is often comparable in length to a minor collection. The remark pause is affected by certain application characteristics (e.g., a high rate of object modification can increase this pause) and the time since the last minor collection (i.e., more objects in the young generation may increase this pause). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="other_considerations"&gt;8. Other Considerations&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;Permanent Generation Size&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The permanent generation does not have a noticeable impact on garbage collector performance for most applications. However, some applications dynamically generate and load many classes; for example, some implementations of JavaServer Pages (JSP) pages. These applications may need a larger permanent generation to hold the additional classes. If so, the maximum permanent generation size can be increased with the command-line option &lt;kbd&gt;-XX:MaxPermSize=&amp;lt;N&amp;gt;&lt;/kbd&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;Finalization; Weak, Soft and Phantom References&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Some applications interact with garbage collection by using finalization and weak, soft, or phantom references. These features can create performance artifacts at the Java programming language level. An example of this is relying on finalization to close file descriptors, which makes an external resource (descriptors) dependent on garbage collection promptness. Relying on garbage collection to manage resources other than memory is almost always a bad idea. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The &lt;a href="http://java.sun.com/javase/technologies/hotspot/gc/#resources"&gt;Resources section&lt;/a&gt; includes an article that discusses in depth some of the pitfalls of finalization and techniques for avoiding them. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;Explicit Garbage Collection&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Another way applications can interact with garbage collection is by invoking full garbage collections explicitly by calling &lt;code&gt;System.gc()&lt;/code&gt;. This can force a major collection to be done when it may not be necessary (i.e., when a minor collection would suffice), and so in general should be avoided. The performance impact of explicit garbage collections can be measured by disabling them using the flag &lt;kbd&gt;-XX:+DisableExplicitGC&lt;/kbd&gt;, which causes the VM to ignore calls to &lt;code&gt;System.gc()&lt;/code&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;One of the most commonly encountered uses of explicit garbage collection occurs with RMI's distributed garbage collection (DGC). Applications using RMI refer to objects in other virtual machines. Garbage cannot be collected in these distributed applications without occasionally collection the local heap, so RMI forces full collections periodically. The frequency of these collections can be controlled with properties. For example, &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;img src="http://java.sun.com/im/a.gif" height="1" width="40" /&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;code&gt;java -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 ... &lt;/code&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;specifies explicit collection once per hour instead of the default rate of once per minute. However, this may also cause some objects to take much longer to be reclaimed. These properties can be set as high as &lt;code&gt;Long.MAX_VALUE&lt;/code&gt; to make the time between explicit collections effectively infinite, if there is no desire for an upper bound on the timeliness of DGC activity. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;Soft References&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;Soft references are kept alive longer in the server virtual machine than in the client. The rate of clearing can be controlled with the command line option &lt;kbd&gt;-XX:SoftRefLRUPolicyMSPerMB=&amp;lt;N&amp;gt;&lt;/kbd&gt;, which specifies the number of milliseconds a soft reference will be kept alive (once it is no longer strongly reachable) for each megabyte of free space in the heap. The default value is 1000 ms per megabyte, which means that a soft reference will survive (after the last strong reference to the object has been collected) for 1 second for each megabyte of free space in the heap. Note that this is an approximate figure since soft references are cleared only during garbage collection, which may occur sporadically. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h2&gt;Solaris 8 Alternate libthread&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The Solaris 8 Operating System supports an alternate version of the threading library, libthread, that binds threads to light-weight processes (LWPs) directly. Some applications can benefit greatly from the use of this alternate libthread and it is a potential benefit for any threaded application. The following commands will load the alternate libthread for java (Bourne shell syntax is shown): &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td&gt;&lt;img src="http://java.sun.com/im/a.gif" height="1" width="40" /&gt; &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td&gt;&lt;br /&gt;         &lt;pre&gt;LD_PRELOAD=/usr/lib/lwp/libthread.so.1&lt;br /&gt;export LD_PRELOAD&lt;br /&gt;java ...&lt;/pre&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;span class="sp10"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;The above is necessary only on Solaris 8, since the alternate libthread is the default in the Solaris 9 Operating System and is the only libthread available starting with Solaris 10. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;h1&gt;&lt;a name="resources"&gt;9. Resources&lt;/a&gt; &lt;/h1&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href="http://java.sun.com/docs/hotspot/HotSpotFAQ.html"&gt;HotSpot VM Frequently Asked Questions (FAQ)&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;&lt;a href="http://java.sun.com/docs/hotspot/gc1.4.2/example.html"&gt;GC output examples&lt;/a&gt; describes how to interpret the output from the different collectors. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;&lt;a name="resources.finalization_article"&gt;&lt;/a&gt;&lt;a href="http://www.devx.com/Java/Article/30192"&gt;How to Handle Java Finalization's Memory-Retention Issues&lt;/a&gt; covers finalization pitfalls and ways to avoid them. &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li&gt;&lt;a name="resources.jones_lins_book"&gt;Richard Jones and Rafael Lins, Garbage Collection: Algorithms for Automated Dynamic Memory Management, Wiley and Sons (1996), ISBN 0-471-94148-4 &lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;As used on the web site, the terms "Java Virtual Machine" and "JVM" mean a virtual machine for the Java platform. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;&lt;img alt=" " src="http://java.sun.com/im/a.gif" border="0" height="1" width="10" /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;img alt=" " src="http://java.sun.com/im/a.gif" border="0" height="2" width="1" /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="right"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2488490746136830746-3561450660038751751?l=nutthaphon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutthaphon.blogspot.com/feeds/3561450660038751751/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://nutthaphon.blogspot.com/2009/11/java-se-6-hotspottm-virtual-machine.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/3561450660038751751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2488490746136830746/posts/default/3561450660038751751'/><link rel='alternate' type='text/html' href='http://nutthaphon.blogspot.com/2009/11/java-se-6-hotspottm-virtual-machine.html' title='Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning'/><author><name>ณัฐพล สุวรรณวงษ์</name><uri>http://www.blogger.com/profile/14291406590594822628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2488490746136830746.post-2974818172316535775</id><published>2009-11-27T12:57:00.003+07:00</published><updated>2009-12-16T13:45:09.174+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><title type='text'>JBoss performance tuning part 2</title><content type='html'>&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://nutthaphon.blogspot.com/2009/11/jboss-performance-tuning-part-1.html"&gt;JBoss Performance Tuning part 1&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://nutthaphon.blogspot.com/2009/11/jboss-performance-tuning-part-2.html"&gt;JBoss Performance Tuning part 2&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style="color: red;"&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style="color: red;"&gt;Tip 15: Lots of EJB requests ? switch to the PoolInvoker  &lt;br /&gt; &lt;/h3&gt;  &lt;p&gt;JBoss uses RMI for EJB communication and by default creates a single thread for every incoming request.&lt;/p&gt;  &lt;p&gt;When the number of requests is very large this could be a bottleneck. However you can switch from the  &lt;br /&gt;standard jrmp service invoker to the pool invoker.   &lt;br /&gt;How to do it ? open standardjboss.xml and find the following fragment:   &lt;br /&gt; &lt;/p&gt;  &lt;p class="ol-foreground"&gt; &amp;lt;invoker-mbean&amp;gt;jboss:service=invoker,type=jrmp&amp;lt;/invoker-mbean&amp;gt;&lt;/p&gt;  &lt;p&gt;  &lt;br /&gt;On JBoss 4.x you should find 4 occurrences of it: stateless-rmi-invoker, clustered-stateless-rmi-invoker, stateful-rmi-invoker,entity-rmi-invoker. Now replace this fragment with :   &lt;br /&gt; &lt;/p&gt;  &lt;p class="ol-foreground"&gt; &amp;lt;invoker-mbean&amp;gt;jboss:service=invoker,type=pooled&amp;lt;/invoker-mbean&amp;gt;   &lt;br /&gt; &lt;/p&gt;  &lt;p&gt;Notice you can even have a mixed environment: that is stateless invocation managed by the pool and all others by jrmp.&lt;/p&gt;  &lt;p&gt;If you want to change the default attributes of your pool then open &lt;strong&gt;jboss-service.xml&lt;/strong&gt;&lt;/p&gt;  &lt;div class="dp-highlighter"&gt;   &lt;div class="bar"&gt;     &lt;div class="tools"&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;view plain&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;print&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;?&lt;/a&gt;&lt;/div&gt;   &lt;/div&gt;    &lt;ol class="dp-xml"&gt;     &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;mbean&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;code&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"org.jboss.invocation.pooled.server.PooledInvoker"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"jboss:service=invoker,type=pooled"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"NumAcceptThreads"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"MaxPoolSize"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;300&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ClientMaxPoolSize"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;300&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"SocketTimeout"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;60000&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ServerBindAddress"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;${jboss.bind.address}&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ServerBindPort"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;4445&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ClientConnectAddress"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;${jboss.bind.address}&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ClientConnectPort"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"ClientRetryCount"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"EnableTcpNoDelay"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;      &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;mbean&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;   &lt;/ol&gt; &lt;/div&gt;  &lt;pre style="display: none;" class="xml" name="code"&gt;   &amp;lt;mbean code="org.jboss.invocation.pooled.server.PooledInvoker"&lt;br /&gt;     name="jboss:service=invoker,type=pooled"&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="NumAcceptThreads"&amp;gt;1&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="MaxPoolSize"&amp;gt;300&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ClientMaxPoolSize"&amp;gt;300&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="SocketTimeout"&amp;gt;60000&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ServerBindAddress"&amp;gt;${jboss.bind.address}&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ServerBindPort"&amp;gt;4445&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ClientConnectAddress"&amp;gt;${jboss.bind.address}&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ClientConnectPort"&amp;gt;0&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="ClientRetryCount"&amp;gt;1&amp;lt;/attribute&amp;gt;&lt;br /&gt;     &amp;lt;attribute name="EnableTcpNoDelay"&amp;gt;false&amp;lt;/attribute&amp;gt;&lt;br /&gt;  &amp;lt;/mbean&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are two key attributes for the PooledInvoker in regards to how many threads are used in processing requests.  The first is the &lt;strong&gt;NumAcceptThreads &lt;/strong&gt;attribute.  The value for this attribute will determine how many threads are created to listen for incoming requests. These threads will be the ones that call the accept() method of the server socket (which is a blocking call and will wait there till data is received on the network interface for the server socket).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;MaxPoolSize &lt;/strong&gt;is the other key factor: it's the size of the pool containing the ServerThreads .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;How can MaxPoolSize become a bottleneck ?&lt;/em&gt;  if the accept thread can not get a worker thread from the pool and the pool size has reached the MaxPoolSize value, it will wait for one to become available (instead of creating a new one).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;h3 style="color: red;"&gt;Tip 16: Have you got readonly Entity Beans ? tell it to JBoss&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;JBoss offers a way to handle this situation by defining either an entire EJB as being "read-only" or simply as a subset of its methods. When accessing a read-only method (or EJB), while JBoss still prevents concurrent access to the same bean instance, the bean will not be enrolled in the transaction and will not be locked during the whole transaction lifetime. Consequently, other transactions can directly use it for their own work.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;br /&gt; &lt;div class="bar"&gt;&lt;br /&gt;   &lt;div class="tools"&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;view plain&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;print&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol class="dp-xml"&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;enterprise-beans&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;  &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;MyEntity&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;get*&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;  &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;enterprise-beans&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="display: none;" class="xml" name="code"&gt;  &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;   &amp;lt;entity&amp;gt;&lt;br /&gt;     &amp;lt;ejb-name&amp;gt;MyEntity&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;       &amp;lt;method&amp;gt;&lt;br /&gt;         &amp;lt;method-name&amp;gt;get*&amp;lt;/method-name&amp;gt;&lt;br /&gt;         &amp;lt;read-only&amp;gt;true&amp;lt;/read-only&amp;gt;&lt;br /&gt;       &amp;lt;/method&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;   &amp;lt;/entity&amp;gt;&lt;br /&gt; &amp;lt;/enterprise-beans&amp;gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;&lt;br /&gt;&lt;br /&gt;Tip 17: Disable the hot deployer in production&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;See this tip:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mastertheboss.com/en/jboss-howto/42-jboss-config/68-configure-jboss-disable-hot-deployment-.html"&gt;http://www.mastertheboss.com/en/jboss-howto/42-jboss-config/68-configure-jboss-disable-hot-deployment-.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;Tip 18: Configure the EJB container to use cache, when possible.&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If the EJB container has exclusive access to the persistent store, it doesn’t need to synchronize the in-memory bean state from the persistent store at the beginning of each transaction.&lt;br /&gt;&lt;br /&gt;So you could activate the so-called &lt;strong&gt;Commit-A &lt;/strong&gt;option that caches entity bean state between transactions. In order to activate this option :&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;br /&gt; &lt;div class="bar"&gt;&lt;br /&gt;   &lt;div class="tools"&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;view plain&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;print&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol class="dp-xml"&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;jboss&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;  &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;enterprise-beans&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;container-configurations&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;container-configuration&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;extends&lt;/span&gt;&lt;span&gt;=  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;        &lt;span class="attribute-value"&gt;"Standard CMP 2.x EntityBean"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;container-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;CMP 2.x and Cache&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;container-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;commit-option&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;A&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;commit-option&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;container-configuration&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;container-configurations&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;MyEntity&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;configuration-name&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      CMP 2.x and Cache&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;configuration-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;          &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;get*&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;          &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;        &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;      &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;    &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;jboss&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="display: none;" class="xml" name="code"&gt;&amp;lt;jboss&amp;gt;&lt;br /&gt; &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;container-configurations&amp;gt;&lt;br /&gt;     &amp;lt;container-configuration extends=&lt;br /&gt;       "Standard CMP 2.x EntityBean"&amp;gt;&lt;br /&gt;       &amp;lt;container-name&amp;gt;CMP 2.x and Cache&amp;lt;/container-name&amp;gt;&lt;br /&gt;       &amp;lt;commit-option&amp;gt;A&amp;lt;/commit-option&amp;gt;&lt;br /&gt;     &amp;lt;/container-configuration&amp;gt;&lt;br /&gt;   &amp;lt;/container-configurations&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;entity&amp;gt;&lt;br /&gt;     &amp;lt;ejb-name&amp;gt;MyEntity&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;     &amp;lt;configuration-name&lt;br /&gt;   CMP 2.x and Cache&amp;lt;/configuration-name&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;       &amp;lt;method&amp;gt;&lt;br /&gt;         &amp;lt;method-name&amp;gt;get*&amp;lt;/method-name&amp;gt;&lt;br /&gt;         &amp;lt;read-only&amp;gt;true&amp;lt;/read-only&amp;gt;&lt;br /&gt;       &amp;lt;/method&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;   &amp;lt;/entity&amp;gt;&lt;br /&gt;&amp;lt;/jboss&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;Tip 19: Use Cache invalidation in a Cluster for Commit Option A&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Commit option A can boost your Entity Bean but what happens when running in a cluster ? in a cluster configuration &lt;em&gt;more than one JBoss node&lt;/em&gt; will access the same database. Furthermore, they will not only read data, but may also update the db store.Consequently, we now have as many points of write access to the database as we have JBoss instances in the cluster.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;For these scenarios, JBoss incorporates a handy tool: the cache invalidation framework. It provides automatic invalidation of cache entries in a single node or across a cluster of JBoss instances. As soon as an entity bean is modified on a node, an invalidation message is automatically sent to all related containers in the cluster and the related entry is removed from the cache. The next time the data is required by a node, it will not be found in cache, and will be reloaded from the database.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In order to activate it, add to your Entity Bean the cache-invalidation tag.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;br /&gt; &lt;div class="bar"&gt;&lt;br /&gt;   &lt;div class="tools"&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;view plain&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;print&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol class="dp-xml"&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;MyEntity&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ejb-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;configuration-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;Standard CMP 2.x with cache invalidation  &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;configuration-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;     &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;       &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;get*&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method-name&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;       &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;read-only&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;     &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;method&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;method-attributes&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;cache-invalidation&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;True&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;cache-invalidation&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt; &lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;entity&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="display: none;" class="xml" name="code"&gt;    &amp;lt;entity&amp;gt;&lt;br /&gt;     &amp;lt;ejb-name&amp;gt;MyEntity&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;     &amp;lt;configuration-name&amp;gt;&lt;br /&gt;   Standard CMP 2.x with cache invalidation&lt;br /&gt;   &amp;lt;/configuration-name&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;       &amp;lt;method&amp;gt;&lt;br /&gt;         &amp;lt;method-name&amp;gt;get*&amp;lt;/method-name&amp;gt;&lt;br /&gt;         &amp;lt;read-only&amp;gt;true&amp;lt;/read-only&amp;gt;&lt;br /&gt;       &amp;lt;/method&amp;gt;&lt;br /&gt;     &amp;lt;method-attributes&amp;gt;&lt;br /&gt;     &amp;lt;cache-invalidation&amp;gt;True&amp;lt;/cache-invalidation&amp;gt;&lt;br /&gt;   &amp;lt;/entity&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;Tip 20: Synchronize at commit time when possible.&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;The sync-on-commit-only element configures a performance optimization that will cause entity bean state to be synchronized with the database only at commit time. Normally the state of all the beans in a transaction would need to be synchronized when an finder method is called or when an remove method is called :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="ol-foreground"&gt; &amp;lt;container-configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;container-name&amp;gt;Standard Pessimistic CMP 2.x EntityBean&amp;lt;/container-name&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;call-logging&amp;gt;false&amp;lt;/call-logging&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;invoker-proxy-binding-name&amp;gt;entity-pooled-invoker&amp;lt;/invoker-proxy-binding-name&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;strong&gt; &amp;lt;sync-on-commit-only&amp;gt;true&amp;lt;/sync-on-commit-only&amp;gt;&lt;br /&gt;  &lt;br /&gt;&lt;/strong&gt;  ....   &lt;br /&gt;&amp;lt;/container-configuration&amp;gt; &lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;Tip 21: Use Prepared Statement Cache:&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In JBoss, by default,prepared statements are not cached. To improve performance one can configure a prepared statement cache of an arbitrary size. You can use in your -ds.xml file the &lt;strong&gt;&amp;lt;prepared-statement-cache-size&amp;gt;&lt;/strong&gt; : this is the number of prepared statements per connection to be kept open and reused in subsequent requests.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: red;"&gt;Tip 22: Remove services you don't need&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;JBoss ships with lots of services, however you'll seldom need to use them all. The service is usually deployed as *-service.xml under the deploy directory. Sometimes it's also deployed as .sar/.rar archive.&lt;br /&gt;&lt;br /&gt;In order to remove the service, remove the file in the "&lt;strong&gt;Server/deploy&lt;/strong&gt;" column. If needed remove also the relative libs stated under "&lt;strong&gt;Server/lib&lt;/strong&gt;" &lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;span id="fck_dom_range_temp_1229075013265_370"&gt;&lt;br /&gt; &lt;table style="border: medium none ; width: 488.9pt; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0" width="652"&gt;&lt;tbody&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td style="border: 0.75pt solid navy; padding: 0in 3.5pt; background: navy none repeat scroll 0% 0%; width: 167.15pt; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style=";font-size:9pt;color:white;"  &gt;&lt;span style="font-size:85%;"&gt;Servizio&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: solid solid solid none; border-color: navy navy navy rgb(236, 233, 216); border-width: 0.75pt 0.75pt 0.75pt medium; padding: 0in 3.5pt; background: navy none repeat scroll 0% 0%; width: 154.5pt; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style=";font-size:9pt;color:white;"  &gt;&lt;span style="font-size:85%;"&gt;Server/deploy&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: solid solid solid none; border-color: navy navy navy rgb(236, 233, 216); border-width: 0.75pt 0.75pt 0.75pt medium; padding: 0in 3.5pt; background: navy none repeat scroll 0% 0%; width: 167.25pt; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style=";font-size:9pt;color:white;"  &gt;&lt;span style="font-size:85%;"&gt;Server/lib&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Mail service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;mail-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;mail-plugin.jar, mail.jar,activation.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Cache invalidation service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;cache-invalidation-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;J2EE client deployer service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;client-deployer-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Hibernate HAR support&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;hibernate-deployer-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jboss-hibernate.jar, hibernate2.jar, cglib-full-2.0.1.jar, odmg-3.0.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;HSQL DB&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;hsqldb-ds.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;hsqldb-plugin.jar, hsqldb.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Default JMS Service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jms folder&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jbossmq.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;HTTP Invoker (tunnels RMI through HTTP)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;http-invoker.sar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;XA Datasources&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jboss-xa-jdbc.rar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;JMX Console&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jmx-console.war&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Web Console&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;management/web-console.war&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;JSR-77&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;management/console-mgr.sar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Monitoring mail alerts&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;monitoring-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;jboss-monitoring.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Schedule Manager&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;schedule-manager-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;scheduler-plugin.jar, scheduler-plugin-example.jar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;     &lt;tr&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid; border-color: rgb(236, 233, 216) navy navy; border-width: medium 0.75pt 0.75pt; padding: 0in 3.5pt;color:transparent;" valign="top" width="223"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Sample Schedule service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td  style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt;color:transparent;" valign="top" width="206"&gt;&lt;br /&gt;         &lt;p&gt;&lt;span style="font-size:9pt;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;scheduler-service.xml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;       &lt;/td&gt;&lt;br /&gt;&lt;br /&gt;       &lt;td style="border-style: none solid solid none; border-color: rgb(236, 233, 216) navy navy rgb(236, 233, 216); border-width: medium 0.75pt 0.75pt medium; padding: 0in 3.5pt; background-color: transparent; width: 167.25pt;" valign="top" width="223"&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;&lt;br /&gt;     &lt;/tr&gt;&lt;br /&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are removing a core JBoss service like JMS or EAR Deployer then you need to remove it also from the &lt;strong&gt;jboss-service.xml &lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="dp-highlighter"&gt;&lt;br /&gt; &lt;div class="bar"&gt;&lt;br /&gt;   &lt;div class="tools"&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;view plain&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;print&lt;/a&gt;&lt;a href="http://www.mastertheboss.com/jboss-application-server/130-jboss-performance-tuning-part-2.html#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt; &lt;ol class="dp-xml"&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;mbean&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;code&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"org.jboss.management.j2ee.LocalJBossServerDomain"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"jboss.management.local:j2eeType=J2EEDomain,name=Manager"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"MainDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.system:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;MainDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"SARDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.system:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;ServiceDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"EARDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.j2ee:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;EARDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"EJBDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.ejb:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;EJBDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"RARDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.jca:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;RARDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"CMDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.jca:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;ConnectionFactoryDeployer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="alt"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"WARDeployer"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attribute"&gt;jboss.web:service&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;WebServer&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;   &lt;li class="class"&gt;&lt;span&gt;   &lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;attribute&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;name&lt;/span&gt;&lt;span&gt;=&lt;/span
