Question Removed shared memory with segment_id. This process terminated with exit

vinhng

Member
Hello all,
I am facing problems about QAD linux memory issue

My customer has 2 servers: 1 for App server(linux), 1 for DB server(linux). They use 2 DBs (live and test Database) on the same local server (DB server).
Some times the test DB does not run, it automatically shutdown (they can not login it). The live database is still run at that time.
I use crontab to backup live DB everyday (afterwork) and restore the test DB from live DB at 3:00AM everyday.

Pls give me any idea expert from you all.
Thanks,

Here is the error msg log file when I try to startup the test database by manual:

[root@qadprod-srv5 mfgsvr]# ./start.qadprod-test
10:17:27 BROKER 0: Multi-user session begin. (333)
10:17:27 BROKER 0: ** The database was last used Wed Jun 12 03:36:19 2013. (886)
10:17:27 BROKER 0: ** The before-image file expected Thu Jun 13 03:35:29 2013. (887)
10:17:27 BROKER 0: ** Those dates don't match, so you have the wrong copy of one of them. (888)
10:17:27 BROKER : Removed shared memory with segment_id: 1146892
10:17:27 BROKER : Multi-user session end. (334)
10:17:27 BROKER ** This process terminated with exit code 2. (8619)
10:17:27 BROKER ** The database /u01/mfgqadprod/mfgsvr/dataqadprod/qadprod-test/hlpqadprod-test is in use in multi-user mode. (276)
10:17:27 BROKER ** This process terminated with exit code 2. (8619)
10:17:27 BROKER ** The database /u01/mfgqadprod/mfgsvr/dataqadprod/qadprod-test/admqadprod-test is in use in multi-user mode. (276)
10:17:27 BROKER ** This process terminated with exit code 2. (8619)
[root@qadprod-srv5 mfgsvr]# ./stop.qadprod-test
SYSTEM ERROR: Can't attach shared memory with segment_id: 1146892 for /u01/mfgqadprod/mfgsvr/dataqadprod/qadprod-test/mfgqadprod-test
There is no server for database /u01/mfgqadprod/mfgsvr/dataqadprod/qadprod-test/mfgqadprod-test. (1423)
Shutdown is executing. (1613)
Shutdown complete. (1614)
Shutdown is executing. (1613)
Shutdown complete. (1614)
[root@qadprod-srv5 mfgsvr]# ./start.qadprod-test
10:18:06 BROKER 0: Multi-user session begin. (333)
10:18:06 BROKER 0: ** The database was last used Wed Jun 12 03:36:19 2013. (886)
10:18:06 BROKER 0: ** The before-image file expected Thu Jun 13 03:35:29 2013. (887)
10:18:06 BROKER 0: ** Those dates don't match, so you have the wrong copy of one of them. (888)
10:18:06 BROKER : Removed shared memory with segment_id: 1179658
10:18:06 BROKER : Multi-user session end. (334)
10:18:06 BROKER ** This process terminated with exit code 2. (8619)
10:18:06 BROKER 0: Multi-user session begin. (333)
10:18:06 BROKER 0: Begin Physical Redo Phase at 0 . (5326)
10:18:06 BROKER 0: Physical Redo Phase Completed at blk 0 off 6215 upd 0. (7161)
10:18:06 BROKER 0: At end of Physical redo, transaction table size is 128. (13547)
10:18:06 BROKER 0: Multi-user session begin. (333)
10:18:06 BROKER 0: Begin Physical Redo Phase at 0 . (5326)
10:18:06 BROKER 0: Physical Redo Phase Completed at blk 88 off 782 upd 0. (7161)
10:18:06 BROKER 0: At end of Physical redo, transaction table size is 128. (13547)
[root@qadprod-srv5 mfgsvr]#
 

Cringer

ProgressTalk.com Moderator
Staff member
Do you truncate the BI after you restore the backup?
So test and live are on the same server? Have you checked the structure file for each to check there's no conflicts, particularly in the BI location?
 

vinhng

Member
Hello,

The 2 Dbs are on the same server.
I use Procopy tool to restore DB live to test for daily.
How can we do with your advices?

Regards
 

TomBascom

Curmudgeon
How many different questions are there in this thread?
 

vinhng

Member
TomBascom,

Sorry, do we need to create new thread again ?
Thanks
 

Cringer

ProgressTalk.com Moderator
Staff member
Sorry that's my fault - I merged them together because I felt that the majority of his questions will be answerable in one thread as to my eyes they all look related - ie a bad backup strategy and setup. I then got called into an urgent meeting and wasn't able to explain what I'd done until now.
 

TomBascom

Curmudgeon
Sorry, but I have no idea what, if any, question is being asked. It just looks like a bunch of random stuff tossed up on a wall.

One thing at a time works best for me.
 

Cringer

ProgressTalk.com Moderator
Staff member
Fair enough Tom, I'll split them out again but I wouldn't be surprised if the actual answers are all the same lol! :)
 

TomBascom

Curmudgeon
It might be better to see if we can get the original poster to rephrase his issue or issues more clearly in a new thread (or if there are multiple issues then multiple new threads).
 

vinhng

Member
Could anyone pls give me expert your advices this issue?

Thanks
 

TomBascom

Curmudgeon
If you have a problem with shutdowns due to shared memory being removed ask the person removing shared memory to please stop doing that.
 

vinhng

Member
Hello TomBascom,

I am still facing this issue.
Could you pls guide us how can I do that by careful steps?
I am waiting for your kindly advices

Thanks,
Vinh Ng
 

Stefan

Active Member
10:17:27 BROKER 0: ** Those dates don't match, so you have the wrong copy of one of them. (888)
How did you create your test database? Show the scripts you are using for:

  1. backup of live
  2. restore of live backup to test
  3. startup of test
 

TomBascom

Curmudgeon
Have you asked the person removing shared memory segments to please stop doing that?
 

vinhng

Member
@Stefan: Yes, we have backup DB. But we use procopy live to test daily
@TomBascom: I have already asked you before, do you mean remove shared memory seg in Linux OS, right? Could you pls tell me for more detail?

Thanks
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Re-reading the messages above that result from running the start and stop scripts, it looks like there are three databases involved here, not two: mfgqadprod-test, hlpqadprod-test, and admqadprod-test.

At 10:17:27:
  • You run start.qadprod-test.
  • It tries to proserve a DB (presumably mfgqadprod-test) but it complains that the BI date is wrong, the created shared memory segment is removed, and the proserve exits with code 2.
  • It tries to proserve hlpqadprod-test but finds that it is already running in multi-user mode and exits with code 2.
  • It tries to proserve admqadprod-test but finds that it is already running in multi-user mode and exits with code 2.
At this point the first DB is offline and the other two are online.

A short time later:
  • You run stop.qadprod-test.
  • It tries to shut down mfgqadprod-test, but fails because it is already offline.
  • It tries to shut down a DB and succeeds (presumably hlpqadprod-test).
  • It tries to shut down a DB and succeeds (presumably admqadprod-test).
At this point all three DBs are offline.

At 10:18:06:
  • You run start.qadprod-test.
  • It tries to proserve a DB (presumably mfgqadprod-test) but it complains that the BI date is wrong, removes the created shared memory segment, and exits with code 2. This is the same result as last time.
  • It tries to proserve hlpqadprod-test and succeeds.
  • It tries to proserve admqadprod-test and succeeds.
Once again, mfg is offline and hlp and adm are online.

Based on the provided messages, you have a bad copy of mfgqadprod-test that cannot be opened. Maybe it was created via an OS copy rather than probkup or procopy; I don't know. But if you create a new working copy of it, that should resolve this issue.
 
Top