Sunday, April 21, 2013

Oracle ASM Load Balancing

Automatic Storage Management (ASM)
Automatic Storage Management (ASM) is oracle’s logical volume manager, it uses OMF (Oracle Managed Files) to name and locate the database files. It can use raw disks, filesystems or files which can be made to look like disks as long as the device is raw. ASM uses its own database instance to manage the disks, it has its own processes and pfile or spfile, it uses ASM disk groups to manage disks as one logical unit.
The benefits of ASM are
  • Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
  • Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O performance
  • Adding disks is straight forward - ASM automatically performs online disk reorganization when you add or remove storage
  • Uses redundancy features available in intelligent storage arrays
  • The storage system can store all types of database files
  • Using disk group makes configuration easier, as files are placed into disk groups
  • ASM provides stripping and mirroring (fine and coarse gain - see below)
  • ASM and non-ASM oracle files can coexist
  • ASM is free!!!!!!!!!!!!!
The three components of ASM are
ASM Instanceis a special instance that does not have any data files, there is only ASM instance one per server which manages all ASM files for each database. The instance looks after the disk groups and allows access to the ASM files. Databases access the files directly but uses the ASM instance to locate them. If the ASM instance is shutdown then the database will either be automatically shutdown or crash.
ASM Disk GroupsDisks are grouped together via disk groups, these are very much like logical volumes.
ASM FilesFiles are stored in the disk groups and benefit from the disk group features i.e. stripping and mirroring.
ASM Summary
  • database is allowed to have multiple disk groups
  • You can store all of your database files as ASM files
  • Disk group comprises a set of disk drives
  • ASM disk groups are permitted to contain files from more than one disk
  • Files are always spread over every disk in an ASM disk group and belong to one disk group only
  • ASM allocates disk space in allocation units of 1MB
  • Not Managed by ASM - Oracle binaries, alert log, trace files, init.ora or password file
  • Managed by ASM - Datafiles, SPFILES, redo log files, archived log files, RMAN backup set / image copies, flash recovery area.
ASM Processes
There are a number of new processes that are started when using ASM, both the ASM instance and Database will start new processes
ASM Instance
RBAL
(rebalance master)
coordinates the rebalancing when a new disk is add or removed
ARB[1-9]
(rebalance)
actually does the work requested by the RBAL process (upto 9 of these)
Database Instance
RBALopens and closes the ASM disk
ASMBconnects to the ASM instance via session and is the communication between ASM and RBMS, requests could be file creation, deletion, resizing and also various statistics and status messages.
ASM registers its name and disks with the RDBMS via the cluster synchronization service (CSS). This is why the oracle cluster services must be running, even if the node and instance is not clustered. The ASM must be in mount mode in order for a RDBMS to use it and you only require the instance type in the parameter file.
ASM Disk Groups
An ASM disk group is a logical volume that is created from the underlying physical disks. If storage grows you simply add disks to the disks groups, the number of groups can remain the same.
ASM file management has a number of good benefits over normal 3rd party LVM's
  • performance
  • redundancy
  • ease of management
  • security
ASM Stripping
ASM stripes files across all the disks within the disk group thus increasing performance, each stripe is called an ‘allocation unit’. ASM offers two types of stripping which is dependent on the type of database file
Coarse Strippingused for datafile, archive logs (1MB stripes)
Fine Strippingused for online redo logs, controlfile, flashback files(128KB stripes)
ASM Mirroring
Disk mirroring provides data redundancy, this means that if a disk were to fail Oracle will use the other mirrored disk and would continue as normal. Oracle mirrors at the extent level, so you have a primary extent and a mirrored extent. When a disk fails, ASM rebuilds the failed disk using mirrored extents from the other disks within the group, this may have a slight impact on performance as the rebuild takes place.
All disks that share a common controller are in what is called a failure group, you can ensure redundancy by mirroring disks on separate failure groups which in turn are on different controllers, ASM will ensure that the primary extent and the mirrored extent are not in the same failure group. When mirroring you must define failure groups otherwise the mirroring will not take place.
There are three forms of Mirroring
  • External redundancy - doesn't have failure groups and thus is effectively a no-mirroring strategy
  • Normal redundancy - provides two-way mirroring of all extents in a disk group, which result in two failure groups
  • High redundancy - provides three-way mirroring of all extents in a disk group, which result in three failure groups
