Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2794844
  • 博文数量: 423
  • 博客积分: 7770
  • 博客等级: 少将
  • 技术积分: 4766
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-09 11:58
个人简介

Oracle/DB2/Postgresql/Mysql/Hadoop/Greenplum/Postgres-xl/Mongodb

文章分类

全部博文(423)

文章存档

2019年(3)

2018年(6)

2017年(27)

2016年(23)

2015年(30)

2014年(16)

2013年(31)

2012年(73)

2011年(45)

2010年(14)

2009年(30)

2008年(30)

2007年(63)

2006年(32)

分类: DB2/Informix

2012-04-18 05:33:11

Creates DB2® instances.

On Linux and UNIX operating systems, this utility is located in the DB2DIR/instance directory, where DB2DIR represents the installation location where the current version of the DB2 database system is installed. On Windows operating systems, this utility is located under the DB2PATH\bin directory where DB2PATH is the location where the DB2 copy is installed.

The db2icrt command creates DB2 instances in the instance owner's home directory.

Note: This command is not available for a non-root installation of DB2 database products on Linux and UNIX operating systems.
Authorization

Root user authority on Linux and UNIX operating systems or Local Administrator authority on Windows operating systems.

Command syntax

For Linux and UNIX operating systems

Read syntax diagram >>-db2icrt--+-----+--+-----+--+---------------+-----------------> +- -h-+ '- -d-' '- -a--AuthType-' '- -?-' >--+---------------+--+---------------+--+---------------+------> '- -p--PortName-' '- -s--InstType-' '- -u--FencedID-' >--InstName----------------------------------------------------><

For Windows operating systems

Read syntax diagram >>-db2icrt--InstName--+---------------+-------------------------> '- -s--InstType-' >--+-------------------------+--+-------------------+-----------> '- -u--UserName, Password-' '- -p--InstProfPath-' >--+---------------+--+----------------+------------------------> '- -h--HostName-' '- -r--PortRange-' >--+------------------------------------------------------+-----> '- -j--"TEXT_SEARCH-+--------------+-+-------------+-"-' '-,servicename-' '-,portnumber-' >--+-----+----------------------------------------------------->< '- -?-'
Command parameters

For Linux and UNIX operating systems

-h | -? Displays the usage information. -d Turns debug mode on. Use this option only when instructed by DB2 database support. -a AuthType Specifies the authentication type (SERVER, CLIENT or SERVER_ENCRYPT) for the instance. The default is SERVER. -p PortName Specifies the port name or number used by the instance. This option does not apply to client instances. -s InstType Specifies the type of instance to create. Use the -s option only when you are creating an instance other than the default associated with the installed product from which you are running db2icrt. Valid values are: client Used to create an instance for a client. This is the default instance type for IBM® Data Server Client,IBM Data Server Runtime Client, and DB2 Connect™ Personal Edition. standalone Used to create an instance for a database server with local clients. It is the default instance type for DB2 Personal Edition. ese Used to create an instance for a database server with local and remote clients with partitioned database environment support. This is the default instance type for DB2 Enterprise Server Edition or DB2 Advanced Enterprise Server Edition. wse Used to create an instance for a database server with local and remote clients. This is the default instance type for DB2 Workgroup Server Edition, DB2 Express® Edition or DB2 Express-C, and DB2 Connect Enterprise Edition.

DB2 database products support their default instance types and the instance types lower than their default ones. For instance, DB2 Enterprise Server Edition supports the instance types of ese, wse, standalone and client.

-u Fenced ID Specifies the name of the user ID under which fenced user-defined functions and fenced stored procedures will run. The -u option is required if you are not creating a client instance. InstName Specifies the name of the instance which is also the name of an existing user in the operating system. This has to be the last argument of the db2icrt command.

For Windows operating systems

InstName Specifies the name of the instance. -s InstType Specifies the type of instance to create. Currently, there are four kinds of DB2 instance types. Valid values are: client Used to create an instance for a client. This is the default instance type for IBM Data Server Client, IBM Data Server Runtime Client, and DB2 Connect Personal Edition. standalone Used to create an instance for a database server with local clients. It is the default instance type for DB2 Personal Edition. ese Used to create an instance for a database server with local and remote clients with partitioned database environment support. The -s ese -u Username, Passwordoptions have to be used with db2icrt to create the ESE instance type and a partitioned database environment instance. wse Used to create an instance for a database server with local and remote clients. This is the default instance type for DB2 Workgroup Server Edition, DB2 Express Edition or DB2 Express-C, and DB2 Connect Enterprise Edition.

