1. Trang chủ
  2. » Công Nghệ Thông Tin

oracle space management handbook 2003

311 744 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 311
Dung lượng 2,5 MB

Nội dung

[...]... tablespace_name,file_id ,max(block_id) max_data_block_id from dba_extents 10 Oracle Space Management Handbook group by tablespace_name,file_id) a ,dba_free _space b where a.tablespace_name = b.tablespace_name and a.file_id = b.file_id and b.block_id > a.max_data_block_id) e Where b.tablespace_name = c.tablespace_name And b.tablespace_name = d.tablespace_name And bytes_full/bytes_total < 7 And b.tablespace_name... warehouses in Oracle John can be reached at jweeg@hesaonline.com or http://www.hesaonline.com/dba/dba_services.shtml xviii Oracle Space Management Handbook Foreword As a database management system, the management of Oracle file structures is critically important to the successful operation of any system The Oracle administrator must understand all levels of Oracle file management, including data file management. .. statements to try to save CPU costs Space management for tablespaces offers a PL/SQL package to automate database cleanup, a thorough discussion of TEMP tablespaces, a section on the ability of Oracle' s dataserver to manage itself, strategies for using locally-managed tablespaces, and a discussion of Oracle' s ability to support multiple block sizes In the discussion on space management for tables you will... data block: select tablespace_name,file_id,max(block_id) max_data_block_id from dba_extents group by tablespace_name,file_id; 8 Oracle Space Management Handbook Now that the command to find the last data block has been inserted, it is time to find the free space in each file above that last data block: Select a.tablespace_name,a.file_id,b.bytes bytes_free From (select tablespace_name,file_id,max(block_id)... ,(Select tablespace_name,sum(bytes) bytes_full From dba_extents Group by tablespace_name) c ,(Select tablespace_name,sum(bytes) bytes_total From dba_data_files Group by tablespace_name) d ,(Select a.tablespace_name,a.file_id,b.bytes bytes_free From (select tablespace_name,file_id ,max(block_id) max_data_block_id from dba_extents group by tablespace_name,file_id) a ,dba_free _space b where a.tablespace_name... ,(Select tablespace_name,sum(bytes) bytes_full From dba_extents Group by tablespace_name) c ,(Select tablespace_name,sum(bytes) bytes_total From dba_data_files Group by tablespace_name) d ,(Select a.tablespace_name,a.file_id,b.bytes bytes_free From (select tablespace_name,file_id ,max(block_id) max_data_block_id from dba_extents group by tablespace_name,file_id) a ,dba_free _space b where a.tablespace_name... cost-effective solutions to Oracle performance problems and for his ability to explain performance issues to technical audiences He is co-author of the O'Reilly & Associates books Oracle Design and Oracle8 Design Tips xvi Oracle Space Management Handbook Liza Fernandez is an aspiring DBA working toward her Oracle 9i DBA certification She is also pursuing her Master's Degree in Information Systems Management Mike... times and, most painfully, limits the potential allocation of space to a tablespace that needs the extra room A simpler solution would be to review the evolution of the script, which lets the administrator know which files can and cannot be resized to create more space 6 Oracle Space Management Handbook Alter Database It's possible to release space from data files but only down to the first block of data... bytes_total From dba_data_files Group by tablespace_name) d Where b.tablespace_name = c.tablespace_name And b.tablespace_name = d.tablespace_name And bytes_full/bytes_total < 7 ; According to the command, a selection has been made based on tablespace What if you want to resize based on file? It's crucial to remember that multiple files can exist in any tablespace Plus, only space that is after the last data block... a.tablespace_name = b.tablespace_name and a.file_id = b.file_id and b.block_id > a.max_data_block_id) e Where b.tablespace_name = c.tablespace_name And b.tablespace_name = d.tablespace_name Double Checking the Work Now, the thing to do is ensure that the right amount of space not too much, not too little - has been de-allocated The rule of thumb to follow: Do not go above 70 percent of the tablespace Double Checking . Block Management in Oracle9 i 85 Conclusion 86 vi Oracle Space Management Handbook Section Two - Tablespaces Chapter 9 - Automated Space Cleanup in Oracle 87 Automated Space Cleanup in Oracle. Wade Cover Design: Bryan Hoff Printing History: August, 2003 for First Edition Oracle, Oracle7 , Oracle8 , Oracle8 i and Oracle9 i are trademarks of Oracle Corporation. Many of the designations used. Tables Chapter 15 - Automated Table Reorganization in Oracle8 i150 viii Oracle Space Management Handbook Automated Table/Index Reorganization In Oracle8 i by Mike Hordila 150 When Reorganizing, How

Ngày đăng: 07/04/2014, 15:53