ASM Files
The data files you create under ASM are not like the normal database files, when you create a file you only need to specify the disk group that the files needs to be created in, Oracle will then create a stripped file across all the disks within the disk and carry out any redundancy required, ASM files are OMF files. ASM naming is dependent on the type file being created, here are the different file-naming conventions
  • fully qualified ASM filenames - are used when referencing existing ASM files (+dgroupA/dbs/controlfile/CF.123.456789)
  • numeric ASM filenames - are also only used when referencing existing ASM files (+dgroupA.123.456789)
  • alias ASM filenames - employ a user friendly name and are used when creating new files and when you refer to existing files
  • alias filenames with templates - are strictly for creating new ASM files
  • incomplete ASM filenames - consist of a disk group only and are used for creation only.
Creating ASM Instance
Creating a ASM instance is like creating a normal instance but the parameter file will be smaller, ASM does not mount any data files, it only maintains ASM metadata. ASM normally only needs about 100MB of disk space and will consume about 25MB of memory for the SGA, ASM does not have a data dictionary like a normal database so you must connect to the instance using either O/S authentication as SYSDBA or SYSOPER or using a password file.
The main parameters in the instance parameter file will be
  • instance_type - you have two types RDBMS or ASM
  • instance_name - the name of the ASM instance
  • asm_power_limit - maximum speed of rebalancing disks, default is 1 and the range is 1 - 11 (11 being the fastest)
  • asm_diskstring - this is the location were oracle will look for disk discovery
  • asm_diskgroups - diskgroups that will be mounted automatically when the ASM instance is started.
You can start an ASM instance with nomount, mount but not open. When shutting down a ASM instance this passes the shutdown command to the RDBMS (normal, immediate, etc)
ASM Configuration
Parameter file
(init+asm.ora)
instance_type=’asm’
instance_name=’+asm’
asm_power_limit=2
asm_diskstring=’\\.\f:’,’\\.\g:’,’\\.\h:’
asm_diskgroup= dgroupA, dgroupB
Note: file should be created in $ORACLE_HOME/database
Create service (windows only)c:> oradim –new –asmsid +ASM –startmode manual
Set the oracle_sid environment variable (windows or unix)c:> set ORACLE_SID=+ASM (windows only)
export ORACLE_SID=+ASM (unix only)
Login to ASM instance and start instancec:> sqlplus /nolog;
sql> connect / as sysdba;
sql> startup pfile=init+asm.ora
Note: sometimes you get a ora-15110 which means that the diskgroups are not created yet.
ASM Operations
Instance nameselect instance_name from v$instance;
Create disk groupcreate diskgroup diskgrpA high redundancy
  failgroup failgrpA disk ’\\.\f:’ name disk1
  failgroup failgrpB disk ’\\.\g:’ name disk2 force
  failgroup failgrpC disk ’\\.\h:’ name disk3;
create diskgroup diskgrpA external redundancy
Note: force is used if disk has been in a previous diskgroup, external redundancy uses third party mirroring i.e SAN
Add disks to a groupalter diskgroup diskgrpA add disk
  '\\.\i:' name disk4;
  '\\.\j:' name disk5;
Remove disks from a groupalter diskgroup diskgrpA drop disk disk6;
Remove disk groupdrop diskgroup diskgrpA including contents
resizing disk groupalter diskgroup diskgrpA resize disk 'disk3' size 500M;
Undo remove disk groupalter database diskgrpA undrop disks;
Display diskgroup infoselect name, group_number, name, type, state, total_mb, free_mb from v$asm_diskgroup;
select group_number, disk_number, name, failgroup, create_date, path, total_mb from v$asm_disk;
select group_number, operation, state, power, actual, sofar, est_work, est_rate, est_minutes from v$asm_operation;
Rebalance a diskgroup (after disk failure and disk has been replaced)alter diskgroup diskgrpA rebalance power 8;
Note: to speed up rebalancing increase the level upto 11, remember that this will also decrease performance, you can also use the wait parameter this will hold the commandline until it is finished
Dismount or mount a diskgroupalter diskgroup diskgrpA dismount;
alter diskgroup diskgrpA mount;
Check a diskgroups integrityalter diskgroup diskgrpA check all;
Diskgroup Directoryalter diskgroup diskgrpA add directory '+diskgrpA/dir1'
Note: this is required if you use aliases when creating databse files i.e '+diskgrpA/dir/control_file1'
adding and drop aliasesalter diskgroup diskgrpA add alias '+diskgrpA/dir/second.dbf' for '+diskgrpB/datafile/table.763.1';
alter diskgroup diskgrpA drop alias '+diskgrpA/dir/second.dbf'
Drop files from a diskgroupalter diskgroup diskgrpA drop file '+diskgrpA/payroll/payroll.dbf';
Using ASM Disks
Examples of using ASM diskscreate tablespace test datafile ‘+diskgrpA’ size 100m;
alter tablespace test add datafile ‘+diskgrpA’ size 100m;
alter database add logfile group 4 ‘+dg_log1’,’+dg_log2’ size 100m;
alter system set log_archive_dest_1=’location=+dg_arch1’;
alter system set db_recovery_file_dest=’+dg_flash’;
Display performanceselect path, reads, writes, read_time, write_time,
       read_time/decode(reads,0,1,reads) "AVGRDTIME",
       write_time/decode(writes,0,1,writes) "AVGWRTIME"
