content top

Optimum Size of The Online Redo Log Files

The Oracle Database Performance Tuning Guide recommends switching logs at most once every twenty minutes. If our online redo logs switch once every 10 minus during peak hours, our redo logs should be increased to 2 times larger then their current size.

Here’s a simple query for calculating recommended size of redo log files:

Read More

How to Develop Java Stored Procedures

I’ll try to demonstrate how we can use loadjava to load our Java class into Oracle Database and use its methods as stored procedures. Before we begin to write the Java codes, I’ll create a simple table. When I call my java stored procedure, it will insert a record to this table.

I created this table in HR schema because I’ll load my java object in HR schema. If you’ll use another schema, then do not forget to load your java code in same schema or set required permissions. This is the main method I’ll use as my stored procedure:

Read More

How to Upgrade Oracle Application Express (APEX)

Upgrading APEX is a very easy task. All we need to install the new APEX version to the database. Only one instance of Application Express can be active in the database so when we run the APEX installation script, it will detect existing APEX installation and upgrade it.

Then we need to update the /i/ (virtual directory) with the images, javascript, css, etc. For the standard HTTP Server installations, you can use copy command. If you use Embedded PL/SQL Gateway (EPG), you need to run apxldimg.sql script.

After the upgrade, you may need to modify some applications but most of them will work correctly. APEX also provides a utility to upgrade your applications and make them use the latest features.

Application Express URL Syntax

The URLs are automatically constructed by APEX, so in most cases we do not need to understand the syntax nor modify it. On the other hand, understanding how URL (f?p) syntax works can be useful while defining hypertext links to the pages.

Let’s take a look at the parameters send as variable “p”:

http://<servername>:<port>/pls/f?p=
App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

App: Uniquely identified application ID

Page: Unique page ID

Session: Randomly generated session ID – to keep your session information.

Request: The value of REQUEST. When you click a button, the value of REQUEST will keep the name of the button. Bind variable: :REQUEST

Debug: DEBUG flag. Setting this flag to YES displays details about application processing.

ClearCache: Clears the cache if you specify he numeric page number.

ItemNames: Comma-delimited list of item names (stored in user’s session).

ItemValues: List of item values (stored in user’s session)

PrinterFriendly: If it’s set to YES, the page is rendered in printer friendly mode.

About vmstat (Virtual Memory Statistics)

The vmstat helps you to identify bottlenecks on your server. It displays real-time performance information about processes, memory, paging, disk I/O, and CPU usage.

Here’s sample output (Oracle Linux 5.6):

Descriptions of the columns:

r: The number of processes waiting for run time
b: The number of processes in uninterruptible sleep
swpd: Total virtual memory (swap) in use (KB)
free: Total idle memory (KB)
buff: Total memory used as buffers (KB)
cache: Total memory used as cache (KB)
si: Amount of memory swapped in from disk (KB/s).
so: Amount of memory swapped to disk (KB/s).
bi: Blocks received from a block device (blocks/s).
bo: Blocks sent to a block device (blocks/s).
in: The number of interrupts per second, including the clock.
cs: The number of context switches per second.
us: User-level code time as a percentage of total CPU time
sy: System-level code time as a percentage of total CPU time
id: Idle time as a percentage of total CPU time.
wa: Time spent waiting for IO.
st: Time stolen from a virtual machine.

Read More
Page 41 of 43« First...3940414243
content top