??xml version="1.0" encoding="utf-8" standalone="yes"?>av毛片在线免费看,久久久av电影,欧美男男激情freegayhttp://www.aygfsteel.com/alexwan/archive/2008/09/12/228544.htmlAlexwanAlexwanFri, 12 Sep 2008 03:20:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/09/12/228544.htmlhttp://www.aygfsteel.com/alexwan/comments/228544.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/09/12/228544.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/228544.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/228544.html
可以在sqlplus中用以下命?l表I间d数据文g:

 alter   tablespace   tablespaceName add   datafile   filePath size   500m;

Alexwan 2008-09-12 11:20 发表评论
]]>
[hibernate]hibernate中自定义主键生成?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/09/02/226316.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Tue, 02 Sep 2008 03:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/09/02/226316.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/226316.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/09/02/226316.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/226316.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/226316.html</trackback:ping><description><![CDATA[<strong>背景</strong>:<br /> Hibernate(目前使用的版本是3.2)中提供了多种生成主键的方?在下面的文章中有列出?br /> <a title="[hibernate]Hibernate主键生成方式 Key Generator " href="http://www.aygfsteel.com/alexwan/archive/2008/09/02/226299.html">[hibernate]Hibernate主键生成方式 Key Generator </a><br /> <br /> 然而当前的q么多种生成方式未必能满x们的要求.<br /> 比如<strong>increment</strong>,可以在一个hibernate实例的应用上很方便的时?但是在集的时候就不行?<br /> 再如<strong> identity</strong> ,<strong>sequence</strong> ,<strong>native</strong> 是数据局提供的主键生成方?往往也不是我们需?而且在程序跨数据库方面也体现Z?<br /> q有Z法的生成方式生成出来的主键基本都是字符串的.<br /> <br /> 我们现在需要一U生成方?使用Long作ؓ主键cd,自动?支持集群.<br /> 那么我们需要自定义一个我们的主键生成器才能实C.<br /> <br /> <strong>实现代码</strong>:<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">package</span><span style="color: #000000"> hibernate;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.Serializable;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.sql.Connection;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.sql.PreparedStatement;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.sql.ResultSet;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.sql.SQLException;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Properties;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.commons.logging.Log;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.apache.commons.logging.LogFactory;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.HibernateException;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.MappingException;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.dialect.Dialect;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.engine.SessionImplementor;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.id.Configurable;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.id.IdentifierGenerator;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.id.PersistentIdentifierGenerator;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.hibernate.type.Type;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_699_2226_Open_Image" onclick="this.style.display='none'; Codehighlighter1_699_2226_Open_Text.style.display='none'; Codehighlighter1_699_2226_Closed_Image.style.display='inline'; Codehighlighter1_699_2226_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_699_2226_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_699_2226_Closed_Text.style.display='none'; Codehighlighter1_699_2226_Open_Image.style.display='inline'; Codehighlighter1_699_2226_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> IncrementGenerator </span><span style="color: #0000ff">implements</span><span style="color: #000000"> IdentifierGenerator, Configurable </span><span id="Codehighlighter1_699_2226_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_699_2226_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> Log log </span><span style="color: #000000">=</span><span style="color: #000000"> LogFactory.getLog(IncrementGenerator.</span><span style="color: #0000ff">class</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> Long next;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> String sql;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> Serializable generate(SessionImplementor session, Object object)<br /> <img id="Codehighlighter1_927_1025_Open_Image" onclick="this.style.display='none'; Codehighlighter1_927_1025_Open_Text.style.display='none'; Codehighlighter1_927_1025_Closed_Image.style.display='inline'; Codehighlighter1_927_1025_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_927_1025_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_927_1025_Closed_Text.style.display='none'; Codehighlighter1_927_1025_Open_Image.style.display='inline'; Codehighlighter1_927_1025_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />            </span><span style="color: #0000ff">throws</span><span style="color: #000000"> HibernateException </span><span id="Codehighlighter1_927_1025_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_927_1025_Open_Text"><span style="color: #000000">{<br /> <img id="Codehighlighter1_946_1001_Open_Image" onclick="this.style.display='none'; Codehighlighter1_946_1001_Open_Text.style.display='none'; Codehighlighter1_946_1001_Closed_Image.style.display='inline'; Codehighlighter1_946_1001_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_946_1001_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_946_1001_Closed_Text.style.display='none'; Codehighlighter1_946_1001_Open_Image.style.display='inline'; Codehighlighter1_946_1001_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (sql</span><span style="color: #000000">!=</span><span style="color: #0000ff">null</span><span style="color: #000000">) </span><span id="Codehighlighter1_946_1001_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_946_1001_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />            getNext( session.connection() );<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />        }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />       </span><span style="color: #0000ff">return</span><span style="color: #000000"> next;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    <br /> <img id="Codehighlighter1_1117_1607_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1117_1607_Open_Text.style.display='none'; Codehighlighter1_1117_1607_Closed_Image.style.display='inline'; Codehighlighter1_1117_1607_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1117_1607_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1117_1607_Closed_Text.style.display='none'; Codehighlighter1_1117_1607_Open_Image.style.display='inline'; Codehighlighter1_1117_1607_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> configure(Type type, Properties params, Dialect d) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> MappingException </span><span id="Codehighlighter1_1117_1607_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1117_1607_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        String table </span><span style="color: #000000">=</span><span style="color: #000000"> params.getProperty(</span><span style="color: #000000">"</span><span style="color: #000000">table</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (table</span><span style="color: #000000">==</span><span style="color: #0000ff">null</span><span style="color: #000000">) table </span><span style="color: #000000">=</span><span style="color: #000000"> params.getProperty(PersistentIdentifierGenerator.TABLE);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        String column </span><span style="color: #000000">=</span><span style="color: #000000"> params.getProperty(</span><span style="color: #000000">"</span><span style="color: #000000">column</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (column</span><span style="color: #000000">==</span><span style="color: #0000ff">null</span><span style="color: #000000">) column </span><span style="color: #000000">=</span><span style="color: #000000"> params.getProperty(PersistentIdentifierGenerator.PK);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        String schema </span><span style="color: #000000">=</span><span style="color: #000000"> params.getProperty(PersistentIdentifierGenerator.SCHEMA);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        sql </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">select max(</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">column </span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">) from </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> ( schema</span><span style="color: #000000">==</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">?</span><span style="color: #000000"> table : schema </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">'</span><span style="color: #000000">.</span><span style="color: #000000">'</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> table );<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        log.info(sql);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    <br /> <img id="Codehighlighter1_1677_2224_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1677_2224_Open_Text.style.display='none'; Codehighlighter1_1677_2224_Closed_Image.style.display='inline'; Codehighlighter1_1677_2224_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1677_2224_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1677_2224_Closed_Text.style.display='none'; Codehighlighter1_1677_2224_Open_Image.style.display='inline'; Codehighlighter1_1677_2224_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />     </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> getNext(Connection conn) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> HibernateException </span><span id="Codehighlighter1_1677_2224_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1677_2224_Open_Text"><span style="color: #000000">{<br /> <img id="Codehighlighter1_1692_1961_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1692_1961_Open_Text.style.display='none'; Codehighlighter1_1692_1961_Closed_Image.style.display='inline'; Codehighlighter1_1692_1961_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1692_1961_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1692_1961_Closed_Text.style.display='none'; Codehighlighter1_1692_1961_Open_Image.style.display='inline'; Codehighlighter1_1692_1961_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />            </span><span style="color: #0000ff">try</span><span style="color: #000000"> </span><span id="Codehighlighter1_1692_1961_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1692_1961_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                PreparedStatement st </span><span style="color: #000000">=</span><span style="color: #000000"> conn.prepareStatement(sql);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                ResultSet rs </span><span style="color: #000000">=</span><span style="color: #000000"> st.executeQuery();<br /> <img id="Codehighlighter1_1829_1887_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1829_1887_Open_Text.style.display='none'; Codehighlighter1_1829_1887_Closed_Image.style.display='inline'; Codehighlighter1_1829_1887_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1829_1887_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1829_1887_Closed_Text.style.display='none'; Codehighlighter1_1829_1887_Open_Image.style.display='inline'; Codehighlighter1_1829_1887_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( rs.next() ) </span><span id="Codehighlighter1_1829_1887_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1829_1887_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    next </span><span style="color: #000000">=</span><span style="color: #000000"> rs.getLong(</span><span style="color: #000000">1</span><span style="color: #000000">) </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1907_1950_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1907_1950_Open_Text.style.display='none'; Codehighlighter1_1907_1950_Closed_Image.style.display='inline'; Codehighlighter1_1907_1950_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1907_1950_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1907_1950_Closed_Text.style.display='none'; Codehighlighter1_1907_1950_Open_Image.style.display='inline'; Codehighlighter1_1907_1950_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span id="Codehighlighter1_1907_1950_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1907_1950_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    next </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1l</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />            }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(SQLException e)<br /> <img id="Codehighlighter1_1993_2047_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1993_2047_Open_Text.style.display='none'; Codehighlighter1_1993_2047_Closed_Image.style.display='inline'; Codehighlighter1_1993_2047_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1993_2047_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1993_2047_Closed_Text.style.display='none'; Codehighlighter1_1993_2047_Open_Image.style.display='inline'; Codehighlighter1_1993_2047_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />            </span><span id="Codehighlighter1_1993_2047_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1993_2047_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">throw</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> HibernateException(e);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />            }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_2066_2217_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2066_2217_Open_Text.style.display='none'; Codehighlighter1_2066_2217_Closed_Image.style.display='inline'; Codehighlighter1_2066_2217_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2066_2217_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2066_2217_Closed_Text.style.display='none'; Codehighlighter1_2066_2217_Open_Image.style.display='inline'; Codehighlighter1_2066_2217_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />            </span><span style="color: #0000ff">finally</span><span style="color: #000000"> </span><span id="Codehighlighter1_2066_2217_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2066_2217_Open_Text"><span style="color: #000000">{<br /> <img id="Codehighlighter1_2081_2117_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2081_2117_Open_Text.style.display='none'; Codehighlighter1_2081_2117_Closed_Image.style.display='inline'; Codehighlighter1_2081_2117_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2081_2117_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2081_2117_Closed_Text.style.display='none'; Codehighlighter1_2081_2117_Open_Image.style.display='inline'; Codehighlighter1_2081_2117_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">try</span><span id="Codehighlighter1_2081_2117_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2081_2117_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                conn.close();<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(SQLException e)<br /> <img id="Codehighlighter1_2150_2206_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2150_2206_Open_Text.style.display='none'; Codehighlighter1_2150_2206_Closed_Image.style.display='inline'; Codehighlighter1_2150_2206_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_2150_2206_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2150_2206_Closed_Text.style.display='none'; Codehighlighter1_2150_2206_Open_Image.style.display='inline'; Codehighlighter1_2150_2206_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span id="Codehighlighter1_2150_2206_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_2150_2206_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    </span><span style="color: #0000ff">throw</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> HibernateException(e);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />            }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />        }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br /> <br /> 配置:<br /> 在对应的hbm文g里面id的配|如?<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">        </span><span style="color: #0000ff"><</span><span style="color: #800000">id </span><span style="color: #ff0000">name</span><span style="color: #0000ff">="id"</span><span style="color: #ff0000"> type</span><span style="color: #0000ff">="long"</span><span style="color: #ff0000"> column</span><span style="color: #0000ff">="id"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">generator </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="hibernate.IncrementGenerator"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        </span><span style="color: #0000ff"></</span><span style="color: #800000">id</span><span style="color: #0000ff">></span></div> <br /> ps:此生成方式仅通过两个hibernate实例试,如发现有问题,La.<br /> <img src ="http://www.aygfsteel.com/alexwan/aggbug/226316.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-09-02 11:59 <a href="http://www.aygfsteel.com/alexwan/archive/2008/09/02/226316.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[hibernate]Hibernate主键生成方式 Key Generatorhttp://www.aygfsteel.com/alexwan/archive/2008/09/02/226299.htmlAlexwanAlexwanTue, 02 Sep 2008 03:24:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/09/02/226299.htmlhttp://www.aygfsteel.com/alexwan/comments/226299.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/09/02/226299.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/226299.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/226299.html   主键产生? 
  可选项说明Q? 
  1)   assigned  
  主键由外部程序负责生成,无需Hibernate参与? 
   
  2)   hilo  
  通过hi/lo   法实现的主键生成机Ӟ需要额外的数据库表保存? 
  键生成历史状态? 
   
  3)   seqhilo  
  与hilo   cMQ通过hi/lo   法实现的主键生成机Ӟ只是主键历史  
  状态保存在Sequence中,适用于支持Sequence的数据库Q如Oracle? 
   
  4)   increment  
  主键按数值顺序递增。此方式的实现机制ؓ在当前应用实例中l持  
  一个变量,以保存着当前的最大|之后每次需要生成主键的时? 
  此值加1作ؓ主键? 
  q种方式可能产生的问题是Q如果当前有多个实例讉K同一个数? 
  库,那么׃各个实例各自l护主键状态,不同实例可能生成同样  
  的主键,从而造成主键重复异常。因此,如果同一数据库有多个? 
  例访问,此方式必避免用? 
   
  5)   identity  
  采用数据库提供的主键生成机制。如DB2、SQL   Server、MySQL  
  中的主键生成机制? 
   
  6)   sequence  
  采用数据库提供的sequence   机制生成主键。如Oralce   中的  
  Sequence? 
   
  7)   native  
  由HibernateҎ底层数据库自行判断采用identity、hilo、sequence  
  其中一U作Z键生成方式? 
   
  8)   uuid.hex  
  由HibernateZ128   位唯一g生算法生?6   q制数|~码? 
  以长?2   的字W串表示Q作Z键? 
   
  9)   uuid.string  
  与uuid.hex   cMQ只是生成的主键未进行编码(长度16Q。在某些  
  数据库中可能出现问题Q如PostgreSQLQ? 
   
  10)   foreign  
  使用外部表的字段作ؓ主键? 
  一般而言Q利用uuid.hex方式生成主键提供最好的性能和数据库q_? 
  应性? 
   
  另外׃常用的数据库Q如Oracle、DB2、SQLServer、MySql   {,都提  
  供了易用的主键生成机ӞAuto-Increase   字段或者SequenceQ。我们可以在? 
  据库提供的主键生成机制上Q采用generator-class=native的主键生成方式? 
  不过值得注意的是Q一些数据库提供的主键生成机制在效率上未必最佻I  
  大量q发insert数据时可能会引v表之间的互锁? 
  数据库提供的主键生成机制Q往往是通过在一个内部表中保存当前主键状  
  态(如对于自增型主键而言Q此内部表中q护着当前的最大值和递增量)Q? 
  之后每次插入数据会读取这个最大|然后加上递增量作为新记录的主键,? 
  后再把这个新的最大值更新回内部表中Q这P一ơInsert操作可能D数据  
  库内部多ơ表d操作Q同时伴随的q有数据的加锁解锁操作,q对性能产生  
  了较大媄响? 
  因此Q对于ƈ发Insert要求较高的系l,推荐采用uuid.hex   作ؓ主键生成  
  机制?nbsp;   


Alexwan 2008-09-02 11:24 发表评论
]]>
[ORACLE]ORACLE中表I间的?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224439.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Tue, 26 Aug 2008 03:51:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224439.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/224439.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224439.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/224439.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/224439.html</trackback:ping><description><![CDATA[<p>     表空间的作用之一是在一个ORACLE应用中开辟一个领域让指定用户的数据表区别于其他用L数据?q也方便用户Ҏ据表的管?同时也方便了对ORACLE服务的管?节省计算?<br />      要达到这个目标通常要给用户讄一个默认的表空?以下是其中一U实现方?步骤如下:<br /> 步骤是:<br /> 1Q创Z个表I间,在sqlplus下用如下参考命?<br /> create tablespace data datafile '/home/oracle/databases/ora10/data .dbf'<br /> size                                 200M<br /> autoextend on maxsize                200M<br /> extent management local uniform size  64K;<br /> 2Q创Z个用P该用户默认的表空间ؓ刚刚创徏的表I间Q时表I间为TEMP,参考如下命?<br /> create user userName identified by password DEFAULT TABLESPACE tablespaceName TEMPORARY TABLESPACE temptablespaceName;</p> <p>3Q以q个用户名和密码q进d是另一个用户对应的数据库表I间?</p> <img src ="http://www.aygfsteel.com/alexwan/aggbug/224439.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-08-26 11:51 <a href="http://www.aygfsteel.com/alexwan/archive/2008/08/26/224439.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[ORACLE]linux下开启ORACLE服务的步?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224434.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Tue, 26 Aug 2008 03:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224434.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/224434.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/08/26/224434.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/224434.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/224434.html</trackback:ping><description><![CDATA[一般按照如下步骤开启数据库服务:<br /> 1Q以oraclew䆾q入 su oracle<br /> 2Q进入oraproduct/bin目录<br /> 3Q执行启动监听命令:./lsnrctl start<br /> 4Q修改当前要启动的SID|export ORACLE_SID=dbname<br /> (要查看可用的数据库实?在oraproduct/ dbs目录下面。LS一下看看所有扩展名?ora的就可以?<br /> 5Q以NOLOG方式q接数据库:./sqlplus /nolog<br /> 6Q再q接到sysdbaQconnect /as sysdba<br /> 7Q执行启动命令:startup<br /> PS:前三步只执行一?后四步可重复执行.<br /> <br /> 在此感谢杨秧同志的热心帮? <img src ="http://www.aygfsteel.com/alexwan/aggbug/224434.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-08-26 11:32 <a href="http://www.aygfsteel.com/alexwan/archive/2008/08/26/224434.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从SQLSERVER与ORACLE数据库中随机取记?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/08/21/223551.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Thu, 21 Aug 2008 08:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/08/21/223551.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/223551.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/08/21/223551.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/223551.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/223551.html</trackback:ping><description><![CDATA[<p><font style="color: #000000" color="#ff0000">在sql server?从数据表中随机取出n条记?使用以下SQL语句:</font></p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff">select</span><span style="color: #000000"> </span><span style="color: #0000ff">top</span><span style="color: #000000"> n </span><span style="color: #808080">*</span><span style="color: #000000"> </span><span style="color: #0000ff">from</span><span style="color: #000000"> tableName </span><span style="color: #0000ff">order</span><span style="color: #000000"> </span><span style="color: #0000ff">by</span><span style="color: #000000"> </span><span style="color: #ff00ff">newid</span><span style="color: #000000">() <br /> </span></div> <p><font color="#0000ff"></font></p> <p><font color="#0000ff"><font style="color: #000000" color="#0000ff">在oralce?从数据表中随机取出n条记?使用以下SQL语句<br /> </font></font><br /> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff">select</span><span style="color: #000000">   </span><span style="color: #808080">*</span><span style="color: #000000">   </span><span style="color: #0000ff">from</span><span style="color: #000000">   (</span><span style="color: #0000ff">select</span><span style="color: #000000">   tableName .</span><span style="color: #808080">*</span><span style="color: #000000">,dbms_random.random  as randomKey   </span><span style="color: #0000ff">from</span><span style="color: #000000"> tableName  </span><span style="color: #0000ff">order</span><span style="color: #000000">  </span><span style="color: #0000ff">by</span><span style="color: #000000">   randomKey)    <br />   </span><span style="color: #0000ff">where</span><span style="color: #000000">   rownum</span><span style="color: #808080"><=</span><span style="color: #000000">n</span></div> <img src ="http://www.aygfsteel.com/alexwan/aggbug/223551.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-08-21 16:53 <a href="http://www.aygfsteel.com/alexwan/archive/2008/08/21/223551.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[oracle]oracle中创I间(tablespace)http://www.aygfsteel.com/alexwan/archive/2008/08/16/222419.htmlAlexwanAlexwanSat, 16 Aug 2008 05:51:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/08/16/222419.htmlhttp://www.aygfsteel.com/alexwan/comments/222419.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/08/16/222419.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/222419.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/222419.html
create tablespace data datafile '/home/oracle/databases/ora10/data .dbf'
size                                 100M
autoextend on maxsize                200M
extent management local uniform size  64K;

ps:需要确?'/home/oracle/databases/ora10/data .dbf' 中涉及到的文件夹存在,q且oralce用户有写的权?

Alexwan 2008-08-16 13:51 发表评论
]]>
[oracle]cd转换之字W串转成旉http://www.aygfsteel.com/alexwan/archive/2008/07/14/214689.htmlAlexwanAlexwanMon, 14 Jul 2008 03:59:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/07/14/214689.htmlhttp://www.aygfsteel.com/alexwan/comments/214689.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/07/14/214689.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/214689.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/214689.html select to_timestamp('2003-12-19 00:00:00','yyyy-mm-dd hh24:mi:ss')  from dual

