Re: clone creations fails with shared memory realm already exists

  • From: Jeff Chirco <backseatdba@xxxxxxxxx>
  • To: Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx>
  • Date: Thu, 7 Feb 2019 15:58:07 -0800

Ok found out a little later that the other databases didn't really crash,
they were working fine for existing connections, just any new connection
failed. And if I tried to connect as sys as sysdba it told me the instance
was idle.

Here is the output you requested

$ ipcs -m
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 1221361664 oracle     600        4096       0
0x00000000 1221394433 oracle     600        4096       0
0x00000000 1221427202 oracle     600        4096       0
0xcdd9f634 1221459971 oracle     600        24576      93
0x00000000 1221492740 oracle     600        4096       0
0x00000000 1221525509 oracle     600        4096       0
0x00000000 1221558278 oracle     600        4096       0
0x34ef509c 1221591047 oracle     600        40960      147
0x00000000 1225883656 oracle     600        4096       0
0x00000000 1225916425 oracle     600        4096       0
0x00000000 1225949194 oracle     600        4096       0
0x7afafd64 1225981963 oracle     600        40960      81
0x00000000 1226997772 oracle     600        8630272    166
0x00000000 1227030541 oracle     600        3372220416 83
0x00000000 1227063310 oracle     600        8146944    83
0x76c55318 1227096079 oracle     600        16384      83
0x00000000 1228439568 oracle     600        4096       0
0x00000000 1228472337 oracle     600        4096       0
0x00000000 1228505106 oracle     600        4096       0
0x866b8aa0 1228537875 oracle     600        28672      247
0x00000000 1293221908 oracle     600        4096       0
0x00000000 1293254677 oracle     600        4096       0
0x00000000 1293287446 oracle     600        4096       0
0xc402bb18 1293320215 oracle     600        28672      90
0x00000000 1229029400 oracle     600        4096       0
0x00000000 1229062169 oracle     600        4096       0
0x00000000 1229094938 oracle     600        4096       0
0x0c51f55c 1229127707 oracle     600        40960      80
0x00000000 1229160476 oracle     600        4096       0
0x00000000 1229193245 oracle     600        4096       0
0x00000000 1229226014 oracle     600        4096       0
0xbae4e74c 1229258783 oracle     600        40960      87
0x00000000 615972896  oracle     600        4096       0
0x00000000 616005665  oracle     600        4096       0
0x00000000 616038434  oracle     600        4096       0
0xc78a1c8c 616071203  oracle     600        28672      113
0x00000000 1231388708 oracle     600        12173312   186
0x00000000 1231421477 oracle     600        11207180288 93
0x00000000 1231454246 oracle     600        21381120   93
0x4c7ac944 1231487015 oracle     600        28672      93
0x00000000 1232830504 oracle     600        4096       0
0x00000000 1232863273 oracle     600        4096       0
0x00000000 1232896042 oracle     600        4096       0
0xf06d661c 1232928811 oracle     600        24576      85
0x00000000 1233616940 oracle     600        12173312   174
0x00000000 1233649709 oracle     600        11207180288 87
0x00000000 1233682478 oracle     600        21381120   87
0xdb5acf68 1233715247 oracle     600        28672      87
0x00000000 1236697136 oracle     600        4096       0
0x00000000 1236729905 oracle     600        4096       0
0x00000000 1236762674 oracle     600        4096       0
0x9cd83398 1236795443 oracle     600        24576      87
0x00000000 1237483572 oracle     600        4096       0
0x00000000 1237516341 oracle     600        4096       0
0x00000000 1237549110 oracle     600        4096       0
0x4bd6517c 1237581879 oracle     600        28672      108
0x00000000 1238925368 oracle     600        4096       0
0x00000000 1238958137 oracle     600        4096       0
0x00000000 1238990906 oracle     600        4096       0
0x33ec8074 1239023675 oracle     600        28672      125
0x00000000 1156022332 oracle     600        4096       0
0x00000000 1156055101 oracle     600        4096       0
0x00000000 1156087870 oracle     600        4096       0
0x30c66f7c 1156120639 oracle     600        24576      0
0x00005060 2293824    oracle     660        62169088   0
0x00005061 2326593    oracle     660        5709824    0
0x00005062 2359362    oracle     660        65544192   0
0x00000000 1239056451 oracle     600        4096       0
0x00000000 1239089220 oracle     600        4096       0
0x00000000 1239121989 oracle     600        4096       0
0xb40541dc 1239154758 oracle     600        40960      92
0x00000000 1241481287 oracle     600        4096       0
0x00000000 1241514056 oracle     600        4096       0
0x00000000 1241546825 oracle     600        4096       0
0x6762e034 1241579594 oracle     600        24576      91
0x00000000 1241612363 oracle     600        12173312   176
0x00000000 1241645132 oracle     600        11207180288 88
0x00000000 1241677901 oracle     600        21381120   88
0x36329238 1241710670 oracle     600        28672      88
0x00000000 620822607  oracle     600        4096       0
0x00000000 620855376  oracle     600        4096       0
0x00000000 620888145  oracle     600        4096       0
0x507a78a4 620920914  oracle     600        12288      102
0x00000000 1351549011 oracle     600        12173312   322
0x00000000 1351581780 oracle     600        20937965568 161
0x00000000 1351614549 oracle     600        54935552   161
0x35b8fa94 1351647318 oracle     600        24576      161
0x00000000 1265729623 oracle     600        4096       0
0x00000000 1265762392 oracle     600        4096       0
0x00000000 1265795161 oracle     600        4096       0
0xa0206b88 1265827930 oracle     600        28672      89


