ehxz 发表于 2007-6-26 12:41:54

[转帖] 如何处理错误"Page size too big"

<table cellspacing="0" cellpadding="0" width="95%" align="center" border="0"><center><tbody><tr><td height="22">&nbsp;</td><td width="100%" height="22"><div align="left"><p align="center"><b>如何处理错误"Page size too big"</b></p></div></td><td height="22">&nbsp;</td></tr><tr><td colspan="3">  </td></tr><tr><td height="1239">&nbsp;</td><td width="100%" height="1239"><p align="left"><b>Database's Page Size Too Big - Refined Solutions and Performance Issue</b></p><table cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr valign="top"><td width="86" bgcolor="#e7e7e7" height="22"><b><font color="#000080">SUMMARY:</font></b></td><td width="528" bgcolor="#e7e7e7" height="22">The database engine must have a page size which is greater than or equal to the maximum of the page sizes of all databases which are in use by this engine. If this is not the case, it will result in the error message "Page size too big".</td></tr></tbody></table><table cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr valign="top"><td width="86" bgcolor="#f0f0f0" height="22"><b><font color="#000080">Document ID:</font></b></td><td width="192" bgcolor="#f0f0f0" height="22">47886</td><td width="115" bgcolor="#f0f0f0" height="22"><b><font color="#000080">Last Revised:</font></b></td><td width="192" bgcolor="#f0f0f0" height="22">03/09/99</td></tr><tr valign="top"><td width="86" bgcolor="#e7e7e7" height="22"><b><font color="#000080">Topic:</font></b></td><td width="192" bgcolor="#e7e7e7" height="22">Database Admin, Performance &amp; Tuning</td><td width="115" bgcolor="#e7e7e7" height="22"><b><font color="#000080">Document Type:</font></b></td><td width="192" bgcolor="#e7e7e7" height="22">TechNote</td></tr><tr valign="top"><td width="86" bgcolor="#f0f0f0" height="22"><b><font color="#000080">Product:</font></b></td><td width="192" bgcolor="#f0f0f0" height="22">Adaptive Server Anywhere, SQL Anywhere</td><td width="115" bgcolor="#f0f0f0" height="22"><b><font color="#000080">Version:</font></b></td><td width="192" bgcolor="#f0f0f0" height="22">Not Version Specific</td></tr><tr valign="top"><td width="86" bgcolor="#e7e7e7" height="22"><b><font color="#000080">Platform:</font></b></td><td width="192" bgcolor="#e7e7e7" height="22">PC</td><td width="115" bgcolor="#e7e7e7" height="22"><b><font color="#000080">Operating System:</font></b></td><td width="192" bgcolor="#e7e7e7" height="22">Not Operating System Specific</td></tr></tbody></table><h4 align="left">Document:</h4><p align="left"><b>  </b>The general rule with regards to the engine page size/database page size relationship in SQL Anywhere is:</p><p align="left">  The database engine must have a page size which is greater than or equal to the maximum of the page sizes of all databases which are in use by this engine.</p><p align="left">  If the database(s) is(are) started at the same time as the database engine then the engine page size is set up correctly, according to this rule. If however, the user attempts to dynamically start another database with page size greater than the largest database page size running on the engine, the error message "page size too big" appears.</p><p align="left">  By default, database is created with a page size of 1024 bytes and, when not contradicts with the above rule, the engine is started with 1024 bytes page size as well.</p><p align="left"> <b> <span>Refined Solution 1</span></b></p><p align="left">  When it is possible beforehand to determine which databases will be running under a particular database engine(standalone or server), the page size of the engine should be set as the maximum page size of these databases.</p><p align="left">  Example:</p><p align="left">  Assume that there are only three database files: db1.db, db2.db and db3.db with page sizes 1024, 1024 and 2048 respectively, reside on a drive C: on a particular server. Then any of the following will set up the correct page size for database engine (server engine) named db1 :</p><blockquote><p align="left"><font color="#006443">dbsrv50 c:\db1.db c:\db2.db c:\db3.db<br/>dbsrv50 -gp 2048 c:\db1.db c:\db2.db c:\db3.db<br/>dbsrv50 -gp 2048 -n db1<br/>dbsrv50 -n db1 c:\db3.db</font></p></blockquote><p align="left">  The dbinfo.exe utility can be used to verify database page size, ie. dbinfo c:\db1.db</p><p align="left"> <b> <span>Refined Solution 2</span></b></p><p align="left">  Changing the page size of the databases. It can be achieved by creating a new database with a fixed page size, unloading the original database and reload it to the new database with the fixed page size.</p><p align="left">  Example:</p><p align="left">  Assume that there are only three database files: db1.db, db2.db and db3.db with page sizes 1024, 1024 and 2048 respectively, reside on a drive C: on a particular server and for a particular reason it is desired to have them have the same page size 2048 bytes each. The db3.db can be left as is, and for each db1.db and db2.db the following can be done, assuming c:\unload exists:</p><blockquote><p align="left"><font color="#006443">dbinit -p 2048 c:\db1new.db<br/>dbunload -c "uid=...;pwd=...;dbf=c:\db1.db" -r c:\unload\reload.sql c:\unload<br/>isql -c "uid=dba;pwd=sql;dbf=c:\db1new.db" read c:\unload\reload.sql</font></p></blockquote><p align="left">  <b>Performance Issue</b></p><p align="left">  At most one database page can be put into one engine page. Thus if you start two databases, one with a page size of 1K and one with a page size of 4K, the engine will use 4K page size, which means that the 1K page size database pages are only one quarter full. In the case of a 512 byte page size database, at least half of all cache pages will be wasted. This makes the use of 512 byte page size for databases not recommended, although it is still supported for upward compatibility. </p></td><td height="1239"><p>&nbsp;</p><p>&nbsp;</p></td></tr><tr><td>&nbsp;</td><td width="100%"> </td><td>&nbsp;</td></tr></tbody></center></table>
页: [1]
查看完整版本: [转帖] 如何处理错误"Page size too big"

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com