Nancy Mathew
26th February 2003, 05:29
Hi,
What are the risks associated with Reorganize Table?
What are the precautions to be taken before doing reorganize.
Is it as risky as doing reconfigure.

Regards,
Nancy

morpheus
26th February 2003, 08:49
Reorganizing the tabels, recreates the tables as per the new DD. It creates the "R" file and drops the table. While creating the new table, it reads "R" file. In case there is an interruption, and "R" is not created completely, then there is a possibility of losing the data. So, either use this session on the server, or the best way is to keep a sequential dump of the table.
Hope this helps.
:)

Nancy Mathew
26th February 2003, 09:34
Is it Reorganize or reconfigure that recreates the table

lauras
26th February 2003, 16:55
As I understand it, both reorg and reconfig recreate the table. It is a good idea to have either a DB backup or sequential dump before starting. We had an interruption once on a reorg of tfgld418, and that was a mess. It took months to get all the records recreated and fixed. Whenever I can, I use Oracle to reorg the tables, it goes faster and rarely has a problem.

dave_23
26th February 2003, 19:31
Reorganize and Reconfigure are 2 very different things.

Reorganize:
Calls bdbpre6.X and bdbpost6.X to drop and re-create the table. Followed by refint6.X to repair any reference counters.

Why would you want to do this?
1) If you're a level 1 driver, its the 2nd eaisest way to drop and re-create a corrupt index on a table. (gcommand being the first)
2) If you have a lot of fragmentation in your tables and do not have a DBA, you can edit your X_storage (ora, inf, msql) file to tell it the initial and next extents and then run reorganize to coalesce your table.

Problems that may occur:
1) if your X_storage file is not up to date, you're table will be just as fragmented as it was when it went in.
2) some OS's have a 2 GB filesize limit, that can cause problems on older porting sets.
3) refint6.X might kick off, this can take forever and you don't always need it.

Reconfigure:
the key binary is bdbreconfig6.X, which is called from Create Runtime DD and Convert to runtime DD.
This is how you make physical changes to a table. (add a field, index or change a domain).
This is what creates R.<table> files and reads them back in.

I hope this helps!

Dave

lauras
26th February 2003, 19:46
I agree, there are big differences between reconfig and reorg. However, both do create the R file. I avoid Baan reorgs whenever possible, Oracle is faster and easier to recover from mishaps.

I'm curious about this gcommand. What is it and how does one use it?

dave_23
26th February 2003, 20:14
Ya know. I never noticed that before.
reorg calls bdbreconfig with the -Z option which means that its going to look at the current dd instead of the .new dd. Instead of using bdbpre and bdbpost.

I guess you learn something new every day!

But I agree, unless you're level 2 don't bother with reorg.

Dave

jak_tn
26th February 2003, 23:01
OK, I'm curious about this gcommand, too! Please tell us more!

Thanks,
Judy

askajale
28th February 2003, 00:40
Hi Nancy,

The basic difference is

Reorganize - It is related to data and in which all the links, indices and reference counters are updated.

Reconfigure - Here first the table is exported (to R file), the table is dropped and is created with new defn and the data is loaded.

Now if you are thinking of RISK factors, Baan creates ".R" files under $BSE_TMP folder, these files are deleted once the data is loaded completely. Now when u do this with large volume of data, it is possible to keep the copy of these ".R" files and if the process is failed due to some reason, you can recover the table with this file.

Pl mail me if you need ano more info.

-- Avinash

timb25
27th March 2003, 15:37
How do you perform an oracle reorg on a table?

-Tim

lauras
27th March 2003, 22:48
First export the data using Oracle's export command. Then delete or truncate the tables either in Baan or Oracle. Then import the data using Oracle's import command.
I usually do a Baan dump (Create sequential dump) also, just in case Oracle freaks out or otherwise doesn't work. I've only used the Baan dump once, so I consider it my safety net - if I have it, I don't need it.;)

askajale
28th March 2003, 02:04
Hi Timb25,

Do you mean when we reorg the data in Baan application where the backend is Oracle?

or

How data is reorganised in Oracle database?

Basically Reorganise data is somewhat unique concept of Baan in which we can rebuild the reference counters, rebuild indices etc. And for all these each database has it's own command.

-- Avinash

manojlathwal
22nd January 2008, 13:21
could you please suggest the steps to recover data from ".R" file as data loss happen to me and luckyly i have that ".R" file.

Brendan Shine
23rd January 2008, 03:22
Regarding gcommand, for more information on the gcommand search the Infor support website along with technical notes las gcommand is NOT an end-user/customer tool but more of an internal Infor command that is used for example to test that certain scenarios have been fixed in a porting set upgrade.

So in the technical notes Infor would explain how to use the gcommand to create/test this scenario (ex. use gcommand to enter data into the table, drop table, etc). So be very careful with this command as it is NOT intuitive so you need to understand what you are doing :)

Brendan Shine
23rd January 2008, 03:25
To recover using R. file see the bdbreconfig options with the plus "+" option in the Infor documentation or search baanboard with appropriate keywords. Make sure to take a backup copy of the R. file beforehand. Also, make sure you've dealt with the root cause of why the reconfigure stopped in the middle and left the R. file in the first place.