$ ipcrm -m 1265795161
$ ipcrm -m 1265762392
$ ipcrm -m 1265729623
$ ipcrm -m 620888145
$ ipcrm -m 620855376
$ ipcrm -m 620822607
$ ipcrm -m 1241546825


On Thu, Feb 7, 2019 at 11:23 AM Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx>
wrote:

Jeff,



Could you post ipcs –am output from before executing the ipcrm commands
and the ipcrm commands themselves, so that we try to figure what went wrong?



Nenad



https://nenadnoveljic.com/blog/





*From:* oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> *On
Behalf Of *Noveljic Nenad
*Sent:* Donnerstag, 7. Februar 2019 19:41
*To:* Jeff Chirco <backseatdba@xxxxxxxxx>
*Cc:* Mark W. Farnham <mwf@xxxxxxxx>; oracle-l-freelist <
oracle-l@xxxxxxxxxxxxx>
*Subject:* RE: clone creations fails with shared memory realm already
exists



That’s strange. I can’t see why removing a non-used shared memory segment
would crash any database.



Meanwhile, Stefan has already suggested a better way for identifying
shared memory segments belonging to a particular database.



sysresv

Shared Memory:

ID              KEY

905970099       0x00000000

905970100       0x00000000

905970101       0x00000000

905970098       0x00000000

905970102       0x6073fcb8



The dead segments can be removed by ipcrm –m shmid



Expectedly, the segments listed by sysresv match the ipcs –am output,
which also shows some additional information, such as the number of
attached processes, last access time etc.:



ipcs -am | grep 905970

m  905970102   0x6073fcb8 --rw-------   oracle      dba   oracle
dba     64      20480 23319 28463 19:23:10 19:23:10 10:04:51

m  905970101   0x0        --rw-------   oracle      dba   oracle
dba     64   92274688 23319 28463 19:23:10 19:22:56 10:04:51

m  905970100   0x0        --rw-------   oracle      dba   oracle
dba     64  973078528 23319 28463 19:23:10 19:22:56 10:04:51

m  905970099   0x0        --rw-------   oracle      dba   oracle
dba     64 3221225472 23319 28463 19:23:10 19:22:56 10:04:51

m  905970098   0x0        --rw-------   oracle      dba   oracle
dba     64   10485760 23319 28463 19:23:10 19:22:56 10:04:51



So for safety reasons, both outputs can be compared before removing any
segments.



Nenad



https://nenadnoveljic.com/blog/







