This is a discussion on Difference between Oracle 9i and 10g within the Database Support forums, part of the Web Development category; Hi, What is the difference between Oracle 9i and 10g and which features are implemented in the 10g. Thanks V....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi oralce 10g is higher version of oracle 9i, oracle 10g has added a follwoing features Transparent Data Encryption Async commits CONNECT ROLE can not only connect Passwords for DB Links are encrypted New asmcmd utility for managing ASM storage Grid computing - an extension of the clustering feature (Real Application Clusters) Manageability improvements (self-tuning features) Performance and scalability improvements Automated Storage Management (ASM) Automatic Workload Repository (AWR) Automatic Database Diagnostic Monitor (ADDM) Flashback operations available on row, transaction, table or database level Ability to UNDROP a table from a recycle bin Ability to rename tablespaces Ability to transport tablespaces across machine types (E.g Windows to Unix) New 'drop database' statement New database scheduler - DBMS_SCHEDULER DBMS_FILE_TRANSFER Package Support for bigfile tablespaces that is up to 8 Exabytes in size Data Pump - faster data movement with expdp and impdp. Thanks Ragav |
| |||
| Its simple like how we are all having difference among themselves ..... there are some feature differences available for Oracle 9i and Oracle 10g. ![]()
__________________ -Murali.. |
| |||
| Here are some additional features available in 10g Network Management • Back Up Directory Naming Entries to Local Naming File. • Dynamic Connection Manager Configuration. • Easy Connect Naming Method. • Improved Network Outage Detection. • Automatic LDAP Discovery for Clients. • Improved Connection Manager Access Rules. • Automatic Shared Server Configuration. • Simplified Shared Server Configuration Parameters. Manageability Infrastructure • Database Features Usage Tracking. • Enhanced Database Time Model. • End-to-End Application Tracing. • JDBC: End-to-End Tracing. • SYSAUX Tablespace. • Automatic Routine Administration Tasks. • Server-Generated Alerts. • Automatic Workload Respository. • Enhanced Wait Model. • Threshold-Based Alerts. Storage Management • Multiple Default Temporary Tablespace Support for SQL Operations. • Automatic Storage Management. • Rename Tablespace. Backup and Recovery Manageability • Enhanced RMAN Reporting. • Backup Compression. • Bounded Backup Window. • RMAN Scripts Manageability. • Recovery Area Full Alert. Performance and Scalability • Index-Organized Table (IOT) Partitioning Enhancements. • Eliminate Duplicated Columns in Index on an Index-Organized Table. • Configurable TCP/IP Send and Receive Buffer Size. • Single-Set Aggregates in DML Returning Clause. • High-Speed Infiniband Network Support. • Sorted Hash Clusters. • Windows Fiber Support. • Optimized 64-bit Database. • SQL Tuning Advisor. • SQLAccess Advisor. • Materialized View Tuning API. • Automatic Optimizer Statistics Collection. Backup and Recovery • Flash Backup and Recovery. • Drop Database. • RMAN Database Deregistration. • Backup and Restore of Standby Control File. • Automatic TSPITR. • Simplified Recovery Manager Cataloging of Backup Files. • Automatic Channel Failover for Backup and Restore. • Automatic File Creation During Recovery. • Simplified Backups to Disk. • Proxy Copy Backup of Archivelogs. • Incrementally Updated Backups. • Simplified Recovery Through Resetlogs. • Restore Tolerates Corrupt or Missing Backups. • Full Database Begin Backup Command. • Change-Aware Incremental Backups. Improved Administration • DML Support in FGA. • Communication over SASL. • Unified User Model. • Easy Database Registration. • Extended and Uniform Audit Trail. • Oracle Label Security Directory Integration. Data Mining Support for Analytic Applications • Frequent Itemsets. • DBMS_DATA_MINING PL/SQL Interface for Oracle Data Mining. • Features Extraction using Non-Negative Matrix Factorization Algorithm. • Enhanced Data Preprocessing. • Enhanced Adaptive Bayes Network. • Multi-User Access Control. • Oracle Data Mining Client (DM4J). • Support Vector Machines (SVM). And still many more......
__________________ -Murali.. |
| |||
| Hi, Here are some, Automatic Database Diagnostic Monitor (ADDM). a. To Produce the Automatic Database reports and Monitoring. Automatic SQL Tuning. a. New features to find the automated SQL Tuning Scripts. DBMS_FILE_TRANSFER Package a. Its an API to make binary copies of files on the local server or to transfer files between the local server and remote servers. PL/SQL Enhancements a. The compiled shared libraries are now stored in the database and extracted as necessary. This means they form part of the normal backup and recovery process, require no manual maintenance. b. Nested Tables comes with more flexibility with the enhancement of using collections comparison and types. c. FOR ALL Syntax can be supportive for Non-Consecutive Index in collections. And still many more......
__________________ -Murali.. |
| |||
| And some more... An additional Feature in ORACLE 10g Enchancement in PL/SQL IEEE Floating-Point Types 1. BINARY_FLOAT 2. BINARY_DOUBLE. These can be used for computations as the work is passed directly to the operating system. Literal assignments can be perfomed using the "f" and "d" suffixes or conversion functions TO_BINARY_FLOAT and TO_BINARY_DOUBLE Code: DECLARE vFloat BINARY_FLOAT; vDouble BINARY_DOUBLE; BEGIN vFloat := 1.1f; vDouble := 1.00001d; vFloat := TO_BINARY_FLOAT(1.1); vDouble := TO_BINARY_DOUBLE(1.00001);END; Code: CREATE OR REPLACE PACKAGE SP_NUMBERIC AS
PROCEDURE NUMBERIC(vNumber NUMBER);
PROCEDURE NUMBERIC(vNumber BINARY_FLOAT);
PROCEDURE NUMBERIC(vNumber BINARY_DOUBLE);
END;
/
CREATE OR REPLACE PACKAGE BODY SP_NUMBERIC AS
PROCEDURE NUMBERIC (vNumber NUMBER) AS
BEGIN
DBMS_OUTPUT.put_line('PRINTING NUMBER');
END;
PROCEDURE NUMBERIC(vNumber BINARY_FLOAT) AS
BEGIN
DBMS_OUTPUT.put_line('PRINTING BINARY_FLOAT');
END;
PROCEDURE NUMBERIC(vNumber BINARY_DOUBLE) AS
BEGIN
DBMS_OUTPUT.put_line('PRINTING BINARY_DOUBLE');
END;
END; Code: Output SET SERVEROUTPUT ON BEGIN SP_NUMBERIC.NUMBERIC(2); SP_NUMBERIC.NUMBERIC(0.1f); SP_NUMBERIC.NUMBERIC(0.1d); END; PRINTING NUMBER PRINTING BINARY_FLOAT PRINTING BINARY_DOUBLE PL/SQL procedure successfully completed. • REGEXP_INSTR - Similar to INSTR except it uses a regular expression rather than a literal as the search string. • REGEXP_LIKE - Similar to LIKE except it uses a regular expression as the search string. • REGEXP_REPLACE - Similar to REPLACE except it uses a regular expression as the search string. • REGEXP_SUBSTR - Returns the string matching the regular expression. Not really similar to SUBSTR. And still many more......
__________________ -Murali.. |
| |||
| Hi All, Here are some more..... Enhancements in SQL plus SPOOL file comes with the Extension of CREATE, REPLACE and APPEND. Code: SQL> spool <File Path> create Code: SQL> spool <File Path> Replace Code: SQL> spool <File Path> append And still many more......
__________________ -Murali.. |
| |||
| Hi All, Here are some more..... Database Security Enhancements in Oracle Database 10g Virtual Private Database (VPD) Enhancements Column-Level VPD Policy Code: CREATE TABLE EMPLOYEE ( EMPNO NUMBER PRIMARY KEY, ENAME VARCHAR2(30), EJOB VARCHAR2(30), ESALARY NUMBER, ECOMMENTS VARCHAR2(30), EDEPTNO NUMBER ); Code: INSERT INTO EMPLOYEE VALUES(1,'kuamr','DBD',10000,'',10); INSERT INTO EMPLOYEE VALUES(2,'ram','PHP',20000,'',20); INSERT INTO EMPLOYEE VALUES(3,'raja','DBD',30000,'',10); INSERT INTO EMPLOYEE VALUES(4,'kanna','PHP',40000,'',20); INSERT INTO EMPLOYEE VALUES(5,'karna','DBD',50000,'',30); INSERT INTO EMPLOYEE VALUES(6,'arun','DBD',60000,'',3); INSERT INTO EMPLOYEE VALUES(7,'mani','DBD',70000,'',10); Now creating a Policy to Restrict to SALARY and COMMENTS for Employee belongs to the Department 20 Code: DECLARE
vRestrictDept VARCHAR2(200);
BEGIN
vRestrictDept := 'deptno = 20';
DBMS_RLS.ADD_POLICY (object_schema => <Schema_Name>,
object_name => <OBject_Name>,
policy_name => <Policy_Name>,
function_schema => <Policy Schema_Name>,
policy_function => <Policy_Function>,
sec_relevant_cols => <Fields to be Restricted>);
EXCEPTION WHEN OTHERS THEN
NULL;
END; When we select the fields which not come unders the restriction, then SELECT empno, ename, job FROM employee; Code: EMPNO ENAME JOB 1 kuamr DBD 2 ram PHP 3 raja DBD 4 kanna PHP 5 karna DBD 6 arun DBD 7 mani DBD SELECT empno, ename, job, salary, comm FROM employee; Code: EMPNO ENAME JOB SALARY COMM 1 ram DBD 20000 4 kanna PHP 40000 Removing the Creating Policy Code: BEGIN
DBMS_RLS.DROP_POLICY (
object_schema => <Schema_Name>,
object_name => <Object_Name>,
policy_name => <Policy_Name>);
END;
__________________ -Murali.. |
| |||
| Hi All, Here are some more..... Enhancement in Collection Comparison in ORACLE-10g Code: CREATE OR REPLACE TYPE Typ_TableElements IS TABLE OF VARCHAR2(4000); SET SERVEROUTPUT ON;
DECLARE
Array_1 Typ_TableElements := Typ_TableElements('D','F','S');
Array_2 Typ_TableElements := Typ_TableElements('R','J','K');
Array_3 Typ_TableElements := Typ_TableElements('R','J','K');
PROCEDURE SP_COMPARE_ARRAYS(pmInput IN VARCHAR2,pmArray IN Typ_TableElements,pmArray1 IN Typ_TableElements) IS
BEGIN
DBMS_OUTPUT.PUT(RPAD('{'||pmInput||'}',40) || '-----> ');
IF(pmArray = pmArray1)THEN
DBMS_OUTPUT.PUT_LINE( 'EQUAL' );
ELSE
DBMS_OUTPUT.PUT_LINE( 'NOT EQUAL' );
END IF;
END SP_COMPARE_ARRAYS;
BEGIN
-- Comparing the First values from the Array
SP_COMPARE_ARRAYS( '1: Array_1 -> Array_2, Compared Array',Array_1,Array_2);
SP_COMPARE_ARRAYS( '2: Array_2 -> Array_3, Compared Array',Array_2,Array_3);
-- Deleting the Compared Array Values
Array_1.DELETE;
Array_2.DELETE;
SP_COMPARE_ARRAYS( '3: Array_1 -> Array_2, Deleted Array',Array_1,Array_2);
Array_1 := Typ_TableElements();
Array_2 := Typ_TableElements();
-- Reintializing the Array value for comparison
SP_COMPARE_ARRAYS( '4: Array_1 -> Array_2, ReInitialized',Array_1,Array_2);
END; Code:
Type created.
{1: Array_1 -> Array_2, Compared Array} -----> NOT EQUAL
{2: Array_2 -> Array_3, Compared Array} -----> EQUAL
{3: Array_1 -> Array_2, Deleted Array} -----> EQUAL
{4: Array_1 -> Array_2, ReInitialized} -----> EQUAL
PL/SQL procedure successfully completed. And still many more......
__________________ -Murali.. Last edited by Murali : 08-23-2007 at 03:44 AM. |
| |||
| Exception and Error Handling Enhancements In Oracle9i Code: CREATE TABLE TEST(TEST_ID INTEGER PRIMARY KEY,TEST_DESC VARCHAR2(5)); INSERT INTO TEST VALUES ( 1,'May be this time is the correct one !' ); Code: ORA-01401: inserted value too large for column. Code: CREATE TABLE TEST(TEST_ID INTEGER PRIMARY KEY,TEST_DESC VARCHAR2(5)); INSERT INTO TEST VALUES ( 1,'May be this time is the correct one !' ); Code: ORA-12899: value too large for column "TEST"."TEST"."TEST_DESC" (actual: 37, maximum: 5).
__________________ -Murali.. |
| |||
| Regular Expressions REGEXP_LIKE Retrieving just the Numbers alone from the Field which stores alphanumeric values. Code: WITH REG_EXP AS ( SELECT 'ABC' AS FIELD FROM DUAL UNION ALL SELECT 'ABC123' FROM DUAL UNION ALL SELECT '123' FROM DUAL ) SELECT * FROM REG_EXP WHERE REGEXP_LIKE(FIELD,'^[0-9]+$'); Code: WITH REG_EXP AS ( SELECT 'ABC' AS FIELD FROM DUAL UNION ALL SELECT 'ABC123' FROM DUAL UNION ALL SELECT '123' FROM DUAL ) SELECT * FROM REG_EXP WHERE REGEXP_LIKE(FIELD,'^[A-Z]+$'); Retrieving the position of the special characters from the Field. Code: WITH REG_EXP AS ( SELECT 'It is you?' AS FIELD FROM DUAL UNION ALL SELECT 'I not expect this !!!' FROM DUAL UNION ALL SELECT 'May be?' FROM DUAL ) SELECT FIELD,REGEXP_INSTR(FIELD, '\!!!') AS POSITION FROM REG_EXP; Code: FIELD POSITION --------------------- ---------- It is you? 0 I not expect this !!! 19 May be? 0 3 rows selected. Code: WITH REG_EXP AS ( SELECT 'It is you?' AS FIELD FROM DUAL UNION ALL SELECT 'I not expect this !!!' FROM DUAL UNION ALL SELECT 'May be?' FROM DUAL ) SELECT FIELD,REGEXP_INSTR(FIELD, '\?')AS POSITION FROM REG_EXP; Code: FIELD POSITION --------------------- ---------- It is you? 10 I not expect this !!! 0 May be? 7 3 rows selected.
__________________ -Murali.. |
| |||
| Database Security Enhancements in Oracle Database 10g VIRTUAL PRIVATE DATABASE (VPD) ENHANCEMENTS 2. COLUMN MASKING column masking behaviour is implemented by using the "sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS" parameter. this allows you to display all rows but mask the values of the specified columns for the restricted rows: EXAMPLE ----------- CREATE TABLE employee ( empno NUMBER PRIMARY KEY, ename VARCHAR2(30), ejob VARCHAR2(30), esalary NUMBER, ecomments VARCHAR2(30), edeptno NUMBER ); INSERT INTO employee VALUES(1,'kuamr','DBD',10000,'',10); INSERT INTO employee VALUES(2,'ram','PHP',20000,'',20); INSERT INTO employee VALUES(3,'raja','DBD',30000,'',10); INSERT INTO employee VALUES(4,'kanna','PHP',40000,'',20); INSERT INTO employee VALUES(5,'karna','DBD',50000,'',30); INSERT INTO employee VALUES(6,'arun','DBD',60000,'',3); INSERT INTO employee VALUES(7,'mani','DBD',70000,'',10); -- create the policy function to restrict access to sal and comm columns -- if the employee is not part of the department 20. CREATE OR REPLACE FUNCTION pf_job (OOWNER IN VARCHAR2, OJNAME IN VARCHAR2) RETURN VARCHAR2 AS CON VARCHAR2 (200); BEGIN CON := 'deptno = 20'; RETURN (CON); END pf_job; -- now create the policy to restrict to salary and -- comments for employee belongs to the department 20 DECLARE VRESTRICTDEPT VARCHAR2(200); BEGIN VRESTRICTDEPT := 'deptno = 20'; DBMS_RLS.ADD_POLICY (OBJECT_SCHEMA => 'test', OBJECT_NAME => 'e_employee', POLICY_NAME => 'sp_job', FUNCTION_SCHEMA => 'test', POLICY_FUNCTION => 'pf_job', SEC_RELEVANT_COLS => 'salary,comm', SEC_RELEVANT_COLS_OPT => DBMS_RLS.ALL_ROWS); EXCEPTION WHEN OTHERS THEN NULL; END; -- when we select the fields which not come unders the restriction, then SELECT EMPNO, ENAME, JOB FROM employee; EMPNO ENAME JOB ------------------------- 1 KUAMR DBD 2 RAM PHP 3 RAJA DBD 4 KANNA PHP 5 KARNA DBD 6 ARUN DBD 7 MANI DBD -- while selecting the field which is issued in the policy for -- restriction then we get, SELECT empno, ename, job, salary, comm FROM employee; EMPNO ENAME JOB SALARY COMM --------------------------------------------------------- 1 KUAMR DB 2 RAM PHP 20000 3 RAJA DB 4 KANNA PHP 40000 5 KARNA DB 6 ARUN DB 7 MANI DB -- now we get the results based on the department 20 which -- is used in the policy and we cannot see other person details. -- Remove the policy function from the table. BEGIN DBMS_RLS.DROP_POLICY (OBJECT_SCHEMA => 'test', OBJECT_NAME => 'employee', POLICY_NAME => 'sp_job'); END; Last edited by kumaresan : 08-28-2007 at 12:03 AM. Reason: one mistake in my post |
| |||
| ORACLE-10g measures CPU Time Elapsed Code: SQL> SET SERVEROUTPUT ON; SQL> DECLARE 2 vInteger INTEGER; 3 vResultInt INTEGER; 4 BEGIN 5 vInteger := DBMS_UTILITY.GET_TIME(); 6 FOR I IN 1 .. 50000000 LOOP 7 NULL; 8 END LOOP; 9 vResultInt := DBMS_UTILITY.GET_TIME() - vInteger; 10 DBMS_OUTPUT.PUT_LINE( 'ELAPSED TIME := ' || vInteger || ' HSECS' ); 11 DBMS_OUTPUT.PUT_LINE( 'ELAPSED CPU TIME := ' ||vResultInt || ' HSECS' ); 12 END; 13 / ELAPSED TIME := -1456785280 HSECS ELAPSED CPU TIME := 220 HSECS PL/SQL procedure successfully completed.
__________________ -Murali.. |
| |||
| ORACLE-10g DBMS_OUTPUT.PUT_LINE() Enhancements ORACLE-9i Code:
SQL> SET SERVEROUTPUT ON;
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE( RPAD('(#',255,'X') );
3 END;
4 /
(#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
PL/SQL procedure successfully completed. Code: SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE( RPAD('(#',256,'X') );
3 END;
4 /
BEGIN
*
ERROR at line 1:
ORA-20000: ORU-10028: line length overflow, limit of 255 chars per line
ORA-06512: at "SYS.DBMS_OUTPUT", line 35
ORA-06512: at "SYS.DBMS_OUTPUT", line 133
ORA-06512: at line 2 ORACLE-10g Supports upto 32767 Characters per line. Code: SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE( RPAD('(#',256,'X') );
3 END;
4 /
(#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
PL/SQL procedure successfully completed. Code: SQL> SET SERVEROUTPUT ON;
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE( RPAD('(#',32767,'X')|| '...');
3 END;
4 /
BEGIN
*
ERROR at line 1:
ORA-20000: ORU-10028: line length overflow, limit of 32767 bytes per line
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 91
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at line 2
__________________ -Murali.. |
| |||
| Oracle 10g Release 1 (10.1.0)
Oracle 10g Release 2 (10.2.0)
|
| |||
| New 'drop database' statement in oracle 10g RMAN (Oracle Recovery Manager) Database Dropping and Deregistration - The new DROP DATABASE and its UNREGISTER DATABASE using RMAN commands. Its removes the database and its from the RMAN recovery catalog. Code: SQL>DROP DATABASE; Code: DROP DATABASE INCLUDING BACKUPS; Code: SQL> UNREGISTER DATABASE GRID; |