473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

shared memory - can't backup

Jim
Hello,

I have a broken server that we are going to be moving off to a new server
with a new version of DB2 but here is what I have right now:
RedHat 7.0 (2.2.24smp)
DB2 v6.1.0.40

I am getting this error when I try to run the command 'db2 "backup database
dbname online to /opt/BACKUP"' on my 3 databases:
SQL1042C An unexpected system error occurred. SQLSTATE=58004
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

I have done some research and my shmmax is set to '1073741824'.

1) How can I get this to back up? :)
2) What are my options to move the database to a new server with these
problems?

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #1
5 7029
Jim
Hi again. I didn't receive a response on this. Was my question(s) not
stated clearly or is this just a completely stupid question? I appreciate
a response.

Thanks!

Jim wrote:
Hello,

I have a broken server that we are going to be moving off to a new server
with a new version of DB2 but here is what I have right now:
RedHat 7.0 (2.2.24smp)
DB2 v6.1.0.40

I am getting this error when I try to run the command 'db2 "backup
database dbname online to /opt/BACKUP"' on my 3 databases:
SQL1042C An unexpected system error occurred. SQLSTATE=58004
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

I have done some research and my shmmax is set to '1073741824'.

1) How can I get this to back up? :)
2) What are my options to move the database to a new server with these
problems?

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World!
100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #2
Hi Jim,

You wrote:
I am getting this error when I try to run the command 'db2 "backup
database dbname online to /opt/BACKUP"' on my 3 databases:
SQL1042C An unexpected system error occurred. SQLSTATE=58004
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

I have done some research and my shmmax is set to '1073741824'.
This is the maximum size of a segment.
Your problem might be the maximum number of segments is too low.

extract of "man shmget":
The followings are limits on shared memory segment resources affecting a
shmget call:

SHMALL System wide maximum of shared memory pages: policy dependent.

SHMMAX Maximum size in bytes for a shared memory segment:
implementation dependent (currently 4M).

SHMMIN Minimum size in bytes for a shared memory segment:
implementation dependent (currently 1 byte, though PAGE_SIZE is
the effective minimum size).

SHMMNI System wide maximum number of shared memory segments:
implementation dependent (currently 4096, was 128 before Linux
2.3.99).
1) How can I get this to back up? :)
Increase SHMMNI/SHMALL parameters and retry.
2) What are my options to move the database to a new server with these
problems?


Maybe shared memory segments got lost somehow: stop instance, use ipclean or
ipcs/ipcrm to free segs, start instance, if this does not help, reboot.

Maybe an offline backup works?

If this all won't work (and noone else has a better idea), you can copy the
database file by file (with cp, tar, ...).
You have to consider some things then:
- This won't work online. Best/easiest to stop the instance before copying.
- Get the source path with "db2 list db directory" and
"db2 get db directory on /path/for/db/from/cmd/above")
- Don't forget to copy tablespace containers you created outside of the
database directory (check with "db2 list tablespaces" and
"db2 list tablespace containers for <TBSPACE_ID_from_cmd_above>").
- Preserve user, group and permissions (e.g. use tar).
- Recreate exactly the same directory structure (using links is ok if you
have another physical disk layout on the new server)
- Create an instance with the same name, users and groups (with same ID's)
- Target system should be same/newer db2 version and same/newer fixpak level
(if newer you might have to migrate the database)
- Catalog the database on the new server
(db2 catalog database xy on /path/from/list/db/cmd/above)

HTH

Joachim Banzhaf

Nov 12 '05 #3
Jim
33554432
This is the value of shmall. What do you think?

<posted & mailed>

Joachim Banzhaf wrote:
Hi Jim,

You wrote:
I am getting this error when I try to run the command 'db2 "backup
database dbname online to /opt/BACKUP"' on my 3 databases:
SQL1042C An unexpected system error occurred. SQLSTATE=58004
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

I have done some research and my shmmax is set to '1073741824'.


This is the maximum size of a segment.
Your problem might be the maximum number of segments is too low.

extract of "man shmget":
The followings are limits on shared memory segment resources affecting a
shmget call:

SHMALL System wide maximum of shared memory pages: policy dependent.

SHMMAX Maximum size in bytes for a shared memory segment:
implementation dependent (currently 4M).

SHMMIN Minimum size in bytes for a shared memory segment:
implementation dependent (currently 1 byte, though PAGE_SIZE is
the effective minimum size).

SHMMNI System wide maximum number of shared memory segments:
implementation dependent (currently 4096, was 128 before Linux
2.3.99).
1) How can I get this to back up? :)