*From:* Jeff Chirco <backseatdba@xxxxxxxxx>
*Sent:* Donnerstag, 7. Februar 2019 18:21
*To:* Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx>
*Cc:* Mark W. Farnham <mwf@xxxxxxxx>; oracle-l-freelist <
oracle-l@xxxxxxxxxxxxx>
*Subject:* Re: clone creations fails with shared memory realm already
exists



Ok that apparently crashed a few of my dev databases that were running
when I did that.  I got reports of errors and when I tried to log in to
database it said shared memory realm already exists.  I ran a ps -ef | grep
for the database name and found a bunch of processes still running.  Killed
the pmon and they all dropped and I was able to restart the database.  No
harm done as it is just Dev but I don't think anyone will want to do this
on a Production system with other running databases, maybe if they are all
down.



Jeff



On Thu, Feb 7, 2019 at 8:56 AM Jeff Chirco <backseatdba@xxxxxxxxx> wrote:

Thanks Mark and Nenad, removing the dead segments worked.  Learned
something today!



Jeff



On Thu, Feb 7, 2019 at 7:38 AM Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx>
wrote:

You’d need to look for a segment with no attached processes (NATTACH=0).
It’s a dead segment that can be removed with ipcrm.



IPC status from <running system> as of Thu Feb  7 16:34:40 MET 2019

T         ID      KEY        MODE        OWNER    GROUP  CREATOR   CGROUP
*NATTCH*      SEGSZ   CPID  LPID   ATIME    DTIME    CTIME

Shared Memory:

m 1560281188   0x2a54d290 --rw-------   oracle      dba   oracle
dba    453      28672  8707 24484 16:34:33 16:34:33  8:47:09

m  905969763   0x0        --rw-------   oracle      dba   oracle
dba    453  329252864  8707 24484 16:34:33 16:34:33  8:47:09







Best regards,



Nenad



https://nenadnoveljic.com/blog/





*From:* oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> *On
Behalf Of *Jeff Chirco
*Sent:* Donnerstag, 7. Februar 2019 16:33
*To:* Mark W. Farnham <mwf@xxxxxxxx>
*Cc:* oracle-l-freelist <oracle-l@xxxxxxxxxxxxx>
*Subject:* Re: clone creations fails with shared memory realm already
exists



Hi Mark not sure what to look for with that. There is 22 other databases
running on this server.  Its a dev server with a bunch of clones and little
use.



On Wed, Feb 6, 2019 at 7:41 PM Mark W. Farnham <mwf@xxxxxxxx> wrote:

see what ipcs –m says is allocated.



*From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Jeff Chirco
*Sent:* Wednesday, February 06, 2019 10:05 PM
*To:* oracle-l-freelist
*Subject:* clone creations fails with shared memory realm already exists



Ok I am confused.  I am trying to make a thin clone of our database from
one server to another. Something I have done many times. I use NetApp Snap
Manager for Oracle. Oracle EE 12.2.0.1 running on Oracle Linux 7.  The
clone process is failing with ORA-27100: shared memory realm already exists.



This database does not currently exist. I ran a ps -ef | grep for my
database name and no process are found.  There is nothing in /etc/oratab.
I've tried adding an entry to make sure a database with that name is not
running.  There is no pfile, spfile, password file.  I've checked /dev/shm
for any files related to my database name and there is nothing. I don't
understand by it thinks shared memory realm already exists.

Any suggestions?



Thanks,

Jeff

____________________________________________________

Please consider the environment before printing this e-mail.

Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.