Alexwan 2008-07-14 11:59 发表评论
]]>
[oracle]sqlplus创徏用户q授?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/07/14/214686.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Mon, 14 Jul 2008 03:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/07/14/214686.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/214686.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/07/14/214686.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/214686.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/214686.html</trackback:ping><description><![CDATA[<p>sqlplus 下用命令:</p> <p>create user username identified by pwd;<br /> grant connect,resource,dba to username;</p> <img src ="http://www.aygfsteel.com/alexwan/aggbug/214686.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-07-14 11:40 <a href="http://www.aygfsteel.com/alexwan/archive/2008/07/14/214686.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[pgsql]linux下开启postgres sql数据库服务器命ohttp://www.aygfsteel.com/alexwan/archive/2008/07/11/214337.htmlAlexwanAlexwanFri, 11 Jul 2008 13:33:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/07/11/214337.htmlhttp://www.aygfsteel.com/alexwan/comments/214337.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/07/11/214337.html#Feedback1http://www.aygfsteel.com/alexwan/comments/commentRss/214337.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/214337.html /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & Q开PGQ?br /> exit (恢复为root)

Alexwan 2008-07-11 21:33 发表评论
]]>
[oracle]linux下启动DataBase Configuration assistanthttp://www.aygfsteel.com/alexwan/archive/2008/07/10/213991.htmlAlexwanAlexwanThu, 10 Jul 2008 07:45:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/07/10/213991.htmlhttp://www.aygfsteel.com/alexwan/comments/213991.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/07/10/213991.html#Feedback1http://www.aygfsteel.com/alexwan/comments/commentRss/213991.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/213991.html ./DBCA
Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-
没想到那么简单!Q?

