DBC Archive & Restore on DR

Database
Enthusiast

DBC Archive & Restore on DR

We have Prod & DR customer level databases are synchronized using data mover jobs on daily basis but there is no synchronization at DBC level. If i archive only DBC using

LOGON **bleep**.**bleep**.xx.60/dbc,dbc;

ARCHIVE DATA TABLES(DBC) ,

RELEASE LOCK,

FILE=dbcARR;

LOGOFF;

and restore it on DR using 

LOGON **bleep**.**bleep**.**bleep**.10/dbc,dbc;

copy DATA TABLES(DBC)

RELEASE LOCK,

FILE=dbcARR;

LOGOFF;

1. will this archive only DBC tables not all the child databases ?

2. Will it restore it on DR site successfully without any consequences like internal IDs etc.

Please enlight a bit about what are the measures a DBA must keep in mind for recovering from a disaster.

 

9 REPLIES
Enthusiast

Re: DBC Archive & Restore on DR

I tried it first of all Copy not allowed with DBC then i changed it to RESTORE and now the following problem

Cannot Proceed with DBC Restore, DBC
Logons are not enabled.

I disconnected all the utilities because before that it was saying users other than DBC logged on.

 

Any help ?

 

Enthusiast

Re: DBC Archive & Restore on DR

I disable all logons from database window

i enable dbc logons from database window

TD-EXPRESS:~ # pdestate -a
PDE state is RUN/STARTED.
DBS state is 10: Only user DBC Logons are enabled - Users are logged on

SELECT AbortSessions(1,'VIEWPOINT',0,'Y','Y');

*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.

AbortSessions(1,'VIEWPOINT',0,'Y','Y')
--------------------------------------
4

SELECT * FROM DBC.SESSIONINFO
;

*** Query completed. One row found. 87 columns returned.
*** Total elapsed time was 1 second.

UserName AccountName SessionN
------------------------------ ------------------------------ -------------
DBC DBC 2,9

 

 

After ensuring that only logons are enabled for DBC and only DBC is logged in when i tried to restore now this is the error.

03/20/2017 21:15:39 RESTORE DATA TABLES(DBC),
03/20/2017 21:15:39 RELEASE LOCK,
03/20/2017 21:15:39
03/20/2017 21:15:39 FILE=DBCARR;
03/20/2017 21:15:39
03/20/2017 21:15:39 ARC HAS REQUESTED 4 SESSIONS, TASM HAS GRANTED IT 4 SESSIONS
03/20/2017 21:15:39
03/20/2017 21:15:39 UTILITY EVENT NUMBER - 238
03/20/2017 21:15:39 LOGGED ON 4 SESSIONS
03/20/2017 21:15:39 STARTING TO RESTORE DATABASE "DBC"
03/20/2017 21:15:56 *** Failure 3596:Invalid restore of database DBC.
03/20/2017 21:15:57 LOGGED OFF 7 SESSIONS
03/20/2017 21:15:57 ARCMAIN TERMINATED WITH SEVERITY 12

 

 

Enthusiast

Re: DBC Archive & Restore on DR

Hi ,

 

If you see the status of pdestate -a,

 

TD-EXPRESS:~ # pdestate -a
PDE state is RUN/STARTED.
DBS state is 10: Only user DBC Logons are enabled - Users are logged on

 

Here only user DBC logons are enabled ..This is not correct output for pdestate -a

 

You should get like this 

pdestate -a
PDE state is RUN/STARTED.
DBS state is 5: Logons are enabled - The system is quiescent

 

Please try to enable logons first then restore the DBC.

 

 

Enthusiast

Re: DBC Archive & Restore on DR

