# ERROR-136, RESTORE DATABASE ONLINE NOT PERMITTED

**URL:** <https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [July 21, 2014, 6:41pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590 "2014-07-21T18:41:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Bourgeois](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_bourgeois/32/952_2.png) [@Steve\_Bourgeois](https://techcommunity.softwareag.com/u/Steve_Bourgeois)\
**Post date:** [July 21, 2014, 6:41pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/1 "2014-07-21T18:41:37Z")

</div>

Hello all,

I am trying to restore a database and want to make sure I have all the pieces and parts.  
The SDSF hold queue had a run of a restore that ran clean.  
I did a sj to get the original JCL. Now I am trying to verify the JCL work again.  
I am getting this error:

ERROR-136, RESTORE DATABASE ONLINE NOT PERMITTED

What do I need to do to take the database off line?  
Could it be that the backup file was used once and the restore was clean that the Database is smart enough that I don’t need to do another restore?

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 21, 2014, 8:12pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/2 "2014-07-21T20:12:29Z")

</div>

You “take the database offline” by stopping the job or STC with either

```auto
P <taskname>
```

or

```auto
F <taskname>,ADAEND
```

where is the job- or STC name.

---

<div class="post-metadata">

**Author:** ![Steve\_Bourgeois](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_bourgeois/32/952_2.png) [@Steve\_Bourgeois](https://techcommunity.softwareag.com/u/Steve_Bourgeois)\
**Post date:** [July 22, 2014, 3:19pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/3 "2014-07-22T15:19:12Z")

</div>

Thank you Wolfgang,  
I am getting the following in my log file:

ADAEXIT2 0000104 CALLED FOR PLOG, FLAGS=X’4040’ RETURN TO NUCLEUS

It just seems to repeat.

Seems to me that the task need to end or get purged from the system.  
How can I do that?

Steve

---

<div class="post-metadata">

**Author:** ![Steve\_Bourgeois](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_bourgeois/32/952_2.png) [@Steve\_Bourgeois](https://techcommunity.softwareag.com/u/Steve_Bourgeois)\
**Post date:** [July 22, 2014, 3:34pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/4 "2014-07-22T15:34:15Z")

</div>

I need to add that this is causing a beep on the console in ops.  
It is driving them a little crazy that is not a long road.

---

<div class="post-metadata">

**Author:** ![Steve\_Bourgeois](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_bourgeois/32/952_2.png) [@Steve\_Bourgeois](https://techcommunity.softwareag.com/u/Steve_Bourgeois)\
**Post date:** [July 22, 2014, 9:50pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/5 "2014-07-22T21:50:30Z")

</div>

I found the log switch jcl.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 23, 2014, 1:03am UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/6 "2014-07-23T01:03:04Z")

</div>

Sorry for being late to reply, just one thing to add then - there are user exits (UEX2 for dual logs and UEX12 for multi-logs) to automatically submit the log save/switch JCL.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:31pm UTC](https://techcommunity.softwareag.com/t/error-136-restore-database-online-not-permitted/177590/7 "2021-04-02T15:31:37Z")

</div>