Alexwan 2008-07-10 15:45 发表评论
]]>
pl/sqlҎ据表加锁的现?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/07/09/213538.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Wed, 09 Jul 2008 02:19:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/07/09/213538.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/213538.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/07/09/213538.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/213538.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/213538.html</trackback:ping><description><![CDATA[当用pl/sql对oracle数据库中Ҏ据表q行修改Q包括修Ҏ据和修改l构Q时会对对应的数据表q行加锁。那么在其他地方QQ何尝试去讉K该表的数据库Q的E序都会一直等待,直到E序时或者pl/sql客户端解?关闭修改H口的时?Q?br /> Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-<br /> 一开始我也觉得很奇怪,无意中发现的现象Q也没有特别的去查资料,应该q有其他形式的加锁方式吧Q? <img src ="http://www.aygfsteel.com/alexwan/aggbug/213538.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-07-09 10:19 <a href="http://www.aygfsteel.com/alexwan/archive/2008/07/09/213538.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[oracle]ORA-01460: 转换h无法实现或不合理http://www.aygfsteel.com/alexwan/archive/2008/07/09/213508.htmlAlexwanAlexwanWed, 09 Jul 2008 01:32:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/07/09/213508.htmlhttp://www.aygfsteel.com/alexwan/comments/213508.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/07/09/213508.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/213508.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/213508.html一开始以为是~码或者字W集的问题,后来才发现是数据库类型的长度不够Q?br /> 类型从nvarchar2(2000)换成clob好?br /> 如果要在Hibernate上用clob像用string那么方便需要spring的辅助!



Alexwan 2008-07-09 09:32 发表评论
]]>
[oracle]oracle字符?~码方式问题http://www.aygfsteel.com/alexwan/archive/2008/07/08/213294.htmlAlexwanAlexwanTue, 08 Jul 2008 04:41:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/07/08/213294.htmlhttp://www.aygfsteel.com/alexwan/comments/213294.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/07/08/213294.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/213294.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/213294.html   [A]数据库服务器字符集select   *   from   nls_database_parametersQ其来源于props$Q是表示数据库的字符集?   
      客户端字W集环境select   *   from   nls_instance_parameter,其来源于v$parameterQ?   
  表示客户端的字符集的讄Q可能是参数文gQ环境变量或者是注册?nbsp;    

      会话字符集环?  select   *   from   nls_session_parameterQ其来源于v$nls_parametersQ表CZ话自q讄Q可能是会话的环境变量或者是alter   session完成Q如果会话没有特D的讄Q将与nls_instance_parameter一致?nbsp;    

      客户端的字符集要求与服务器一_才能正确昄数据库的非Ascii字符。如果多个设|存在的时候,alter   session>环境变量>注册?gt;参数文g    
      字符集要求一_但是语言讄却可以不同,语言讄用英文。如字符集是zhs16gbkQ则nls_lang可以是American_America.zhs16gbk? 
   
  HKEY_LOCAL_MACHINE-->SOFTWARE-->ORACLE-->HOME0  
  修改为nls_lang=AMERICAN_AMERICA.UTF-8