TD-EXPRESS:~ # pdestate -a PDE state is RUN/STARTED. DBS state is 4: Logons are enabled - Users are logged on ==================================================================== 03/21/2017 17:16:56 RESTORE DATA TABLES(DBC), 03/21/2017 17:16:56 RELEASE LOCK, 03/21/2017 17:16:56 03/21/2017 17:16:56 FILE=DBCARR; 03/21/2017 17:16:56 03/21/2017 17:16:56 ARC HAS REQUESTED 4 SESSIONS, TASM HAS GRANTED IT 4 SESSIONS 03/21/2017 17:16:56 03/21/2017 17:16:56 UTILITY EVENT NUMBER - 240 03/21/2017 17:16:56 LOGGED ON 4 SESSIONS 03/21/2017 17:16:57 STARTING TO RESTORE DATABASE "DBC" 03/21/2017 17:16:57 *** Failure 9514:Cannot Proceed with DBC Restore, DBC Logons are not enabled. 03/21/2017 17:16:59 LOGGED OFF 7 SESSIONS 03/21/2017 17:16:59 ARCMAIN TERMINATED WITH SEVERITY 12 ======================================================================== ENABLE DBC LOGONS ENABLE LOGONS ======================================================================== TD-EXPRESS:~ # pdestate -a PDE state is RUN/STARTED. DBS state is 4: Logons are enabled - Users are logged on TD-EXPRESS:~ # ======================================================= RESTORE DATA TABLES(DBC), 03/21/2017 17:34:55 RELEASE LOCK, 03/21/2017 17:34:55 03/21/2017 17:34:55 FILE=DBCARR; 03/21/2017 17:34:55 03/21/2017 17:34:55 ARC HAS REQUESTED 4 SESSIONS, TASM HAS GRANTED IT 4 SESSIONS 03/21/2017 17:34:55 03/21/2017 17:34:55 UTILITY EVENT NUMBER - 242 03/21/2017 17:34:55 LOGGED ON 4 SESSIONS 03/21/2017 17:34:55 STARTING TO RESTORE DATABASE "DBC" 03/21/2017 17:34:55 *** Failure 9263:Cannot Proceed with DBC Restore, Users other than DBC are logged on. 03/21/2017 17:34:57 LOGGED OFF 7 SESSIONS 03/21/2017 17:34:57 ARCMAIN TERMINATED WITH SEVERITY 12==================

 

Enthusiast

Re: DBC Archive & Restore on DR

THEN I SHUT DOWN THE VIEW POINT AND MADE SURE NO OTHER IS LOGGED ON EXCEPT DBC

AND TRIED AGAIN

03/21/2017 17:44:40 *** Failure 9514:Cannot Proceed with DBC Restore, DBC
Logons are not enabled.
03/21/2017 17:44:42 LOGGED OFF 7 SESSIONS
03/21/2017 17:44:42 ARCMAIN TERMINATED WITH SEVERITY 12

THEN I LOGOFF DBC FROM BTEQ

TD-EXPRESS:~ # pdestate -a
PDE state is RUN/STARTED.
DBS state is 5: Logons are enabled - The system is quiescent

===========================================================

03/21/2017 17:44:40 *** Failure 9514:Cannot Proceed with DBC Restore, DBC
Logons are not enabled.
03/21/2017 17:44:42 LOGGED OFF 7 SESSIONS
03/21/2017 17:44:42 ARCMAIN TERMINATED WITH SEVERITY 12

===========================================================

Input Supervisor Command:
ENABLE DBC LOGONS

17/03/21 10:48:40 DBC Logons enabled.

============================================================

03/21/2017 17:52:22 ARC HAS REQUESTED 4 SESSIONS, TASM HAS GRANTED IT 4 SESSIONS
03/21/2017 17:52:22
03/21/2017 17:52:22 UTILITY EVENT NUMBER - 250
03/21/2017 17:52:22 LOGGED ON 4 SESSIONS
03/21/2017 17:52:22 STARTING TO RESTORE DATABASE "DBC"
03/21/2017 17:52:49 *** Failure 3596:Invalid restore of database DBC.
03/21/2017 17:52:51 LOGGED OFF 7 SESSIONS
03/21/2017 17:52:51 ARCMAIN TERMINATED WITH SEVERITY 12

================================================================================

no success. i read some where that DBC restore is only possible on new system. in my case is it the reason of failure that DBC already exists and by the way archived file is of the same system's DBC.

Any HELP?

 

Senior Apprentice

Re: DBC Archive & Restore on DR

Afaik you can restore dbc only to a system after runnning a sysinit (otherwise you would destroy all existing data).

Junior Supporter

Re: DBC Archive & Restore on DR

DBC restore on DR will wipe out all the existing data from your DR.

In your case,to keep PROD and DR DBC in sync without losing existing data you will have to create missing objects,do the grants etc.

That way you can try to match DBC tables.


Abhishek Jadhav
Enthusiast

Re: DBC Archive & Restore on DR

Alright. I took your advice. Thank You. Is there any algorithm to check what objects and rights are missing on Prod and DR. Secondly, Is it good practice to keep DBC archive. In case if system crashed totally to recover it? 

Re: DBC Archive & Restore on DR

Thanks for providing the information.