﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-旅途-随笔分类-DB2</title><link>http://www.cppblog.com/mydriverc/category/11831.html</link><description>如果想飞得高，就该把地平线忘掉</description><language>zh-cn</language><lastBuildDate>Thu, 24 Sep 2009 23:41:20 GMT</lastBuildDate><pubDate>Thu, 24 Sep 2009 23:41:20 GMT</pubDate><ttl>60</ttl><item><title>SQL1422N 容器的大小无效。</title><link>http://www.cppblog.com/mydriverc/archive/2009/09/25/97185.html</link><dc:creator>旅途</dc:creator><author>旅途</author><pubDate>Thu, 24 Sep 2009 16:45:00 GMT</pubDate><guid>http://www.cppblog.com/mydriverc/archive/2009/09/25/97185.html</guid><wfw:comment>http://www.cppblog.com/mydriverc/comments/97185.html</wfw:comment><comments>http://www.cppblog.com/mydriverc/archive/2009/09/25/97185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/mydriverc/comments/commentRss/97185.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/mydriverc/services/trackbacks/97185.html</trackback:ping><description><![CDATA[<div class="msgitem">
<div class="msgitemtitle">说明:</div>
<p class="msgitem">在数据库管理的表空间中将使用的其中一个容器太大或太小。
容器的长度必须至少为 2 * 扩展数据块大小页。容器的最大大小与操作系统有关。
最常用的系统限制是 2 千兆字节（524288 个 4K 页）。</p>
</div>
<div class="msgitem">
<div class="msgitemtitle">用户响应:</div>
<p class="msgitem">检查管理通知日志以获取详细信息。
然后更正 SQL 语句。</p>
<p class="msgitem">
<strong>sqlcode</strong>:  -1422</p>
<p class="msgitem">
<strong>sqlstate</strong>:  54039</p>
</div><img src ="http://www.cppblog.com/mydriverc/aggbug/97185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/mydriverc/" target="_blank">旅途</a> 2009-09-25 00:45 <a href="http://www.cppblog.com/mydriverc/archive/2009/09/25/97185.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>must the system catalog tablespace by manage by sms or could it be also managed by dms</title><link>http://www.cppblog.com/mydriverc/archive/2009/09/25/97183.html</link><dc:creator>旅途</dc:creator><author>旅途</author><pubDate>Thu, 24 Sep 2009 16:37:00 GMT</pubDate><guid>http://www.cppblog.com/mydriverc/archive/2009/09/25/97183.html</guid><wfw:comment>http://www.cppblog.com/mydriverc/comments/97183.html</wfw:comment><comments>http://www.cppblog.com/mydriverc/archive/2009/09/25/97183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/mydriverc/comments/commentRss/97183.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/mydriverc/services/trackbacks/97183.html</trackback:ping><description><![CDATA['m almost certain that it must be SMS.<br><br>It can be DMS.  But you have to say so at CREATE DATABASE time:<br> <br>
$ db2 "CREATE <acronym title="Database">DB</acronym> x CATALOG TABLESPACE MANAGED BY DATABASE USING ( FILE<br>
'sys_ts' 100000 )"<br>
DB20000I  The CREATE DATABASE command completed successfully.<br>
$ db2 list tablespaces<br> <br>
Tablespaces for Current Database<br> <br>
Tablespace ID                        = 0<br>
Name                                 = SYSCATSPACE<br>
Type                                 = Database managed space<br>
Contents                             = Any data<br>
State                                = 0x0000<br>
Detailed explanation:<br>
Normal<br> <br>
Tablespace ID                        = 1<br>
Name                                 = TEMPSPACE1<br>
Type                                 = System managed space<br>
Contents                             = System Temporary data<br>
State                                = 0x0000<br>
Detailed explanation:<br>
Normal<br> <br>
Tablespace ID                        = 2<br>
Name                                 = USERSPACE1<br>
Type                                 = System managed space<br>
Contents                             = Any data<br>
State                                = 0x0000<br>
Detailed explanation:<br>
Normal<br> <br> <br>
--<br>
Knut Stolze<br>
DB2 Information Integration Development<br>
IBM Germany<br>
<div style="margin-top: 10px;" align="right">  <a  href="http://dbaspot.com/forums/newreply.php?do=newreply&amp;p=746008" rel="nofollow"><img  src="http://dbaspot.com/forums/images/vbseo_skin_2.0/buttons/quote.gif" title="Reply with quote" alt="Reply with quote" border="0"></a>  </div>
<br><img src ="http://www.cppblog.com/mydriverc/aggbug/97183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/mydriverc/" target="_blank">旅途</a> 2009-09-25 00:37 <a href="http://www.cppblog.com/mydriverc/archive/2009/09/25/97183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>遇到了289错误</title><link>http://www.cppblog.com/mydriverc/archive/2009/09/25/97182.html</link><dc:creator>旅途</dc:creator><author>旅途</author><pubDate>Thu, 24 Sep 2009 16:26:00 GMT</pubDate><guid>http://www.cppblog.com/mydriverc/archive/2009/09/25/97182.html</guid><wfw:comment>http://www.cppblog.com/mydriverc/comments/97182.html</wfw:comment><comments>http://www.cppblog.com/mydriverc/archive/2009/09/25/97182.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/mydriverc/comments/commentRss/97182.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/mydriverc/services/trackbacks/97182.html</trackback:ping><description><![CDATA[SQL0289N&nbsp; Unable to allocate new pages in table space "SYSCATSPACE".&nbsp; <br>SQLSTATE=57011<br><br><br>Create database mydb<br>dft_extent_sz 4<br>catalog tablespace managed by system using<br>( '/home/sd/data/cat')<br>extentsize 2<br>prefetchsize 2<br>temporary tablespace managed by system using<br>('/home/sd/data/tmp')<br>user tablespace managed by database using<br>(file '/home/sd/data/data.usr' 200)<br>extentsize 2<br>prefetchsize 2;<br><br>将catalog改为了SMS顺利通过，使用DMS就报289错误。<br><br><br> <img src ="http://www.cppblog.com/mydriverc/aggbug/97182.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/mydriverc/" target="_blank">旅途</a> 2009-09-25 00:26 <a href="http://www.cppblog.com/mydriverc/archive/2009/09/25/97182.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SQL1043C error when creating databases (error code -289)</title><link>http://www.cppblog.com/mydriverc/archive/2009/09/25/97181.html</link><dc:creator>旅途</dc:creator><author>旅途</author><pubDate>Thu, 24 Sep 2009 16:24:00 GMT</pubDate><guid>http://www.cppblog.com/mydriverc/archive/2009/09/25/97181.html</guid><wfw:comment>http://www.cppblog.com/mydriverc/comments/97181.html</wfw:comment><comments>http://www.cppblog.com/mydriverc/archive/2009/09/25/97181.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/mydriverc/comments/commentRss/97181.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/mydriverc/services/trackbacks/97181.html</trackback:ping><description><![CDATA[http://www-01.ibm.com/support/docview.wss?uid=swg21232410<br>
<table border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr valign="top">
            <td width="438">
            <table border="0" cellpadding="0" cellspacing="0" width="443">
                <tbody>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td valign="bottom" width="443" height="20"><strong>Question</strong></td>
                    </tr>
                    <tr>
                        <td width="443">
                        This document provides troubleshooting advice for situations where an
                        attempt to create a database fails with the error message SQL1043C:
                        "The database manager could not initialize the system catalogs. Error
                        '-289' was returned". </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                </tbody>
            </table>
            </td>
        </tr>
        <tr valign="top">
            <td width="438"><br></td>
        </tr>
        <tr>
            <td valign="bottom" width="443" height="20"><strong>Cause</strong></td>
        </tr>
        <tr>
            <td width="443">
            As described in the Messages Reference, SQL1043C indicates that the
            CREATE DATABASE command failed while initializing the system catalogs.
            Error "-289" maps to SQL0289N, which in turn means "Unable to allocate
            new pages in table space...".
            <p>You may also see in the db2diag.log the following error messages
            when you create a database with the catalog tablespace in DMS and the
            size specified for the containers is not enough: <br> <code> </code><br> <tt>2007-04-11-09.50.23.928002+180 E23114C1031 &nbsp; &nbsp; &nbsp; &nbsp;LEVEL: Error</tt><br> <tt>PID &nbsp; &nbsp; : 20522 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TID &nbsp;: 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROC : db2agent (instance) 0</tt><br> <tt>INSTANCE: db2inst1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NODE : 000</tt><br> <tt>APPHDL &nbsp;: 0-235 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;APPID: *LOCAL.db2inst1.070411064735</tt><br> <tt>FUNCTION: DB2 UDB, buffer pool services, sqlbAllocateExtent, probe:830</tt><br> <tt>MESSAGE
            : ADM6044E &nbsp;The DMS table space "SYSCATSPACE" (ID "0") is full. &nbsp;If
            this is an autoresize or automatic storage DMS tablespace, the maximum
            table space size may have been reached or the existing containers or
            storage paths cannot grow any more. Additional space can be added to
            the table space by either adding new containers or extending existing
            ones using the ALTER TABLESPACE SQL statement. If this is an autoresize
            or automatic storage DMS table space, additional space can be added by
            adding containers to an autoresize table space or by adding new storage
            paths to an automatic storage database.</tt><br> <br> <tt>2007-04-11-09.50.23.929462+180 I24146C879 &nbsp; &nbsp; &nbsp; &nbsp; LEVEL: Warning</tt><br> <tt>PID &nbsp; &nbsp; : 20522 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TID &nbsp;: 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROC : db2agent (instance) 0</tt><br> <tt>INSTANCE: db2inst1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NODE : 000</tt><br> <tt>APPHDL &nbsp;: 0-235 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;APPID: *LOCAL.db2inst1.070411064735</tt><br> <tt>FUNCTION: DB2 UDB, buffer pool services, sqlbObtainDataExtent, probe:800</tt><br> <tt>MESSAGE : ZRC=0x85020021=-2063466463=SQLB_END_OF_CONTAINER "DMS Container space full"</tt><br> <tt>DATA #1 : Object descriptor, PD_TYPE_SQLB_OBJECT_DESC, 68 bytes</tt><br> <tt>Obj: {pool:0;obj:14;type:3} Parent={0;14}</tt><br> <tt>lifeLSN: &nbsp; &nbsp; &nbsp; 000000026069 &nbsp;tid: &nbsp; &nbsp; &nbsp; 0 0 &nbsp;1</tt><br> <tt>extentAnchor: &nbsp; &nbsp; &nbsp; &nbsp;1920 &nbsp;initEmpPages: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0</tt><br> <tt>poolPage0: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;poolflags: &nbsp; &nbsp; 0x00000102</tt><br> <tt>objectState: &nbsp; 0x00030025 &nbsp;lastSMP: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32</tt><br> <tt>pageSize: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4096 &nbsp;extentSize: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32</tt><br> <tt>bufferPoolID: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp;partialHash: &nbsp; &nbsp;51249152</tt><br> <tt>bufferPool: &nbsp; 0x14355650</tt><br>  </p>
            <p>This
            error message (SQL0289N) is most often received when you issue the
            CREATE DATABASE command and specify a database managed space (DMS) for
            the system catalog table space.
            </p>
            <p> </p>
            <p style="font-weight: bold;">In most cases,<strong> </strong>you should use system managed space (SMS) table spaces for the system catalog table space<strong>, </strong>as
            well as for temporary table spaces. When using SMS table spaces, space
            is not allocated by the system until it is required. Space for the
            system catalog tables is only allocated as the space is needed. Refer
            to "System managed space" in the Related Information for more details.
            </p>
            <p><br>When using DMS table spaces, the space is pre-allocated
            which means that the space must be available on the containers before
            the table space can be created.<strong> </strong>If you choose to create the system catalog table space as a DMS table space, be aware that:
            </p>
            <ul>
                <li type="disc">The minimum size of a DMS table space is five
                extents: three are reserved for overhead; the other extents are to
                store user data.
                </li>
                <li type="disc">The extent size is defined as the number of continuous pages. An extent is the unit of space allocation within a table space.
                </li>
                <li type="disc">Page size affects the space available; the number of pages also affects the space available.
                </li>
                <li type="disc">In a partitioned database environment, the system
                catalog table space is only created on the database partition on which
                the CREATE DATABASE command is issued.
                </li>
            </ul>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td width="438"><br></td>
        </tr>
        <tr>
            <td valign="bottom" width="443" height="20"><strong>Answer</strong></td>
        </tr>
        <tr>
            <td width="443">
            If you plan to use a DMS for the system catalog table space, ensure
            that your containers have sufficient space available to be
            pre-allocated.<br>
            To correct the error, choose one of the following alternatives: <br>
            <ol type="1">
                <li>Increase
                the number of pages specified for the DMS table space by using the
                ALTER TABLESPACE statement. This will result in a larger allocated disk
                space the next time the database is started. Since the space is
                pre-allocated for the database, some space may be wasted for the system
                catalogs. <br> </li>
                <li>Use a smaller extent size (of 2 or 4 pages),
                in order to allocate fewer pages for the system catalog. Since the
                extent size is specified only when the table space is created, however,
                you will need to recreate the database. Moving data from the current
                database to the new database must also be considered.<br> </li>
                <li>Recreate
                the database using SMS table spaces for the catalog table space. The
                space needed by the system catalog table space is only allocated as
                needed. (The space to be allocated must be available on the container.)
                Moving data from the current database to the new database must also be
                considered. </li>
            </ol>
            </td>
        </tr>
    </tbody>
