LSF9.0
In AIX using Oracle 9i, I've got a database space for ORACLE defined as prod_data and the indexs are defined as prod_index in dbdef. The Oracle DBA says that on the Oracle side, there are no tablespaces with the names prod_data, prod_index , but the tables (and their indices) reside in 14 separate tablespaces called law_data1, law_data2, ... law_index1, law_index2, ... etc.
The queires, updates, programs are working fine. Dbreorg says there is nothing to reorg. My question is: How does Lawson know which Oracle tablespaces to point to? Is there a configuration setting or mapping which correlates the 1 Lawson database space to the 14 tablespaces? Sorry I am not an Oracle DBA expert. I thought the prod_data and prod_index had to exist on the ORacle side too. So why/how does everything work ok?
Thanks in advance,
-R
Roger,
Lawson only cares about the tablespace definitions, both in dbdef (GEN) and what is actually available in Lawson when a table is created/dropped. When accessing data, the location of the object in Oracle is not relevant. You shouldn't run into any issues until you apply a patch that adds a table or modifies a table such that it needs to be unloaded to disk/dropped and recreated. If you run into either of these situations and prod_data/prod_index do not exist then the dbreorg will fail. I would recommend syncing up your lawson dbdef with the actual location of the objects in Oracle and then running a blddbdict followed by a dbreorg -d. The -d will not actually affect anything in Oracle but at that point your Lawson and Oracle definitions will be in sync.
thanks,
Jason Beard
617-548-5568
jabeard3@gmail.com
Hi Jason... I understand what you are talking about and I agree with it....
Instead of synching up Lawson with what Oracle is, can we synch up Oracle to what Lawson is? Meaning, can we create the single tablespaces in Oracle prod_data, prod_index and move the data files in Oracle to those tablespaces? The run the blddbdict and dbreorg -d?
But still, the question begs... If the database space in Lawson is prod_data, prod_index and the table spaces in Oracle are law_data1, law_data2, etc... then where is the mapping or whatever which connects or links the two? How does Lawson know to connect prod_data, prod_index with law_data1, law_data2, etc....? This is the set up now, and things work fine.
Thanks Jason,
Roger
Ben, I'm assuming that after making such changes to DBSPACE table that you would have to rebuild dict and dbreog -d. Is this correct?
Thanks,
Ben is correct you can assign a dbspace at the productline/data are level or to an individual table. You can certainly change Oracle rather than Lawson however there may be a reason that your DBA has configured the database this way. Once your database grows beyond a certain size a single tablespace is not typically preferred by most DBA's there are a million schools of thought on the best way to lay things out.
Regarding your question of how Lawson knows where the tables are today. When requesting data from a table you connect to a database and perform a select. The database knows where the object is and returns the data to the calling program. So, I connect to "prod" and execute "select * from lawson.glsystem" It doesn't matter what tablespace the lawson object glsystem is defined in, the database simply returns the data.
Gotcha...
Ok, so, I'm attempting to dump those two tables using sqlplus. I don't see those two tables (LAW_DBA_TABLE, LAW_DBA_INDEX) in GEN or the application productline. select * from law_dba_table; or select * from LAW_DBA_TABLE; results in saying table or view does not exist. select * from GEN.law_dba_table and select * from .law_dba_index says the same thing.
Where are they? I have the master lawson login/password of 'lawson'.
How about the GEN.DBSPACE table? That will tell you all the DBSPACE's defined in Lawson, the location and indlocation fields should match the Oracle names. To see if there are spaces assigned directly to tables you can select from GEN.FILELOC
the law_dba_table/index are optional and may or may not exist on your system
LAW_DBA_TABLE and LAW_DBA_INDEX don't exist.
DBSPACE exists. It has rows which point to a single table and index space.. Everything works fine as is.. can run programs and queries, etc.
Oracle has 14 different tables spaces , 7 for tables and 7 for indices
Again, how does Lawson know or point the single table and index spaces to the Oracle 14 table spaces? Where does it "know" to do that? Where is the mapping? Where is the "magic" here? hah.