Problem:
For some customers with strong security requirements the Data Express DXEGENLOADFILE Utility is not acceptable and cannot be used because of the reasons below:
1. User console interaction is needed to get the source Data Store Name (DSN).
2. It is not applicable for batch use.
3. The method.rc file is only searched on Administration areas ("Program Files", "All Users") and this cannot be altered by non-administrator users or by automation scripts.
4. Currently the field “Number of records” in the “List of Data Stores” menu (Data Builder module) contains 0 for all tables loaded via ODBC/Oracle drivers. Due to the various limitations to make queries on Production Databases, the customers have some troubles with the zeroed “'Record Number” field because they cannot decide, if a reduction is needed for a table.
Resolution:
New parameters are added to the DXEGENLOADFILE Utility to satisfy the customers’ needs. These parameters are valid for Oracle and ODBC Extension.
The new syntax of the command is:
dxegenloadfile -c - d<path> -i<input method.rc> -r < count | system | none >
where:
-c
means that there is no console interaction. The information about the connection comes from the standard method.rc file. It contains the connection information including database name.
If only this parameter is specified, the file method.rc is read from the default configuration directories. The dxegenloadfile utility generates files which are written in the default configuration directories
-d<path>
-d means that the file method.rc is read from the directory specified in the parameter <path>. If this option is not specified Data Express will use the default configuration directories.
Note: In case -d is used -c must not be specified .
Example 1:
dxegenloadfile -d “C:\\Testlib1”
The process will read the connection information from the file method.rc located in the directory C:\\Testlib1\\config and will create the produced file list and log file in the directory C:\\Testlib1\\log.
-i<input method.rc>
-i means that the input connection information is read from a different ‘’FileName.rc’’ file, equal to the method.rc file. The name and the path to the new .RC file can be specified in this parameter.
Example 2:
dxegenloadfile -d “C:\\Testlib1” -i “C:\\Testlib2\\method1.rc”
The process will read the connection information from the file method1.rc placed in the folder C:\\Testlib2 and will create the produced file list and log file in the folder C:\\Testlib1\\log.
-r < count | system | none>
Only the DXEGENLOADFILE utility will be modified in order to obtain the number of the records for each table loaded via ODBC/Oracle driver. If the parameter ‘’–r’’ is omitted, the parameter ‘’–r none’’ is assumed by default. The information about the number of the records will be stored in the interface file that currently contains the table structure. If only this parameter is specified the information about the connection comes from the console. The dxegenloadfile utility generates files which are written in the default configuration directories.
The meaning of the options is:
count - the number of the records are obtained using the statement SELECT COUNT(*).
system - the number of the records are obtained from the system catalogue. The customer is responsible the value of the number of records in the system catalogue to be updated.
none - the value for the number of the records for each table will not be counted and will be -1.
For all tables loaded in the Data Builder via “Load from file”, if you choose:
- “Skip” - the existing tables will be ignored, so they will continue to have old values, the new tables will be loaded with the number of the records;
- “Overwrite” - the tables will be loaded as new ones, so you will have the new number of the records together with the structure information;
- “Update” - the structure of the existing tables will be updated together with the number of the records.
Example 3:
dxegenloadfile -r count
If only this parameter is specified the information about the connection comes from the console - you will be asked for the connection alias, schema ID, username, and password for your data store. The information about the number of the records will be stored in the interface file DataStoreLoader.txt created in the default Data Express log folder and will come from the execution of the statement SELECT COUNT(*).
Example 4:
dxegenloadfile -d “C:\\Testlib1” -i “C:\\Testlib2\\method1.rc” -r system
The process will read the connection information from the file method1.rc placed in the folder C:\\Testlib2 and will produce list file and log file in the folder C:\\Testlib1\\log. The information about the number of the records will be stored in the list file DataStoreLoader.txt and will come from the system catalogue via SELECT statement. UPDATE STATISTICS should be performed before running the utility to update the number of the records in the system catalogue.
In order to create the file .RC follow the steps below:
1. Create a .INI flat file, named FileName.ini.
2. Specify the parameters below and comma "," as a delimiter. Both formats are valid:
Connection type (ODBC or ORACLE),Connection Alias,Schema Name,Userid,Password
or
Connection type (ODBC or ORACLE),Connection Alias,Schema Name,Userid,Password,,,,
3. Encrypt the .INI file using the command: dxeencrypt.exe FileName
#EnterpriseDeveloper
#DataExpressDXEGENLOADFILEUtility.RCODBCORACLEmethod.rccountnone
#MFDS