Like we execute .sql file against SQL, we can write multiple goldengate commands inside a .oby file and execute it against GGSCI prompt using OBEY command.


In the below example, we will add supplemental login(add trandata) for multiple tables using obey command.

1. Create a text file and put goldengate commands.

2. execute obey command from GGSCI

SYNTAX – obey < text_file_name.oby>

ggsci> obey addtran.oby

We can see, it executed all the commands mentioned inside the text file.


Can we put one obey file inside another obey file.?? Well this nested obey is controlled by the keyword ALLOWNESTED.


This is the default setting. Any attempt to run nested obey file will throw below error.

ERROR: Nested OBEY scripts not allowed. Use ALLOWNESTED to allow nested scripts.


This parameter Enables the use of nested OBEY files. i.e we can use one obey file inside another obey file.

Let’s create two obey files:

Let’s try with the default one(NOALLOWNESTED)

Here I have created two obey files and put them inside another obey file

Execute the obey file

As expected it is throwing error,

Now let’s use ALLOWNESTED parameter:

Execute the obey file:

With ALLOWNESTED, obey file executed successfully. The maximum number of nested levels is 16.