Index A Guide to the Index The index is arranged hierarchically, in alphabetical order, with symbols preceding the letter A. Most second-level entries and many third-level entries also occur as first-level entries. This is to ensure that users will find the information they require however they choose to search for it. Symbols 1023 byte limit overloaded FOPEN function gets around byte limit, 1205 UTL_FILE API, 1205 2PC protocol see two-phase distributed commit protocol. A ABOUT operator interMedia Text, 756 accessing adjacent rows analytic functions, 582 LAG function, 583 LEAD function, 583 ACID properties Atomicity, 135 Consistency, 135 Durability, 135 Isolation, 135 transactional mechanisms, 135 ADD_POLICY routine DBMS_RLS package, 921 parameters, 921 ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1) LISTENER.ORA file, 775 TNSNAMES.ORA file, 776 address space isolation dedicated server, 86 administration burden reducing using partitioning, 629 advanced Oracle features, importance of, 44 Advanced Queues EMNn, 96 Oracle database, 26, 44 QMNn, 96 AFTER trigger compared to BEFORE trigger, 169 aggregate compatibility materialized views, 604 ALL_OUTLINE_HINTS table optimizer plan stability, 517 ALL_OUTLINES table optimizer plan stability, 516 4826l_index.pdf 1 ALTER ANY OUTLINE privilege stored outlines, creating, 519 ALTER INDEX statement synchronizing text index, 754 ALTER OUTLINE command DDL, 525 ALTER SESSION command ALTER SESSION SET CREATE_STORED_OUTLINE command, 520 ALTER SESSION SET USE_STORED_OUTLINE command, 513 auto binding, 520 implementing tuning, 510 optimizer plan stability, problems with, 533 stored outlines, creating, 520 syntax, 520 ALTER SESSION SET CREATE_STORED_OUTLINE command stored outlines, creating, 520 ALTER SESSION SET USE_STORED_OUTLINE command development tool, 515 implementing tuning, 513 optimizer plan stability, 513, 515 ALTER TYPE command object methods, 875 ALTER USER command GRANT CONNECT THROUGH clause n-Tier authentication, 965, 973 security privileges, 975 syntax, 975 REVOKE CONNECT THROUGH clause, 975 analytic functions, 545 advantages over standard SQL, 548, 571, 585 avoiding fragile code, 573 examples, 566 accessing adjacent rows, 582 pivot queries, 576 generic pivot queries, 578 TOP-N queries, 566 function types AVG function, 562 CORR function, 563 COUNT function, 563 COVAR_POP function, 563 COVAR_SAMP function, 563 CUME_DIST function, 563 DENSE_RANK function, 563 FIRST_VALUE function, 563 LAG function, 550, 564 LAST_VALUE function, 564 3/2/2005 1:31:20 PM analytic functions (Continued) analytic functions (Continued) function types (Continued) LEAD function, 550, 564 MAX function, 564 MIN function, 564 NTILE function, 564 PERCENT_RANK function, 564 RANK function, 564 ranking functions, 550 RATIO_TO_REPORT function, 565 REGR_ functions, 565 reporting functions, 550 ROW_NUMBER function, 565 statistical functions, 551 STDDEV function, 565 STDDEV_POP function, 565 STDDEV_SAMP function, 565 SUM function, 565 VAR_POP function, 565 VAR_SAMP function, 565 VARIANCE function, 565 windowing functions, 550 performance testing, 571, 583 SQL_TRACE, 571 TIMED_STATISTICS, 571 TKPROF, 571 problems with, 586 NULLS, 588 PL/SQL, using with, 586 tuning, 590 Where clause, 588 syntax, 549 function clause, 550 ORDER BY clause, 551 partition clause, 551 windowing clause, 553 BETWEEN, 561 CURRENT ROW, 560 Numeric Expression FOLLOWING, 560 Numeric Expression PRECEDING, 560 range windows, 555 row windows, 558 UNBOUNDED PRECEDING, 560 ANALYZE_DATABASE function DBMS_UTILITY package, 1179 should not be used, not ever, 1179 ANALYZE_SCHEMA function DBMS_UTILITY package, 1176 limitations, 1178 using with changing schema, 1178 ANSI compliant databases differences between, 38 Oracle database, 38 SQL Server, 38 Sybase, 38 API-based database programming dynamic SQL, 700 application context bind variables, 716, 919 creating application context, 929 Fine Grained Access Control, 913, 918 global variables, 931 implementing security policy with FGAC, 923 testing, 934 namespace variables, 919 native dynamic SQL, 716 security policy, 930 setting application context, 927 ON LOGON database trigger, 927 SYS_CONTEXT function, 716 testing, 930 trustworthiness of application context, 929 application development, simplifying Fine Grained Access Control, reasons for using, 916 application domain indexes, 271, 297 interMedia Text indexes, 297 application server application server session, 970 n-Tier authentication, 968 Application Server Providers see ASPs. application server session client session, 970 n-Tier authentication, 970 APPNAME record fields, meaning of, 465 trace files, using and interpreting, 465 AQ see Advanced Queues. Archive Process see ARCn. archived redo log files, 69, 158 ARCHIVELOG mode, 69 compared to NOARCHIVELOG mode, 69 ARCn focused background processes, 94 Array interface, getArray() method manipulating arrays, 854 array processing DBMS_SQL, 726 native dynamic SQL, 728 ARRAY type, Java passed from Oracle DATEARRAY type Java stored procedures, 850 passed from Oracle NUMARRAY type Java stored procedures, 850 passed from Oracle STRARRAY type Java stored procedures, 850 printing metadata about array types, 854 arrays manipulating arrays, 854 passing OUT parameter using arrays, 852 ASPs hosting applications as ASP, 917 atomic instructions latches, 122 Atomicity Oracle transactions, 136 statement level atomicity, 136 Oracle database, 137 PL/SQL blocks, 138 triggers, 138 transactional mechanisms, 135 AUDIT command auditing attempts to modify secure information, 662 BY <proxy> clause, 976 n-Tier authentication, 976 ON BEHALF OF ALL clause, 976 ON BEHALF OF clause, 976 authentication n-Tier authentication, 963 Operating System authentication, 969 password authentication, 969 web-based authentication, 964 auto binding ALTER SESSION command, 520 cursor_sharing=force parameter, 533 automated query rewrite facility materialized views, brief history, 594 1266 4826l_index.pdf 2 3/2/2005 1:31:20 PM blocking autonomous transactions, 659 auditing attempts to modify secure information, 662 compared to DBMS_JOB package, 666 compared to non-autonomous transactions, 660 ending autonomous transactions, 686 errors ORA-00060, 696 ORA-06519, 695 ORA-14450, 695 modular code, 678 mutating tables, avoiding, 665 Oracle database, 44 PRAGMA AUTONOMOUS_TRANSACTION directive, 660 problems with, 689 distributed transactions, 689 mutating tables, 693 require PL/SQL, 689 rollback, 690 temporary tables, 691 quick example, 660 reasons for using, 662 savepoints, 687 scope, 681 database changes, 682 locks, 685 packaged variables, 681 session state, 682 transactional control flow, 679 trasactional control flow nesting autonomous transactions, 680 triggers, 663 performing DDL, 666 potential failure with, 668 trigger reads from table in query, 663 writing to database from SQL functions, 670 really strict auditing, 671 using only SELECT statements, 675 care in using, 676 auto-sectioning interMedia Text, 761 AUTOTRACE controlling report, 15 execution plan, 15 generating report, 14 setting up, 14 availability increasing using partitioning, 628 AVG function analytic functions, 562 B B*Tree Cluster indexes, 270 B*Tree indexes, 270, 271 branch blocks, 271 commonly used, 271 compared to bitmap indexes, 287 compressing index, 272 leaf nodes, 271 reasons for using, 277 related to reverse key indexes, 275 background processes database architecture, 55, 85, 90 focused background processes, 90 UNIX-based systems, 55 utility background processes, 95 Windows-based systems, 55 backup EXP/IMP tools role in backup, 340 unsuitable for main backup, 340 Large pool, 83 BAD file using with SQLLDR, 383, 385, 424 BEFORE trigger compared to AFTER trigger, 169 increases Redo, 169 benchmarking benchmarking in isolation, 434 benchmarking to scale, 435 tuning, 434 BETWEEN windowing clause, 561 BFILE, 821 LOB_IO procedure, 824 reading file using, 393 BigDecimal type, Java passed from Oracle Number type Java stored procedures, 849 Binary File see BFILE. Binary Large Object type see BLOB type. BIND record fields, meaning of, 469 trace files, using and interpreting, 469 bind variables application context, 716, 919 collection types, using querying from PL/SQL routine, 892 cursor_sharing=force parameter, 441 description, 27 determining if bind variables being used, 449 dynamic PL/SQL, 714 dynamic SQL, 29 latch free event, 439 Oracle applications, 27 over binding, 446 scalability, 27, 436 testing with multiple users, 436 Shared pool, 81 static SQL, 440 tuning, 436 using new data types as bind variables, 870 bitmap indexes, 270, 285 compared to B*Tree indexes, 287 reasons for using, 286 BLOB type, 821 BLOB to VARCHAR2 conversions, 1077 LOB_IO procedure, 824 storing VARRAYS as, 880 writing BLOB to disk, 1088 block buffer cache KEEP pool, 80 RECYCLE pool, 80 SGA, 78 block server process see BSP. blocking DELETE statement, 107 INSERT statement, 107 locking policy, 107 SELECT FOR UPDATE statement, 107 UPDATE statement, 107 1267 4826l_index.pdf 3 3/2/2005 1:31:21 PM blocks blocks block buffer cache, 78 cleanout of, 177 Commit clean out, 177 design issues, 179 ORA-01555, 185, 191 necessary conditions for error, 192 rarity of error, 194 solutions to error, 195 extents, 62 branch blocks B*Tree indexes, 271 breakable parse locks, 119 DBA_DDL_LOCKS view, 120 stored procedures and, 121 using, 121 BSP focused background processes, 95 BSTAT/ESTAT replaced by StatsPack, 477 BY <proxy> clause AUDIT command, 976 byte type, Java passed from Oracle RAW type Java stored procedures, 851 configuring server, 775 LISTENER.ORA file, 775 ORA-28575 error, 776 TNSNAMES.ORA file, 775, 776 errors, 833 ORA-06520, ORA-06521, ORA-06523, ORA-06525, ORA-06526, ORA-06527, ORA-28575, ORA-28576, ORA-28577, ORA-28578, ORA-28579, ORA-28580, ORA-28582, 837 837 838 839 839 840 833 834 834 835 835 836 836 first example, 783 C code, 794 error codes, 801 functions that return values, 813 mapping Oracle data types to C data types, 802 portability macro, 802 template for external procedures, 794 installing and running procedure, 819 makefiles, 817 building extproc.dll, 817 building extproc.so, 819 porting extproc to UNIX, 818 C PL/SQL prototype, 784 C code C-based stored procedures, first example, 794 error codes, 801 functions that return values, 813 mapping Oracle data types to C data types, 802 OCICollAppend API call, 809 OCICollGetElem API call, 809 OCICollSize API call, 809 OCINumberFromReal API call, 802 n-Tier authentication, 966 OCI programs, 967 portability macro, 802 Pro*C code, 823 strtok function, 967 template for external procedures, 794 debugf function, 795 debugf macro, 796 global context, 794 init function, 798 lastOCiError function, 797 raise_application_error function, 797 term function, 801 C compiler, 15 C data types mapping Oracle data types to C data types, 787, 802 table mapping external types to C types, 793 CASCADE option DROP USER command, 533 cascade update deferring constraint checking, 141 case sensitivity optimizer plan stability, problems with, 531 case statement, SQL, 382 CATEGORY column DBA_OUTLINES table, 516 C-based stored procedures, 771 compared to Java stored procedures, 848, 857 creating library object, 786 creating package body, 786 data type functions, 784 mapping Oracle data types to C data types, 787 implementing, 773 EXTPROC OS process, 773 LOB_IO procedure installing and running procedure, 829 LOBS, manipulating, 821 makefiles, 827 Pro*C code, 823 LOBS, manipulating, 821 LOB_IO procedure, 821 makefiles, 816 reasons for using, 772 template for external procedures, 783, 794 debugf function, 795 debugf macro, 796 error handling, 784 global context, 794 init function, 798 lastOCiError function, 797 parameter setting, 784 raise_application_error function, 797 state management, 783 term function, 801 tracing mechanisms, 783 testing installation, 779 DEMOLIB library, creating, 781 demonstration program, 779 extproc.c code, compiling, 780 installing and running PL/SQL code, 782 SCOTT/TIGER account, setting up, 780 UTL_TCP package, 772 CBO FULL TABLE SCAN, 282 function based indexes, 288 materialized views, 595 temporary tables and, 255 chained rows LogMiner packages, limitations, 1116 1268 4826l_index.pdf 4 3/2/2005 1:31:21 PM CREATE CLUSTER statement Character Large Object type see CLOB type. Checkpoint Process see CKPT. checkpointing online redo log files, 67 CKPT focused background processes, 93 client application statements trace files, using and interpreting, 471 client session application server session, 970 n-Tier authentication, 969 CLOB type, 821 Java stored procedures, 850 LOB_IO procedure, 824 using Java input/output stream types with, 853 writing CLOB to disk, 1088 CLOSE function FILETYPE object type, 885 cluster index index clustered tables, 226 clustered tables hash clustered tables, 198, 231 index clustered tables, 197, 224 CLUSTERING_FACTOR column USER_INDEXES view, 283 coding conventions, 16 collection types, using array fetch into tables, 892, 895 inserting records, 892, 896 object relational features, 892 querying from PL/SQL routine, 892 bind variables, 892 comma separated values see CSV format. COMMA_TO_TABLE function DBMS_UTILITY package, 1191 command line options TKPROF, 462 Commit clean out block cleanout, 177 forcing cleanout, 177 COMMIT statement cannot COMMIT over database link, 149 compared to rollback, 163 description, 158 flat response time operation, 160 increases Redo, 168 LGWR, 160 ORA-01555, 185, 190 SCN, generating, 160 synchronous calls to LGWR from COMMIT, 160 transaction control statements, 136 COMPATIBLE parameter materialized views, setting up, 602 COMPILE_SCHEMA function DBMS_UTILITY package, 1172 complex data types Java stored procedures, 849 JPublisher, 849 composite partitioning, 633, 636 COMPRESS N option compared to NOCOMPRESS option, 220 CREATE TABLE statement index organized tables, 217 Indexes, 217 concurrency control definition, 123 importance of, 30 Informix, 102 locking policy, 30, 102 multi-versioning, 33 Oracle database, 30, 103 Sybase, 102 transaction isolation levels, 124 dirty read, 124 non-repeatable read, 124 phantom read, 124 read committed isolation level, 124, 126 read only isolation level, 125, 132 read uncommitted isolation level, 124, 125 repeatable read isolation level, 124, 128 serializable isolation level, 124, 130 CONNECT_DATA = (SID = PLSExtProc) TNSNAMES.ORA file, 776 Consistency transactional mechanisms, 135 consistent answers, obtaining repeatable read isolation level, 128 constraints care in using, 609 integrity constraints, 140 materialized views, 605 metadata, 607 CONTEXT index type interMedia Text, 749 ConText Option interMedia Text, brief history, 740 control file, SQLLDR, 371 command line overrides control file, 426 simple example, 371 control files database architecture, file types, 60, 66 cooked file systems compared to RAW devices, 181 CORR function analytic functions, 563 corruption, detecting EXP tool, reasons for using, 319 Cost-Based Optimizer see CBO. COUNT function analytic functions, 563 generic pivot queries, 578 TOP-N queries, 568 COVAR_POP function analytic functions, 563 COVAR_SAMP function analytic functions, 563 covert channel referential integrity, 941 CREATE ANY CONTEXT privilege DBMS_RLS package, 918 CREATE ANY OUTLINE privilege optimizer plan stability, 508 stored outlines, creating, 519 CREATE CLUSTER statement compared to CREATE TABLE statement, 225 hash clustered tables, 232 HASHKEYS option, 232 single table hash cluster, 238 size parameter, 232 index clustered tables, 225 size parameter, 226 1269 4826l_index.pdf 5 3/2/2005 1:31:21 PM CREATE INDEX statement CREATE INDEX statement function based indexes, 289 substr function, 293 synchronizing text index, 754 CREATE LIBRARY privilege SCOTT/TIGER account, setting up, 781 CREATE LIBRARY statement DEMOLIB library, creating, 781 CREATE OR REPLACE OUTLINE command CREATE ANY OUTLINE privilege, 508 optimizer plan stability, 508 CREATE TABLE statement compared to CREATE CLUSTER statement, 225 heap organized tables, 210 FREELIST, 211 INITRANS parameter, 212 PCTFREE parameter, 212 PCTUSED parameter, 212 IMP tool, problems with, 360 increasing complexity of, 360 index clustered tables, 226 index organized tables, 216 COMPRESS N option, 217 INCLUDING option, 220, 222 NOCOMPRESS option, 217 OVERFLOW option, 220, 222 PCTTHRESHOLD parameter, 217, 222 multi-tablespace objects, 361 nested tables, 241 object tables, 258, 261 CREATE TYPE statement data types, adding, 869 CSV format delimited data, 374 CTXCAT catalog index type interMedia Text, 749 interMedia Text, problems with, 765 ctxsrv program synchronizing text index, 753 CUME_DIST function analytic functions, 563 CURRENT ROW windowing clause, 560 cursor caching description, 949 Fine Grained Access Control, problems with, 945 CURSOR function relational tables and, 908 cursor record fields, meaning of, 466 trace files, using and interpreting, 466 cursor variables generic pivot queries, 582 native dynamic SQL, 711 OPEN FOR clause, 711 cursor_sharing=force parameter auto binding, 533 bind variables, 441 over binding, 446 improving performance with, 48 limitations, 441 optimizer plan stability, problems with, 533 problems with, 48, 442 optimizer related issues, 443 query output issues, 447 tuning, 441 customized access control compared to Fine Grained Access Control, 991 invoker rights, reasons for using, 991 D Data Definition Language see DDL. data dictionary applications index clustered tables, 229 invoker rights, reasons for using, 988 problems with, 989 data files database architecture, file types, 60, 62 SYSTEM data, 62 tablespaces, 64 USER data, 62 data loading, 367 load dates, 379 loading into LOBS, 409 DBMS_LOB package, 409 Directory object, 410 LOBFILEs, 414 PL/SQL, 409 SQLLDR, 412 loading data into object columns, 416 loading inline data, 413 loading out of line data, 414 OCI programs, 368 SQLLDR, 367 loading data with embedded newlines, 391 loading delimited data, 374 loading fixed format data, 377 loading into LOBS, 412 loading into LONG field, 390 loading into LONG RAW field, 389 loading nested tables, 418 loading report-style data, 387 loading tab-delimited data, 375 loading VARRAYS, 418 using functions, 380 using sequences, 380 Data Manipulation Language see DML. data source management interMedia Text problems with, 764 using, 743, 745 data sufficiency materialized views, 603 data type functions C-based stored procedures, first example, 784 creating collection types, 784 LOB_IO procedure, 821 mapping Oracle data types to C data types, 787 passing parameters, 784 returning SCALAR types, 785 data type names table of codes for, 722 data types, adding adding member function to type, 872 CREATE TYPE statement, 869 object relational features, using, 869 using new type, 870 using as bind variables, 870 data unloading unloading in SQLLDR friendly format, 399 unloader PL/SQL utility, 399 data warehousing global index partition, 647 global indexes should be avoided, 651 1270 4826l_index.pdf 6 3/2/2005 1:31:21 PM DBMS_LOB package data with embedded newlines loading with SQLLDR, 391 converting other character into newline, 391 using FIX attribute, 392 using STR attribute, 398 using VAR attribute, 397 data, copying between platforms EXP tool, reasons for using, 320 IMP tool, reasons for using, 320 database compared to instance, 54 definition, 54 database architecture, 53 background processes, 55, 85, 90 focused background processes, 90 UNIX-based systems, 55 utility background processes, 95 Windows-based systems, 55 dedicated server, 56 file types, 60 control files, 60, 66 data files, 60, 62 parameter files, 60 password files, 60 redo log files, 60, 66 temp files, 60, 65 memory structures, 70 PGA, 70 SGA, 55, 70, 74 UGA, 70 MTS, 57 OPS, 54 Oracle database, 25 server processes, 85 dedicated server, 85 MTS, 85, 86 slave processes, 85, 97 I/O slaves, 97 parallel query slaves, 97 Database Block Writer see DBWn. database buffer cache online redo log files, 67 database changes scope in autonomous transactions, 682 database dependence not necessarily a problem, 46 vendor-specific features, making use of, 41 database environment, verifying resolving ORA-28575 error, 777 TNSNAMES.ORA file, 778 database independence infeasibility of total independence, 41 Oracle applications, 37 problems with, 37 database link cannot COMMIT over database link, 149 cannot do DDL over database link, 149 cannot issue SAVEPOINT over database link, 150 distributed transactions, 148 database logon triggers see ON LOGON database trigger. database standards portability and, 41 SQL92 standard, 40 database tables see tables. datastore object DETAIL_DATASTORE datastore object, 744 DIRECT_DATASTORE datastore object, 743 FILE_DATASTORE datastore object, 745 interMedia Text, 743 URL_DATASTORE datastore object, 746 date mask SQLLDR, load dates, 379 Date type, Oracle manipulating using Timestamp class, 852 passing to Java Timestamp type Java stored procedures, 850 SQLLDR, load dates, 379 DATEARRAY type, Oracle passing to Java ARRAY type Java stored procedures, 850 DB_VERSION function DBMS_UTILITY package, 1193 DBA_DDL_LOCKS view DDL locks, 120 DBA_OUTLINE_HINTS table HINT column, 517 JOIN_POS column, 517 NAME column, 517 NODE column, 517 optimizer plan stability, 517 OWNER column, 517 STAGE column, 517 DBA_OUTLINES table CATEGORY column, 516 NAME column, 516 optimizer plan stability, 516 OWNER column, 516 SQL_TEXT column, 517 TIMESTAMP column, 517 USED column, 516 VERSION column, 517 DBMS_ALERT package concurrent signals, 1034 many calls to signal, 1037 necesssary supplied packages, 1031, 1032 repeated calls, 1036 DBMS_APPLICATION_INFO package necesssary supplied packages, 1042 SET_CLIENT_INFO call, 1043 V$SESSION_LONGOPS view, 1045 DBMS_JAVA package compiler options, 1051 dropjava function, 1055 loadjava function, 1055 LONGNAME routine, 1050 necesssary supplied packages, 1050 permission procedures, 1056 SET_OUTPUT procedure, 1055 SHORTNAME routine, 1050 DBMS_JOB package compared to autonomous transactions, 666 custom scheduling, 1068 error messages, 1071 monitoring jobs, 1070 necesssary supplied packages, 1059 one-off jobs, running, 1063 performing DDL in triggers, 666 recurring jobs, scheduling, 1066 DBMS_LOB package conversions, 1077 BLOB to VARCHAR2 conversions, 1077 conversion on the fly, 1086 LONG RAW to LOB conversions, 1081 LONG to LOB conversions, 1081 mass conversion example, 1083 1271 4826l_index.pdf 7 3/2/2005 1:31:21 PM DBMS_LOB package (Continued) DBMS_LOB package (Continued) GETLENGTH method, 411 LOADFROMFILE function, 409 LOBS displaying LOBS on Web, 1089 loading LOBS, 1074 loading data into LOBS, 409 manipulating LOBS, 821, 1073 necesssary supplied packages, 1073 READ method, 412 SELECT FOR UPDATE statement, 1075 substr function, 1074 writing BLOB to disk, 1088 writing CLOB to disk, 1088 DBMS_LOCK package necesssary supplied packages, 1092 user-defined locks, 123 DBMS_LOGMNR package see LogMiner packages. DBMS_LOGMNR_D package see LogMiner packages. DBMS_OBFUSCATION_TOOLKIT package encryption, 1123 key management, 1140 necesssary supplied packages, 1123 problems with, 1139 wrapper, 1125 DBMS_OLAP package ESTIMATE_SUMMARY_SIZE routine, 618 materialized views, 618 editing views, 618, 622 estimating size of view, 618 evaluating utilization of view, 618 validating dimension objects, 618, 620 RECOMMEND_MV routine, 622 RECOMMEND_MV_W routine, 622 VALIDATE_DIMENSION routine, 621 DBMS_OUTPUT package creating DBMS_OUTPUT functionality, 1154 description, 1145 enhancing with wrapper function, 1153 limitations, 1153 making programming environments DBMS_OUTPUTaware, 1149 necesssary supplied packages, 1144 using UTL_FILE instead, 1154 DBMS_PIPE package compared to external procedures, 1040 necesssary supplied packages, 1031, 1038 online example, 1041 DBMS_PROFILER necesssary supplied packages, 1161 problems with, 1171 tuning with, 475 using, 475 DBMS_RLS package ADD_POLICY routine, 921 CREATE ANY CONTEXT privilege, 918 EXECUTE ON DBMS_RLS privilege, 924 EXECUTE_CATALOG_ROLE privilege, 918 Fine Grained Access Control, 918 DBMS_SHARED_POOL package Shared pool, 81 DBMS_SPACE package hash clustered tables, measuring space used by, 232 setting value of PCTFREE parameter, 205 setting value of PCTUSED parameter, 205 DBMS_SQL array processing, 726 compared to native dynamic SQL, 702, 713 bind variables, 714 repeated statements, 725 unknown number of outputs, 718 DESCRIBE_COLUMNS API, 720 DML statements, using with, 707 dynamic PL/SQL, 702 performance testing, 726, 727 PL/SQL blocks, using with, 707 pseudo-code for, 704 structure of processes, 704 using, 703 DBMS_STATS package temporary tables and, 254 DBMS_UTILITY package ANALYZE_DATABASE function, 1179 should not be used, not ever, 1179 ANALYZE_SCHEMA function, 1176 limitations, 1178 using with changing schema, 1178 COMMA_TO_TABLE function, 1191 COMPILE_SCHEMA function, 1172 DB_VERSION function, 1193 FORMAT_CALL_STACK function, 1181 FORMAT_ERROR_STACK function, 1179 GET_HASH_VALUE function, 1193 GET_PARAMETER_VALUE function, 1185 GET_TIME function, 1184 NAME_RESOLVE function, 1186 NAME_TOKENIZE function, 1188 necesssary supplied packages, 1172 PORT_STRING function, 1193 TABLE_TO_COMMA function, 1191 DBWn focused background processes, 93 online redo log files, 68 DDL ALTER OUTLINE command, 525 always commits in Oracle, 119 cannot do DDL over database link, 149 DROP OUTLINE command, 527 extracting EXP tool INDEXFILE option, 334 reasons for using, 319 SHOW = Y option, 334 scripts, 337 performing in triggers, 666 autonomous transactions, 666 potential failure with, 668 DBMS_JOB package, 666 stored outlines, creating, 519 stored outlines, managing, 525 DDL locks, 112, 119 breakable parse locks, 119 DBA_DDL_LOCKS view, 120 exclusive DDL locks, 119 share DDL locks, 119 deadlocks causes of, 108 foreign keys, 108 locking policy, 108 Oracle Forms and, 109 rarity in Oracle, 108 trace files for, 108 DEBUG package tuning with, 476 1272 4826l_index.pdf 8 3/2/2005 1:31:21 PM documented parameters debug.f package Fine Grained Access Control, debugging, 955 debugf function template for external procedures, 795 debugf macro template for external procedures, 796 dedicated server address space isolation, 86 advantages, 87 compared to MTS, 57, 87 creating, 58 database architecture, 56 listener, 58 Net8 listener, 86 remote execution, 86 server processes, 85 SQL*PLUS, 86 usually preferred option, 89 DEFERRABLE constraint INITIALLY IMMEDIATE constraint, 142 integrity constraints, 142 definer definition, 981 definer rights compared to invoker right, 983, 994 description, 995 directly granted security privileges, 996 documentation concerning, 996 errors, 1025 Java stored procedures and, 1021 reasons for using scalability, 994 security logic in database, 995 roles not enabled, 996, 999 static behavior, 984 stored procedures and, 982 compiling stored procedure, 998 setting up dependencies, 998 verifying accessed objects, 998 DELETE statement blocking, 107 generating Undo, 185 nested tables, 245 delimited data CSV format, 374 loading SQLLDR, 374 tab-delimited data, 375 DEMOLIB library, creating C-based stored procedures, testing, 781 CREATE LIBRARY statement, 781 demonstration program C-based stored procedures, testing, 779 DENSE_RANK function analytic functions, 563 TOP-N queries, 567 dependency chain, breaking dynamic SQL, problems with, 734 descending indexes, 270, 276 DESCRIBE_COLUMNS API DBMS_SQL, 720 using, 720 DETAIL_DATASTORE datastore object, 744 deterministic keyword function based indexes, 292 development tool ALTER SESSION SET USE_STORED_OUTLINE command, 515 ON LOGON database trigger, 514 optimizer plan stability, 514 dictionary cache StatsPack report, interpreting, 492 dictionary-managed tablespace, 64 recursive SQL, 64 dimensions creating, 613 DBMS_OLAP package validating dimension objects, 618, 620 description, 609 hierarchies and, 616 direct path exports EXP tool, 345 DIRECT_DATASTORE datastore object, 743 directly granted security privileges definer rights, 996 invoker rights, 1006 directory listing, obtaining Java stored procedures, 858 security privileges, 859 SQLJ, 859 Directory object loading data into LOBS, 410 dirty read not supported by Oracle, 125 transaction isolation levels, 124 dirty read isolation level concurrency control, 124 dispatcher process connecting to, 59 MTS, 57 Distributed Database Recovery see RECO. distributed locks, 112 distributed transactions, 148 autonomous transactions, problems with, 689 database link, 148 cannot COMMIT over database link, 149 cannot do DDL over database link, 149 cannot issue SAVEPOINT over database link, 150 limitations, 149 two-phase distributed commit protocol, 149 DML locks, 112, 113 TM locks, 118 TX locks, 113 DML performance enhancing using partitioning, 630 parallel DML, 630 DML statements DBMS_SQL, using with, 707 DMP file see dump file. document filters interMedia Text, 743 document management interMedia Text problems with, 762 using, 743 document services interMedia Text, problems with, 764 documented parameters parameter files, 61 1273 4826l_index.pdf 9 3/2/2005 1:31:22 PM DROP ANY OUTLINE privilege DROP ANY OUTLINE privilege stored outlines, creating, 519 DROP OUTLINE command DDL, 527 DROP USER command CASCADE option, 533 optimizer plan stability, problems with, 533 DROP_BY_CAT procedure OUTLN_PKG package, 529 DROP_UNUSED procedure OUTLN_PKG package, 529 dropjava function DBMS_JAVA package, 1055 dump file EXP tool, 319 IMP tool, 319 duplicate row IDs index clustered tables, 229 Durability transactional mechanisms, 135 dynamic SQL, 699 API-based database programming, 700 bind variables, 29 compared to static SQL, 700 generic pivot queries, 579 PL/SQL, 699 bind variables, 714 DBMS_SQL, 702 required if output number unknown, 718 repeated statements, 725 unknown number of outputs, 718 problems with, 734 dependency chain, breaking, 734 fragile code, 735 tuning, 735 reasons for using, 702 UTL_FILE API, 707, 723 E e-mail, sending and receiving Java stored procedures, 844 EMNn Advanced Queues, 96 utility background processes, 96 encapsulation object methods, reasons for using, 873 encryption DBMS_OBFUSCATION_TOOLKIT package, 1123 key management, 1140 ENFORCED value QUERY_REWRITE_INTEGRITY parameter, 602 enqueues see internal locks. environment, setting up, 12 error codes C-based stored procedures, first example, 801 LOB_IO procedure, 822 error handling invoker rights, problems with, 1015 Java stored procedures, 845, 863 lastOCiError function, 797 ORA-29459 Java Session State cleared, 864 ORA-29531 no method X in class Y, 864 permissions errors, 864 raise_application_error function, 797 template for external procedures, 784 error messages DBMS_JOB package, 1071 ESTIMATE_SUMMARY_SIZE routine DBMS_OLAP package, 618 Event Monitor Processes EMNn. evolutionary application development Fine Grained Access Control, reasons for using, 916 exception handling UTL_FILE API, 1202 exclusive DDL locks, 119 EXEC record fields, meaning of, 466 trace files, using and interpreting, 466 EXECUTE IMMEDIATE clause native dynamic SQL, 709 syntax, 709 EXECUTE ON DBMS_RLS privilege DBMS_RLS package, 924 EXECUTE ON OUTLN_PKG privilege stored outlines, creating, 519 EXECUTE phase TKPROF, analyzing query, 458 EXECUTE_CATALOG_ROLE privilege DBMS_RLS package, 918 EXP tool, 317 DDL, extracting, 334 INDEXFILE option, 334 SHOW = Y option, 334 direct path exports, 345 dump file, 319 Fine Grained Access Control, problems with, 951, 952 HELP = Y option, 321 large exports, 325 exporting smaller pieces, 326 exporting to OS pipe, 327 exporting to tape device, 328 FILESIZE parameter, 325 problems with, 325 name-value pairs, 321 parameters, 321 table of parameters, 322 problems with, 345 cloning schemas, 346 disappearance of indexes, 353 National Language Support, 359 using across different Oracle versions, 353 quick example, 318 reasons for using, 319 cloning schemas, 319 copying data between platforms, 320 detecting corruption, 319 extracting DDL, 319 rebuilding instances, 320 transporting tablespaces, 320 role in backup, 340 subsetting data, 328 QUERY= parameter, 328 transporting data, 329 limitations, 329 read only data, 333 tablespaces, 330, 331 unsuitable as reorganization tool, 340 unsuitable for main backup, 340 explain plan facility problems with, 462 TKPROF, analyzing query, 462 1274 4826l_index.pdf 10 3/2/2005 1:31:22 PM full exact text match extensible indexing see application domain indexes. extents blocks, 62 segments, 62 external data types table mapping external types to C types, 793 table mapping SQL types to external types, 792 external procedure errors interMedia Text, 767 external procedures C-based stored procedures, 771 compared to DBMS_PIPE package, 1040 EXTPROC OS process C-based stored procedures, implementing, 773 Net8 listener, 773 verifying program resolving ORA-28575 error, 777 extproc.c code, compiling C-based stored procedures, testing, 780 compiling in UNIX, 780 compiling in Windows, 780 EXTPROC_CONNECTION_DATA TNSNAMES.ORA file, 776 F ON LOGON database trigger, 918 Oracle database, 47 problems with, 940 cursor caching, 945 EXP tool, 951, 952 IMP tool, 951, 954 referential integrity, 941 covert channel, 941 ON DELETE CASCADE clause, 942 ON DELETE SET NULL clause, 943 reasons for using, 914 application development, simplifying, 916 evolutionary application development, 916 hosting applications as ASP, 917 maintainability, 915 security logic in database, 915 shared accounts, avoiding, 916 single account environment, supporting, 917 security policy, 918 application context, 931 implementing policy with FGAC, 919 simple example, 914 SYS_CONTEXT function, 918 FIRST_VALUE function analytic functions, 563 FIX attribute INFILE clause, 392 loading data with embedded newlines, 392 reading file using BFILE, 393 FAST FULL SCAN compared to INDEX RANGE SCAN, 279 Fear Uncertainty and Doubt about Oracle database, 21 FETCH phase TKPROF, analyzing query, 458 FGAC see Fine Grained Access Control. field section interMedia Text, 758 file system-based solution compared to interMedia Text, 746 FILE_DATASTORE datastore object, 745 FILESIZE parameter EXP tool, large exports, 325 FILETYPE object type CLOSE function, 885 demonstrating functionality, 890 encapsulating UTL_FILE in new PL/SQL data type, 884 GET_LINE function, 886 isOpen method, 886 OPEN function, 884, 885 supported by PL/SQL package, 885 WRITE_IO procedure, 884, 887 Fine Grained Access Control, 913 application context, 913, 918 bind variables, 919 implementing security policy with FGAC, 923 testing, 934 namespace variables, 919 security policy, 931 compared to customized access control, 991 DBMS_RLS package, 918 debugging, 955 debug.f package, 955 errors, 955 ORA-28106, 959 ORA-281110, 955 ORA-28112, 957 ORA-28113, 958 fixed format data, loading POSITION keyword, 377 SQLLDR, 377 fixed SGA, 77 focused background processes, database architecture, 90 ARCn, 94 BSP, 95 CKPT, 93 DBWn, 93 LCKN, 95 LGWR, 94 LMD, 95 LMON, 95 PMON, 91 RECO, 93 SMON, 92 FOR UPDATE clause care in using, 23 Oracle database, locking policy, 32 foreign keys deadlocks, causes of, 108 foreign keys and indexes, 302 FORMAT_CALL_STACK function DBMS_UTILITY package, 1181 FORMAT_ERROR_STACK function DBMS_UTILITY package, 1179 fragile code analytic functions, avoided by, 573 dynamic SQL, problems with, 735 FREELIST CREATE TABLE statement heap organized tables, 211 tables, syntax, 200 FROMUSER option IMP tool, 319 full exact text match materialized views, 603 1275 4826l_index.pdf 11 3/2/2005 1:31:22 PM FULL TABLE SCAN FULL TABLE SCAN CBO, 282 compared to TABLE ACCESS BY INDEX ROWID, 279 function based indexes, 270, 288 CBO, 288 CREATE INDEX statement, 289 deterministic keyword, 292 example, 289 GLOBAL QUERY REWRITE privilege, 288 implementing, 288 performance testing, 295 problems with, 296 QUERY REWRITE privilege, 288 substr function, 288 hiding substr call, 295 function clause analytic functions, syntax, 550 G generic object types invoker rights, reasons for using, 991 generic pivot queries analytic functions, 578 COUNT function, 578 cursor variables, 582 dynamic SQL, 579 MAX function, 578 ROW_NUMBER function, 578 generic utilities, developing invoker rights, reasons for using, 985 problems with, 985 security policy, 985 GET_HASH_VALUE function DBMS_UTILITY package, 1193 GET_LINE function FILETYPE object type, 886 GET_PARAMETER_VALUE function DBMS_UTILITY package, 1185 GET_TIME function DBMS_UTILITY package, 1184 getallcode.sql script DDL, extracting, 337 getallviews.sql script DDL, extracting, 338 getArray() method, Array interface manipulating arrays, 854 getaview.sql script DDL, extracting, 338 getcode.sql script DDL, extracting, 337 GETLENGTH method DBMS_LOB package, 411 gettrig.sql script DDL, extracting, 339 global context template for external procedures, 794 global index partition, 637, 645 compared to local index partition, 638, 645 data warehousing, 647 global indexes should be avoided, 651 OLTP systems, 651 sliding window implementation, 647 should be avoided, 651 global namespace of outlines optimizer plan stability, problems with, 539 GLOBAL QUERY REWRITE privilege function based indexes, 288 global variables application context, 931 GRANT CONNECT THROUGH clause ALTER USER command n-Tier authentication, 965, 973 security privileges, 975 syntax, 975 GRANT CREATE MATERIALIZED VIEW privilege materialized views, 595 GRANT CREATE SESSION privilege materialized views, 595 GRANT CREATE TABLE privilege materialized views, 595 GRANT QUERY REWRITE privilege materialized views, 595 grouping compatibility materialized views, 604 H hard parsing queries, 27 hash clustered tables compared to index clustered tables, 231 CREATE CLUSTER statement, 232 HASHKEYS option, 232 size parameter, 232 description, 231 performance testing, 234 SQL_TRACE, 234 TKPROF, 234 single table hash cluster, 238 space used by, measuring DBMS_SPACE package, 232 table types, 198, 231 hash partitioning, 633, 635 HASHKEYS option, CREATE CLUSTER statement hash clustered tables, 232 heap organized tables compared to index organized tables, 212 CREATE TABLE statement, 210 FREELIST, 211 INITRANS parameter, 212 PCTFREE parameter, 212 PCTUSED parameter, 212 description, 209 table types, 197, 209 HELP = Y option EXP tool, 321 IMP tool, 321 hidden columns invoker rights, problems with, 1018 hierarchies dimensions and, 616 high water mark tables, syntax, 199 HINT column DBA_OUTLINE_HINTS table, 517 hinted views stored outlines, optimizing, 524 hinting mechanism optimizer plan stability, 506 hosting applications as ASP Fine Grained Access Control, reasons for using, 917 1276 4826l_index.pdf 12 3/2/2005 1:31:22 PM Indexes HTML section searching interMedia Text, 757 HTTP_PKG package enhancing UTL_HTTP package, 1219 SocketType object type, 1220 I I/O slaves database architecture, 97 I/Os logical and physical StatsPack report, interpreting, 485 IFILE directive init.ora file, 62 IMP tool, 317 DDL, extracting, 335 dump file, 319 errors ORA-00959, 364 Fine Grained Access Control, problems with, 951, 954 FROMUSER option, 319 HELP = Y option, 321 importing into different structures, 341 structure with additional column, 341 structure with changed data type, 341 INSTEAD OF trigger, 343 views, 343 structure with missing column, 341 INSTEAD OF trigger, 343 views, 343 name-value pairs, 321 parameters, 323 table of parameters, 324 problems with, 345 cloning schemas, 346 CREATE TABLE statement, 361 disappearance of indexes, 353 National Language Support, 359 using across different Oracle versions, 353 quick example, 318 reasons for using, 319 cloning schemas, 319 copying data between platforms, 320 rebuilding instances, 320 transporting tablespaces, 320 role in backup, 340 TOUSER option, 319 transporting data, 329 limitations, 329 read only data, 333 tablespaces, 330, 332 unsuitable as reorganization tool, 340 unsuitable for main backup, 340 implementing tuning ALTER SESSION command, 510 ALTER SESSION SET USE_STORED_OUTLINE command, 513 ON LOGON database trigger, 512 optimizer plan stability, 509 SQL_TRACE, 510 TKPROF, 510 implicit transactions Oracle database, 143 IN parameter Java stored procedures, 849 INCLUDING option compared to PCTTHRESHOLD parameter, 223 CREATE TABLE statement index organized tables, 220, 222 OVERFLOW option, 223 index clustered tables cluster index, 226 compared to hash clustered tables, 231 CREATE CLUSTER statement, 225 size parameter, 226 CREATE TABLE statement, 226 data dictionary applications, 229 description, 224 duplicate row IDs, 229 reasons not to use, 230 table types, 197, 224 index organized tables, 270 compared to heap organized tables, 212 CREATE TABLE statement, 216 COMPRESS N option, 217 INCLUDING option, 220, 222 NOCOMPRESS option, 217 OVERFLOW option, 220, 222 PCTTHRESHOLD parameter, 217, 222 description, 212 reasons for using, 212 secondary indexes, 224 storage of nested tables, 249 table types, 197, 212 index out of date errors interMedia Text, 767 index partitioning schemes, 637 global index partition, 637, 645 data warehousing, 647 OLTP systems, 651 sliding window implementation, 647 local index partition, 637, 638 local non-prefixed indexes, 638 local prefixed indexes, 638 uniqueness and, 643 sliding window implementation, 638 INDEX RANGE SCAN compared to FAST FULL SCAN, 279 compared to TABLE ACCESS BY INDEX ROWID, 279 Indexes application domain indexes, 271, 297 B*Tree Cluster indexes, 270 B*Tree indexes, 270, 271 reasons for using, 277 bitmap indexes, 270, 285 reasons for using, 286 cluster index, 226 COMPRESS N option, 217 descending indexes, 270, 276 determining index usage, 308 stored outlines, using, 308 tablespaces, 308 frequently asked questions, 299 foreign keys and indexes, 302 views and indexes, 299 function based indexes, 270, 288 example, 289 implementing, 288 problems with, 296 index organized tables, 270 interMedia Text indexes, 271 1277 4826l_index.pdf 13 3/2/2005 1:31:22 PM Indexes (Continued) Indexes (Continued) introduction, 269 myths about indexes, 308 most discriminating elements should go first, 311 space never reused in index, 308 NOCOMPRESS option, 217 physical data layout, importance of, 281 reverse key indexes, 270, 275 secondary indexes, 224 unused indexes, reasons for, 303 indexes, disappearance of EXP tool, problems with, 353 IMP tool, problems with, 353 INDEXFILE option compared to SHOW = Y option, 335 DDL, extracting, 334 INDICATOR parameter, 791 INFILE clause FIX attribute, 392 Informix concurrency control, 102 locking policy, 102 init function, external procedures template, 798 OCIContextGetValue API call, 798 OCIContextSetValue API call, 799 OCIExtProcGetEnv API call, 798 OCIExtractFromFile API call, 800 OCIExtractInit API call, 800 OCIExtractSetKey API call, 800 OCIExtractSetNumKeys API call, 800 OCIExtractTerm API call, 800 OCIExtractTo API call, 800 OCIFileInit API call, 801 OCIMemoryAllocate API call, 799 init.ora file configuration settings, 61 documented parameters, 61 IFILE directive, 62 parameter files, 60 SGA, 77 undocumented parameters, 61 UTL_FILE_DIR parameter, 1200 INITIAL parameter considered obsolete, 208 tables, syntax, 208 INITIALLY IMMEDIATE constraint integrity constraints, 142 INITRANS parameter CREATE TABLE statement heap organized tables, 212 tables, syntax, 209 TX locks, 117 INLINE VIEW compared to temporary tables, 254 INSERT statement blocking, 107 generating Undo, 185 nested tables, 245 SQLLDR, 380 instance compared to database, 54 definition, 54 rebuilding EXP tool, reasons for using, 320 IMP tool, reasons for using, 320 INSTEAD OF trigger importing into structures with changed data type, 343 importing into structures with missing column, 343 object relational views, updating views, 901 INSTR function text search, 741 instrumentation DEBUG package, 476 tuning, 475 int type Java stored procedures, 851 problems with, 856 integrity constraints DEFERRABLE constraint, 142 INITIALLY IMMEDIATE constraint, 142 deferring constraint checking, 141 cascade update, 141 transactional mechanisms, 140 validated after execution, 141 interMedia, 739 interMedia Text, 739 interMedia Text, 739 ABOUT operator, 756 brief history, 739 ConText Option, 740 SQL*TextRetrieval, 739 TextServer3, 740 compared to file system-based solution, 746 CONTEXT index type, 749 creating index, 742 CTXCAT catalog index type, 749 datastore object, 743 DETAIL_DATASTORE datastore object, 744 DIRECT_DATASTORE datastore object, 743 FILE_DATASTORE datastore object, 745 URL_DATASTORE datastore object, 746 description, 749 document filters, 743 external procedure errors, 767 future prospects, 768 index out of date errors, 767 operator object, 750 problems with, 762 CTXCAT catalog index type, 765 data source management, 764 document management, 762 document services, 764 synchronizing index, 763 section searching, 756 auto-sectioning, 761 field section, 758 HTML section searching, 757 section group, 757 XML section searching, 760 zone section, 761 sections object, 749 tables created by, 751 text indexing, 753 stoplists, 755 synchronizing index, 753 using, 740 data source management, 743, 745 document management, 743 text search, 742 theme generation, 747 XML indexing, 749 interMedia Text indexes, 271 application domain indexes, 297 internal locks, 112, 122 see also latches. compared to latches, 122 invoker definition, 981 1278 4826l_index.pdf 14 3/2/2005 1:31:22 PM Large pool examples, 857 invoker rights compared to definer right, 983, 994 description, 1000 directly granted security privileges, 1006 dynamic behavior, 984 errors, 1025 example, 982 Java stored procedures directory listing, obtaining, 858 getting time down to milliseconds, 863 Operating System, running command or program, 860 IN parameter, 849 int type, 851 invoker rights used by default, 1020 when default behavior matters, 1024 invoker rights used by default, 1020 null concept supported, 852 NUMARRAY type passed to ARRAY type, 850 Number type passed to BigDecimal type, 849 Operating System, running command or program, 844 OUT parameter, 849 when default behavior matters, 1024 Oracle database, 981 problems with, 1010 error handling, 1015 hidden columns, 1018 parsing performance time, 1013 scalability, 994 SELECT * statements, 1017 shared pool utilization, 1010 reasons for using, 984 customized access control, 991 data dictionary applications, 988 generic object types, 991 generic utilities, developing, 985 roles and, 1006 security privileges, conveying, 1001 stored procedures and, 982 compiling stored procedure, 1006 setting up dependencies, 1006 verifying accessed objects, 1006 environments for procedures, 1001 table of environments, 1001 PL/SQL pieces, 1000 SQL pieces, 1000 template objects, 1007, 1008 IOTs see index organized tables. Isolation transactional mechanisms, 135 isOpen method FILETYPE object type, 886 passing OUT parameter using arrays, 852 parameter setting, 845, 848 PL/SQL calls for, 849 RAW type passed to byte type, 851 reasons for using, 844 scalar types, 851 state management, 845 STRARRAY type passed to ARRAY type, 850 tracing mechanisms, 845 Varchar2 type passed to String type, 850 JavaMail API loading, 1236 using, 1237 UTL_SMTP package, 1236 JDBC API autocommit by default, 148 job queues see SNPn. join compatibility materialized views, 603 JOIN_POS column DBA_OUTLINE_HINTS table, 517 JPublisher Java stored procedures with complex data types, 849 K J Java data types mapping Java data types to SQL data types, 847 Java input/output stream types using with CLOB type, 853 Java pool MTS, 84 SGA, 76, 83 Java stored procedures, 843 CLOB type, 850 compared to C-based stored procedures, 848, 857 compared to PL/SQL stored procedures, 844 complex data types, 849 JPublisher, 849 Date type passed to Timestamp type, 850 DATEARRAY type passed to ARRAY type, 850 definer rights and, 1021 directory listing, obtaining, 844 e-mail, sending and receiving, 844 error handling, 845, 863 ORA-29459 Java Session State cleared, 864 ORA-29531 no method X in class Y, 864 permissions errors, 864 KEEP pool block buffer cache, 80 Shared pool, 82 key management DBMS_OBFUSCATION_TOOLKIT package, 1140 encryption, 1140 keys in client application, 1141 keys in database, 1141 keys in file system, 1142 L LAG function accessing adjacent rows, 583 analytic functions, 550, 564 syntax, 585 Large pool backup, 83 MTS, 83 parallel execution of statements, 83 RECYCLE pool, 82 SGA, 76, 82 1279 4826l_index.pdf 15 3/2/2005 1:31:22 PM LAST_VALUE function LAST_VALUE function analytic functions, 564 lastOCiError function template for external procedures, 797 latch free event bind variables, 439 latches, 112, 122 see also internal locks. atomic instructions, 122 compared to internal locks, 122 Oracle database, 27 StatsPack report, interpreting, 491 LCKN focused background processes, 95 LEAD function accessing adjacent rows, 583 analytic functions, 550, 564 syntax, 585 leaf nodes B*Tree indexes, 271 LENGTH parameter, 790 LGWR COMMIT statement, 160 focused background processes, 94 synchronous calls to LGWR from COMMIT, 160 library object, creating C-based stored procedures, first example, 786 C-based stored procedures, testing, 781 LOB_IO procedure, 821 LIKE operator text search, 741 linguistic analysis theme generation, 747 listener dedicated server, 58 MTS, 59 verifying LISTENER.ORA file, 779 resolving ORA-28575 error, 779 LISTENER.ORA file ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1), 775 C-based stored procedures, configuring server, 775 configuring, 775 Net8 Assistant, 775 plain text editor, 775 listener, verifying, 779 SID_DESC = (SID_NAME = PLSExtProc), 775 listing executed SQL ON LOGON database trigger, 515 optimizer plan stability, 515 listing used indexes ON LOGON database trigger, 515 optimizer plan stability, 515 LMD focused background processes, 95 LMON focused background processes, 95 LOADFROMFILE function DBMS_LOB package, 409 loadjava function DBMS_JAVA package, 1055 LOB_IO procedure BFILE, 824 BLOB type, 824 C-based stored procedures, 821 CLOB type, 824 data type functions, 821 error codes, 822 installing and running procedure, 829 library object, creating, 821 LOBS, manipulating, 821 lobToFile library, 822 makefiles, 827 building extproc.dll, 827 building extproc.so, 829 Pro*C code, 823 LOBFILEs loading data into LOBS, 414 TERMINATED BY EOF statement, 415 LOBS displaying on Web, 1089 loading data into, 409 DBMS_LOB package, 409 Directory object, 410 LOBFILEs, 414 ORDYS.ORDIMAGE object, 416 PL/SQL, 409 SQLLDR, 412 loading data into object columns, 416 loading inline data, 413 loading out of line data, 414 LONG RAW to LOB conversions, 1081 LONG to LOB conversions, 1081 manipulating C-based stored procedures, 821 DBMS_LOB package, 821, 1073 LOB_IO procedure, 821 NON-POLLING method, 826 lobToFile library LOB_IO procedure, 822 Pro*C code, 823 local index partition, 637, 638 compared to global index partition, 638, 645 local non-prefixed indexes, 638 local prefixed indexes, 638 uniqueness and, 643 local non-prefixed indexes compared to local prefixed indexes, 639 local prefixed indexes compared to local non-prefixed indexes, 639 locally-managed tablespace, 65 lock conversion compared to lock escalation, 111 Oracle database, 112 lock escalation, 111 compared to lock conversion, 111 not supported by Oracle, 111 Lock Manager Daemon see LMD. Lock Monitor Process see LMON. Lock Process see LCKN. lock promotion see lock conversion. LOCK TABLE statement manual locking, 123 locking policy blocking, 107 concurrency control, 102 deadlocks, 108 FOR UPDATE clause, 32 Informix, 102 lost update prevention, 104 manual locking, 123 1280 4826l_index.pdf 16 3/2/2005 1:31:22 PM metadata Locking policy (Continued) non-blocking reads, 31 optimistic locking, 106 Oracle database, 30, 103 pessimistic locking, 105 Sybase, 102 user-defined locks, 123 locks DDL locks, 112, 119 breakable parse locks, 119 exclusive DDL locks, 119 share DDL locks, 119 definition, 102 distributed locks, 112 DML locks, 112, 113 TM locks, 118 TX locks, 113 internal locks, 112, 122 latches, 112, 122 PCM locks, 112 scope in autonomous transactions, 685 shared read locks, 128 log contention causes, 180 redo log files, 180 log file SQLLDR, 372 log switch online redo log files, 67 Log Writer see LGWR. LogMiner packages analyzing redo, 184 creating Data Dictionary, 1099 discovering when error happened, 1110 limitations, 1113 chained rows, 1116 migrated rows, 1116 object types, 1113 necesssary supplied packages, 1097 options, 1107 PGA and, 1111 using, 1102 V$LOGMNR_CONTENTS table, 1119 LONG field loading into field using SQLLDR, 390 LONG to LOB conversions, 1081 LONG RAW field loading into field using SQLLDR, 389 LONG RAW to LOB conversions, 1081 LONGNAME routine DBMS_JAVA package, 1050 lost update prevention locking policy, 104 optimistic locking, 106 Oracle Forms, 104 pessimistic locking, 105 repeatable read isolation level, 129 serializable isolation level, 129 M maintainability Fine Grained Access Control, reasons for using, 915 make command building extproc.so, 819 makefiles building extproc.dll, 817, 827 building extproc.so, 819, 829 C-based stored procedures, 816 porting extproc to UNIX, 818 manual locking LOCK TABLE statement, 123 locking policy, 123 SELECT...FOR UPDATE statement, 123 MAP methods compared to ORDER methods, 875 description, 874 object methods, 873 materialized views, 593 aggregate compatibility, 604 brief history, 594 automated query rewrite facility, 594 Snapshot, 594 summary table management, 594 CBO, 595 constraints, 605 data sufficiency, 603 DBMS_OLAP package, 618 editing views, 618, 622 estimating size of view, 618 evaluating utilization of view, 618 validating dimension objects, 618, 620 description, 601 dimensions creating, 613 hierarchies and, 616 full exact text match, 603 grouping compatibility, 604 join compatibility, 603 metadata, 601 partial text match, 603 problems with, 624 OLTP systems, 624 QUERY_REWRITE_INTEGRITY parameter, 624 query rewrite methods, 603 quick example, 595 pre-calculating object count, 598 REFRESH ON COMMIT, 600 reasons for using, 601 decreased CPU consumption, 601 faster response times, 601 less reads and writes, 601 security privileges, 595 GRANT GRANT GRANT GRANT CREATE MATERIALIZED VIEW privilege, 595 CREATE SESSION privilege, 595 CREATE TABLE privilege, 595 QUERY REWRITE privilege, 595 setting up, 602 COMPATIBLE parameter, 602 QUERY_REWRITE_ENABLED parameter, 602 QUERY_REWRITE_INTEGRITY parameter, 602 MAX function analytic functions, 564 generic pivot queries, 578 pivot queries, 577 MAXEXTENTS parameter rollback segments, 185, 187 tables, syntax, 208 MAXLEN parameter, 788 MAXTRANS parameter tables, syntax, 209 TX locks, 117 metadata constraints as, 607 materialized views, 601 1281 4826l_index.pdf 17 3/2/2005 1:31:22 PM migrated rows migrated rows avoiding PCTFREE parameter, 202 definition, 202 LogMiner packages, limitations, 1116 tables, syntax, 202 MIN function analytic functions, 564 MINEXTENTS parameter tables, syntax, 208 modular code autonomous transactions, 678 most discriminating elements should go first disproving myth, 314 myths about indexes, 311 MTS advantages, 88 compared to dedicated server, 57, 87 database architecture, 57 description, 25 dispatcher process, 57 connecting to, 59 Java pool, 84 Large pool, 83 listener, 59 Net8 listener, 86 Oracle database, using with, 25 avoiding long transactions, 25 server processes, 85, 86 when and how to use, 89 multiple users online redo log files, factors affecting, 68 multiple versions of SQL query StatsPack report, interpreting, 486 multi-tablespace objects CREATE TABLE statement, 361 multi-threaded server see MTS. multi-versioning example, 33 non-blocking queries, 33 Oracle database, 33 read-consistent queries, 33, 125 repeatable read isolation level, 128 mutating tables autonomous transactions, problems with, 693 avoiding with autonomous transactions, 665 compared to DBMS_SQL, 702, 713 bind variables, 714 repeated statements, 725 unknown number of outputs, 718 cursor variables, 711 EXECUTE IMMEDIATE clause, 709 OPEN FOR clause, 711 performance testing, 728 using, 709 example, 709 necesssary supplied packages DBMS_ALERT package, 1031, 1032 DBMS_APPLICATION_INFO package, 1042 DBMS_JAVA package, 1050 DBMS_JOB package, 1059 DBMS_LOB package, 1073 DBMS_LOCK package, 1092 DBMS_OBFUSCATION_TOOLKIT package, 1123 DBMS_OUTPUT package, 1144 DBMS_PIPE package, 1031, 1038 DBMS_PROFILER, 1161 DBMS_UTILITY package, 1172 description, 1028 LogMiner packages, 1097 Oracle database, 1027 reasons for using, 1028 UTL_FILE API, 1199 UTL_HTTP package, 1208 UTL_RAW package, 1229 UTL_SMTP package, 1231 UTL_TCP package, 1244 nested tables compared to relational tables, 244 compared to VARRAYS, 876, 880 CREATE TABLE statement, 241 DELETE statement, 245 description, 240 extending PL/SQL with object relational features, 240 INSERT statement, 245 loading SQLLDR, 418 object relational features, 240 referential integrity not supported by, 242 storage of nested tables, 248 index organized tables, 249 syntax, 240 exotic features of syntax, 242 table types, 198, 240 treating as real table, 247 NESTED_TABLE_GET_REFS hint, 247 N NAME column DBA_OUTLINE_HINTS table, 517 DBA_OUTLINES table, 516 NAME_RESOLVE function DBMS_UTILITY package, 1186 NAME_TOKENIZE function DBMS_UTILITY package, 1188 named pipes OS pipe, exporting to, 327 namespace variables application context, 919 National Language Support EXP tool, problems with, 359 IMP tool, problems with, 359 native dynamic SQL application context, 716 array processing, 728 undocumemted features, 245 UPDATE statement, 244 using as physical storage mechanism, 240 disadvantages, 245, 264 NESTED_TABLE_GET_REFS hint treating nested tables as real tables, 247 nesting autonomous transactions, 680 Net8 Assistant LISTENER.ORA file, configuring, 775 Net8 listener dedicated server, 86 EXTPROC OS process, 773 MTS, 86 PMON, 91 network programming UTL_TCP package, 1244 networking parameter files and, 60 1282 4826l_index.pdf 18 3/2/2005 1:31:23 PM OCICollSize API call NEXT parameter considered obsolete, 208 tables, syntax, 208 NLS see National Language Support. nmake command building extproc.dll, 817 NOARCHIVELOG mode, 69 compared to ARCHIVELOG mode, 69 NOCOMPRESS option compared to COMPRESS N option, 220 CREATE TABLE statement index organized tables, 217 Indexes, 217 NODE column DBA_OUTLINE_HINTS table, 517 NOLOGGING clause care in using, 175 limitations, 175 preventing redo log generation, 173 replaces UNRECOVERABLE clause, 174 tables, syntax, 208 using implicitly, 175 non-autonomous transactions compared to autonomous transactions, 660 non-blocking queries Oracle database, multi-versioning, 33 non-blocking reads Oracle database, locking policy, 31 non-default roles, 999 NON-POLLING method LOBS, manipulating, 826 non-repeatable read transaction isolation levels, 124 n-Tier authentication, 963 ALTER USER command, GRANT CONNECT THROUGH clause, 965, 973 application server, 968 application server session, 970 AUDIT command, 976 C code, 966 care in using, 977 client session, 969 application server session, 970 mechanics, 966 OCI programs, 966 Operating System authentication, 969 password authentication, 969 reasons for using, 964 security model, 966 web-based authentication, 965 NTILE function analytic functions, 564 NULL pool SGA, 76 NULLS analytic functions, problems with, 588 Java stored procedures, 852 NUMARRAY type, Oracle passing to Java ARRAY type Java stored procedures, 850 Number type, Oracle passing to Java BigDecimal type Java stored procedures, 849 Numeric Expression windowing clause, Numeric Expression windowing clause, FOLLOWING 560 PRECEDING 560 O object methods, 872 ALTER TYPE command, 875 difficulties in altering, 873 MAP methods, 873 ORDER methods, 873 reasons for using, 873 binding methods to data, 873 encapsulation, 873 object relational features, 867 adding data types, 869 adding member function to type, 872 CREATE TYPE statement, 869 using new type, 870 collection types, using, 892 array fetch into tables, 892, 895 inserting records, 892, 896 querying from PL/SQL routine, 892 nested tables, 240 extending PL/SQL, 240 object methods, 872 object tables, 260 reasons for using, 868 creating object tables, 868 enforcing standardization, 868 extending PL/SQL, 868, 882 creating new PL/SQL data type, 883 presenting object relational views, 868, 897 VARRAYS, 876 object relational views, 897 advantages of using, 910 data types, 898 relational tables and, 900, 906 synthesizing view, 898 updating views, 901 INSTEAD OF trigger, 901 using view, 899 object tables compared to relational tables, 264 CREATE TABLE statement, 258, 261 creating using object relational features, 868 description, 258 external face of table, 260 object relational features, 260 object types, 258 SYS_NC_OID$ column, 260 analyzing, 262 table types, 198, 258 true structure of table, 260 undocumented features, 262 using as physical storage mechanism disadvantages, 264 object types FILETYPE object type, 884 LogMiner packages, limitations, 1113 object tables, 258 schemas, cloning, 349 SocketType object type, 1245 OCI programs C code, 967 data loading, 368 n-Tier authentication, 966 OCICollAppend API call mapping Oracle data types to C data types, 809 OCICollGetElem API call mapping Oracle data types to C data types, 809 OCICollSize API call mapping Oracle data types to C data types, 809 1283 4826l_index.pdf 19 3/2/2005 1:31:23 PM OCIContextGetValue API call OCIContextGetValue API call init function, external procedures template, OCIContextSetValue API call init function, external procedures template, OCIExtProcGetEnv API call init function, external procedures template, OCIExtractFromFile API call init function, external procedures template, OCIExtractInit API call init function, external procedures template, OCIExtractSetKey API call init function, external procedures template, OCIExtractSetNumKeys API call init function, external procedures template, OCIExtractTerm API call init function, external procedures template, OCIExtractTo API call init function, external procedures template, OCIFileInit API call init function, external procedures template, OCIMemoryAllocate API call init function, external procedures template, OCINumberFromReal API call mapping Oracle data types to C data types, ODBC API autocommit by default, 148 OLTP systems global index partition, 651 materialized views, problems with, 624 ON BEHALF OF ALL clause AUDIT command, 976 ON BEHALF OF clause AUDIT command, 976 ON COMMIT DELETE ROWS clause transaction-based temporary tables, 252 ON COMMIT PRESERVE ROWS clause session-based temporary tables, 252 ON DELETE CASCADE clause referential integrity, 942 ON DELETE SET NULL clause referential integrity, 943 ON LOGON database trigger development tool, 514 Fine Grained Access Control, 918 implementing tuning, 512 listing executed SQL, 515 listing used indexes, 515 setting application context, 927 online redo log files, 67, 158 checkpointing, 67 database buffer cache, 67 DBWn, 68 factors affecting, 68 798 799 798 800 800 800 800 800 CREATE ANY OUTLINE privilege, 508 800 801 799 802 multiple users, 68 recovery time, 69 standby database, 68 log switch, 67 OPEN FOR clause cursor variables, 711 native dynamic SQL, 711 OPEN function FILETYPE object type, 884, 885 Operating System Oracle database as virtual operating system, 20 running command or program Java stored procedures, 844, 860 security privileges, 861 Operating System authentication n-Tier authentication, 969 Operating System Dependent code see OSD code. operator object interMedia Text, 750 OPS database architecture, 54 optimistic locking compared to pessimistic locking, 106 SELECT FOR UPDATE NOWAIT statement, 106 strategies for avoiding lost updates, 106 optimizer plan stability, 505 ALTER SESSION SET USE_STORED_OUTLINE command, 513, 515 CREATE OR REPLACE OUTLINE command, 508 description, 506, 516 errors ORA-18001, ORA-18002, ORA-18003, ORA-18004, ORA-18005, ORA-18006, ORA-18007, 540 541 541 541 542 542 542 hinting mechanism, 506 OUTLINE_HINTS table, 517 ALL_OUTLINE_HINTS table, 517 DBA_OUTLINE_HINTS table, 517 USER_OUTLINE_HINTS table, 517 OUTLINES table, 516 ALL_OUTLINES table, 516 DBA_OUTLINES table, 516 USER_OUTLINES table, 516 OUTLN user, 521 performance testing, 536 problems with, 531 ALTER SESSION command, 533 case sensitivity, 531 cursor_sharing=force parameter, 533 DROP USER command, 533 global namespace of outlines, 539 OR-Expansion, 535 OUTLN user in SYSTEM tablespace by default, 535 quoted identifiers, 533 text matching, 534 quick example, 506 reasons for using, 506 stored outlines creating, 518 managing, 525 moving between databases, 522 optimizing, 522 using, 509 development tool, 514 implementing tuning, 509 listing executed SQL, 515 listing used indexes, 515 optimizer related issues cursor_sharing=force parameter, 443 ORA-00060 autonomous transactions, errors, 696 ORA-00959 IMP tool, errors, 364 ORA-01555, 185 block cleanout, 185, 191 example, 192 necessary conditions for error, 192 rarity of error from, 194 1284 4826l_index.pdf 20 3/2/2005 1:31:23 PM Oracle database ORA-01555 (Continued) causes, 185 COMMIT statement, 185, 190 example, 190 error cannot always be avoided, 146 read consistency model, 186 read only isolation level, 132 rollback segment size, 185, 186 example, 188 serializable isolation level, 130 solutions to error, 186 analyzing related objects, 186, 195 avoiding unnecessary COMMITs, 195 increasing rollback segments, 186, 195 tuning query, 186, 195 ORA-01562 error avoidable by right sizing, 146 ORA-06519 autonomous transactions, errors, 695 ORA-06520 C-based stored procedures, errors, 837 ORA-06521 C-based stored procedures, errors, 837 ORA-06523 C-based stored procedures, errors, 838 ORA-06525 C-based stored procedures, errors, 839 ORA-06526 C-based stored procedures, errors, 839 ORA-06527 C-based stored procedures, errors, 840 ORA-14450 autonomous transactions, errors, 695 ORA-18001 optimizer plan stability, errors, 540 ORA-18002 optimizer plan stability, errors, 541 ORA-18003 optimizer plan stability, errors, 541 ORA-18004 optimizer plan stability, errors, 541 ORA-18005 optimizer plan stability, errors, 542 ORA-18006 optimizer plan stability, errors, 542 ORA-18007 optimizer plan stability, errors, 542 ORA-28106 Fine Grained Access Control, errors, 959 ORA-28110 Fine Grained Access Control, errors, 955 ORA-28112 Fine Grained Access Control, errors, 957 ORA-28113 Fine Grained Access Control, errors, 958 ORA-28575 C-based stored procedures configuring error, 776 errors, 833 resolving error, 777 database environment, verifying, 777 EXTPROC OS process, verifying, 777 listener, verifying, 779 ORA-28576 C-based stored procedures, errors, 834 ORA-28577 C-based stored procedures, errors, 834 ORA-28578 C-based stored procedures, errors, 835 ORA-28579 C-based stored procedures, errors, 835 ORA-28580 C-based stored procedures, errors, 836 ORA-28582 C-based stored procedures, errors, 836 ORA-29459 Java Session State cleared Java stored procedures, 864 ORA-29531 no method X in class Y Java stored procedures, error handling, 864 Oracle applications, 19 bind variables, 27 database independence, 37 developing, 19 project failures, investigating, 24 project failures, reasons for, 21 security logic in database, 995 solving problems simply, 44 tuning, 23, 47, 431 Oracle Call Interface see OCI programs. Oracle data types BFILE, 821 BLOB type, 821 CLOB type, 821 mapping Oracle data types to C data types, 787, 802 Oracle database Advanced Queues, 26, 44 ANSI compliant databases, 38 ARCHIVELOG mode, 69 autonomous transactions, 44, 661 writing to database from SQL functions, 670 background processes, 55 C compiler, 15 compared to SQL Server, 39 concurrency control, 30, 103 data loading, 367 database architecture, 25, 53 DDL always commits, 119 deadlocks causes of, 108 rarity of, 108 developing, 21 distributed transactions, 148 does not support dirty read, 125 does not support lock escalation, 111 EXP tool, 317 explain plan facility, 462 Fear Uncertainty and Doubt about, 21 features and functions, 43 advanced features importance of, 44 Fine Grained Access Control, 47, 913 IMP tool, 317 implicit transactions, 143 importance of familiarity with, 21 Indexes, 270 interMedia, 739 invoker rights, 981 latches, 27 lock conversion, 112 locking policy, 30, 103 FOR UPDATE clause, 32 non-blocking reads, 31 MTS, using with, 25 avoiding long transactions, 25 1285 4826l_index.pdf 21 3/2/2005 1:31:23 PM Oracle database (Continued) Oracle database (Continued) multi-versioning, 33 example, 33 non-blocking queries, 33 read-consistent queries, 33, 125 repeatable read isolation level, 128 necesssary supplied packages, 1027-1256 NOARCHIVELOG mode, 69 object relational features, 867 optimizer plan stability, 505 Oracle applications, 19 OSD code, 42 partitioning, 627 redo log files, 157 scalability, 25 segments, 62 serializable transactions, 130 SQL92 standard, 40 statement level atomicity, 137 tables, 197 tablespaces, 63 transactional mechanisms, 35, 135 Atomic transactions, 136 serializable transactions, 23 treating as black box, disadvantages of, 21 virtual operating system, Oracle as, 20 Oracle Forms deadlocks and, 109 strategies for avoiding lost updates, 104 Oracle Parallel Server see OPS. ORDER BY clause analytic functions, syntax, 551 ORDER methods compared to MAP methods, 875 description, 874 object methods, 873 ORDYS.ORDIMAGE object loading data into LOBS, 416 SETPROPERTIES method, 418 structure, 416 OR-Expansion optimizer plan stability, problems with, 535 OS pipe, exporting to EXP tool, large exports, 327 named pipes, 327 requires UNIX system, 327 OSD code, 42 OUT parameter Java stored procedures, 849 passing OUT parameter using arrays, 852 OUTLINE_HINTS table ALL_OUTLINE_HINTS table, 517 DBA_OUTLINE_HINTS table, 517 optimizer plan stability, 517 USER_OUTLINE_HINTS table, 517 OUTLINES table ALL_OUTLINES table, 516 DBA_OUTLINES table, 516 optimizer plan stability, 516 USER_OUTLINES table, 516 OUTLN user in SYSTEM tablespace by default, 521 optimizer plan stability, problems with, 535 moving from SYSTEM to TOOLS, 521 optimizer plan stability, 521 OUTLN_PKG package DROP_BY_CAT procedure, 529 DROP_UNUSED procedure, 529 functions undocumented, 528 stored outlines, managing, 528 UPDATE_BY_CAT procedure, 529 over binding cursor_sharing=force parameter, 446 OVERFLOW option CREATE TABLE statement index organized tables, 220, 222 INCLUDING option, 223 PCTTHRESHOLD parameter, 222 OWNER column DBA_OUTLINE_HINTS table, 517 DBA_OUTLINES table, 516 P packaged variables scope in autonomous transactions, 681 Parallel Cache Management see PCM. parallel DML, 630 enhancing DML performancr, 630 limitations, 630 requires partitioning, 630 parallel execution of statements Large pool, 83 parallel operations enhancing query performance, 631 limitations, 631 parallel query slaves database architecture, 97 parameter files database architecture, file types, 60 init.ora file, 60 configuration settings, 61 documented parameters, 61 IFILE directive, 62 undocumented parameters, 61 networking and, 60 SID, 60 parameter setting Java stored procedures, 845, 848 list of non-default parameters StatsPack report, interpreting, 494 template for external procedures, 784 parameters, ADD_POLICY routine, 921 parameters, SQLLDR, 369 table of parameters, 369 PARSE errors fields, meaning of, 474 trace files, using and interpreting, 472 PARSE phase TKPROF, analyzing query, 458 parse-related statistics ratio of soft versus hard parses, 481 StatsPack report, interpreting, 480 parsing hard parsing, 27 performance time invoker rights, problems with, 1013 measuring with TKPROF, 1013 ratio of soft versus hard parses, 481 soft parsing, 27 avoiding soft parse, 441 1286 4826l_index.pdf 22 3/2/2005 1:31:23 PM PL/SQL stored procedures partial text match materialized views, 603 partition clause analytic functions, syntax, 551 partition elimination enhancing query performance, 631 limitations, 631 partitioning, 627 enhancing DML performance, 630 enhancing query performance, 631 parallel operations, 631 partition elimination, 631 increasing availability, 628 parallel DML, 630 index partitioning schemes, 637 global index partition, 637, 645 data warehousing, 647 OLTP systems, 651 local index partition, 637, 638 local non-prefixed indexes, 638 local prefixed indexes, 638 uniqueness and, 643 sliding window implementation, 638 reasons for using, 627 reducing administration burden, 629 table partitioning schemes, 632 composite partitioning, 633, 636 hash partitioning, 633, 635 range partitioning, 632, 633 password authentication n-Tier authentication, 969 password files database architecture, file types, 60 password protected roles, 999 PCM locks, 112 PCTFREE parameter CREATE TABLE statement heap organized tables, 212 row migration, avoiding, 202 setting value of parameter, 204 DBMS_SPACE package, 205 tables, syntax, 202 PCTINCREASE parameter considered obsolete, 208 tables, syntax, 208 PCTTHRESHOLD parameter compared to INCLUDING option, 223 CREATE TABLE statement index organized tables, 217, 222 OVERFLOW option, 222 PCTUSED parameter CREATE TABLE statement heap organized tables, 212 setting value of parameter, 204 DBMS_SPACE package, 205 tables, syntax, 202 PDML see parallel DML. PERCENT_RANK function analytic functions, 564 performance metrics, identifying, 434 PERFSTAT user StatsPack, setting up, 478 permissions errors Java stored procedures, 864 pessimistic locking compared to optimistic locking, 106 strategies for avoiding lost updates, 105 PGA database architecture, 70 LogMiner packages and, 1111 testing usage, 71 phantom read transaction isolation levels, 124 physical data layout importance of, 281 pinging, avoiding reverse key indexes, 275 pivot queries analytic functions, 576 generic pivot queries, 578 COUNT function, 578 cursor variables, 582 dynamic SQL, 579 MAX function, 578 ROW_NUMBER function, 578 MAX function, 577 ROW_NUMBER function, 577 PL/SQL analytic functions, problems with, 586 blocks DBMS_SQL, using with, 707 statement level atomicity, 138 collection types, using, 892 compared to SQLJ, 844 dynamic SQL, 699 bind variables, 714 DBMS_SQL, 702 required if output number unknown, 718 repeated statements, 725 unknown number of outputs, 718 extending with object relational features, 868, 882 creating new PL/SQL data type, 883 nested tables, 240 loading data into LOBS, 409 required for autonomous transactions, 689 running programs using UTL_HTTP package, 1217 unloader PL/SQL utility, 399 writing mini-SQLLDR, 422 PL/SQL data type creating new PL/SQL data type, 883 encapsulating UTL_FILE functionality, 883 PL/SQL package encapsulating UTL_FILE in new PL/SQL data type, 884 supporting FILETYPE object type, 885 PL/SQL pieces invoker rights and stored procedures, 1000 PL/SQL prototype C-based stored procedures, first example, 784 creating library object, 786 creating package body, 786 data type functions, 784 creating collection types, 784 passing parameters, 784 returning SCALAR types, 785 INDICATOR parameter, 791 LENGTH parameter, 790 mapping Oracle data types to C data types, 787 MAXLEN parameter, 788 RETURN keyword, 790 PL/SQL stored procedures see also stored procedures compared to Java stored procedures, 844 1287 4826l_index.pdf 23 3/2/2005 1:31:24 PM plain text editor plain text editor LISTENER.ORA file, configuring, 775 PMON focused background processes, 91 Net8 listener, 91 PORT_STRING function DBMS_UTILITY package, 1193 portability macro mapping Oracle data types to C data types, 802 POSITION keyword loading fixed format data, 377 PRAGMA AUTONOMOUS_TRANSACTION directive autonomous transactions, 660 pre-calculating object count materialized views, 598 pre-compiler based database programming static SQL, 700 Pro*C code LOB_IO procedure, 823 lobToFile library, 823 NON-POLLING method, 826 Process Global Area see PGA. Process Monitor see PMON. proxy authentication see n-Tier authentication. Q QMNn Advanced Queues, 96 utility background processes, 96 queries hard parsing, 27 multiple versions of SQL query, 486 non-blocking queries, 33 pivot queries, 576 generic pivot queries, 578 read-consistent queries, 33 soft parsing, 27 TOP-N queries, 566 query output issues cursor_sharing=force parameter, 447 query performance enhancing using partitioning, 631 parallel operations, 631 partition elimination, 631 query plan TKPROF, analyzing query, 460 query rewrite methods materialized views, 603 QUERY REWRITE privilege function based indexes, 288 QUERY_REWRITE_ENABLED parameter materialized views, setting up, 602 QUERY_REWRITE_INTEGRITY parameter ENFORCED value, 602 materialized views problems with, 624 setting up, 602 STALE_TOLERATED value, 602 TRUSTED value, 602 QUERY= parameter EXP tool, subsetting data, 328 Queue Monitor Processes see QMNn. quoted identifiers optimizer plan stability, problems with, 533 R raise_application_error function template for external procedures, 797 range partitioning, 632, 633 range windows analytic functions, syntax, 555 RANK function analytic functions, 564 ranking functions analytic functions, 550 RATIO_TO_REPORT function analytic functions, 565 RAW devices compared to cooked file systems, 181 redo log files, 181 RAW type, Oracle passing to Java byte type Java stored procedures, 851 storing VARRAYS as, 880 read committed isolation level behavior varies between databases, 127 concurrency control, 124, 126 read consistency model ORA-01555, 186 read consistent queries example, 34 Oracle database, 125 multi-versioning, 33 READ method DBMS_LOB package, 412 read only data transporting data EXP tool, 333 IMP tool, 333 read only isolation level compared to serializable isolation level, 132 concurrency control, 125, 132 ORA-01555, 132 read uncommitted isolation level concurrency control, 124, 125 really strict auditing autonomous transactions, 671 RECO focused background processes, 93 RECOMMEND_MV routine DBMS_OLAP package, 622 RECOMMEND_MV_W routine DBMS_OLAP package, 622 recovery and backup see backup. recovery time online redo log files, factors affecting, 69 recursive SQL dictionary-managed tablespace, 64 RECYCLE pool block buffer cache, 80 Large pool, 82 Redo analyzing redo, 184 LogMiner packages, 184 BEFORE trigger, increase Redo, 169 block cleanout, 177 COMMIT statement, increases Redo, 168 1288 4826l_index.pdf 24 3/2/2005 1:31:24 PM Run-time errors Redo (Continued) estimating amount of Redo, 173 introduction, 157 measuring amount of Redo, 164 redo size statistic, 164 table of results, 167 V$MYSTAT view, 164 V$STATNAME view, 164 preventing redo log generation UNRECOVERABLE clause, 174 system crashes and, 151 temporary tables, 182 measuring redo/rollback, 182 transactional mechanisms, 150 redo log buffer rollback segments, 151 Undo, 151 SGA, 77 system crashes and, 153 redo log files analyzing redo, 184 LogMiner packages, 184 archived redo log files, 69, 158 cannot allocate new log message, dealing with, 176 adding redo log files, 177 increasing size of redo log files, 177 more frequent checkpointing, 177 tuning DBWR, 176 database architecture, file types, 60, 66 importance of, 66 log contention, 180 causes, 180 online redo log files, 67, 158 Oracle database, 157 preventing redo log generation, 173 NOLOGGING clause, 173 RAW devices, 181 redo size statistic measuring amount of Redo, 164 REF CURSOR see cursor variables. referential integrity covert channel, 941 Fine Grained Access Control, problems with, 941 not supported by nested tables, 242 ON DELETE CASCADE clause, 942 ON DELETE SET NULL clause, 943 schemas, cloning, 347 REFRESH ON COMMIT materialized views, 600 REGR_ functions analytic functions, 565 relational tables advantages of using, 906 compared to nested tables, 244 compared to object tables, 264 CURSOR function and, 908 object relational views and, 900, 906 remote execution dedicated server, 86 reorganization EXP/IMP tools, unsuitable for, 340 repeatable read isolation level concurrency control, 124, 128 consistent answers, obtaining, 128 lost update prevention, 129 Oracle database, multi-versioning, 128 shared read locks, 128 repeated statements dynamic PL/SQL, 725 performance testing, 725 reporting functions analytic functions, 550 report-style data loading using SQLLDR, 387 stored procedures, 388 RETURN keyword, 790 reverse key indexes, 270, 275 pinging, avoiding, 275 related to B*Tree indexes, 275 REVOKE CONNECT THROUGH clause ALTER USER command, 975 roles invoker rights and, 1006 non-default roles, 999 not enabled for definer rights, 996, 999 password protected roles, 999 rollback see also Undo. autonomous transactions, problems with, 690 compared to COMMIT statement, 163 description, 163 introduction, 184 ORA-01555, 185 temporary tables, 182 measuring redo/rollback, 182 ROLLBACK TO <SAVEPOINT> statement transaction control statements, 136 rollback segments importance of adequate sizing, 146 issues with rollback segments, 184 MAXEXTENTS parameter, 185, 187 problems with, 144 redo log buffer, 151 SET TRANSACTION statement, 185 size of ORA-01555, 185, 186 SQLLDR, problems with, 426 transactional mechanisms, 144 Undo, 151 ROLLBACK statement transaction control statements, 136 row IDs duplicate row IDs, 229 Row Level Security see Fine Grained Access Control. row migration see migrated rows. row windows analytic functions, syntax, 558 ROW_NUMBER function analytic functions, 565 generic pivot queries, 578 obtaining slices of data, 570 pivot queries, 577 TOP-N queries, 570 rows inserting with SQLLDR, 385 updating with SQLLDR, 385 RUN function unloader PL/SQL utility, 403 Run-time errors fields, meaning of, 474 trace files, using and interpreting, 472 1289 4826l_index.pdf 25 3/2/2005 1:31:24 PM SAVEPOINT statement S SAVEPOINT statement cannot issue SAVEPOINT over database link, 150 transaction control statements, 136 savepoints autonomous transactions, 687 scalability bind variables, 27, 436 testing with multiple users, 436 definer rights, reasons for using, 994 invoker rights, problems with, 994 Oracle database, 25 scalar types Java stored procedures, 851 schemas, cloning EXP tool problems with, 346 reasons for using, 319 IMP tool problems with, 346 reasons for using, 319 object types, 349 referential integrity, 347 SCN, generating COMMIT statement, 160 scope autonomous transactions, 681 database changes, 682 locks, 685 packaged variables, 681 session state, 682 SCOTT/TIGER account, setting up, 11 C-based stored procedures, testing, 780 CREATE LIBRARY privilege, 781 scripts DDL, extracting, 337 getallcode.sql script, 337 getallviews.sql script, 338 getaview.sql script, 338 getcode.sql script, 337 gettrig.sql script, 339 secondary indexes index organized tables, 224 section group interMedia Text, 757 section searching auto-sectioning, 761 field section, 758 HTML section searching, 757 interMedia Text, 756 section group, 757 XML section searching, 760 zone section, 761 sections object interMedia Text, 749 secure information auditing attempts to modify secure information AUDIT command, 662 autonomous transactions, 662 Secure Sockets Layer see SSL. security logic in database definer rights, reasons for using, 995 Fine Grained Access Control, reasons for using, 915 Oracle applications, 995 security model n-Tier authentication, 966 security policy application context, 930 Fine Grained Access Control, 918 generic utilities, developing, 985 implementing policy with FGAC, 919 security privileges ALTER ANY OUTLINE privilege, 519 ALTER USER command, GRANT CONNECT THROUGH clause, 975 CREATE ANY CONTEXT privilege, 918 CREATE ANY OUTLINE privilege, 508, 519 CREATE LIBRARY privilege, 781 directly granted security privileges definer rights, 996 invoker rights, 1006 directory listing, obtaining, 859 DROP ANY OUTLINE privilege, 519 EXECUTE ON DBMS_RLS privilege, 924 EXECUTE ON OUTLN_PKG privilege, 519 EXECUTE_CATALOG_ROLE privilege, 918 GLOBAL QUERY REWRITE privilege, 288 GRANT CREATE MATERIALIZED VIEW privilege, 595 GRANT CREATE SESSION privilege, 595 GRANT CREATE TABLE privilege, 595 GRANT QUERY REWRITE privilege, 595 invoker rights, conveying privileges for, 1001 materialized views, 595 Operating System, running command or program, 861 QUERY REWRITE privilege, 288 stored outlines, creating, 519 segments, 62 extents, 62 blocks, 62 tablespaces, 63 SELECT * statements invoker rights, problems with, 1017 SELECT FOR UPDATE NOWAIT statement optimistic locking, 106 SELECT FOR UPDATE statement blocking, 107 DBMS_LOB package, 1075 SELECT statements writing to database from SELECT statements autonomous transactions, 675 care in using, 676 SELECT...FOR UPDATE statement manual locking, 123 serializable isolation level compared to read only isolation level, 132 concurrency control, 124, 130 lost update prevention, 129 ORA-01555, 130 serializable transactions, 130 serializable transactions Oracle database, 23, 130 serializable isolation level, 130 server processes database architecture, 85 dedicated server, 85 MTS, 85, 86 session state scope in autonomous transactions, 682 session-based temporary tables, 251 ON COMMIT PRESERVE ROWS clause, 252 1290 4826l_index.pdf 26 3/2/2005 1:31:24 PM SQL_TEXT column SET EVENTS approach, SQL_TRACE not supported or documented by Oracle, 453 SET TRANSACTION statement rollback segments, 185 transaction control statements, 136 SET_CLIENT_INFO call DBMS_APPLICATION_INFO package, 1043 SET_OUTPUT procedure DBMS_JAVA package, 1055 SETPROPERTIES method ORDYS.ORDIMAGE object, 418 SGA block buffer cache, 78 KEEP pool, 80 RECYCLE pool, 80 database architecture, 55, 70, 74 fixed SGA, 77 init.ora file, 77 Java pool, 76, 83 Large pool, 76, 82 RECYCLE pool, 82 NULL pool, 76 redo log buffer, 77 Shared pool, 76, 80 bind variables, 81 DBMS_SHARED_POOL package, 81 KEEP pool, 82 problems with, 81 UNIX-based systems, 75 Windows-based systems, 75 share DDL locks, 119 shared accounts, avoiding Fine Grained Access Control, reasons for using, 916 Shared pool bind variables, 81 DBMS_SHARED_POOL package, 81 KEEP pool, 82 problems with, 81 SGA, 76, 80 shared pool utilization invoker rights, problems with, 1010 StatsPack report, interpreting, 482, 493 shared read locks problems with, 129 repeatable read isolation level, 128 SHORTNAME routine DBMS_JAVA package, 1050 SHOW = Y option compared to INDEXFILE option, 335 DDL, extracting, 334 SID parameter files, 60 SID_DESC = (SID_NAME = PLSExtProc) LISTENER.ORA file, 775 Simple Mail Transfer Protocol see SMTP. single account environment, supporting Fine Grained Access Control, reasons for using, 917 single table hash cluster, 238 CREATE CLUSTER statement SINGLE TABLE keywords, 238 SINGLE TABLE keywords CREATE CLUSTER statement single table hash cluster, 238 size parameter CREATE CLUSTER statement hash clustered tables, 232 index clustered tables, 226 slave processes database architecture, 85, 97 I/O slaves, 97 parallel query slaves, 97 sliding window implementation global index partition, 647 should be avoided, 651 index partitioning schemes, 638 SMON clean up functions, 92 coalescing free space, 92 focused background processes, 92 recovery functions, 92 rollback functions, 92 SMTP UTL_SMTP package, 1231 Snapshot materialized views, brief history, 594 Snapshot Processes see SNPn. SNPn utility background processes, 96 SocketType object type HTTP_PKG package, 1220 UTL_TCP package, 1245 soft parsing queries, 27 space never reused in index disproving myth, 311 myths about indexes, 308 SQL analytic functions, 545 case statement, 382 listing executed SQL, 515 recursive SQL, 64 static SQL, 699 writing to database from SQL functions autonomous transactions, 670 SQL data types mapping Java data types to SQL data types, 847 mapping Oracle data types to C data types, 787, 802 table mapping SQL types to external types, 792 SQL pieces invoker rights and stored procedures, 1000 SQL Server ANSI compliant databases, 38 compared to Oracle database, 39 SQL*LOADER tool see SQLLDR. SQL*PLUS AUTOTRACE controlling report, 15 execution plan, 15 generating report, 14 setting up, 14 dedicated server, 86 environment, setting up, 12 SQL*TextRetrieval interMedia Text, brief history, 739 SQL_TEXT column DBA_OUTLINES table, 517 Site Identifier see SID. 1291 4826l_index.pdf 27 3/2/2005 1:31:24 PM SQL_TRACE SQL_TRACE analytic functions, performance testing, 571 guidelines for using, 454 hash clustered tables, performance testing, 234 implementing tuning, 510 selectively enabling, 452 enabling in current session, 453 packaged procedure, using, 453 SET EVENTS approach, 453 setting up, 452 tuning with, 451 SQL92 standard entry-level, 40 full implementation, 40 intermediate-level, 40 portability and, 41 transaction isolation levels, 124 transitional-level, 40 SQLJ compared to PL/SQL, 844 directory listing, obtaining, 859 SQLLDR BAD file, using with, 383, 385, 424 calling from stored procedure, 421 problems with, 421 writing mini-SQLLDR, 422 control file, 371 command line overrides control file, 426 simple example, 371 conventional path, 368 data loading, 367 loading data into LOBS, 412 loading data into object columns, 416 loading inline data, 413 loading out of line data, 414 loading data with embedded newlines, 391 loading delimited data, 374 loading fixed format data, 377 loading into LONG field, 390 loading into LONG RAW field, 389 loading nested tables, 418 loading report-style data, 387 loading tab-delimited data, 375 loading VARRAYS, 418 using functions, 380 using sequences, 380 direct path, 368 INSERT statement, 380 introduction, 368 load dates, 379 DATE data type, 379 date mask, 379 log file, 372 parameters, 369 table of parameters, 369 problems with, 426 command line overrides control file, 426 default length of input fields, 426 rollback segments, 426 TRUNCATE option, 426 rows inserting new rows, 385 updating rows, 385 unloading data in SQLLDR friendly format, 399 unloader PL/SQL utility, 399 SSL UTL_HTTP package, 1210 STAGE column DBA_OUTLINE_HINTS table, 517 STALE_TOLERATED value QUERY_REWRITE_INTEGRITY parameter, 602 standardization enforcing with object relational features, 868 standby database online redo log files, factors affecting, 68 STAT record fields, meaning of, 472 trace files, using and interpreting, 472 state management Java stored procedures, 845 template for external procedures, 783 statement level atomicity, 136 Oracle database, 137 PL/SQL blocks, 138 triggers, 138 static SQL bind variables, 440 compared to dynamic SQL, 700 pre-compiler based database programming, 700 statistical functions analytic functions, 551 StatsPack replaces BSTAT/ESTAT, 477 report, interpreting, 479 detailed numerical information, 488 dictionary cache, 492 I/Os logical and physical, 485 latches, 491 list of non-default parameters, 494 multiple versions of SQL query, 486 parse-related statistics, 480 ratio of soft versus hard parses, 481 shared pool utilization, 482, 493 Wait events, 482 setting up, 477 PERFSTAT user, 478 tuning with, 477 STDDEV function analytic functions, 565 STDDEV_POP function analytic functions, 565 STDDEV_SAMP function analytic functions, 565 stoplists text indexing, 755 stored outlines, creating ALTER ANY OUTLINE privilege, 519 ALTER SESSION command, 520 ALTER SESSION SET CREATE_STORED_OUTLINE command, 520 CREATE ANY OUTLINE privilege, 519 DROP ANY OUTLINE privilege, 519 EXECUTE ON OUTLN_PKG privilege, 519 optimizer plan stability, 518 security privileges, 519 using DDL, 519 stored outlines, managing optimizer plan stability, 525 OUTLN_PKG package, 528 using DDL, 525 stored outlines, moving between databases optimizer plan stability, 522 stored outlines, optimizing hinted views, 524 optimizer plan stability, 522 stored outlines, using determining index usage, 308 1292 4826l_index.pdf 28 3/2/2005 1:31:24 PM template for external procedures stored procedures breakable parse locks and, 121 calling SQLLDR from, 421 problems with, 421 writing mini-SQLLDR, 422 C-based stored procedures, 771 customized access control, 991 data dictionary applications, 989 definer rights and, 982 compiling stored procedure, 998 setting up dependencies, 998 verifying accessed objects, 998 generic utilities, developing, 985 invoker rights and, 982 compiling stored procedure, 1006 setting up dependencies, 1006 verifying accessed objects, 1006 environments for procedures, 1001 table of environments, 1001 PL/SQL pieces, 1000 SQL pieces, 1000 Java stored procedures, 843 loading report-style data, 388 STR attribute hexadecimal specification, 398 loading data with embedded newlines, 398 STRARRAY type, Oracle passing to Java ARRAY type Java stored procedures, 850 String type, Java ease of manipulation, 853 passed from Oracle Varchar2 type Java stored procedures, 850 strtok function C code, 967 substr function CREATE INDEX statement, 293 DBMS_LOB package, 1074 function based indexes, 288 hiding substr call, 295 SUM function analytic functions, 565 summary table management materialized views, brief history, 594 supplied packages see necesssary supplied packages. Sybase ANSI compliant databases, 38 concurrency control, 102 locking policy, 102 synchronizing index interMedia Text, 753 problems with, 763 SYS_CONTEXT function application context, 716 changing value during application, 950 Fine Grained Access Control, 918 SYS_NC_OID$ column analyzing, 262 object tables, 260 System Change Number see SCN. system crashes Redo and, 151 redo log buffer and, 153 Undo and, 151 SYSTEM data data files, 62 System Global Area see SGA. System Monitor see SMON. T tab-delimited data, 375 loading with SQLLDR, 375 TERMINATED BY clause, 375 TABLE ACCESS BY INDEX ROWID compared to FULL TABLE SCAN, 279 compared to INDEX RANGE SCAN, 279 table partitioning schemes, 632 composite partitioning, 633, 636 hash partitioning, 633, 635 range partitioning, 632, 633 TABLE_TO_COMMA function DBMS_UTILITY package, 1191 tables, 197 general information about tables, 198 introduction, 197 syntax, 199 FREELIST, 200 high water mark, 199 INITIAL parameter, 208 INITRANS parameter, 209 MAXEXTENTS parameter, 208 MAXTRANS parameter, 209 migrated rows, 202 MINEXTENTS parameter, 208 NEXT parameter, 208 NOLOGGING clause, 208 PCTFREE parameter, 202 PCTINCREASE parameter, 208 PCTUSED parameter, 202 table types, 197 hash clustered tables, 198, 231 heap organized tables, 197, 209 index clustered tables, 197, 224 index organized tables, 197, 212 nested tables, 198, 240 object tables, 198, 258 temporary tables, 198, 251 tablespaces, 63 data files, 64 determining index usage, 308 dictionary-managed tablespace, 64 EXP tool, transporting data, 330, 331 IMP tool, transporting data, 330, 332 locally-managed tablespace, 65 multi-tablespace objects, 361 segments, 63 transporting EXP tool, reasons for using, 320 IMP tool, reasons for using, 320 tape device, exporting to EXP tool, large exports, 328 requires UNIX system, 328 temp files cannot be restored, 65 database architecture, file types, 60, 65 template for external procedures C code, 794 C-based stored procedures, 783 debugf function, 795 debugf macro, 796 error handling, 784 global context, 794 init function, 798 lastOCiError function, 797 1293 4826l_index.pdf 29 3/2/2005 1:31:24 PM template for external procedures (Continued) template for external procedures (Continued) parameter setting, 784 raise_application_error function, 797 state management, 783 term function, 801 tracing mechanisms, 783 template objects invoker rights, 1007, 1008 temporary tables autonomous transactions, problems with, 691 CBO and, 255 compared to INLINE VIEW, 254 DBMS_STATS package and, 254 description, 251 differences from permanent tables, 253 disadvantages, 253 measuring redo/rollback, 182 reasons for using, 254 Redo, 182 rollback, 182 session-based temporary tables, 251 table types, 198, 251 transaction-based temporary tables, 251 term function template for external procedures, 801 TERMINATED BY clause loading tab-delimited data, 375 TERMINATED BY WHITESPACE, 375 TERMINATED BY X’09’, 376 TERMINATED BY EOF statement LOBFILEs, 415 text indexing interMedia Text, 753 stoplists, 755 synchronizing index, 753 ALTER INDEX statement, 754 CREATE INDEX statement, 754 ctxsrv program, 753 text matching full exact text match, 603 optimizer plan stability, problems with, 534 partial text match, 603 text search INSTR function, 741 interMedia Text, using, 742 LIKE operator, 741 TextServer3 interMedia Text, brief history, 740 theme generation interMedia Text, using, 747 linguistic analysis, 747 time, getting time down to milliseconds Java stored procedures, 863 TIMED_STATISTICS analytic functions, performance testing, 571 tuning with, 451 Timestamp class manipulating Oracle date types, 852 TIMESTAMP column DBA_OUTLINES table, 517 Timestamp type, Java passed from Oracle Date type Java stored procedures, 850 TKPROF analytic functions, performance testing, 571 analyzing query, 455 EXECUTE phase, 458 explain plan facility, 462 FETCH phase, 458 PARSE phase, 458 query plan, 460 command line options, 462 hash clustered tables, performance testing, 234 implementing tuning, 510 interpreting output, 458 column headings, meanings of, 458 important points, 459 parsing performance time, measuring, 1013 trace files, using and interpreting, 464 tuning with, 451 using, 454 TM locks configuring number of allowed locks, 119 DML locks, 118 TNSLISTENER see Net8 listener. TNSNAMES.ORA file ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1), 776 C-based stored procedures, configuring server, 775, 776 CONNECT_DATA = (SID = PLSExtProc), 776 database environment, verifying, 778 EXTPROC_CONNECTION_DATA, 776 TOP-N queries ambiguity, 566 analytic functions, 566 COUNT function, 568 DENSE_RANK function, 567 ROW_NUMBER function, 570 TOUSER option IMP tool, 319 trace files deadlocks, trace files for, 108 using and interpreting, 464 APPNAME record, 465 BIND record, 469 client application statements, 471 cursor record, 466 EXEC record, 466 PARSE errors, 472 Run-time errors, 472 STAT record, 472 TKPROF, 464 wait record, 467 XCTEND record, 472 tracing mechanisms Java stored procedures, 845 template for external procedures, 783 transaction control statements, 136 COMMIT statement, 136 ROLLBACK TO <SAVEPOINT> statement, 136 ROLLBACK statement, 136 SAVEPOINT statement, 136 SET TRANSACTION statement, 136 transaction isolation levels concurrency control, 124 dirty read, 124 non-repeatable read, 124 phantom read, 124 read committed isolation level, 124, 126 1294 4826l_index.pdf 30 3/2/2005 1:31:24 PM unused indexes, reasons for transaction isolation levels (Continued) read only isolation level, 125, 132 read uncommitted isolation level, 124, 125 repeatable read isolation level, 124, 128 serializable isolation level, 124, 130 SQL92 standard, 124 transactional mechanisms ACID properties, 135 TKPROF, 451 V$ tables, 494 V$EVENT_NAME table, 494 V$FILESTAT table, 495 V$LOCK table, 495 V$MYSTAT table, 495 V$OPEN_CURSOR table, 496 V$PARAMETER table, 498 V$SESS_IO table, 501 V$SESSION table, 498 V$SESSION_EVENT table, 500 V$SESSION_LONGOPS table, 500 V$SESSION_WAIT table, 500 V$SESSTAT table, 500 V$SQL table, 501 V$SQLAREA table, 501 V$STATNAME table, 501 V$SYSSTAT table, 501 V$SYSTEM_EVENT table, 501 V$TEMPSTAT table, 495 Atomicity, 135 Consistency, 135 Durability, 135 Isolation, 135 advantages of large transactions, 158 autonomous transactions, 659 bad habits, 143 autocommit by default, 148 failure to ensure enough rollback space, 144 using loops for updates, 143 COMMIT statement, 158 distributed transactions, 148 implicit transactions, 143 integrity constraints, 140 introduction, 135 Oracle database, 35, 135 Redo, 150 rollback segments, 144 serializable transactions, 23 transaction control statements, 136 TX locks, 113 Undo, 150 transaction-based temporary tables, 251 ON COMMIT DELETE ROWS clause, 252 trigger reads from table in query autonomous transactions, 663 mutating tables, avoiding, 665 triggers autonomous transactions, 663 performing DDL, 666 potential failure with, 668 statement level atomicity, 138 trigger reads from table in query, 663 mutating tables, avoiding, 665 TRUNCATE option SQLLDR, problems with, 426 TRUSTED value QUERY_REWRITE_INTEGRITY parameter, 602 tuning, 429 analytic functions, problems with, 590 benchmarking, 434 benchmarking in isolation, 434 benchmarking to scale, 435 bind variables, 436 cursor_sharing=force parameter, 441 latch free event, 439 static SQL, 440 continuing tuning, 432 DBMS_PROFILER, 475 defensive programming, 434 dynamic SQL, problems with, 735 experimental approach, 433 implementing with optimizer plan stability, 509 instrumentation, 475 DEBUG package, 476 Oracle applications, 23, 47, 431 performance metrics, identifying, 434 problems with, 430 soft parse of query, avoiding, 441 SQL_TRACE, 451 StatsPack, 477 TIMED_STATISTICS, 451 two-phase distributed commit protocol distributed transactions, 149 TX locks DML locks, 113 INITRANS parameter, 117 MAXTRANS parameter, 117 simple example, 114 transactional mechanisms, 113 using, 113 U UGA database architecture, 70 testing usage, 71 UNBOUNDED PRECEDING windowing clause, 560 Undo see also rollback. generating Undo, 185 DELETE statement, 185 INSERT statement, 185 UPDATE statement, 185 redo log buffer, 151 rollback segments, 151 system crashes and, 151 transactional mechanisms, 150 undocumented parameters care in using, 61 parameter files, 61 uniqueness local index partition and, 643 unknown number of outputs dynamic PL/SQL, 718 requires DBMS_SQL, 718 unloader PL/SQL utility control file, 400 data file, 400 RUN function, 403 unloading data in SQLLDR friendly format, 399 using, 407 UNRECOVERABLE clause preventing redo log generation, 174 replaced by NOLOGGING clause, 174 unused indexes, reasons for, 303 functions used implicitly on columns, 304 functions used on columns, 303 index on nullable columns, 303 index used to be slower, 307 1295 4826l_index.pdf 31 3/2/2005 1:31:24 PM unused indexes, reasons for (Continued) unused indexes, reasons for (Continued) index would be slower, 305 leading edge of index not used in query, 303 UPDATE statement blocking, 107 generating Undo, 185 nested tables, 244 UPDATE_BY_CAT procedure OUTLN_PKG package, 529 URL_DATASTORE datastore object, 746 USED column DBA_OUTLINES table, 516 USER data data files, 62 User Global Area see UGA. USER_INDEXES view CLUSTERING_FACTOR column, 283 USER_OUTLINE_HINTS table optimizer plan stability, 517 USER_OUTLINES table optimizer plan stability, 516 user-defined locks creating, 123 DBMS_LOCK package, 123 locking policy, 123 utility background processes database architecture, 95 EMNn, 96 QMNn, 96 SNPn, 96 UTL_FILE API 1023 byte limit, 1205 overloaded FOPEN function gets around byte limit, 1205 accessing mapped Windows drives, 1201 dynamic SQL, 707, 723 encapsulating functionality in new PL/SQL data type, 883 exception handling, 1202 limitations, 1199 necesssary supplied packages, 1199 reading directory, 1205 using instead of DBMS_OUTPUT, 1154 UTL_FILE_DIR parameter, 1200 web pages, dumping to disk, 1203 UTL_FILE_DIR parameter init.ora file, 1200 UTL_FILE API, 1200 UTL_HTTP package enhancing HTTP_PKG package, 1219 necesssary supplied packages, 1208 running PL/SQL programs, 1217 SSL, 1210 using, 1209 UTL_RAW package necesssary supplied packages, 1229 UTL_SMTP package example, 1231 JavaMail API, 1236 necesssary supplied packages, 1231 UTL_TCP package C-based stored procedures, 772 necesssary supplied packages, 1244 network programming, 1244 SocketType object type, 1245 V V$ tables, tuning with, 494 V$EVENT_NAME table, 494 V$FILESTAT table, 495 V$LOCK table, 495 V$MYSTAT table, 495 V$OPEN_CURSOR table, 496 V$PARAMETER table, 498 V$SESS_IO table, 501 V$SESSION table, 498 V$SESSION_EVENT table, 500 V$SESSION_LONGOPS table, 500 V$SESSION_WAIT table, 500 V$SESSTAT table, 500 V$SQL table, 501 V$SQLAREA table, 501 V$STATNAME table, 501 V$SYSSTAT table, 501 V$SYSTEM_EVENT table, 501 V$TEMPSTAT table, 495 V$EVENT_NAME table, tuning with, 494 V$FILESTAT table, tuning with, 495 V$LOCK table, tuning with, 495 V$LOGMNR_CONTENTS table LogMiner packages, 1119 V$MYSTAT table measuring amount of Redo, 164 tuning with, 495 V$OPEN_CURSOR table, tuning with, 496 V$PARAMETER table, tuning with, 498 V$SESS_IO table, tuning with, 501 V$SESSION table, tuning with, 498 V$SESSION_EVENT table, tuning, 500 V$SESSION_LONGOPS table DBMS_APPLICATION_INFO package, 1045 tuning with, 500 V$SESSION_WAIT table, tuning with, 500 V$SESSTAT table, tuning with, 500 V$SQL table, tuning with, 501 V$SQLAREA table, tuning with, 501 V$STATNAME table measuring amount of Redo, 164 tuning with, 501 V$SYSSTAT table, tuning with, 501 V$SYSTEM_EVENT table, tuning with, 501 V$TEMPSTAT table, tuning with, 495 VALIDATE_DIMENSION routine DBMS_OLAP package, 621 VAR attribute loading data with embedded newlines, 397 VAR_POP function analytic functions, 565 VAR_SAMP function analytic functions, 565 Varchar2 type, Oracle BLOB to VARCHAR2 conversions, 1077 passing to Java String type Java stored procedures, 850 VARIANCE function analytic functions, 565 VARRAYS compared to nested tables, 876, 880 loading SQLLDR, 418 object relational features, 876 1296 4826l_index.pdf 32 3/2/2005 1:31:24 PM zone section VARRAYS (Continued) storing, 880 BLOB type, 880 RAW type, 880 using, 877 vendor-specific database features making use of, 41 VERSION column DBA_OUTLINES table, 517 views importing into structures with changed data type, 343 importing into structures with missing column, 343 presenting object relational views, 868 views and indexes, 299 virtual operating system Oracle database as virtual operating system, 20 Virtual Private Database (VPD) see Fine Grained Access Control. VPD (Virtual Private Database) see Fine Grained Access Control. W Wait events StatsPack report, interpreting, 482 wait record fields, meaning of, 468 trace files, using and interpreting, 467 web pages dumping to disk with UTL_FILE API, 1203 web-based authentication, 964 n-Tier authentication, 965 problems with, 965 WHEN OTHERS exception handler avoiding using, 473 Where clause cannot contain analytic functions, 588 windowing clause analytic functions, syntax, 553 BETWEEN, 561 CURRENT ROW, 560 Numeric Expression FOLLOWING, 560 Numeric Expression PRECEDING, 560 range windows, 555 row windows, 558 UNBOUNDED PRECEDING, 560 windowing functions analytic functions, 550 WRITE_IO procedure FILETYPE object type, 884, 887 X XCTEND record fields, meaning of, 472 trace files, using and interpreting, 472 XML indexing interMedia Text, using, 749 XML section searching interMedia Text, 760 Z zone section interMedia Text, 761 1297 4826l_index.pdf 33 3/2/2005 1:31:25 PM License Agreement (Single-User Products) THIS IS A LEGAL AGREEMENT BETWEEN YOU, THE END USER, AND APRESS. BY OPENING THE SEALED DISK PACKAGE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE UNOPENED DISK PACKAGE AND THE ACCOMPANYING ITEMS (INCLUDING WRITTEN MATERIALS AND BINDERS AND OTHER CONTAINERS) TO THE PLACE YOU OBTAINED THEM FOR A FULL REFUND. APRESS SOFTWARE LICENSE 5254LicAgreemt.pdf 1 1. GRANT OF LICENSE. Apress grants you the right to use one copy of this enclosed Apress software program (the “SOFTWARE”) on a single terminal connected to a single computer (e.g., with a single CPU). You may not network the SOFTWARE or otherwise use it on more than one computer or computer terminal at the same time. 2. COPYRIGHT. The SOFTWARE copyright is owned by Apress and is protected by United States copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE like any other copyrighted material (e.g., a book or musical recording) except that you may either (a) make one copy of the SOFTWARE solely for backup or archival purposes, or (b) transfer the SOFTWARE to a single hard disk, provided you keep the original solely for backup or archival purposes. You may not copy the written material accompanying the SOFTWARE. 3. OTHER RESTRICTIONS. You may not rent or lease the SOFTWARE, but you may transfer the SOFTWARE and accompanying written materials on a permanent basis provided you retain no copies and the recipient agrees to the terms of this Agreement. You may not reverse engineer, decompile, or disassemble the SOFTWARE. If SOFTWARE is an update, any transfer must include the update and all prior versions. 4. By breaking the seal on the disc package, you agree to the terms and conditions printed in the Apress License Agreement. If you do not agree with the terms, simply return this book with the still-sealed CD package to the place of purchase for a refund. 3/9/2005 6:25:40 PM DISCLAIMER OF WARRANTY NO WARRANTIES. Apress disclaims all warranties, either express or implied, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose, with respect to the SOFTWARE and the accompanying written materials. The software and any related documentation is provided “as is.” You may have other rights, which vary from state to state. NO LIABILITIES FOR CONSEQUENTIAL DAMAGES. In no event shall be liable for any damages whatsoever (including, without limitation, damages from loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use this Apress product, even if Apress has been advised of the possibility of such damages. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. U.S. GOVERNMENT RESTRICTED RIGHTS The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restriction as set forth in subparagraph (c) (1) (ii) of The Rights in Technical Data and Computer Software clause at 52.227-7013. Contractor/manufacturer is Apress, 2560 Ninth Street, Suite 219, Berkeley, California, 94710. This Agreement is governed by the laws of the State of California. Should you have any questions concerning this Agreement, or if you wish to contact Apress for any reason, please write to Apress, 2560 Ninth Street, Suite 219, Berkeley, California, 94710. 5254LicAgreemt.pdf 2 3/9/2005 6:28:47 6:25:41 PM BOB_Forums725x9 1/23/04 Page ______ forums.apress.com FOR PROFESSIONALS BY PROFESSIONALS™ JOIN THE APRESS FORUMS AND BE PART OF OUR COMMUNITY. You’ll find discussions that cover topics of interest to IT professionals, programmers, and enthusiasts just like you. If you post a query to one of our forums, you can expect that some of the best minds in the business—especially Apress authors, who all write with The Expert’s Voice™—will chime in to help you. Why not aim to become one of our most valuable participants (MVPs) and win cool stuff? Here’s a sampling of what you’ll find: DATABASES PROGRAMMING/BUSINESS Data drives everything. Share information, exchange ideas, and discuss any database programming or administration issues. Unfortunately, it is. Talk about the Apress line of books that cover software methodology, best practices, and how programmers interact with the “suits.” INTERNET TECHNOLOGIES AND NETWORKING WEB DEVELOPMENT/DESIGN Try living without plumbing (and eventually IPv6). Talk about networking topics including protocols, design, administration, wireless, wired, storage, backup, certifications, trends, and new technologies. Ugly doesn’t cut it anymore, and CGI is absurd. Help is in sight for your site. Find design solutions for your projects and get ideas for building an interactive Web site. JAVA SECURITY We’ve come a long way from the old Oak tree. Hang out and discuss Java in whatever flavor you choose: J2SE, J2EE, J2ME, Jakarta, and so on. Lots of bad guys out there—the good guys need help. Discuss computer and network security issues here. Just don’t let anyone else know the answers! MAC OS X TECHNOLOGY IN ACTION All about the Zen of OS X. OS X is both the present and the future for Mac apps. Make suggestions, offer up ideas, or boast about your new hardware. Cool things. Fun things. It’s after hours. It’s time to play. Whether you’re into LEGO® MINDSTORMS™ or turning an old PC into a DVR, this is where technology turns into fun. OPEN SOURCE WINDOWS Source code is good; understanding (open) source is better. Discuss open source technologies and related topics such as PHP, MySQL, Linux, Perl, Apache, Python, and more. No defenestration here. Ask questions about all aspects of Windows programming, get help on Microsoft technologies covered in Apress books, or provide feedback on any Apress Windows book. HOW TO PARTICIPATE: Go to the Apress Forums site at http://forums.apress.com/. Click the New User link.