Alexwan 2008-07-08 12:41 发表评论
]]>
oracle使用exp导出数据库数?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/07/04/212646.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Fri, 04 Jul 2008 08:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/07/04/212646.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/212646.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/07/04/212646.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/212646.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/212646.html</trackback:ping><description><![CDATA[<p>EXP  用户?密码Q服务名 full=y/n file=c:\ss.dmp </p> <p>ps:服务名指的是在客L|络理(net manager)中设|的服务名称</p> <img src ="http://www.aygfsteel.com/alexwan/aggbug/212646.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-07-04 16:59 <a href="http://www.aygfsteel.com/alexwan/archive/2008/07/04/212646.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于pl/sql登陆oracle 10g时发生的错误:ORA-12541:TNS:没有监听?/title><link>http://www.aygfsteel.com/alexwan/archive/2008/06/28/211332.html</link><dc:creator>Alexwan</dc:creator><author>Alexwan</author><pubDate>Sat, 28 Jun 2008 08:03:00 GMT</pubDate><guid>http://www.aygfsteel.com/alexwan/archive/2008/06/28/211332.html</guid><wfw:comment>http://www.aygfsteel.com/alexwan/comments/211332.html</wfw:comment><comments>http://www.aygfsteel.com/alexwan/archive/2008/06/28/211332.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alexwan/comments/commentRss/211332.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alexwan/services/trackbacks/211332.html</trackback:ping><description><![CDATA[<br /> windows:开?>控制面板=>性能和维?>理工具=>服务<br /> 然后后按名称排序查找名称为OracleOraDb10g_home1TNSListener,如果它的状态ؓI的,那么启动?如果状态已l是启动?q是报这个错,是别的问题了吧!<br /> 另外q没有尝试在其他操作pȝ下安装和q行qoracle,不过怿只要知道是因为服务没开启引L?那么可以找到解决的办法? <img src ="http://www.aygfsteel.com/alexwan/aggbug/211332.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alexwan/" target="_blank">Alexwan</a> 2008-06-28 16:03 <a href="http://www.aygfsteel.com/alexwan/archive/2008/06/28/211332.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle数据恢复命ohttp://www.aygfsteel.com/alexwan/archive/2008/06/27/211009.htmlAlexwanAlexwanFri, 27 Jun 2008 01:35:00 GMThttp://www.aygfsteel.com/alexwan/archive/2008/06/27/211009.htmlhttp://www.aygfsteel.com/alexwan/comments/211009.htmlhttp://www.aygfsteel.com/alexwan/archive/2008/06/27/211009.html#Feedback0http://www.aygfsteel.com/alexwan/comments/commentRss/211009.htmlhttp://www.aygfsteel.com/alexwan/services/trackbacks/211009.html

Alexwan 2008-06-27 09:35 发表评论
]]>
վ֩ģ壺 ͬ| | տ| ƽ| | ɽ| ʯ̨| Ƥɽ| ̫| | | ѭ| | Ȫ| ½| ˼é| ɽ| ɽ| | ƽ| ӱ| | Ϫ| | ƽ| Ϫ| | | Ϫ| ³| | | ˮ| Ϋ| | Ž| ɽ| ˳| ʯ| ƽ| ͼ|