from v$asm_disk_stat;
RMAN backup
RMAN is the only way to backup ASM disks.
Backupbackup as copy database format ‘+dgroup1’


Compared to standard volume managers and filesystems (either clustered or single system), ASM has a number of advantages:
  • It does not require large amounts of memory for cache. The memory not required for file system caching can be configured for Oracle memory (SGA) where it is more efficient (note that ASM requires typically a few hundred megabytes for internal administration, shared across all databases)
  • ASM distributes chunks of data pseudo-randomly across all available logical disks in a disk group, thereby removing potential performance “hot-spots”
  • ASM does not perform any I/O itself so there is no “translation layer” for Oracle I/O to datafiles into disk block offsets. I/O from databases is directly applied to disk volumes without modification. This again reduces overhead and improves performance.
  • Therefore ASM also does no read-ahead (like filesystems) to read data in (filesystem) cache that is never used by the database.
  • ASM does not require intensive tuning such as setting fragment sizes correctly and tuning file system journals. When creating an ASM disk group you only need to define the “chunk size” and whether or not to perform fine striping. It is unlikely to make configuration errors (causing performance issues) if a few simple ASM configuration guidelines are followed.
  • ASM does not cause fragmentation (you could argue that ASM balancing is some sort of fragmentation. However, the allocation units are large enough – typically 1MB or more – to allow for very little disk “seeks” to read a number of subsequent (typically 8K) blocks
  • ASM does not break large I/O’s (i.e. 128K) in multiple smaller ones (4K or 8K) like some filesystems do. One large I/O is faster than many small ones.
  • No “journal” (AKA “intent log” etc) is required for consistency (this function is already done by Oracle redo logs and having a journalled filesystem is therefore only overhead).
  • ASM can be managed from within Oracle tooling and does not require Unix administration (this can be an advantage or disadvantage depending on responsibilities of various administrators in the organization).
  • Adding or removing storage to/from ASM is very easy and does not require careful planning (as is the case with volume managers and filesystems). After adding storage, ASM will automatically “rebalance” storage so all disks will be utilized equally. This again increases performance.
  • ASM works on all major operating systems so it is platform independent.
  • SAP now supports Oracle ASM.
  • Finally, EMC fully supports ASM including various tooling that integrate with Oracle (such as Replication Manager, and backup and reporting tools).
Disadvantages? A few, maybe. Biggest disadvantages that I have identified:
  • Migration from legacy filesystems to ASM can be a problem and often requires an outage
  • It is hard (if not impossible) to view ASM contents with standard OS tools. In some cases, ASM data can be accidentally overwritten by OS admins who are using disk volumes that (to them) seem to be empty. However, there are administrative ways to prevent this from happening
  • Backup cannot be done with traditional methods that just backup OS files so you need integrated tooling or use Oracle’s native tools (RMAN)

Saturday, April 20, 2013

You Tube



SCPT 5: Parameter Files in Database  -- 

                http://www.youtube.com/watch?v=mxmnHUZKORU


Performance Tuning with ASH and AWR Data

Thursday, April 11, 2013

Concurrent Issues



Scenario when to run cmclean.sql


Stuck Concurrent Requests
Every now and then users call us with a concurrent request that is running longer than normal and/or blocking other batch jobs because of incompatibilities. Upon investigation we'll see that there is no database session for the request. Since there isn't a database session users may not be unable to cancel the request themselves. The cancel button will be grayed out. The solution is to clean the fnd_concurrent_requests table. Background: Concurrent programs may be incompatible with other programs which means they cannot execute at the same time. If the stuck concurrent request has such rules defined, then programs it is incompatible with will not run until the problem is solved.There are 2 ways to do this, update the table manually or run the Oracle provided cmclean.sql script. Depending on the method you choose, you'll need the request id. This can be provided by the user or you can look at the running requests via Oracle Applications Manager (OAM). To navigate there click on Site Map on the top left hand corner of the page. Under Concurrent requests click on Running.

Once your in the Running requests screen you'll see which programs are currently being executed. With the help of your users, find the request id in question and make note of it. The recommended approach from Oracle will be:1. Kill the database sessions for the requests. (In our case there weren't any.)2. Shutdown the concurrent managers.3. Run the cmclean.sql script Note: 134007.14. Start your concurrent managers.The other method is to update the bad rows in the fnd_concurrent_requests table manually.