Increase SHMMNI/SHMALL parameters and retry.
2) What are my options to move the database to a new server with these
problems?


Maybe shared memory segments got lost somehow: stop instance, use ipclean
or ipcs/ipcrm to free segs, start instance, if this does not help, reboot.

Maybe an offline backup works?

If this all won't work (and noone else has a better idea), you can copy
the database file by file (with cp, tar, ...).
You have to consider some things then:
- This won't work online. Best/easiest to stop the instance before
copying. - Get the source path with "db2 list db directory" and
"db2 get db directory on /path/for/db/from/cmd/above")
- Don't forget to copy tablespace containers you created outside of the
database directory (check with "db2 list tablespaces" and
"db2 list tablespace containers for <TBSPACE_ID_from_cmd_above>").
- Preserve user, group and permissions (e.g. use tar).
- Recreate exactly the same directory structure (using links is ok if you
have another physical disk layout on the new server)
- Create an instance with the same name, users and groups (with same ID's)
- Target system should be same/newer db2 version and same/newer fixpak
level
(if newer you might have to migrate the database)
- Catalog the database on the new server
(db2 catalog database xy on /path/from/list/db/cmd/above)

HTH

Joachim Banzhaf


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #4
Jim wrote:
33554432
This is the value of shmall. What do you think?


I would translate that as "enough".
What about SHMMNI?
What about the other suggestions?

bye

Joachim Banzhaf

Nov 12 '05 #5
Jim
I don't think I can adjust shmmni in this kernel on the fly. I think it
calls for a recompile. How can I find out what it is set to currently?
I don't have shmget on redhat 7.0.

Joachim Banzhaf wrote:
Jim wrote:

33554432
This is the value of shmall. What do you think?

I would translate that as "enough".
What about SHMMNI?
What about the other suggestions?

bye

Joachim Banzhaf


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
11
by: Michael Schuler | last post by:
The use of STL in shared memory poses a real problem since (non-smart) pointers are not allowed there. Is there any solution for containers in shared memory using smart pointers? Where can I...
5
by: Eddie | last post by:
I have a MySQL-server running Innodb. We have installed ~ 2GB of memory in the server. In spite of this MySQL keeps crashing due to out-of-memory errors. The server is a dual xeon i686 running...
12
by: Jeremy | last post by:
Hi all, I'm getting very confused about how DB2 uses shared memory and I wonder if someone could clarify matters for me, please ? We are running 32bit DB2 V7.2 FP9 under AIX 4.3.3 on a machine...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
5
by: apple | last post by:
UDBV8 fp 6a - AIX 5.1 We have scheduled cron jobs to do backups. Periodically and starting to occur more frequently, a backup fails with this error: SQL2072N Unable to bind the shared library...
0
by: Peter | last post by:
When I issue call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL'); I get the messages SQL4301N Java or .NET interpreter startup or communication failed, reason
4
by: Zeya | last post by:
I am executing OSQL using System.Diagnostic.Process with the following parameters: -S <servername> -E -Q "BACKUP DATABASE <databasename> to DISK='E:\Temp\Now.bak'" This works from command...
2
peeaurjee
by: peeaurjee | last post by:
hi! I am using Ms Access 2003 on Xp and i have shared a database on the server through LAN. There is 1 Administrator account, 5 data entry users and 4 read only users. I think I have messed up with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.