shared memory - can't backup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim

    shared memory - can't backup

    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 =---
  • Jim

    #2
    Re: shared memory - can't backup

    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:
    [color=blue]
    > 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![color=green]
    > >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total[/color]
    > Privacy via Encryption =---[/color]



    ----== 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 =---

    Comment

    • Joachim Banzhaf

      #3
      Re: shared memory - can't backup

      Hi Jim,

      You wrote:
      [color=blue]
      > 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'.[/color]

      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).
      [color=blue]
      > 1) How can I get this to back up? :)[/color]

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

      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_fro m_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

      Comment

      • Jim

        #4
        Re: shared memory - can't backup

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

        <posted & mailed>

        Joachim Banzhaf wrote:
        [color=blue]
        > Hi Jim,
        >
        > You wrote:
        >[color=green]
        >> 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'.[/color]
        >
        > 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).
        >[color=green]
        >> 1) How can I get this to back up? :)[/color]
        >
        > Increase SHMMNI/SHMALL parameters and retry.
        >[color=green]
        >> 2) What are my options to move the database to a new server with these
        >> problems?[/color]
        >
        > 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_fro m_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[/color]



        ----== 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 =---

        Comment

        • Joachim Banzhaf

          #5
          Re: shared memory - can't backup

          Jim wrote:
          [color=blue]
          > 33554432
          > This is the value of shmall. What do you think?[/color]

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

          bye

          Joachim Banzhaf

          Comment

          • Jim

            #6
            Re: shared memory - can't backup

            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:
            [color=blue]
            > Jim wrote:
            >
            >[color=green]
            >>33554432
            >>This is the value of shmall. What do you think?[/color]
            >
            >
            > I would translate that as "enough".
            > What about SHMMNI?
            > What about the other suggestions?
            >
            > bye
            >
            > Joachim Banzhaf
            >[/color]



            ----== 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 =---

            Comment

            Working...