Professional Documents
Culture Documents
7 Bootcamp
Database Server Administration
Information Management Technology Ecosystems
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Common Utilities
• genoncfg
• ifxcollect
• oninit
• onmode
• onclean
• onshutdown
• onspaces
• oncheck
• onparams
• onstat
• onlog
• ondblog
• If the server has not shut down after a specified time, forces the
server to shut down
• onshutdown script
• First runs the onmode -ky command
• After a specified wait time, runs the onclean -ky command
• Used to:
• add / drop logical logs
Add a 1000-KB log file to rootdbs:
• resize and/or relocate physical log
onparams -a -d rootdbs -s 1000
• create / change buffer pool settings
• change logical log location
• Changes to the physical log do not take effect until you restart the
database server
• Logging Modes
• Buffered, Unbuffered, No Logging, ANSI
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Allows an Informix
administrator to easily automate
the system monitoring process
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Types of Jobs
• [STARTUP] SENSOR: collects information on a scheduled basis
• [STARTUP] TASK: executes a specific action at a specific time or interval
New Built-
in Tasks
Introduced
with 11.70
– disabled
by default
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Accomplished by:
• Identifying the tables that require new or updated optimizer statistics
and generating the update statistics commands using a task
• Running update statistics on these tables in a priority order within a
specified time using a task
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
SQL Statement
Returned Data
Show ALL
38 © 2010 IBM Corporation
OAT – Space Administration – Dbspaces
Graphical summary of instance wide dbspace storage, and a text
summary by dbspace at the bottom
• Beta customers using the beta versions of OAT will need to voice
the issues to beta advocates/beta forum
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Backup
• Copy of one or more dbspaces and logical logs that the database
server maintains.
• Only pure Informix pages backed up
• Operating system files or Informix configuration files are not backed up.
• Restore
• Re-creates the database server data from backed-up storage spaces
and logical log files.
• Copies data from the backup media back to disk and brings the
dbspaces to a consistent state by applying transactions from the
logical log backup.
• Reasons to restore:
• You need to replace a failed disk that contains database server data.
• You have a corrupted or destroyed database data or pages.
• You need to move your database server data to a new computer.
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
ANCPRPLT 220J 200 Z165-3 NE132 6157 SNCPRPLT 580T 132 Z165-3 NE132 6157 …
• estimate_compression • repack
• Estimates compression ratio on a
table • Move rows within a table or
fragment to consolidate free
• create_dictionary space
• Creates compression dictionary • repack_offline
for a table
• XLOCK the table and move rows
• compress within a table or fragment to
• Does implicit create_dictionary consolidate free space
and compress all previous data
• shrink
• uncompress
• Return free space at end of table
• Uncompress the table and or fragment to the dbspace
deactivates compression
• Normally done after a repack
• uncompress_offline
• XLOCK table and uncompress it.
• purge_dictionary
Also deactivates compression • Delete old inactive dictionaries
Lenny
Roy
execute function task(“table repack”, “customer”, ”db”)
Travis
Steve
John
John
• Frees the space at end of table so other table Tim
can utilize this space Steve
• Entire extents are free Frank
Travis
• The last extent in a table can be partially freed Chris
• Will not shrink a table smaller than the first Jamie
extent size Roy
• New command to modify first extent size Lenny
• “ALTER TABLE MODIFY EXTENT SIZE”
• Online operation
Individual fragments
for table big2
Free Pages
Used Pages
Estimate of used after compression
Animated Slide
© 2010 IBM Corporation
Storage Savings
81% Smaller
78% Smaller
Sales Table Product Table
© 2010 IBM Corporation
Potential Performance Benefit
40% Faster
• Many utility (backup and recovery for
example) will be faster
• 2x as fast in some cases as the
database may now be half the size
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
Examples:
EXECUTE FUNCTION task(“defragment”,“stores7:informix.customer");
EXECUTE FUNCTION task(“defragment partnum”, “16777217,28477346");
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
• Example
EXECUTE FUNCTION task("modify space expand", "8",
"1000000");
• Note
• Can only extend a chunk only if it is in an unmirrored dbspace or
temporary dbspace
• Chunk must be marked as extendable before it can be extended
© 2010 IBM Corporation
Creating a Space or Chunk from the Storage Pool
• Can create storage spaces or chunks from free space in the storage
pool with entries
• Syntax
EXECUTE FUNCTION task("create <space_type> from storagepool",
"<space_name>", "<min_size>", optional arguments...);
• Valid space_type values are: chunk. dbspace, tempdbspace, sbspace,
tempsbspace, blobspace
• Example
• Add a chunk to the dbspace named logdbs with a size of 200 megabytes
EXECUTE FUNCTION task("create chunk from storagepool",
"logdbs", "200 MB");
• Restriction
• Only unmirrored dbspace and temporary dbspace chunks
can be extended
© 2010 IBM Corporation
Automatic Storage Allocation - Configuration
• Instance level Configuration Parameters
• SP_AUTOEXPAND
• Toggle on or off the automatic expansion of spaces
• SP_THRESHOLD
• Minimum free space threshold triggering space expansion (%/KB)
• SP_WAITTIME
• Number of seconds to wait for space expansion before returning an
out-of-space error
• mon_low_storage task
• Periodically (default: once per hour) scans the list of dbspaces to find
spaces that fall below the threshold indicated by SP_THRESHOLD
• Attempts to expand the space below threshold by extending an extendable
chunk or by using the storage pool to add a chunk
• Configure
DATABASE sysadmin; UPDATE ph_task set tk_frequency = INTERVAL (minutes)
MINUTE TO MINUTE WHERE tk_name = “mon_low_storage”;
© 2010 IBM Corporation
72 © 2010 IBM Corporation
Agenda
• Introduction
• Administrative Command-Line Utilities
• System Monitoring Interface
• SQL Based Administration API
• Database Scheduler
• Automatic Update Statistics (AUS)
• OpenAdmin Tool (OAT)
• Backup and Recovery
• Storage Optimization
• Partition Defragmenter
• Automatic Space Management
• Appendix
shrink
• General Options
• -r <Num Times to repeat Collection>
• -d <Seconds for dealy between Collection>
• -y - Answer yes to all prompts
• -V Version Information
• -version Extended Version Information
• Example FTP
• -f -e user@company.org -p 9999.999.999
• -f -e user@company.org
• -f -m machine -l /tmp -u username -w password
Collection Options
• -c ids -s general
• General Collector For All Informix Family Products
• -c af -s general
• General Collector For Assertion Failures
• -c er -s general
• Collect general information For ER
• -c er -s init
• Collect information For ER Initialize Issues
• -c performance -s general
• Collect general information for performance Issues
• -c performance -s cpu
• Collect information for cpu utilization issues
• -c onbar -s archive_failure
• Collect information for onbar archive failures.
• -c onbar -s restore_failure
• Collect information for onbar restore failures.
• -c ontape -s archive_failure
© 2010 IBM Corporation
Ifxcollect -- file location
• Data Collector's
• Each data collector has a separate xml file associated with it.
• Benefits
• Simplifies the process of Informix data backup to an off-site S3
storage location, which can be accessed from anywhere on the web
• Scalable storage capacity to match the growth in Informix backup data
(within backup object size limit imposed by S3)
• Reliable storage system through SLA provided by S3
• Pay-as-you-go model can provide cost-effective Informix backup
solution