DB2 installation in Linux: SQL1220N

Source: Internet
Author: User
Tags db2 installation

Environment: Linux RedHat5
DB2 FOR Linux 32bit

Because the installation directory cannot be changed in this version, it is installed under/opt by default. Therefore, you must allocate enough space to the/directory in advance or allocate space for/opt.

There is no exception in the installation process, but an error occurred while executing db2start after the installation is completed:

1.06/18/2008 17:25:00 0 0 SQL1220N The database manager shared memory set cannot be allocated

2. Search for help db2? SQL1220N. It may be because the shared memory settings are missing. The following suggestions are provided.
On Linux 32-bit, increase the kernel parameter shmmax to 256 MB. On Linux 64-bit, increase the kernel parameter shmmax to 1 GB.

Run the ipcs-l command to check the system configuration.
------ Shared Memory Limits --------
Max number of segments = 4096
Max seg size (kbytes) = 3939665
Max total shared memory (kbytes) = 4G
Min seg size (bytes) = 1
The system has a maximum shared memory of 4 GB.

Vi/etc/sysctl. conf
Kernel. core_uses_pid = 1
Kernel. shmmax = 4034217728
Kernel. msgmni= 1024
Kernel. sem = 250 256000 32 1024

View db2 licm-l. The db2 serial number is permanent and does not expire.

After this modification, it cannot be started.

Search online. The IBM website has such an article. The solution to this problem is mentioned.

Problem

This operation te provides troubleshooting methods for when you attempt to start an instance (db2start) and encounter the following error: SQL1220N The database manager shared memory set cannot be allocated.

Cause

One possibility is that during the creation of the instance the file sqllib/. ftok was not created.

Problem Details
After the creation of a new instance the db2start command can fail with the following message:

06/02/2005 11:45:48 0 0 SQL1220N The database manager shared memory set cannot be allocated.
SQL1032N No start database manager command was issued. SQLSTATE = 57019

DB2 was unable to allocate its shared memory set.

Solution

A quick work-around is to use the executable db2ftok (found in sqllib/bin) to create a new seed file sqllib /. ftok. the. ftok file is generated based on the current time and other information. when starting the instance, DB2 reads. ftok file and creates a standard interprocess communication key (IPC key) which is later supplied to other subroutines for memory allocation.

After the. ftok file has been created, issue the db2start command again.

Please note that in order to determine the reason why the. ftok file was absent in your particle environment, contact DB2 UDB Support and submit a problem record.

Follow the instructions to run db2ftok, then db2start, OK.

Problem Review: After the problem is solved, it may be due to a/opt space attribute problem that cannot be generated during installation. ftok file, because after the installation is complete, run db2start, prompting that you do not have the permission to execute the command. Later, modify the directory owner to db2inst1 to execute the command, and then the above error occurs. (Author: dongyufeng)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.