Manual
Copyright
The copyright in this work is vested in LHS. The information contained in this work (either in
whole or in part) is confidential and must not be modified, reproduced, disclosed or dissemi-
nated to others or used for purposes other than that for which it is supplied, without the prior
written permission of LHS. If this work or any part hereof is furnished to a third party by virtue
of a contract with that party, use of this work by such party shall be governed by the express
contractual terms between LHS, which is party to that contract and the said party.
The information in this document is subject to change without notice and should not be
construed as a commitment by LHS. LHS assumes no responsibility for any errors that may
appear in this document. With the appearance of a new version of this document, all older
versions become invalid.
Database Extraction Tool
Table of Contents
1 Introduction 5
2 New Features in Version 2 7
2.1 New Features from Dec 2008..................................................................................7
3 Requirements 8
3.1 Supported Platforms ...............................................................................................8
3.2 DBExtract-Software and Installation......................................................................8
3.2.1.1 Direct Mode 9
3.2.1.2 Export Mode 9
3.3 Direct mode – Setup Target Database Instance (DBX-DB) ................................10
3.4 Export mode – File export .................................................................................... 11
5 Detailed Instructions 13
5.1 Creation of a new Oracle Instance .......................................................................13
5.2 Create the SYSADM Schema (sysadm.sql).........................................................14
5.3 Create DBX user (dbx_user.sql)...........................................................................14
5.4 Getting an overview (size.sql) ..............................................................................15
5.5 Configuration of DBExtract (dbextract.cfg) ........................................................15
5.5.1 Restart option of the dbextract.sql 15
5.5.2 Direct or Export Mode 16
5.5.3 Use of Oracle Datapump utilitiy 16
5.5.4 Parallel Mode 18
5.5.5 Partition Pruning 18
5.5.6 Database Connections 19
5.5.7 Define Customer, Accounts, Service Provider… 22
5.5.8 Copy of free Resources 25
5.5.9 Copy full controlgroups or billcycles 25
5.5.10 Date specific data reduction 26
5.5.11 Exclude Tables 29
5.5.12 Exclude or Include large Tables 30
5.6 Exclude tables from DBExtract (pcreate.sql) .....................................................31
5.7 Monitoring with dbx_trace.sql..............................................................................31
5.8 Drop objects created by DBExtract (dbx_drop.sql) ...........................................31
5.9 Remove old dumpfiles (dbx_del_dmp.sh) ..........................................................31
5.10 dbextract.sql ..........................................................................................................32
5.11 Export .....................................................................................................................32
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
6 Troubleshooting 37
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Introduction Formatted: Font: Bold
Deleted: Troubleshooting
5
1 Introduction
DBExtract is a tool to create a size-reduced copy of a BSCS database by reducing the data to a
desired subset.
The purpose of this tool is to create slim and consistent database copies (called DBX DB) from
any BSCS test or production environment in order to:
• generate test databases including full BSCS baseline setup
• copy the production environment for BSCS migrations
• create handy dumps containing particular error cases for external maintenance purposes
To reach this goal, DBExtract can do the following:
• Copy full BSCS baseline setup
• Copy freely configurable subset of subscribers, large accounts and contracts
• Copy any database customizations done by the customer
• Create consistent BSCS databases based on real production Environments
DBExtract can work in two different modes:
In export mode all data will be exported to disk first. Later in a second step the data is imported
in a Target-Database (DBX DB). The advantage of the export mode is that it can work in parallel
(with significant speed increase on multi processor machines) and that it does not require an
existing DBExtract database instance during the extraction phase. The export mode is
especially useful to provide LHS with a database extract as defect support material. In this case
you just tar the extracted files and send them to LHS. You do not have to bother with setting up
a new database and importing the files again.
In direct mode all tables are copied into a separate database instance (DBX DB) via a
database link from the BSCS database. The advantage of the direct mode is that it requires less
disk space and that the data copy is quiet fast, even it does not work in parallel.
DBEXTRACT needs to create some temporary tables to control its internal workflow. To get best
performance, it is recommend to allow DBEXTRACT to create these tables on the BSCS
database (i.e. on the production database). In export mode this is a requirement, while in
direct mode the working tables can also be stored in the new instance (DBX DB). Such a
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Introduction Formatted: Font: Bold
Deleted: Troubleshooting
6
configuration reduces the performance but it ensures that there will not be any writing to the
BSCS database.
All customizable DBEXTRACT parameters (e.g. Target and source database names, which
customers should be extracted, etc) can be set in a single control file.
DBExtract will copy the complete structure of the original database.
DBEXTRACT fully copies all tables in the SYSADM scheme and - if existing - all tables of the
DMFADM scheme into the DBX DB, except:
• Tables with customer data. These tables are copied, but consistently reduced in size
according to the control file setting.
• Tables that have explicitly been excluded by the user in the control file. Only the structure of
these tables is copied (without data). Example: Backup or Temporary table.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
New Features in Version 2 Formatted: Font: Bold
Deleted: Troubleshooting
7
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Requirements Formatted: Font: Bold
Deleted: Troubleshooting
8
3 Requirements
Name Remark
DBExtract_manual The manual you are just reading.
.pdf
sysadm.sql Creates user SYSADM.
dbextract.cfg Configuration file for DBExtract. These files must be
configured before start with DBExtract.
dbextract.sql Main script. Calls dbextract.cfg , dbx_trace.sql and
dbx_spp.sql. Creates and fills dbx working tables. Direct
copy of objects to DBX DB in direct mode.
dbx_exp.sh Oracle Export of objects from BSCS-DB to file system.
Oradump.pl Filters Storage information out of an Oracle dump file.
dbx_imp.sh Oracle Import of objects from file system to DBX DB.
compile.sql Recompiles DB-objects with respect to dependencies.
pcreate.sql Pre-creates tables to prevent them from getting copied
to the DBExtract database (optional).
size.sql Determines the size of a database (lists the size of all
tables) (optional, for information only).
seqinst.sql Installation/Reset script for all Sequences.
dbx_trace.sql By the activation of procedure dbx.SQLTraceOn inside
dbx_trace.sql is possible to show all statements
executed by dbextract.sql.
dbx_spp.sql DXExtract package.
dbx_user.sql Can be used to create a Readonly user called DBX at
the BSCS database.
dbx_drop.sql Can be used to drop all objects created by dbextract.sql.
dbx_del_dump.sh Delete dumpfiles and corresponding logfiles, if the
database was fully exported. If the database was only
partially exported (no structure dump), the dumpfiles
must be deleted manually.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Requirements Formatted: Font: Bold
Deleted: Troubleshooting
9
For easier use of DBExtract, it is recommended simply to copy the mentioned files into the
same folder.
Make sure that there is sufficient disk space available on the device.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Requirements Formatted: Font: Bold
Deleted: Troubleshooting
10
The size of the DBExtract database instance strongly depends on the number of customers,
large accounts and dealers, which will get extracted from the BSCS database, but also the
amount of existing baseline data has an impact to the final size of the extracted database.
Therefore it is not possible to give exact figures for the new database.
Here are some figures from previous extractions with DBExtract, which can be used to estimate
the necessary resources:
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Requirements Formatted: Font: Bold
Deleted: Troubleshooting
11
DBEXTRACT will not start in Direct mode, if the Target DB is the same as the BSCS DB.
Log Export Information are stored in log_exp Directory. The log_imp directory is used for Import
LOG Information.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Database Extraction Tool: Step by step - an Overview Formatted: Font: Bold
Deleted: Troubleshooting
12
This section is intended to give you a high level overview on the steps needed to run DBExtract.
See the next section for more details.
Step Five: Create the DBExtract Database. Create BSCS schema ‘SYSADM’ with script
sysadm.sql.
Step Six: Use script dbx_imp.sh to import all dump files into the DBExtract database.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
13
5 Detailed Instructions
In this chapter you will find detailed information on how to configure and run DBExtract.
Please note that it's important to follow all steps mentioned in the sections of this
chapter consecutively in order to run this tool properly!
Please make sure that the system resources are sufficient. The server should not begin
to swap when running the script!
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
14
Make sure that the Oracle environment (ORACLE_SID or TWO_TASK) is set correctly to
the new DBExtract database and use SQL*Plus to run this script.
Start SQL-Script sysadm.sql as user ‘SYS’ at the DBExtract database. However, the script will
try to connect itself as user SYS to the DBExtract database. Therefore it prompts for the
password of the user SYS.
In the further process SYSADM.SQL will do the following:
• Check if user SYSADM already exists
• Create user SYSADM with password SYSADM
• Create user DMF and DMFADM with password SYSADM
• Create BSCS_ROLE, SCHEMA_ADM_ROLE, DMF_USER_ROLE
• Grant required roles (privileges) to SYSADM and DMFADM
• Grant quotas on tablespaces to user SYSADM
At the end a short summary of the previous actions will be given. This information can also be
found in the spool file sysadm.log, which gets automatically created every time you run
sysadm.sql.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
15
The size of the DBExtract database depends strongly on the number of the selected customers,
which can be specified by several parameters in the .cfg file and of the tables excluded.
The following paragraphs explain the parameters of the .cfg file in detail.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
16
REM ###########################################################
REM # Defines the use of ORACLE DATAPUMP #
REM # #
REM # This functionality can only be used since Oracle 11 #
REM # To use this functionality DBEXTRACT must be started #
REM # at all required database servers. #
REM # BSCS/UDR/BILL database server during export (dbx_exp.sh)#
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
17
REM ###########################################################
REM # Definition of directory names for ORACLE DATAPUMP #
REM # #
REM # The following directories will be created by dbx_exp.sh #
REM # and dbx_imp.sh at the databases when parameter #
REM # USE_ORACLE_DATAPUMP='1'! #
REM # #
REM ###########################################################
define DIR_NAME_DBX_DUMPFILES_DIR='DBX_DUMPFILES_DIR'
define DIR_NAME_DBX_LOG_EXP_DIR='DBX_LOG_EXP_DIR'
define DIR_NAME_DBX_LOG_IMP_DIR='DBX_LOG_IMP_DIR'
REM ###########################################################
REM # When DATAPUMP_DBXDB_NWMODE is set to 'd' (or later 'e'),#
REM # then a local database DBX DB is used by dbx_exp.sh and #
REM # dbx_imp.sh to perform exports and imports remotly. #
REM # #
REM # DATAPUMP_DBXDB_NWMODE = e is only for future use! #
REM # Currently DATAPUMP_DBXDB_NWMODE = e is not supported! #
REM # #
REM # DATAPUMP_DBXDB_NWMODE = 0 #
REM # In dbx_mode e all data is exported and imported via the #
REM # file system by dbx_exp.sh and dbx_imp.sh. #
REM # In dbx_mode d the tables are copied with CTAS method #
REM # (CTAS=CreateTableAsSelect) to DBX DB by dbextract.sql. #
REM # The rest of the data is exported and imported via the #
REM # file system by dbx_exp.sh and dbx_imp.sh. #
REM # #
REM # DATAPUMP_DBXDB_NWMODE = d #
REM # In dbx_mode d all the data is copied over database #
REM # links into database DBXDB by Oracle Datapump. #
REM # Log files are written to the file system. #
REM # #
REM # DATAPUMP_DBXDB_NWMODE = (e) #
REM # In dbx_mode e all the data is copied over database #
REM # links on database DBXDB to file system by Oracle #
REM # Datapump. #
REM # Performance is supposed to be low, because the #
REM # the complete table data is first transfered to DBXDB #
REM # and then the Query-Condition is used to reduce the #
REM # amount of data. #
REM # Can not be used for tables with LONG columns. #
REM # #
REM # Possible Values: 0 (off) #
REM # d (only for direct mode) #
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
18
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
19
REM # Default: 1 #
REM ###########################################################
define PRUNE_PARTITION='1'
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
20
REM ###########################################################
REM # Configuration of Database Connections #
REM #---------------------------------------------------------#
REM # #
REM # BSCS DB - The BSCS database objects are stored #
REM # in the BSCS DB #
REM # #
REM # UDR DB - The BSCS database objects of type #
REM # UDR / RTX may be stored in a #
REM # seperate UDR DB (default: BSCS DB) #
REM # #
REM # BILL DB - The BSCS database objects of type #
REM # BILL may be stored in a #
REM # seperate BILL DB (default: BSCS DB) #
REM # #
REM ###########################################################
REM # #
REM # DBXHOME DB - The working tables of dbextract tool #
REM # #
REM # Possible values: #
REM # a) The BSCS DB for best performance (!) #
REM # b) The empty DBX DB database #
REM # c) A database without any BSCS content #
REM # #
REM ###########################################################
REM # #
REM # DBX DB - The Target database of dbextract tool #
REM # where BSCS objects copied to. #
REM # #
REM # Possible values: #
REM # a) The empty DBX DB database #
REM # (DBX_MODE=d + e) #
REM # b) The DBXHOME DB during export phase #
REM # (DBX_MODE=e) #
REM # c) The BSCS DB during export phase #
REM # (DBX_MODE=e) #
REM # #
REM ###########################################################
REM ###########################################################
REM # Specify a Name for the database link #
REM # #
REM # Sample: define vdb1='dbextract' #
REM ###########################################################
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
21
REM ###########################################################
REM # Connect String to the database #
REM # (usually SID, used by the database link) #
REM # #
REM # Sample: define vdbcon1='bscs' #
REM ###########################################################
REM ###########################################################
REM # Name of BSCS and DBX database #
REM # (usually ORACLE SID) #
REM # The database name will appear in the filenames #
REM # created by dbx_exp.sh and dbx_imp.sh #
REM ###########################################################
define vdbnameBSCS ='u5la' -- Name of the BSCS DB
define vdbnameDBX ='u8la' -- Name of the DBX DB
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
22
define cust_id_low='10'
REM ###########################################################
REM # Please enter the upper customer_id (upper boundary) to #
REM # specify the end of a range for the selection of #
REM # customers (flat subscribers only) #
REM # If 0 value is specified, #
REM # then the max. customer_id will be taken. #
REM # #
REM # Sample: define customer_id_high='0' #
REM # Sample: define customer_id_high='1234567' #
REM ###########################################################
define cust_id_high='560'
REM ###########################################################
REM # Please enter the total number of flat subscribers #
REM # you want to export with DBEXTRACT. They will be taken #
REM # out of the given range. If the range is smaller, only #
REM # the customers in the range will be taken. #
REM # #
REM # Warning: #
REM # Setting this value to null will export NO ('0') flat #
REM # subscribers. This value can have big impact to the size #
REM # of the destination database! #
REM # #
REM # Sample: define customers_total='1000' #
REM ###########################################################
define cust_total='100'
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
23
define SELECTION_TABLE=0
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
24
Also all service providers with less or equal than 300 contracts will be added to the selection.
REM ###########################################################
REM # Specify the maximum number of contracts for a #
REM # Service Provider. Service Providers with more than the #
REM # the given number of contracts will be excluded. #
REM # Setting this value to '' (null) will take all records. #
REM # #
REM # Sample: define vservice_providers='300' #
REM ###########################################################
define vservice_providers='300'
If you specify large accounts, all levels and all customers from the given large account will be
added as well. The sample below specifies all Large Accounts starting with ‘2’, (like. 2.10,
2.11…, 2.999) and also the two concrete large accounts 3.14 and 3.33.
Also, if not already part of the selection, every customer from controlgroup ‘A’ will be taken and
also all the customers which depend on billcycle ‘01’.
Please Note: If a control group or billcycle are specified, then all customers of this control group
or billcycle are exported into the new dump. The resulting dump may become quite large and
the export might take very long. Therefore control groups or billcycles should only be specified,
if they are really needed in the new dump.
While customizing this script, make sure that the marked customers are consistent (e. g. all
customers which depend on a Large Account). Please note that specifying an unnecessary big
number of Large Accounts can easily blow up the amount of selected customers. Keep in mind
that also all dealers will automatically be added to the selection of customers.
REM ###########################################################
REM # You can specify up to 10 Large Accounts (0-9) by the #
REM # custcode (first two levels, followed by '%') which you #
REM # want to include into the selection. #
REM # (Do not to specify the same Large Account twice) #
REM # Check the number of customers in the Large Account. #
REM # #
REM # Sample: define 0_large_account='2.12%' #
REM # define 1_large_account='3.14%' #
REM # define ... #
REM # define 8_large_account='' #
REM # define 9_large_account='' #
REM ###########################################################
define 0_large_account='2.%'
define 1_large_account=''
define 2_large_account=''
define 3_large_account=''
define 4_large_account=''
define 5_large_account=''
define 6_large_account=''
define 7_large_account=''
define 8_large_account=''
define 9_large_account=''
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
25
define free_port=100;
define free_dn=100;
define free_sm=100;
define cg='';
REM ###########################################################
REM # If you specify a value for the billcyc-parameter, all #
REM # customers in this billcycle will be taken over by #
REM # DBExtract. #
REM # #
REM # Sample: define billcyc=''; #
REM # Sample: define billcyc='01'; #
REM ###########################################################
define billcyc='';
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
26
define udrentdate=100;
REM ###########################################################
REM # If you specify a value for the ordhdrentdate-parameter #
REM # only the orders with an entry date higher than #
REM # the last created one minus this number of days. #
REM # will be taken over by DBEXTRACT #
REM # #
REM # A value of 0 turns this function off. #
REM # A value of -1 will exclude tables with names #
REM # like ORDER% , CASH% and CASHDETAIL% , which are #
REM # required for Accounting and Billing #
REM # #
REM # Sample: define ordhdrentdate=-1; will exclude tables #
REM # ORDER% CASH% #
REM # and CASHDETAIL% #
REM # Sample: define ordhdrentdate=0; #
REM # Sample: define ordhdrentdate=100; #
REM ###########################################################
define ordhdrentdate=100;
REM ###########################################################
REM # If you specify a value for the tckrccredate-parameter #
REM # only the ticklers with a create date higher than #
REM # the last created one minus this number of days. #
REM # will be taken over by DBEXTRACT #
REM # #
REM # Special values: #
REM # A value of 10 will copy all ticklers of the last 10 days#
REM # A value of 0 will copy all ticklers #
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
27
define tckrccredate=-1;
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
28
REM ###########################################################
REM # Table MPSECTAB read by EC write by RIH #
REM # If you specify a value for the mpsectabdate-parameter #
REM # only the Statistics with a create date higher than #
REM # the last created one minus this number of days. #
REM # will be taken over by DBEXTRACT #
REM # #
REM # Sample: define mpsectabdate=100; #
REM ###########################################################
define mpsectabdate=100;
REM ###########################################################
REM # Table MPSCSTAB read by EC write by RIH #
REM # If you specify a value for the mpscstabdate-parameter #
REM # only the Statistics with a create date higher than #
REM # the last created one minus this number of days. #
REM # will be taken over by DBEXTRACT #
REM # #
REM # Sample: define mpsectabdate=100; #
REM ###########################################################
define mpscstabdate=100;
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
29
define exclude_tab01="%PLAN_TABLE%"
define exclude_tab02="EITC\_%"
define exclude_tab03="C2B\_%"
…
REM ###########################################################
REM # Defines a set of BSCS tables (Schema SYSADM), #
REM # which will be excluded from dbextract process. #
REM # All matching table will be excluded, even they were #
REM # selected previously by any other routine of DBExtract. #
REM # #
REM # These tables will be created with correct structure #
REM # but without data #
REM # #
REM #(The use of % as it is used by LIKE operator is possible)#
REM #(Use \ as an ESCAPE character for the next sign) #
REM ###########################################################
define exclude_any_tab01="\_%TMP"
define exclude_any_tab02="%BACK%"
…
DBExtract will not copy tables ‘NZ0%’ and ‘TAP_RTX_%’ even if they are not excluded
from extraction!
DBExtract exclude tables which are index organized or partitioned and tables with
LONG or LONG ROW columns from the direct copy with dbextract.sql.
These tables are copied with the export/import utility.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
30
define cp_udr=1
define cp_udr_lt_and_st=1
define cp_udr_tap=1
define cp_udr_key=1
REM ###########################################################
REM # If you want to copy the large table DOCUMENT_ALL, #
REM # set cp_doc to 1 else to 0 (default) #
REM # #
REM # Sample: define cp_doc=0 #
REM # Sample: define cp_doc=1 #
REM ###########################################################
REM
define cp_doc=1
REM ###########################################################
REM # If you want to copy the large table BILL_IMAGES, #
REM # set cp_bill to 1 else to 0 (default) #
REM # #
REM # Sample: define cpbill=0 #
REM # Sample: define cpbill=1 #
REM ###########################################################
REM
define cp_bill=1
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
31
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
32
5.10 dbextract.sql
The script dbextract.sql creates database links from the DBExtract database to the BSCS
database, according to the parameters given in dbextract.cfg (see section 5.5). In direct mode
it copies via the created database links the large BSCS tables from the BSCS database into to
the DBExtract database. During this process the data of the customer-related tables
automatically would be reduced with respect to the settings in dbextract.cfg. In the next step all
other tables from user ‘SYSADM’ would be copied, except they have not been excluded (using
dbextract.cfg).
The script dbextract.sql will also create all users in the DBExtract database that exist in the
BSCS database and set the default and temporary tablespace for these users and set the
default values for some table columns in the extracted database.
Additionally, dbextract.sql will provide the user with some information, like used diskspace and
time statistics.
To start dbextract.sql, you must be connected to the DBExtract database with SQL*Plus as
user ‘SYSADM’.
All output of the script gets also written to the spool file dbextract.log and the main actions will
be recorded in table DBX_LOG.
5.11 Export
Make sure that the Oracle environment is set correctly and that ORACLE_SID (or
TWO_TASK) is pointing to the BSCS database.
Run dbx_exp.sh in a UNIX session.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
33
Before dbx_exp.sh exports a table it first checks if the corresponding dmp file already
exists. If the dmp file exists, it will not be overwritten.
To restart dbx_exp.sh first drop all dmp files manually, which where not exported
correctly.
The UNIX Shell script dbx_exp.sh creates dump files in the ./dumpfiles directory and a log file
called dbx_exp.log.
Log-Information are stored in the ./log_exp directory and - after dbx_exp.sh completes - in table
DBX_LOG.
dbx_exp.sh calls the Oracle export tool exp or expdp to export the structure and the data of
the BSCS database (all objects) to the dumpfiles directory. Wherever possible only the
exported table data is reduced in size, according to the configuration in the dbextract.cfg file.
In direct mode the database structure, partitions tables and lob tables are exported.
In export mode the database structure and all tables are exported.
When you used the export mode to export all data to disk, you can use these files directly and
send them to LHS as a reference for feature implementation and for error correction.
For this reason create a tar file of the complete directory where DBExtract is installed or at least
of the directories “./log_exp” and “./dumpfiles”. Then send the tar file to your LHS Customer
Support Contact.
When your operating system is able to use PIPES (you may check that with the mkfifo
command: mkfifo testpipe) or when you use Oracle Datapump, you can start the dbx_exp.sh
tool in parallel mode, by setting the dbx_parallel parameter in file dbextract.cfg to a values >
1.
When you use the Oracle Datapump script dbx_exp.sh has to be started at the unix-server of
the BSCS database. The unix-user (oracle) used to install the Oracle Software must have
read/write permission to the directory where DBExtract is located and the BSCS database must
be configured to allow full read/write access to that directory (See Init.ora Parameter:
UTL_FILE_DIR).
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
34
The program uses standard input (STDIN) to get the data from the dump file and writes to
STDOUT. The ‘–help’ option displays a short help on the screen.
If you run oradump, the following statements are removed from the resulting dump file:
CREATE [UNDO|TEMPORARY] TABLESPACE ...
CREATE [PUBLIC] ROLLBACK SEGMENT ...
CREATE CLUSTER SEGMENT ...
USING INDEX
STORAGE (...)
TABLESPACE ...
PCTFREE ...
INITRANS ...
MAXTRANS ...
PCTTHTESHOLD ...
CLUSTER ...
ALTER USER QUOTA UNLIMITED ON ...
DEFAULT TABLESPACE ...
TEMPORARY TABLESPACE ...
Samples:
perl oradump.pl -help
perl oradump.pl < INPUT.DMP > OUTPUT.DMP
When Oracle Datapump is configured, then utility oradump is not used by DBExtract.
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
35
5.12 Import
Make sure that the Oracle environment is set correctly and dbextract.cfg is configured
(DBExtract DB name, RTX DB Name etc.).
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Detailed Instructions Formatted: Font: Bold
Deleted: Troubleshooting
36
For BSCS Release > 8.01 all objects of user DMFADM are recompiled:
execute dbms_utility.compile_schema(’DMFADM’);
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
Database Extraction Tool
Troubleshooting Formatted: Font: Bold
Deleted: Troubleshooting
37
6 Troubleshooting
Example:
select DBX_TABLE_NAME, ACTION, MESSAGE,
(TO_CHAR(finishtime,'HH24')* 3600 +
TO_CHAR(finishtime,'MI') * 60 +
TO_CHAR(finishtime,'SS') ) -
(TO_CHAR(starttime,'HH24') * 3600 +
TO_CHAR(starttime,'MI')* 60 +
TO_CHAR(starttime,'SS') ) SECONDS, PARA1
from dbx_log order by starttime,action;
Copyright of LHS Telekom GmbH & Co. KG, 2007. All rights reserved.
LHS is a leading provider of telecom billing and customer care systems
across the wireless, wireline, and IP telecom markets worldwide.
LHS Business Support Systems offer full convergence on various levels,
supporting the complete range of business models both across the mix of
fixed and mobile services, as well as prepaid and postpaid services.
LHS builds innovative systems that enable our customers to introduce
new services fast, helping drive revenues up, while keeping operational
costs to a minimum. LHS was awarded “Best Billing or Customer Care
Solution” by the GSM Association in Cannes in 2005, and won the IIR
World Billing Awards for its "Overall Best Contribution to Billing" in
London in 2005 and 2006.
LHS is an independent software vendor (ISV) with headquarters in
Germany, and offices in Brazil, Czech Republic, France, Malaysia,
Turkey, and United Arab Emirates. LHS is part of the LHS Group, and
LHS Aktiengesellschaft as the Group’s Holding company is a public
company listed on the Frankfurter Stock Exchange (LHS400).
For more information, please visit www.lhsgroup.com