update fnd_concurrent_requests set STATUS_CODE='D',phase_code='C' where request_id=STATUS_CODE of D means Cancelled and a phase_code of C is completed.For a list of status, phase_codes and what they mean, refer to Note: 297909.1.

The benefit to updating the fnd_concurrent_requests table manually is that no downtime is required. If you are using cmclean.sql remember to shutdown the concurrent managers first

Wednesday, April 10, 2013

Forms Servlet or Socket Mode?




https://blogs.oracle.com/stevenChan/entry/which_is_better_forms_servlet_or_socket_mode

Difference between forms Socket mode and Servlet mode

Posted: January 17, 2013 in Uncategorized
0
Oracle Forms can be run in either servlet mode or socket mode. 
  • Oracle Applications 11i is based on Forms 6i and is configured to run insocket mode by default. 
  • Oracle Applications 12i is based on Forms 10g and is configured to run inservlet mode by default.  

What is Forms Socket Mode?
The connection from the desktop client to the Forms Listener process was accomplished using a direct socket connection. 
  • The direct socket connection mode was suitable for companies providing thin client access to Forms applications within their corporate local area networks.
  • For the direct socket connection mode, the client had to be able to see the server and had to have permission to establish a direct network connection.
  • Although the direct socket connection mode is perfectly suited for deployments within a company’s internal network, it’s not the best choicefor application deployment via unsecured network paths via the Internet.
  • A company connected to the Internet typically employs a strict policy defining the types of network connections that can be made by Internet clients to secure corporate networks.
Oracle Applications Release12 by default configures Forms 10g stack inservlet mode, as this is the preferred and recommended deployment model for forms on the web.  In this mode a java servlet called the Forms Listener servlet manages the communication between the Forms Java Client and theOracle AS Forms Services.
The Forms Listener Servlet communicates through the HTTP server port and does not need extra ports to handle the communication between the client and the Oracle Application Server Forms Services.
The Forms Servlet architecture is also compatible with web applications industry standards and supports different advanced network configurations such as Load balancing effortlessly.
Although Forms Servlet is the preferred deployment method, there may be circumstances where customers need to switch from Forms Servlet mode to Forms Socket mode, which allows desktop clients to access the Forms Server directly.
This may be required in the following situations:
  • Customers’ network topology is multimode and the Forms Services are configured on a node different from the node on which Web services (Web Entry Point and Web Applications) are configured.
  • Customers constrained by network bandwidth, or machine resources may consider socket mode as an alternative to improve performance.
  • To reduce network traffic. The servlet mode uses http protocol on each transaction between a client and the Forms Server requiring the exchange of cookies and http headers which increases network traffic.
  • To reduce consumption of resources use by the JVMS needed in servlet mode architecture.
 Socket Mode Advantages
  1. Uses up to 40% less bandwidth than Forms servlet mode.  This may be perceived by Wide Area Network (WAN) users as causing slower responsiveness, depending upon network latency.
  2. Uses fewer application-tier JVM resources than servlet mode, due to fewer TCP turns and lack of overhead associated with HTTP POST handling.
Enabling Forms Socket Mode
Execute the following steps to switch from Forms Servlet mode to Forms Socket mode:
  1. Source the environment on the application tier.
  2. Stop all the application tier services using adstpall.sh
  3. Run the following command to enable Forms Socket Mode:
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
[-contextfile=<CONTEXT_FILE>] \
-mode=socket \
[-port=<Forms port number>] \
-runautoconfig=<No or Yes> \
-appspass=<APPS password>
ParameterDescription
-contextfileFull path to application tier context file, using the syntax:On UNIX:$INST_TOP/appl/admin/<CONTEXT_NAME>.xml
-modeservlet – to enable Forms Servlet mode. This is the default value.socket – to enable Forms Socket mode
-portPort number used to run Forms in socket mode. The default port number is 9095.A port number is not needed if servlet mode is used.
-runautoconfigSpecify whether AutoConfig should be run after changing the forms mode. Possible values are:No – Do not run AutoConfig after enabling Forms servlet/socket mode. This is the recommended value.Yes – Run AutoConfig after enabling Forms servlet/socket mode.
-appspassPassword for the applications user. Required only if -runautoconfig=Yes.
 4. If Autoconfig was not automatically executed as part of the preceding step, then run AutoConfig on the application tier:
On UNIX:
$INST_TOP/admin/scripts/adautocfg.sh
5. Start all the application tier services:
On UNIX:
$INST_TOP/admin/scripts/adstrtal.sh
6.Check whether Forms Server is running:
On UNIX:
$INST_TOP/admin/scripts/adformsrvctl.sh status
  1. Log in to Oracle Applications and  launch a Forms-based application.
  2. Open the Sun Java Console (from Tools Menu in Internet Explorer).
  3. Check whether the “mode” directive displayed in Sun Java Console when launching forms-based applications is set to socket.
  4. The direct launch URL for Forms Socket Mode is:
<web_protocol>://<web_host>.<web_domain>:<web_port>/OA_HTML/frmservlet
 What is Forms Servlet Mode?
The Forms Listener Servlet is a Java servlet that delivers the ability to run Oracle Forms applications over HTTP and HTTPS connections. It manages the creation of a Forms Server Runtime process for each client, as well as network communications between the client and its associated Forms Server Runtime process.
The desktop client sends HTTP requests and receives HTTP responses from the web server. The HTTP Listener on the web server acts as the network endpoint for the client, keeping other servers and ports from being exposed at the firewall. 
Servlet Mode Advantages
  1. HTTP and HTTPS traffic is easily recognizable by routers, while socket mode communications is generally considered suspect and treated on an exception basis. 
  2. Existing networking hardware can be used to support basic functions such as load-balancing and packet encryption for network transit.
  3. More resilient to network and firewall reconfigurations.
  4. More robust: servlet connections can be reestablished if network connections drop unexpectedly for Forms, Framework, and JSP-based pages.
  5. Is the only supported method for generic Oracle Forms customers, and therefore is more thoroughly tested by the Forms and E-Business Suite product groups.
  6. Performance traffic can be monitored via tools like Oracle Real User Experience Insight (RUEI).
  7. Socket mode is not supported on Windows-based server platforms.
Enabling Forms Servlet Mode
Carry out these steps to reenable Forms Servlet mode if Socket Mode is no longer required:
1.Source the environment on the application tier.
2. Stop all the application tier services:
On UNIX:
$INST_TOP/admin/scripts/adstpall.sh
3. Run the following script to disable Forms Socket Mode and re-enable Forms Servlet Mode:
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
[-contextfile=<CONTEXT_FILE>] \
[-mode=servlet] \
-runautoconfig=<No or Yes> \
-appspass=<APPS password>
ParameterDescription
-contextfileFull path to application tier context file, using the syntax:On UNIX:$INST_TOP/appl/admin/<CONTEXT_NAME>.xml
-modeservlet – to enable Forms Servlet mode. This is the default value.socket – to enable Forms Socket mode
-portPort number used to run Forms in socket mode. The default port number is 9095.A port number is not needed if servlet mode is used.
-runautoconfigSpecify whether AutoConfig should be run after changing the forms mode. Possible values are:No – Do not run AutoConfig after enabling Forms servlet/socket mode. This is the recommended value.Yes – Run AutoConfig after enabling Forms servlet/socket mode. 
4.If Autoconfig was not automatically executed as part of the preceding step, then run AutoConfig on the application tier:
On UNIX:
$INST_TOP/admin/scripts/adautocfg.sh
5. Start all the application tier services:
On UNIX:
$INST_TOP/admin/scripts/adstrtal.sh
  1. Log in to Oracle Applications and  launch a Forms-based application.
  2. Open the Sun Java Console (from Tools Menu in Internet Explorer).
  3. Check whether the “mode” directive displayed in Sun Java Console when launching forms-based applications, is set to http,native
  4. Direct Forms Servlet Launch is:
