create.barcodecsharp.com

ASP.NET Web PDF Document Viewer/Editor Control Library

The DBMS_SPACE package is useful for finding out how much space is used and how much free space is left in various segments such as table, index, and cluster segments. Recall that the DBA_FREESPACE dictionary view lets you find out free space information in tablespaces and data files, but not in the database objects. Unless you use the DBMS_SPACE package, it s hard to find out how much free space is in the segments allocated to various objects in the database. The DBMS_SPACE package enables you to answer questions such as the following: How much free space can I use before a new extent is thrown How many data blocks are above the high-water mark (HWM) The DBA_EXTENTS and the DBA_SEGMENTS dictionary views do give you a lot of information about the size allocated to objects such as tables and indexes, but you can t tell what the used and free space usage is from looking at those views. If you ve been analyzing the tables, the BLOCKS column will give you the HWM the highest point in terms of size that the table has ever reached. However, if your tables are undergoing a large number of inserts and deletes, the HWM isn t an accurate indictor of the real space used by the tables. The DBMS_SPACE package is ideal for finding out the used and free space left in objects.

how to create barcodes in excel 2013, how to make barcodes in excel mac, barcode creator excel 2007, microsoft excel barcode generator free, excel barcode font not working, excel barcode add in font tool, how to create barcodes in excel 2010, how to make barcodes in excel 2003, excel barcode add in font tool, free 2d barcode generator for excel,

The DBMS_SPACE package has three main procedures. The UNUSED_SPACE procedure gives you information about the unused space in an object segment, the FREE_BLOCKS procedure gives you information about the number of free blocks in a segment, and the SPACE_USAGE procedure gives you details about space usage in the blocks. Let s look at the UNUSED_SPACE procedure closely and see how you can use it to get detailed unused space information. The procedure has three IN parameters (a fourth one is a default parameter) and seven OUT parameters. Listing 24-14 shows the output from the execution of the UNUSED_SPACE procedure. Listing 24-14. Using the DBMS_SPACE.FREE_SPACE Procedure DECLARE v_total_blocks NUMBER; v_total_bytes NUMBER; v_unused_blocks NUMBER; v_unused_bytes NUMBER; v_last_used_extent_file_id NUMBER; v_last_used_extent_block_id NUMBER; v_last_used_block NUMBER; BEGIN dbms_space.unused_space (segment_owner => 'OE', segment_name => 'PRODUCT_DESCRIPTIONS', segment_type => 'TABLE', total_blocks => v_total_blocks, total_bytes => v_total_bytes, unused_blocks => v_unused_blocks, unused_bytes => v_unused_bytes, last_used_extent_file_id => v_last_used_extent_file_id, last_used_extent_block_id => v_last_used_extent_block_id, last_used_block => v_last_used_block, partition_name => NULL); dbms_output.put_line ('Number of Total Blocks : '||v_total_blocks); 22 dbms_output.put_line ('Number of Bytes : '||v_total_bytes); 23 dbms_output.put_line ('Number of Unused Blocks : '||v_unused_blocks); 24 dbms_output.put_line ('Number of unused Bytes : '||v_unused_bytes ); 25 END; Number of Total Blocks : 384 Number of Bytes : 3145728 Number of Unused Blocks : 0 Number of unused Bytes : 0 PL/SQL procedure successfully completed. SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Contrary to what its name suggests, this package won t help you administer space within the Oracle database. You use the DBMS_SPACE_ADMIN package mostly to manage the locally managed tablespaces. The package has several procedures, as shown in Listing 24-15.

Listing 24-15. Describing the DBMS_SPACE_ADMIN Package SQL> DESC DBMS_SPACE_ADMIN Argument Name Type ------------------------------ -------------PROCEDURE SEGMENT_CORRUPT TABLESPACE_NAME VARCHAR2 HEADER_RELATIVE_FILE BINARY_INTEGER HEADER_BLOCK BINARY_INTEGER CORRUPT_OPTION BINARY_INTEGER PROCEDURE SEGMENT_DROP_CORRUPT TABLESPACE_NAME VARCHAR2 HEADER_RELATIVE_FILE BINARY_INTEGER HEADER_BLOCK BINARY_INTEGER PROCEDURE TABLESPACE_MIGRATE_FROM_LOCAL TABLESPACE_NAME VARCHAR2 PROCEDURE TABLESPACE_MIGRATE_TO_LOCAL TABLESPACE_NAME VARCHAR2 UNIT_SIZE BINARY_INTEGER RFNO BINARY_INTEGER PROCEDURE TABLESPACE_RELOCATE_BITMAPS TABLESPACE_NAME VARCHAR2 FILNO BINARY_INTEGER BLKNO BINARY_INTEGER PROCEDURE TABLESPACE_VERIFY TABLESPACE_NAME VARCHAR2 VERIFY_OPTION BINARY_INTEGER SQL> In/Out Default -------- -------IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN IN DEFAULT DEFAULT DEFAULT

if test $curr_proc_cpu -gt $value -a \ $curr_proc_cpu -lt $errval then notify "Warning" $killoption $process $pid \ $curr_proc_cpu $value "percent of the CPU" elif test $curr_proc_cpu -ge $errval then notify "Error" $killoption $process $pid \ $curr_proc_cpu $value "percent of the CPU" else test $debug -gt 0 && echo "process cpu percent ok" fi ;;

You can use the DBMS_SPACE_ADMIN package to migrate dictionary-managed tablespaces to locally managed tablespaces. Make sure you first follow all the requirements before you perform the actual migration of the tablespaces. The following example shows how to use the TABLESPACE_MIGRATE_TO_LOCAL procedure to perform the tablespace migration. There s also a TABLESPACE_MIGRATE_FROM_LOCAL procedure that converts a locally managed tablespace into a dictionary-managed tablespace. SQL> EXECUTE DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL('TEST1'); PL/SQL procedure successfully completed. SQL>

   Copyright 2020.