Important Notice
This message is intended only for the individual named. It may contain
confidential or privileged information. If you are not the named addressee
you should in particular not disseminate, distribute, modify or copy this
e-mail. Please notify the sender immediately by e-mail, if you have
received this message by mistake and delete it from your system.
Without prejudice to any contractual agreements between you and us which
shall prevail in any case, we take it as your authorization to correspond
with you by e-mail if you send us messages by e-mail. However, we reserve
the right not to execute orders and instructions transmitted by e-mail at
any time and without further explanation.
E-mail transmission may not be secure or error-free as information could
be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also
processing of incoming e-mails cannot be guaranteed. All liability of
Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively
referred to as "Vontobel Group") for any damages resulting from e-mail use
is excluded. You are advised that urgent and time sensitive messages should
not be sent by e-mail and if verification is required please request a
printed version. Please note that all e-mail communications to and from the
Vontobel Group are subject to electronic storage and review by Vontobel
Group. Unless stated to the contrary and without prejudice to any
contractual agreements between you and Vontobel Group which shall prevail
in any case, e-mail-communication is for informational purposes only and is
not intended as an offer or solicitation for the purchase or sale of any
financial instrument or as an official confirmation of any transaction.
The legal basis for the processing of your personal data is the legitimate
interest to develop a commercial relationship with you, as well as your
consent to forward you commercial communications. You can exercise, at any
time and under the terms established under current regulation, your rights.
If you prefer not to receive any further communications, please contact
your client relationship manager if you are a client of Vontobel Group or
notify the sender. Please note for an exact reference to the affected group
entity the corporate e-mail signature. For further information about data
privacy at Vontobel Group please consult www.vontobel.com.


Important Notice

This message is intended only for the individual named. It may contain
confidential or privileged information. If you are not the named addressee
you should in particular not disseminate, distribute, modify or copy this
e-mail. Please notify the sender immediately by e-mail, if you have
received this message by mistake and delete it from your system.
Without prejudice to any contractual agreements between you and us which
shall prevail in any case, we take it as your authorization to correspond
with you by e-mail if you send us messages by e-mail. However, we reserve
the right not to execute orders and instructions transmitted by e-mail at
any time and without further explanation.
E-mail transmission may not be secure or error-free as information could
be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also
processing of incoming e-mails cannot be guaranteed. All liability of
Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively
referred to as "Vontobel Group") for any damages resulting from e-mail use
is excluded. You are advised that urgent and time sensitive messages should
not be sent by e-mail and if verification is required please request a
printed version.
Please note that all e-mail communications to and from the Vontobel Group
are subject to electronic storage and review by Vontobel Group. Unless
stated to the contrary and without prejudice to any contractual agreements
between you and Vontobel Group which shall prevail in any case,
e-mail-communication is for informational purposes only and is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction.
The legal basis for the processing of your personal data is the legitimate
interest to develop a commercial relationship with you, as well as your
consent to forward you commercial communications. You can exercise, at any
time and under the terms established under current regulation, your rights.
If you prefer not to receive any further communications, please contact
your client relationship manager if you are a client of Vontobel Group or
notify the sender. Please note for an exact reference to the affected group
entity the corporate e-mail signature. For further information about data
privacy at Vontobel Group please consult www.vontobel.com.


Important Notice
This message is intended only for the individual named. It may contain
confidential or privileged information. If you are not the named addressee
you should in particular not disseminate, distribute, modify or copy this
e-mail. Please notify the sender immediately by e-mail, if you have
received this message by mistake and delete it from your system.
Without prejudice to any contractual agreements between you and us which
shall prevail in any case, we take it as your authorization to correspond
with you by e-mail if you send us messages by e-mail. However, we reserve
the right not to execute orders and instructions transmitted by e-mail at
any time and without further explanation.
E-mail transmission may not be secure or error-free as information could
be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also
processing of incoming e-mails cannot be guaranteed. All liability of
Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively
referred to as "Vontobel Group") for any damages resulting from e-mail use
is excluded. You are advised that urgent and time sensitive messages should
not be sent by e-mail and if verification is required please request a
printed version. Please note that all e-mail communications to and from the
Vontobel Group are subject to electronic storage and review by Vontobel
Group. Unless stated to the contrary and without prejudice to any
contractual agreements between you and Vontobel Group which shall prevail
in any case, e-mail-communication is for informational purposes only and is
not intended as an offer or solicitation for the purchase or sale of any
financial instrument or as an official confirmation of any transaction.
The legal basis for the processing of your personal data is the legitimate
interest to develop a commercial relationship with you, as well as your
consent to forward you commercial communications. You can exercise, at any
time and under the terms established under current regulation, your rights.
If you prefer not to receive any further communications, please contact
your client relationship manager if you are a client of Vontobel Group or
notify the sender. Please note for an exact reference to the affected group
entity the corporate e-mail signature. For further information about data
privacy at Vontobel Group please consult www.vontobel.com.

Other related posts: