Q-DAS Database Manual: Oracle Instances and Scripts Maintenance Procedure
Q-DAS Database Manual: Oracle Instances and Scripts Maintenance Procedure
Q-DAS Library
Living Documentation
Last edited: 09/06/05
Version: EF
Table of Contents
1 CREATING A NEW DATABASE ------------------------------------------------------------------ 3
7 INDEX --------------------------------------------------------------------------------------------------- 20
7.1 Example of DBINFO.sql data -----------------------------------------------------------------------------------------20
Programs
OraHome81
Database Administration
Database Configuration Assistant
Typical database
Create new database files
Multipurpose
Concurrently connected users = xx (Site Discretion, generally 15-30)
Options to Select
Time Series
Spatial
Advanced replication
SQL Plus help
Define a global database name e.g. BLOCKDB, as well as, the SID e.g. BLOCKDB
Note: It is recommended that these be named the same.
After installation reboot your computer and check if the instance is running properly.
Test if your instance runs properly with SQL Plus:
Connect with
User : internal
Password : oracle
SID: blockdb
Write down the names of the tablespaces for the temporary data, the user data and the rollback
data. (Oracle 8.i : e. g.: temp, users, rbs)
You are also able to set the size of the new QDAS database and the directory where the
database should be located. In the script “init_db.sql” are the following entries:
e.g.:
create tablespace qwert_table
datafile '<pathname\withinstancename>\qwert_tab.dbf' size 10M reuse
autoextend on next 10 M maxsize unlimited
default storage(initial 1 M next 5 M maxextents unlimited);
Create subdirectories for each instance of the database on the hard disk, where the
tablespaces should reside.
In the script, specify the location and size of the default datafiles
In the script, specify the location and size of the TABLE datafiles
In the script, specify the location and size of the VALUES INDEX datafile
In the script, set the rollback segment extent to unlimited (RBS1..RBS24 or RB1..RB24)
e.g. alter rollback segment rbs1 storage (NEXT 5M MAXEXTENTS UNLIMITED);
START <Path>\init_db.sql;
You are also able to set the size of the new QDAS database and the directory where the
database should be located. In the script “init_tablespaces.sql” are the following entries:
Create subdirectories for each instance of the database on the hard disk, where the
tablespaces should reside.
In the script, change the location and size of the TABLE datafiles
See section 1.2.1.1
In the script, change the location and size of the VALUES INDEX datafile
See section 1.2.1.1
In the script, set the rollback segment extent to unlimited (RBS1..RBS24 or RB1..RB24)
e.g. alter rollback segment rbs1 storage (NEXT 5M MAXEXTENTS UNLIMITED);
START <Path>\init_tablespaces.sql;
START <Path>\cre_user.sql;
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different within your facility)
To create the tables necessary for using qs-STAT or procella, use the script “Tables_16bit.sql”.
START <Path>\tables_16bit.sql;
Note: Using the script “Droptables_16bit.sql” allows deletion of the created tables.
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different within your facility)
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different)
After that, you can quit sql plus 3.3 window by using the command “exit”.
If you want to install the tables for qs-stat millennium on a fresh instance, run only the script
Tables_2000.sql .
If you want to upgrade from special versions qs-stat 3.x to qs-stat millennium or update from
an earlier special version of qs-stat millennium, run the script:
If you want to upgrade from qs-stat 3.x to qs-stat millennium or update from an earlier
version of qs-stat millennium, run the scripts:
• Tables_upgrade_2000.sql and
• PARTCHARACTERISTIC_NEWFIELDS.SQL
If you want to upgrade from qs-stat 3.x to qs-stat millennium, additionally run the script:
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different)
To create the tables necessary for using qs-STAT or procella, use the script “Tables_2000.sql”.
It may be useful that not all fields in the table TEIL and table MERKMAL have to be
created.
The creation of these tables can be modified in the script, depending on the used K-
Fields of the dataformat.
In table TEIL the following columns must not be deleted : TETEIL and the columns used
in the upload as key fields.
START <Path>\tables_2000.sql;
After that, you can quit sql plus 3.3 window by using the command “exit”.
Note: Using the script “Droptables_2000.sql” allows deletion of the created tables.
This script has to be ran if you want to upgrade from a special customer version of the SQL
scripts. This script adds some additional data fields to the tables, which are implemented in the
standard 16-bit scripts.
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different)
Save 06.09.05/ Print 02.10.08 T © 2008 Q-DAS Inc., Q-DAS GmbH
C:\Source-32bit\Databases\SQL- [email protected] Tel. 248-299-4910
Script\Database_Manual_EF.doc
Database Manual
Page 13 / 31
Oracle
Create the tables, which are necessary for using qs – STAT or / procella with using the script
“tables_upgrade_2000special.sql”.
After that, you can quit sql plus 3.3 window by using the command “exit”.
Using the script “Drop2000.sql” allows deletion of all tables but the update can’t be reversed.
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different)
Create the tables, which are necessary for using qs – STAT or / procella with using the script
“tables_upgrade_2000.sql”.
START <Path>\tables_upgrade_2000.sql;
After that, you can quit sql plus 3.3 window by using the command “exit”.
Using the script “Drop2000.sql” allows deletion of all tables but the update can’t be reversed.
Connect QDAS/QDAS@QDASDB;
(QDASDB is the database alias, it may be different)
If table TEIL or table MERKMAL have been created with reduced column sets, this script
has to be reviewed, because it adds additional fields to these tables.
START <Path>\tables_upgrade_2000.sql;
After that, you can quit sql plus 3.3 window by using the command “exit”.
For deleting the user specific tablespaces, in addition call the script
“DROP_tablespaces.sql”
Programs
OraHome81
Database Administration
Database Configuration Assistant
There you can select the database instance to be removed. This also removes all datafiles
associated with the instance.
SET ORACLE_SID=<INSTANCE_NAME>
e.g.
SET ORACLE_SID=BLOCKDB
SET ORACLE_SID=<INSTANCE_NAME>
e.g.
SET ORACLE_SID=BLOCKDB
The tables for the imported user must not exist but the tablespaces and the user itself must
exist already.
Note: This maintenance procedure must be followed for EACH database instance.
Once the script is finished, rename the created text file to include the date in which the file was
created.
e.g. 07-31-02-dbinfo.txt
Place this file in the DBINFO directory for the related instance.
(See Index for example of dbinfo.sql output.)
Once the script is finished, rename the created text file to include the date in which the file was
created.
e.g. 07-31-02-spool.txt
Place this file in the DBINFO directory for the related instance.
(See Index for example of part_char_valuesinfo.sql output.)
Procedure:
1. Upload each part separately. Record the time it takes for each upload. Also record
the Upload PC specifications. (cpu, memory, etc.)
2. Query each part separately, from the same client machine. Record the time it takes
for each query. Also record the client PC specifications. (cpu, memory, etc.)
3. Record these times in a text file. Name the text file “xx-xx-xx-test-part.txt”, including
the date in which the tests were taken.
4. Place this file in the time-test folder, located in the maintenance directory.
Note: To collect this data, stop the upload process and collect some relevant files waiting to be
uploaded. This will assure that the data does not get duplicated in the database.
Procedure:
1. Upload each part separately. Record the time it takes for each upload. Also record
the Upload PC specifications. (cpu, memory, etc.)
2. Query each part separately, from the same client machine. Record the time it takes
for each query. Also record the client PC specifications. (cpu, memory, etc.)
3. Record these times in a text file. Name the text file “xx-xx-xx-real-part.txt”, including
the date in which the tests were taken.
4. Place this file in the time-test folder, located in the maintenance directory.
• Check the contents of the database first (see Information about database contents)
• Take the index for the meas.values (typical QWERT_INDEX) offline and move it to
another logical disk drive. (copying the index file with the operating system , you must be
logged in as dba).
see Script MOVEINDEXTABLESPACE.SQL
• Drop all indexes related to table wertevar and rebuild the indexes
see Script REINDEX_WERTEVAR.SQL
Sever Name:
Version/SGA Information:
File Size
Tablespace ID Datafile in MG.
---------- ---- --------------------------------------------- -----------
INDX 6 E:\ORA81\ORADATA\BLOCKDB\INDX01.DBF 58.00
********** -----------
TS SIZE: 58.00
Etc.
Etc.
Q-DAS Oracle
Server
Server NEC P3 450 mhz 512 Win2K Server All Instances
Viewer PC
Gateway E- Win98 2nd 16 + 32-bit qs-STAT
PC1 3200 P2 350 mhz 256 edition All Instances
Viewer PC
Gateway E- 32-bit qs-STAT
PC2 3200 P2 350 mhz 228 Win2K Pro sp2 cranckdb
Etc.
This also seemed to happen when the queried part contained few characteristics but with large
amounts of values in each characteristic.
Server-A Client-A
Solution:
A change was made in the source code for qs-STAT Millennium, regarding the server-cursor
and how the server handles the query.
After this change, it was noticed that the server cpu was more active during the entire query time
and there were no significant peaks in processor usage. (See Server-B)
Also, data was being sent over the network continuously to the client. (verified on the network
switch)
The client cpu time was not at 100% during the entire query. (See Client-B)
Server-B Client-B
2. Symptom
Adding new fields to the database
Solution:
When you add fields to the database manually, you need to run the wv_insert script. The new
tables script includes the contents of this script, but you need to run wv_insert script by itself
after adding fields to the database.
3. Symptom
When setting up a new database, the query speed when loading a part was very low.
Solution:
The sort area size of the database memory configuration was changed from 64 KB to 16 MB.
This was changed directly in the init_db.ora file for the database instance.
NOTE: This setting speeds up the query time, but slows down the file loading time. This should
only be used for a client PC, NOT an upload PC.
2. Symptom:
The upload lost connection to the database and was never able to renew the connection. A ping
test and a TNS ping test was made; both successful.
Solution:
The AutoUpload log file was too large for the AutoUpload to manage. 32 KB is the maximum
size for the log file. The AutoUpload automatically maintains the size of the file, but if it gets
caught in a loop (the network cable is pulled or the like) than the log file can grow too large.
Delete the file and restart the AutoUpload.
3. Symptom:
The Upload loses connection to the database or takes a long time to connect.
Solution:
Try deleting the empty folders in the upload directory. It has been noticed that a large number of
empty folders in the upload directory can cause the stated symptoms.
RAID-5
Moving the location of the Index file was tested on a RAID-5 build PC. There were three OS
partions (C:\, D:\, E:\) created across the RAID-5 build. The database data files were located on
the E:\ partition and the index file was moved to the D:\ partition.
We did not see a dramatic increase in performance when we first moved the index to a different
partition than the database data files are located.
Analyzer
After moving the index files, we ran an Oracle command “analyze” on the index file. After we
ran the analyze command, the performance was greatly improved.
Viewer PC
32-bit qs-STAT
PC2 Gateway E-3200 P2 350 mhz 228 Win2K Pro sp2 cranckdb .2
Viewer PC
Oracle
16 + 32-bit qs-STAT
All Instances
16-bit Upload
blackpc DataMyte AMD-K6 300 mhz 160 Win98 2nd edition All Instances .1
Viewer PC
Michael's laptop P3- 1 Ghz 256 Win2K Server All Instances .15
Viewer PC and Upload
Testing Documentation
16+32-bit
PC4 Gateway E-3200 P2 350 mhz 327 Win NT All Instances .6
Script\Database_Manual_EF.doc
C:\Source-32bit\Databases\SQL-
Save 06.09.05/ Print 02.10.08 T
July 22-31, 2002
Script\Database_Manual_EF.doc
C:\Source-32bit\Databases\SQL-
Save 06.09.05/ Print 02.10.08 T
87 L6 BLOCK OP010M 12563711 4 120
85 L6 BLOCK OP020M 12563711 4 444
86 L6 BLOCK OP090M 12563710 33 990
88 L6 BLOCK OP120M 12563710 2 96
89 L6 BLOCK OP130M 12563710 8 96
82 L6 BLOCK OP140AM 12563710 6 90
83 L6 BLOCK OP140BM 12563710 6 162
84 L6 BLOCK OP140CM 12563710 6 126
© 2008 Q-DAS Inc., Q-DAS GmbH
[email protected] Tel. 248-299-4910
Query Times- Compare FES Server and Index on different Partition
PARTKEY PARTDESC PARTNO CHAR_COUNT VALUE_COUNT Q-DAS PC4 32bit Q-DAS PC4 32bit Michael 32bit Q-DAS PC1 16bit
Page 28 / 31 breite_urwerte=16 breite_urwerte=512
QUERY TIME IN SECONDS
64 01/23/02-06/03/02 M140C
55 02/08/02-06/02/02 M090 57 78 94
74 02/14/02-06/04/02 M090
60 02/17/02-06/01/02 M160 55 49 108
63 03/25/02-05/09/02 M140A
28 04/10/01-06/04/02 M120
79 04/19/02-06/03/02 M140A
31 05/01/01-02/27/02 M140A
32 05/12/01-01/11/02 M140C
30 05/19/01-06/03/02 M140B
53 06/19/01-03/20/02 M140A
26 07/31/00-06/04/02 M010 68 66 85
41 08/28/01-01/29/02 M160 56 55 116
47 09/11/01-06/04/02 M020
Database Manual
29 11/09/00-05/23/02 M130
34 11/29/00-01/08/02 M090 222 223 230
50 L6 BLK INL 140A 12563712 592
56 L6 BLK INL 140B 12563712
51 L6 BLK INL 140C 12563712
54 L6 BLK INL 150A 12563712
52 L6 BLK INL 150B 12563712
Oracle
Script\Database_Manual_EF.doc
C:\Source-32bit\Databases\SQL-
Save 06.09.05/ Print 02.10.08 T
87 L6 BLOCK OP010M 12563711
85 L6 BLOCK OP020M 12563711
86 L6 BLOCK OP090M 12563710
88 L6 BLOCK OP120M 12563710
89 L6 BLOCK OP130M 12563710
82 L6 BLOCK OP140AM 12563710
83 L6 BLOCK OP140BM 12563710
84 L6 BLOCK OP140CM 12563710
Database Manual
Page 29 / 31
Oracle
Upload Tests
Q-DAS Server 16-bit Upload Test
with index on different HD
Full day's production from GMPT FES
Black PC Head
PC1 Head
Black PC Head
PC1 Head
Save 06.09.05/ Print 02.10.08 T © 2008 Q-DAS Inc., Q-DAS GmbH
C:\Source-32bit\Databases\SQL- [email protected] Tel. 248-299-4910
Script\Database_Manual_EF.doc
© 2008 Q-DAS Inc., Q-DAS GmbH
[email protected] Tel. 248-299-4910
Q-DAS Server 16-bit Upload Test
with index on different HD and Value Part.
Page 30 / 31
Full day's production from GMPT FES
PC Department Gauge Upload Time (Mins) After Analyzer Changed Temp Tablespace
25 minutes for 4 files
Black PC Block Zeiss
Stopped Upload
PC1 Block Zeiss 38 38
Black PC Block Marposs
PC1 Block Marposs 25
Database Manual
Script\Database_Manual_EF.doc
C:\Source-32bit\Databases\SQL-
Black PC Block Marposs 54 158 13 13