DB2 database products support their default instance types and the instance types lower than their default ones. For instance, DB2 Enterprise Server Edition supports the instance types of ese, wse, standalone and client.

-u Username, Password Specifies the account name and password for the DB2 service. This option is required when creating a partitioned database instance. -p InstProfPath Specifies the instance profile path. -h HostName Overrides the default TCP/IP host name if there is more than one for the current machine. The TCP/IP host name is used when creating the default database partition (database partition 0). This option is only valid for partitioned database instances. -r PortRange Specifies a range of TCP/IP ports to be used by the partitioned database instance when running in MPP mode. For example, -r 50000,50007. The services file of the local machine will be updated with the following entries if this option is specified:DB2_InstName baseport/tcp DB2_InstName_END endport/tcp /j "TEXT_SEARCH" Configures the DB2 Text Search server using generated default values for service name and TCP/IP port number. This parameter cannot be used if the instance type is client. /j "TEXT_SEARCH, servicename"

Configures the DB2 Text Search server using the provided service name and an automatically generated port number. If the service name has a port number assigned in the services file, it uses the assigned port number.

/j "TEXT_SEARCH, servicename, portnumber"

Configures the DB2 Text Search server using the provided service name and port number.

/j "TEXT_SEARCH, portnumber"

Configures the DB2 Text Search server using a default service name and the provided port number. Valid port numbers must be within the 1024 - 65535 range.

-? Displays usage information.
Example
  • On an AIX® machine, to create an instance for the user ID db2inst1, issue the following command:
    On a client machine:DB2DIR/instance/db2icrt db2inst1
    On a server machine:DB2DIR/instance/db2icrt -u db2fenc1 db2inst1where db2fenc1 is the user ID under which fenced user-defined functions and fenced stored procedures will run.
Usage notes
  • The instance_home/sqllib/db2tss/config folder is created by db2icrt on Linux and UNIX operating systems. It is advised that you use a symbolic link to an area outside the sqllib directory.
  • The -s option is intended for situations in which you want to create an instance that does not use the full functions of the system. For example, if you are using DB2 Enterprise Server Edition (ESE) on a UNIX operating system, but do not want partition capabilities, you could create a DB2 Workgroup Server Edition (WSE) instance, using the option -s WSE.
  • To create a DB2 instance that supports Microsoft Cluster Server, first create an instance, then use the db2mscs command to migrate it to run in a MSCS instance.
  • On Linux and UNIX operating systems, only one instance can be created under a user name. If you want to create an instance under a user name that already has an instance, you must drop the existing instance before creating the new one.
  • When creating DB2 instances, consider the following restrictions:
    • If existing IDs are used to create DB2 instances, make sure that the IDs are not locked and do not have passwords expired.
  • You can also use the db2isetup command to create and update DB2 instances using a graphical interface on all supported Linux and UNIX operating systems.
  • On Linux and UNIX operating systems, if you are using the su command instead of the login command to become the root user, you must issue the su command with the - option to indicate that the process environment is to be set as if you had logged in to the system using the login command.
  • On Linux and UNIX operating systems, you must not source the DB2 instance environment for the root user. Running db2icrt when you sourced the DB2 instance environment is not supported.
  • On AIX 6.1 (or higher), when running this command from a shared DB2 copy in a system workload partition (WPAR) global environment, this command must be run as the root user.

  • On Windows operating systems, if the IBM Tivoli® Monitoring for Databases: DB2 Agent is installed and the DB2 instance is created, the Monitoring Agent for DB2 instance is also created if the following are true:
    • The DB2 instance type is standalone, wse, or ese.
    • The default DB2 copy has the ITM agent component installed.
    • The DB2 instance is at version 9.5 (or higher).
    • There is no existing ITM for Databases product.
    In addition, the following are also created after the creation of the Monitoring Agent for DB2 instance: the Monitoring Agent for DB2 instance files, the Windows service and the registry entries.
阅读(1894) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

ghan2012-04-19 11:34:58

坏坏小丸子: 博主可以找中文版的不?这样不好看啊.....
好的,以前尽量中文版, 谢谢,

坏坏小丸子2012-04-18 21:01:33

博主可以找中文版的不?这样不好看啊