</table>
<br> <img src ="http://www.cppblog.com/mydriverc/aggbug/97181.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/mydriverc/" target="_blank">旅途</a> 2009-09-25 00:24 <a href="http://www.cppblog.com/mydriverc/archive/2009/09/25/97181.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>配置db2变量</title><link>http://www.cppblog.com/mydriverc/archive/2009/09/18/96596.html</link><dc:creator>旅途</dc:creator><author>旅途</author><pubDate>Thu, 17 Sep 2009 16:08:00 GMT</pubDate><guid>http://www.cppblog.com/mydriverc/archive/2009/09/18/96596.html</guid><wfw:comment>http://www.cppblog.com/mydriverc/comments/96596.html</wfw:comment><comments>http://www.cppblog.com/mydriverc/archive/2009/09/18/96596.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/mydriverc/comments/commentRss/96596.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/mydriverc/services/trackbacks/96596.html</trackback:ping><description><![CDATA[PATH=$PATH:$HOME/bin:.<br><br>export PATH<br>unset USERNAME<br><br>if [ -f /home/user1/sqllib/db2profile ]; then<br>&nbsp;&nbsp;&nbsp; . /home/user1/sqllib/db2profile<br>fi<br> <img src ="http://www.cppblog.com/mydriverc/aggbug/96596.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/mydriverc/" target="_blank">旅途</a> 2009-09-18 00:08 <a href="http://www.cppblog.com/mydriverc/archive/2009/09/18/96596.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>