web_protocol>://<web_host>.<web_domain>:<web_port>/forms/frmservlet
Step 4.1: Manually Starting Forms Server
On UNIX:
$INST_TOP/admin/scripts/adformsrvctl.sh start
Step 4.2: Manually Stopping Forms Server
On UNIX:
$INST_TOP/admin/scripts/adformsrvctl.sh stop
Step 4.3: Checking Status of Forms Server
On UNIX:
$INST_TOP/admin/scripts/adformsrvctl.sh status
Switching Apps Deployments between Modes
Due to its numerous advantages, Forms servlet mode is the preferred and recommended deployment model for Forms on the web. 
There may be circumstances where you need to switch between the default Forms modes.  You might wish to switch your Oracle E-Business Suite Release 12 environment to socket mode to improve performance or reduce network load.  You might wish to switch your Apps 11i environment to servlet mode as part of your rollout to external web-based end-users outside of your organization.
If you’re running Apps 11i and would like to switch to servlet mode, see:
If you’re running Apps 12 and would like to switch to socket mode, see:


Forms listener servlet diagram showing firewalls desktop client and oc4j container on application tier

Sunday, April 7, 2013

All Database information



LOCKS:


Oracle has several views for showing lock status, some of which show the username:
  • DBA_BLOCKERS – Shows non-waiting sessions holding locks being waited-on
  • DBA_DDL_LOCKS – Shows all DDL locks held or being requested
  • DBA_DML_LOCKS  - Shows all DML locks held or being requested
  • DBA_LOCK_INTERNAL – Displays 1 row for every lock or latch held or being requested with the username of who is holding the lock 
  • DBA_LOCKS  - Shows all locks or latches held or being requested
  • DBA_WAITERS  - Shows all sessions waiting on, but not holding waited for locks
The DBA_LOCK_INTERNAL view is best to show locks for a specific user, and you can specify the query in the form:

OLTP vs OLAP


OLTP vs OLAP

We can divide IT systems into transactional (OLTP) and analytical (OLAP). In general we can assume that OLTP systems provide source data to data warehouses, whereas OLAP systems help to analyze it. 

olap vs oltp


OLTP (On-line Transaction Processing) is characterized by a large number of short on-line transactions (INSERT, UPDATE, DELETE). The main emphasis for OLTP systems is put on very fast query processing, maintaining data integrity in multi-access environments and an effectiveness measured by number of transactions per second. In OLTP database there is detailed and current data, and schema used to store transactional databases is the entity model (usually 3NF). 

OLAP (On-line Analytical Processing) is characterized by relatively low volume of transactions. Queries are often very complex and involve aggregations. For OLAP systems a response time is an effectiveness measure. OLAP applications are widely used by Data Mining techniques. In OLAP database there is aggregated, historical data, stored in multi-dimensional schemas (usually star schema). 


The following table summarizes the major differences between OLTP and OLAP system design.

OLTP System
Online Transaction Processing
(Operational System)

OLAP System
Online Analytical Processing
(Data Warehouse)

Source of data
Operational data; OLTPs are the original source of the data.
Consolidation data; OLAP data comes from the various OLTP Databases
Purpose of data
To control and run fundamental business tasks
To help with planning, problem solving, and decision support
What the data
Reveals a snapshot of ongoing business processes
Multi-dimensional views of various kinds of business activities
Inserts and Updates
Short and fast inserts and updates initiated by end users
Periodic long-running batch jobs refresh the data
Queries
Relatively standardized and simple queries Returning relatively few records
Often complex queries involving aggregations
Processing Speed
Typically very fast
Depends on the amount of data involved; batch data refreshes and complex queries may take many hours; query speed can be improved by creating indexes
Space Requirements
Can be relatively small if historical data is archived
Larger due to the existence of aggregation structures and history data; requires more indexes than OLTP
Database Design
Highly normalized with many tables
Typically de-normalized with fewer tables; use of star and/or snowflake schemas
Backup and Recovery
Backup religiously; operational data is critical to run the business, data loss is likely to entail significant monetary loss and legal liability
Instead of regular backups, some environments may consider simply reloading the OLTP data as a recovery method