Gallery: DB2:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: = DB2 Support for Gallery 2= Gallery 2 supports '''DB2 UDB V9.x for Linux/UNIX/Windows''' as database backend. * Requires a minimum of DB2 Version 9.1 and the 'ibm_db2' PECL PHP extensio...)
 
无编辑摘要
 
第1行: 第1行:
= DB2 Support for Gallery 2=
= Gallery2的DB2支持=
Gallery 2 supports '''DB2 UDB V9.x for Linux/UNIX/Windows''' as database backend.
Gallery 2支持''' Linux/UNIX/Windows的DB2 UDB V9.x '''作为数据库后端。


* Requires a minimum of DB2 Version 9.1 and the 'ibm_db2' PECL PHP extension version 1.2.0. On Linux or UNIX operating systems, install the latest version of the ibm_db2 extension using the "pecl install ibm_db2" command. On Windows, precompiled binaries for ibm_db2 are available from "http://pecl4win.php.net/ext.php/php_ibm_db2.dll".
* 需要至少DB2 9.1版以及'ibm_db2' PECL PHP 扩展的1.2.0版本。在Linux或UNIX操作系统上,安装最新版本使用"pecl install ibm_db2"命令的ibm_db2扩展。在Windows上,为ibm_db2预先编译的二进制可以在http://pecl4win.php.net/ext.php/php_ibm_db2.dll中找到。


== Database Creation Steps (Before running the Installer) ==
== 数据库创建步骤(于运行安装程序之前)==
* The DB2 database for G2 must use a page size of 32 Kb (which is most easily specified at database creation time), and be created to use a Unicode codeset (which must be specified at database creation time).  For example, you could use the DB2 CLP command:
* G2的DB2数据库必须使用一个大小为32KB的页面(在数据库创建时的定义将最简单),并被创建使用某个Unicode编码集(这必须在数据库创建时被定义)。比如,你能使用DB2 CLP命令:
   db2 "CREATE DATABASE gallery2 USING CODESET UTF-8 TERRITORY US PAGESIZE 32 K"
   db2 "CREATE DATABASE gallery2 USING CODESET UTF-8 TERRITORY US PAGESIZE 32 K"
(The territory 'US' could be any territory code supported by DB2.  See the DB2 documentation for a list of supported territory codes: http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0004565.htm)
(领土'US' 可以为DB2所支持的任何领土代码。参见DB2资料中的支持的领土代码列表:http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0004565.htm)


* The database user must have (or be granted) DBADM authority on the database.  For example, assuming 'g2user' is the account that Gallery will use (you will specify this account later during Step 5 of the Installer):
* 数据库用户必须具有(或被允许)Zai数据库上的DBADM授权。比如,假定'g2user'为Gallery将使用的帐户(稍后再安装程序中的第五步中奖会对此帐户进行定义):
   db2 "CONNECT TO gallery2"
   db2 "CONNECT TO gallery2"
   db2 "GRANT DBADM ON DATABASE TO g2user"
   db2 "GRANT DBADM ON DATABASE TO g2user"
   db2 "CONNECT RESET"
   db2 "CONNECT RESET"


* For DB2 product documentation, see http://publib.boulder.ibm.com/infocenter/db2luw/v9.
* DB2产品资料请见: http://publib.boulder.ibm.com/infocenter/db2luw/v9.


== UTF-8 Codeset Considerations ==
== UTF-8 编码集的相关考量==
The Gallery application uses codepage UTF-8, which is why that codeset is specified in the CREATE DATABASE statement shown above.  But, just because Gallery uses that codeset, it is not automatic that the DB2 client does.  If the codepage of your DB2 client's operating system is not UTF-8, it will be necessary for you to configure your DB2 client to use that codepage.  See "Application code page" as described in the DB2 documentation at http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.sql.doc/doc/c0006825.htm for more details.
Gallery应用程序使用编码映射表UTF-8,这就是为和编码集在上面显示的CREATE DATABASE 语句中被定义的原因了。但由于Gallery使用此编码集,DB2客户端就无法自动使用编码映射表了。如果你DB2客户端操作系统的编码映射表不是UTF-8的话,那么你就有必要配置DB2客户端使用该编码映射表。参加DB2资料中所描述的"应用程序编码映射表"http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.sql.doc/doc/c0006825.htm for more details.


