Openedge DB
Openedge DB
Connect to a database as a
Connect to a database as a
user who has DBA privileges
user who has DBA privileges
DB Structure View >> Security Security tab becomes active in the DB Details view
Choose: Grant DBA Privilege Note: If the first account does not have DBA privileges, you cannot add a DBA account or any additional user accounts
or Grant Resource Privilege
Close the Edit Connection Profile dialog once you confirm that the URL is correct
Select the driver you want to configure from the list, and then choose Edit. The Edit Driver dialog appears
In the Edit Driver dialog:
Choose the required driver; repeat for each additional driver required
• When this type of error occurs, ABL tries to resolve it by working back through the procedure, looking at each block
header until it finds the closest block with the error-handling property, and then undoing and retrying the block.
However, because the DataServer is accessing a non-OpenEdge data source, OpenEdge cannot detect duplicate-key
errors until the end of a transaction block. Therefore, if an error occurs in a subtransaction, ABL cannot detect it until
the end of the entire transaction block and must perform default error handling for the entire transaction block.
• Suppose that the user enters an existing state while Progress is processing the DO block. When this duplicate-key
entry occurs for an OpenEdge database, Progress returns control to the DO block, displays a message that the record
exists, and reprompts the user for a state abbreviation.However, with the DataServer, if a duplicate key entry occurs in
the DO block, Progress returns control to the REPEAT block rather than the DO block. As a result, the procedure
reprompts the user for a customer number after the inner transaction completes
• The following example illustrates ABL and DataServer error handling:
rep-blk:
REPEAT:
PROMPT-FOR customer.custnum. /* User input */
FIND customer USING customer.custnum NO-ERROR.
IF AVAILABLE customer THEN
UPDATE customer.custnum customer.name customer.state. /* User input */
do-blk:
DO ON ERROR UNDO do-blk, RETRY do-blk:
FIND state WHERE st.state = customer.state.
DISPLAY state.
SET state. /* User input */
END.
END.
• If you use NO–ERROR to do your own error handling, you must account for the fact that an ODBC data source creates
or updates a record later than Progress does. For example, the following code does not trap data-source errors,
because the requests to perform the operations have not yet been sent to the data source:
Syntax
Parameters
connect_string
{ DEFAULT |db_name|db_type:T:host_name:port_num:db_name }
• Connection_name:
The name of the connection as either a character literal or host variable. If the CONNECT statement omits a
connection name, the default is the name of the database. Connection names must be unique.
• Username :
User name for authentication of the connection. SQL verifies the user name against a corresponding password
before it connects to the database. The value of the DH_USER environment variable specifies the default user
name. If DH_USER is not set, the value of the user environment variable specifies the default user name.
• Password :
Password for authentication of the connection. SQL verifies the password against a corresponding user name
before it connects to the database.
The value of the DH_PASSWD environment variable determines the default password.
Example : The following example illustrates the CONNECT statement:
• FOR EACH
FOR EACH table QUERY-TUNING(query-tuning-optionquery-tuning-option...)
• OPEN QUERY
OPEN QUERY query QUERY-TUNING(query-tuning-optionquery-tuning-option...)
• DO PRESELECT
DO PRESELECT table QUERY-TUNING(query-tuning-optionquery-tuning-option...)
• REPEAT PRESELECT
REPEAT PRESELECT table QUERY-TUNING(query-tuning-optionquery-tuning-option...)
Query-tuning options
Option Description
ARRAY-MESSAGE Specifies whether the DataServer sends
NO-ARRAY-MESSAGE multiple result rows in a single logical
network message, thereby reducing
network traffic.
Default: ARRAY-MESSAGE, if the query
uses a lookahead cursor.
CPU Usage: To use your system to its full potential, the CPU should be busy most of the time. An idle CPU
or unproductive CPU processing can indicate a bottleneck. Use operating system utilities to monitor CPU
usage.
• If performance is inadequate and your CPU is idle, the CPU might be waiting for another resource.
Identify the bottleneck and eliminate it so that the CPU can process work efficiently. Use PROMON to
monitor database activity.
• Disk I/O : Because reading and writing data to disk is a relatively slow operation, disk I/O is a common
database performance bottleneck. The database engine performs three primary types of I/O operations.
Database I/O
Before-image I/O
After-image I/O (relevant only if after-imaging is enabled)
Reduce Disk I/O bottleneck
The best way to reduce disk I/O bottlenecks is to spread I/O across several
physical disks, allowing multiple disk accesses to occur concurrently. You can
extend files across many disk volumes or file systems.
What is Before-image and how to reduce
bottleneck.
• Before-imaging is always enabled to let the database engine recover transactions
if the system fails.
• This mechanism is extremely important for database reliability, but it creates a
significant amount of I/O that can affect performance. In addition, before-image
I/O is usually the first and most likely cause of I/O bottlenecks.
• The engine must always record a change in the BI file before it can record a change
in the database and after-image files. If BI activity creates an I/O bottleneck, all
other database activities are affected.
What is Before-image and how to reduce
bottleneck.
Over time, as records are deleted from a database and new records are added,
gaps can occur on the disk where the data is stored. This fragmentation can
cause inefficient disk space usage and poor performance with sequential
reads. You can eliminate fragmentation by dumping and reloading the
database.
Indexing
The optimal degree of index block utilization depends on the type of database access
performed.
Retrieval-intensive applications generally perform better when the index blocks are close
to full since the database engine has to access fewer blocks to retrieve a record.
The larger the index, the greater the potential for improving performance by compacting
the index.
Update-intensive applications, on the other hand, perform better with loosely packed
indexes because there is room to insert new keys without having to allocate more blocks.
Indexing
2.Shut down devel.db.
“proshut devel”
3. Run PROBKUP -estimate to determine how much media is necessary for the
backup, since this is the first time you are making a backup of the database
“probkup devel a:\devback -com -red 5 -scan -estimate”
“probkup devel incremental /dev/null -estimate”
Backup database
To perform online full backup skip step 2-4 as online backup does not require to
shut down the database.
Full
“probkup online devel a:\devback -verbose -com -red 5 ”
Incremental
“probkup online devel incremental /dev/rrm/0m -vs 35
-bf 20 -verbose -io 1 -com -red 5”
Backup database
“/dev/rrm/0m”
Specifies the output destination is a tape drive, /dev/rrm/0m.
“a:\devback”
Specifies the output destination is a file, \devback, on the a: drive.
“online”
Specifies that the backup is an online backup.
Restore Database
To recover any data from a bad block, you must have specified a redundancy
factor when you performed the database backup. See Error-correction blocks
on page 117 for more information about error-correction blocks and data
recovery.
-vf
Specifies that the restore utility compares the backup to the database block-
for-block. Do not compare the backup to a database that is in use.
9-How to use Web Console for add database for monitoring
Step 1: Starting the Database Administration Console in OpenEdge Management or OpenEdge Explorer
Step 2: Accessing the Database Administration Console
Step 1 : In OpenEdge Management, click Jobs > New > Job from a Template.
Step 2: In the Database Maintenance area of the Create Custom Job page,click:
The OnlineBackup link to create an online backup job.
The OfflineBackup link to create an offline backup job.
Step 3: Specify a name for the job in the Name field
Step 4: Optionally, provide a description for the job in the
Description field.
Step 5: From the Database list, select the database users want to
back up.
Step 9 : Optionally, select the Debug log file option to generate a debug log file.
Once the job is run, the debug log file becomes available through the debug log file link. The
file provides diagnostic details that help users debug the job.
This section describes several tools that you can use to monitor the performance of an
OpenEdge database. It includes information about:
• PROMON utility
• Virtual system tables