P-Matt
4th February 2002, 22:29
I've been reading these (and almost every other) postings and wonder....
What is the relationship between the Oracle tables and the Baan Data Dictionary? Is it possible for a system lockup to corrupt the data dictionary?
If a batch session runs just as slow in company 300 as in company 310 - the problem must NOT be Oracle table definition, fragmentation, corruption or high extents - right? Because each company has it's own tables.
Wouldn't this point to a problem with
1) Oracle tablespaces - which were getting full - but are now only 40% full after resizing.
2) Disk i/o - top notch - not an issue
3) System resources - not a problem rarely > 20% busy.
4) Baan directions to data (data dictionary).
When a Convert to Runtime Data dictionary is performed, what is really going on? What is the difference between Convert and Create?
What is the purpose of the db_resource file and it's entries?
How do I determine the values to enter in a storage(intial xxx next xxx) clause in the ora_storage file?
Doesn't the table take the creation parameters of the tablespace it's in when created?
Alas, so many questions, so little time.
:confused:
gguymer
4th February 2002, 23:01
I can respond to some of this:
The db_resource file contains various parameters that primarily control the behavior of the Baan Oracle driver. The driver itself is a program that makes use of Oracle OCI (Oracle Call Interface) to talk to Oracle.
The ora_storage file tells Baan where and how to create Baan owned tables and indexes in Oracle. You can specify Oracle table and index creation parameters here if you want. As to the INIT and NEXT, I would say its not necessary to set them in the ora_storage file since it can be controlled by parameters present in the tablespace. It is important to keep the size of the ora_storage file to a minimum. On the topic of INIT and NEXT settings for table, I would like to recommend that you read the article titled: "How to Stop Defragmenting and Start Living: The Definitive Word on Framentation". It can be found on Oracle's MetaLink on-line web system.
victor_cleto
5th February 2002, 11:55
Let me do a correction here, the ora_storage does not need necessarly to be small! You can use a ora_storage2 very, very small that is read when each user logs in and still have an enormeous ora_storage that is used for table creations.
See thread http://www.baanboard.com/baanboard/showthread.php?s=&threadid=289&highlight=orastorage2 for more info on this.
victor_cleto
5th February 2002, 12:09
When a Convert to Runtime Data dictionary is performed, what is really going on? What is the difference between Convert and Create?
Even if Baan mentions creations/converts, what happens depends on what will converted/created (for example, conversions to runtime DD of user data is not the same as a convert/create of table definitions).
This would need its own thread since there's SOOO much related to this... So, I'll just discuss the table definitions here. When you define/change your table, this is stored only in the application data dictionary (APDD).
So I consider the APDD like a frendly way to change/display it. But Baan needs a fast way to access the data without even going thru the overload of fetching it thru the database.
That's why exists the runtime data dictionary (RTDD), that I consider as some sort of "compilation" of the APDD, stored as a file in the OS level.
So, any change made in the APDD needs the corresponding "compiled file" to be recreated, and in this tables case, also needs the tables (in Oracle) to be changed accordingly (thru a reorganization of the table affected).
In a general form, a convert will translate into a "compilation" of what has been changed only, while a create is a "forced compilation", even if it has not been changed.
Note: "compilation" here may reffer to real compilations (scripts, reports), dumps (when those special files are created) or a population of other tables (like a convert of user authorizations, that is nothing more than a population of data into ttaad999.000 from ttaad231.000 thru table ttaad400.000) - confused already?
The best way to know more about this is to attend a good Tools training, since then you will know the differences between convert/create but also know what needs to be converted/created, how they work and what special steps needs to be taken into account (like, when you need to logoof/login after a change is made or when no users must be working on a package combination).
patvdv
5th February 2002, 22:49
Maybe some more words on the $BSE/lib/ora/ora_storage file. The INITIAL and NEXT values you either have to estimate from current usage or use a set of default values to begin with. The ora_storage entries have precedence over the default tablespace settings. But if you leave out storage parameters from the ora_storage file, then the tablespace defaults will be used.
toolswizard
7th February 2002, 18:46
I'll address two questions.
The Convert/Create to rutime is Baans version of What came first the chicken or the egg. If a Baan user is signing on, what company does he sign into first, what accesses does he have, what database privledges does he have, what is his default package combination? All this information is in the database right? But if we don't know his privledges how do we access the database? We can't. So when we convert a user to runtime, we take his information out of the databse and store it in a file on the disk so it can be accessed at "runtime" . The file can be seen in $BSE/lib/user. Same with the data dictionary, we make changes that are stored in the dictionary, but when we convert to runtime, a text file is stored in $BSE/dict/(pkg combo)/(pk module)/ table etc. Take a look you'll get the idea. This is also referred to as "Passive" and "Active". You can make the change to the database, but not convert it till you are ready (Passive), and then when you create/convert runtime it makes it Active.
The difference between Create and Convert is that Convert looks at the changes you make and decides if there is something to do, Create foreces an update regardless if there were changes or not.
For database performance I have learned two things. First, it is almost always bad programming that makes a process slow. Second, and I learned this recently, since Baan uses hints to access an oracle databse when no index is forced, you must analyze the database. Recently I added an additional index to a table. The programs written to use this index went from a running time of 2 hours to 20 minutes. All the older programs that used this table that ran in 20 minutes, now took hours. Once we analyzed the table, these programs went back to their shorter running time.
Nuchter
22nd February 2002, 16:32
The difference between Create and Convert is that Convert looks at the changes you make and decides if there is something to do, Create foreces an update regardless if there were changes or not.
Note that it's not always clear for Baan that there's a change. For example: if you use Maintain Table Definitions to change a table Baan knows that something is changed and the Convert will do the job. If you import a patch with a table definition baan will not record the change and a convert will not do. In this case you have to use Create RDD to 'convert' the changes to runtime.
patvdv
22nd February 2002, 16:42
The key to distinguish between Convert and Create is the source of the change:
change on same system -> convert DD
change coming from other system -> create DD
victor_cleto
22nd February 2002, 18:00
And it's good policy to run first a convert before running a create (mandatory for a full create!), because table definitions will fail to dump if domains/table definitions that affect the current tables you want to dump are still present in the need to convert table.