== V9.1 Notes ==
== V9.1 注释 ==
* V9.1 is installed into /opt/ibm/db2/V9.1
* V9.1安装到/opt/ibm/db2/V9.1中。
* When running "pecl install ibm_db2" it will complain that the directory isn't right unless you create a symlink from /opt/ibm/db2/V9.1/lib32 to /opt/ibm/db2/V9.1/lib
* 当运行"pecl install ibm_db2"时,将会提示目录不正确,除非你由/opt/ibm/db2/V9.1/lib32 to /opt/ibm/db2/V9.1/lib创建一个符号链接。
* I used instructions from here to set DB2CODEPAGE:  http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0602doole/
* 我使用这里的相关指导来设定DB2CODEPAGE:http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0602doole/


== Version Requirement History ==
== 版本要求历史==
* Up to G2.2.1, the wrong requirements were communicated. IBM DB2 v8.2 was said to be required, when it actually required v9 or later.
* 直到G2.2.1版本,有误的要求被传达。曾声称需要IBM DB2 v8.2,但实际上需要v9或更新的版本。
* In G2.2.2, the requirement was changed to v9 or later. No code was changed, but the Gallery team discovered that G2 was using SQL that required IBM DB2 v9 all along (ALTER TABLE DROP COLUMN).
* 在G2.2.2中,要求被改为了v9或更新版本。编码虽未作改动,但Gallery团队发现G2使用的SQL始终需要的却是IBM DB2 v9(ALTER TABLE DROP COLUMN)。


[[Category:Gallery 2]]
[[Category:Gallery 2]]

2008年8月28日 (四) 15:35的最新版本

Gallery2的DB2支持[编辑 | 编辑源代码]

Gallery 2支持 Linux/UNIX/Windows的DB2 UDB V9.x 作为数据库后端。

  • 需要至少DB2 9.1版以及'ibm_db2' PECL PHP 扩展的1.2.0版本。在Linux或UNIX操作系统上,安装最新版本使用"pecl install ibm_db2"命令的ibm_db2扩展。在Windows上,为ibm_db2预先编译的二进制可以在http://pecl4win.php.net/ext.php/php_ibm_db2.dll中找到。

数据库创建步骤(于运行安装程序之前)[编辑 | 编辑源代码]

  • G2的DB2数据库必须使用一个大小为32KB的页面(在数据库创建时的定义将最简单),并被创建使用某个Unicode编码集(这必须在数据库创建时被定义)。比如,你能使用DB2 CLP命令:
 db2 "CREATE DATABASE gallery2 USING CODESET UTF-8 TERRITORY US PAGESIZE 32 K"

(领土'US' 可以为DB2所支持的任何领土代码。参见DB2资料中的支持的领土代码列表:http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0004565.htm)

  • 数据库用户必须具有(或被允许)Zai数据库上的DBADM授权。比如,假定'g2user'为Gallery将使用的帐户(稍后再安装程序中的第五步中奖会对此帐户进行定义):
 db2 "CONNECT TO gallery2"
 db2 "GRANT DBADM ON DATABASE TO g2user"
 db2 "CONNECT RESET"

UTF-8 编码集的相关考量[编辑 | 编辑源代码]

Gallery应用程序使用编码映射表UTF-8,这就是为和编码集在上面显示的CREATE DATABASE 语句中被定义的原因了。但由于Gallery使用此编码集,DB2客户端就无法自动使用编码映射表了。如果你DB2客户端操作系统的编码映射表不是UTF-8的话,那么你就有必要配置DB2客户端使用该编码映射表。参加DB2资料中所描述的"应用程序编码映射表": http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.sql.doc/doc/c0006825.htm for more details.

V9.1 注释[编辑 | 编辑源代码]

版本要求历史[编辑 | 编辑源代码]

  • 直到G2.2.1版本,有误的要求被传达。曾声称需要IBM DB2 v8.2,但实际上需要v9或更新的版本。
  • 在G2.2.2中,要求被改为了v9或更新版本。编码虽未作改动,但Gallery团队发现G2使用的SQL始终需要的却是IBM DB2 v9(ALTER TABLE DROP COLUMN)。