FAST DUAL in Oracle 10g

Can anybody tell me, What is FAST DUAL in Oracle 10g, How it is different from Oracle 9i DUAL ? with as conceptual example.

He-he, see what you mean, never thought of that. Maybe because my current problems are in a different ball park.
Getting slightly off-topic, this is the preferred way of using dual when getting next value from a sequence.
And I kid you not, if not done exactly like that I won't pass a QA review. (This is just an example, a true implementation would include something like 40-50 lines of headers and comments)
WARNING when reading this. DON'T ever do the following
PROCEDURE fetch_next_empno(inout_contentrec IN OUT add_emp_rec_type)
IS
   k_module CONSTANT VARCHAR2(30) := 'FETCH_NEXT_EMPNO'
   CURSOR c_next_empno
   IS
      SELECT empno_seq.NEXTVAL
        FROM dual;
   v_empno emp.empno%type;
BEGIN
   logger.prc_start(k_module);
   OPEN c_next_empno;
   FETCH c_next_empno
   INTO v_empno;
   IF c_next_empno%NOTFOUND
   THEN
      raise_application_error(-20000, 'No entries in Dual table');
   END IF;
   CLOSE c_next_empno;
   inout_contentrec.empno := v_empno;
   logger.prc_end(k_module);
EXCEPTION
  WHEN OTHERS THEN
    IF c_next_empno%ISOPEN
    THEN
       CLOSE c_next_empno
    END IF;
    logger.error(k_module, SQLERRM);
    RAISE;
END;P.S: This application was started in '95 - Version 7 or something, I guess.
An upgrade from 10gR2 to 11g is currently planned. So far no coding style has been changed.
Why not? - Conformity rules!
Regards
Peter
Edited by: Peter on Jan 23, 2011 6:15 AM
P.S

Similar Messages

  • Issue with materialized view and fast refresh between Oracle 10g and 11g

    Hi all,
    I've hit a problem when trying to create a fast-refreshable materialized view.
    I've got two databases, one 10.2.0.10, another 11.2.0.1.0, running on 32-bit Windows. Both are enterprise edition, and I'm trying to pull data from the 10g one into the 11g one. I can happily query across the database link from 11g to 10g, and can use complete refresh with no problem except the time it takes.
    On the 10g side, I've got tables with primary keys and m.v. logs created, the logs being of this form ...
    CREATE MATERIALIZED VIEW LOG ON table WITH PRIMARY KEY INCLUDING NEW VALUES
    On the 11g side, when I try to create an m.v. against that ...
    CREATE MATERIALIZED VIEW mv_table REFRESH FAST WITH PRIMARY KEY AS SELECT col1, col2 FROM table@dblink;
    ... I get an ORA-12028 error (materialized view type is not supported by master site).
    After running the EXPLAIN_MVIEW procedure it shows this;
    REFRESH_FAST_AFTER_INSERT not supported for this type mv by Oracle version at master site
    A colleague has managed to build a fast-refresh m.v. from the same source database, but pulling to a different one than I'm using; his target is also 10g, like the (common) source, so I've no idea why I'm getting the 'not supported' message whilst he isn't.
    I've been able, on previous projects, to do exactly what I'm trying to achieve but on those someone with more knowledge than me has configured the database!
    I'm now stumped. I'm also no DBA but despite that it's been left to me to install the new 11g database on the 32-bit Windows server from scratch, so there are probably a couple of things I'm missing. It's probably something really obvious but I don't really know where to look now.
    If anyone can give me any pointers at all, I'd be really grateful. This question is also duplicated in the Replication forum but hasn't had any replies as yet, so I'm reproducing it here in hope!
    Thanks in advance,
    Steve

    Hi Steve,
    You should have a look at metalink, Doc ID 1059547.1
    If that does not help, there may be something else in Mater note ID 1353040.1
    Best regards
    Peter

  • How can I solve memory lick, which occurs when operate Oracle 10g DB ?

    I'm using Dell power Edge2850 server(dual CPU, 4GB Ram), RedHat AS 3 and Oracle 10g SE ONE. When I started the server, transaction speed was very fast. But after several day, the system has been getting slower seriously.
    So I monitored my system using 'top'. And I've found that almost 30MB swap memory has been used and CPU usage has been only 23%. But there has been 2GB idle Ram memory. Besides when Oracle don't execute any operation, swap memory is not freed. After I started my server, swap memory allocated has been getting larger and larger. And the speed of my system has been getting slower and slower.
    I think that it is very strange thing not to free swap memory when there is no operation on the server.
    Of course, swapping which rise with large transaction is not problem. But it is a serious problem not to free swap memory when there is no transaction.
    How can I solve this ploblem? Thanks.

    This means the the URL for database control will use the http protocol. To convert to the https protocol (using the included SSL certificate), use the steps documented above. Before doing so, pl review MOS Doc 1222603.1
    HTH
    Srini

  • Migration from Oracle 9i 32 bit to Oracle 10G 64 bit on Windows 2003 Server

    I am working on migrating Oracle 9i 32 bit to Oracle 10G 64 bit on Windows 2003 from Old server to new server. We have db around 500 GB and 3 schemas. I installed Oracle 10G on new server, created tablespaces, schema's blah blah and now doing export and import at schema level from old server to new server.
    Import is taking more than 4 to 5 hours on new server. My manager is saying, window time is bit longer and he wants me to try possiblities to make this process faster. Can some one help me on this, to use the best possible method to complete this process faster?
    Will below step work, if I try?
    If I install, oracle 9i and 10g both on new server in different home directories and take the hot backup from old machine and restore on new machine in 9i home directory and use the upgrade configuration assistant from 10g and do the upgrade? Pls advice.
    Thanks in advance,
    Hari babu
    Edited by: user6367891 on Mar 2, 2010 5:28 AM

    It looks good.
    I have one question in below steps:
    To migrate an Oracle9i or older database to an Oracle Database 10g Release 1 (10.1) database for 64-bit Windows:
    1 Perform steps 1 - 11 in "Migrating an Oracle Database 10g Release 1 (10.1) Database".
    2 Shut down the database on the 64-bit computer:
    SQL> SHUTDOWN IMMEDIATE;
    3 Start the database migration:
    SQL> STARTUP MIGRATE;
    4 Migrate the database as described in Chapter 3, "Upgrading a Database to the New Oracle Database 10g Release" in Oracle Database Upgrade Guide.
    In step 4, it says, migrate database as described in chapter 3. In chapter 3, it says, to do the upgrade the process using dbca or manually. Pls confirm whether do the upgrade process after issuing startup migrate or not.
    Thanks in advance.

  • Oracle 10g - Date format in SELECT query for CFOUTPUT

    Hello, everyone.
    The project that I am working on in the dev environment is connected to an Oracle 11g database, but the production side is Oracle 10g.
    I have a page that is erroring in production (but not development) when it gets to a date that it needs to display.
    A co-worker mentioned that, in 10g, if a date/time is being SELECTed, you have to put it in to_char(), so I did that.
    But it's still erroring, and I'm not getting an error message, so I'm assuming that I have an incorrect format for the date in the SELECT.
    What is the proper format for SELECTing a date/time when using to_char()?  Right now, I have SELECT to_char(create_date,'MM-DD-YYYY HH:MI') FROM tableA .  Is this not correct for CF to output?
    Thank you,
    ^_^

    Please see my original post ("I have a page erroring in production (but not in development) when it gets to a date that it needs to display.")  Sorry if it came across as vague.  It made sense, to me, when I typed it.  But, then, I'm usually typing fast just to get the question out there, when I'm in a hurry.
    Haven't done a CFDUMP, yet, as every time I make a change in development that needs to be tested in production, I have to notify my supervisor that there are files that need to be copied into production, which can sometimes take a while, so I try to do troubleshooting on dev side - it's a pain in the you-know-what, but that's the kind of environment I'm working in.
    As it turns out, changing the format in the SELECT to_char() did the trick.  If anyone else has this issue with Oracle 10g, I'm now using SELECT to_char(create_date,'YYYY/MM/DD HH:MI') FROM tableA, and now the CFOUTPUT is processing the whole page.  I guess the MM-DD-YYYY threw CF into a tizzy, breaking the process?
    Anyhoo, it's working, now.  Thank you, Dan and Adam, for your thoughts on this.
    ^_^

  • Hanging with Oracle 10g release 2 on Windows XP !!!

    Hi,
    I am trying to Install Oracle 10g release 2(10.2.0.1.0) on Windows XP Professional(SP2).
    Existing environment:
    1. Java(SDK & Runtime Environment) 6 update 1.
    2. Configured Eclipse.
    The installed procedure:
    1. Downloaded "10201_database_win32.zip" from Oracle website.
    2. Unzip it and run setup.exe
    3. It gives an error like below :
    "javaw.exe - Entry Point Not Found"
    "The procedure entry point longjmp could not be located in the dynnamik link library orauts.dll."
    Installation completed(forcefully) without the below.
    1. Oracle Net Configuration Assistant (Failed)
    2. Oracle Database Configuration Assistant (Failed).
    and in services: "No Oracle process exist".
    I tried the below:
    A. Change the environment variables (remove ORACLE_HOME/ORACLE_SID etc)
    B. 2 to 5 times un-install oracle(including registry, directory etc) and install.
    C. Uninstall Java SDK & Runtime Env. Then install Oracle.
    D. Installing Personal edition, Enterprise edition etc etc.
    E. Checked the orauts.dll in 3 places(i. BIN ii. out/bin iii. oui/lib/win32
    F. Copied the orauts.dll to system32 directory.
    What ever I do the above appers all the time and installation is incomplete.
    Due to this problem I couldn't move further, please do help me in solving this.
    Thanks a lot in advance.

    Hey Guys,
    I am Srinivas Here who had been trying to install Oracle Database 10G on Windows X86 on Windows XP Professional.
    If you have Win-XP Professional as your Operating System. Do not download the oracle Database using windows - XP Professional because XP will block certain installation files while downloading. In your machine install Windows 2000 or any other Windows version as a dual boot. First the download Database Zip files using your other version of Windows Operating system and then when you Unzip the files it will create a folder called Database and all the files will be present in it.If you want to store the same to cd for having to install the 10G Rel 2 database through CD then copy the contents of the unzipped database folder and store only the contents of the database folder and write them to CD's. Please see to it that while writing on cd's do not copy the folder itself .
    After this, restart the system and get into windows XP Professional (Your XP Professional should be with Service Pack 2 in order to install 10G Database on windows XP - The Basic requirements for Oracle Database 10G on Windows X86).
    I request you to check the software and hardware requirements from oracle Documents before you install the Oracle Database 10G on Windows x86 as well as Oracle Database 10G on Linux X86 or any other operating systems.
    Finally, After you run the Oracle Universal installer in the last you will get messages for all products installed Success and finally it will ask the password for DBA and open the password management and give the password and reenter password and on the left you will have to unlock the items you would like to use.
    In the last it will give you various URL links for Isqlplus, DBA, Enterprise Manager and a log report stored into oracle directory stored in your C:\Program files\Oracle folders. The correct link will be given at the end and you will have to watch the installation carefully.You can find DBCA and other options working. Try login in to Oracle through Command prompt, Sqlplus prompt availabe in Start ->Programs->Orahome10G->application Development-sqlplus as well as login through isqlplus link- Before this you should login at the command prompt as SYSDBA. YOU CAN SEE THAT YOUR DATABASE IS NOW WORKING IN WINDOWS XP PROFESSIONAL.
    THANKS IN ADVANCE TO ALL FORUM MEMBERS WHO GAVE ME IDEA AND SUPPORT
    REGARDS,
    SRINIVAS

  • How to configure Oracle 10g to use 4GB memory

    I'm trying to configure Oracle 10g to use >4GB memory. Have configured server boot.ini with required flags (/3GB /PAE). Rebooted server then created standard database, then connected to db instance and changed oracle parameters DB_BLOCK_BUFFERS, USE_INDIRECT_DATA_BUFFERS as required. Restarted DB instance, DB fails to restarted with SGA memory error. According to oracle user docs the SGA is nolonger in effect due to previous settings. Can you provide example of SPFILE with parameters settings that do work and use >4GB memory. Current server has 8GB, 2 x Dual XEON core/processors (i.e. 8 processors)

    The recommended /3GB switches in the boot.ini file can only be used with the following operating systems editions (KB article 291988):
    Microsoft Windows 2000 Advanced Server
    Microsoft Windows 2000 Data Center Server
    Microsoft Windows Server 2003, Enterprise Edition
    Microsoft Windows Server 2003, Data Center Edition
    Microsoft Windows Small Business Server 2003
    Important: Windows 2000 and 2003 Server Standard Editions DO NOT SUPPORT /3GB Switch.
    So if your OS is listed above, then you cannot have a larger SGA.

  • Oracle 10g on SLES9 AMD64

    Hi All,
    i have tried to set up a system SLES 9 AMD64 for testing Oracle 10g for AMD 64 .
    After installing the operating system, I added this package
    rpm -Uvh orarun-1.8-109.5.i586.rpm
    and enabled the user oracle.
    I you login as user oracle, the following error message is displayed :
    error while loading shared libraries : librt.so.1 : cannot open shared object files : no such fileSuse support answers to this question : Oracle 10g is certified on SLES9, but the orarun package is only supported for SLES9 i386 ?
    This is correct, but did not help me to continue my installation.
    Any ideas ?
    Best regards
    Werner

    Try: comment the following line in /etc/init.d/oracle and /etc/profile.d/oracle.sh:
    #test -d /lib/i686 && export LD_ASSUME_KERNEL=2.2.5
    Post your question on [email protected] for faster response :)
    You may find http://www.gesinet.it/oracle/oracle10gonsles9amd64.html useful.
    -Arun

  • Tomcat 4.0 and Oracle 10g takes 100% CPU and grinds to a halt

    Hi, I have a system to support that is currently running on Tomcat 4.0 on a Windows Server 2003 R2 SP2 machine with 3.06Ghz, 4Gb Memory, 2Gb Page file connecting to an Oracle 8.1.6 database on a Windows NT 4 virtual server with 3.2Ghz, 1152Mb Memory, 1536Mb Page file.
    I have another Windows virtual server 2003 R2 SP2 machine with 2Gb of memory and a 4Gb page. This server has Tomcat 4.0 and an Oracle 10.2.0.3.0 database. I have made sure that the Oracle 10g classes12.jar file is used.
    I am trying to run the application on the new server. In some tests I had users logging on one by one for the first 5 users - performance was great and the application ran faster than the current live system. When I then got another 10 - 15 people logging on the CPU stuck at 100% on the server, even exploring the server was almost impossible, and the application slowed down to unworkable.
    We dont know if the problem lies with the very fact that we are trying to connect to a 10g database which is cost based and the application was written using rule based Oracle 8. Or is it the virtual server? Or is it the fact that we have both the application and the database on the same server.
    I dont know if it is possible to have another Tomcat4.0 server running on our live server but connecting to the 10g database - what would happen with classes12.zip and classes12.jar? would there be a conflict?
    I would really appreciate some help here. You should know though that I am not a hardened java programmer - I can dabble, but am an Oracle Forms, Reports, Discoverer, SQL person by trade. I am also a trainee DBA, so again am not an expert by any means.
    Thanks in advance for your help
    Lizzie

    lizzie8 wrote:
    Hi, I have a system to support that is currently running on Tomcat 4.0 on a Windows Server 2003 R2 SP2 machine with 3.06Ghz, 4Gb Memory, 2Gb Page file connecting to an Oracle 8.1.6 database on a Windows NT 4 virtual server with 3.2Ghz, 1152Mb Memory, 1536Mb Page file.Tomcat 4? We're up to Tomcat 6. The important difference is the JDK supported. What JDK are you using for Tomcat?
    >
    I have another Windows virtual server 2003 R2 SP2 machine with 2Gb of memory and a 4Gb page. This server has Tomcat 4.0 and an Oracle 10.2.0.3.0 database. I have made sure that the Oracle 10g classes12.jar file is used.classes12.jar is pretty old technology. The JAR should match your JDK and version of Oracle.
    I am trying to run the application on the new server. In some tests I had users logging on one by one for the first 5 users - performance was great and the application ran faster than the current live system. When I then got another 10 - 15 people logging on the CPU stuck at 100% on the server, even exploring the server was almost impossible, and the application slowed down to unworkable.You don't say anything about the whether or not you're using a connection pool or what's happening to the open connections and cursors. If you find that those are drifting up over time, it's likely that the code isn't closing resources properly.
    We dont know if the problem lies with the very fact that we are trying to connect to a 10g database which is cost based and the application was written using rule based Oracle 8. Or is it the virtual server? Or is it the fact that we have both the application and the database on the same server.Database and app server should be separated, IMO.
    I dont know if it is possible to have another Tomcat4.0 server running on our live server but connecting to the 10g database - what would happen with classes12.zip and classes12.jar? would there be a conflict?
    I would really appreciate some help here. You should know though that I am not a hardened java programmer - I can dabble, but am an Oracle Forms, Reports, Discoverer, SQL person by trade. I am also a trainee DBA, so again am not an expert by any means.You need more data. Get some tools to see where the time is being spent. Start monitoring your Oracle connections and cursors to see what's going on. Install some filters to get raw timings on your Java calls. Without data, you're guessing in the dark.
    %

  • Oracle 10g Enterprise Manager Console bug?

    I think I have come across a bug in the Oracle 10g Enterprise Manager Console. If I go into my database, then into the schema, select your schema from the list, then tables. Now once your in your tables, find one that you know of and know fairly well, right click it, and select the show dependencies. A small window will open with just that table and its tablespace and user. Select user, database name, profile, then default. If you right click on the "default" and select "show dependencies" a blank blinking window will open and stay stuck in an infinite loop until you kill the application window. I think that this is a cumbersome tablespace issue. Any thoughts?

    Hi Ugonic
    Sorry both are same, it's spelling mistake it's " WCMMISLINK". Acutally, my database is getting updated but this alert log is getting generated in enterprise manager console of 10g.
    The sql statement is
    CREATE MATERIALIZED VIEW ADASNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM ADA@WCMMISLINK;
    CREATE MATERIALIZED VIEW BGTABSNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM BGTAB@WCMMISLINK;
    The above query is sheduled to run every day .
    and i get the following Alert log in 10g enterprise manager console
    Generic Alert log ORA-12012: error on auto execute of job 54
    ORA-04052: error occured when looking up remote object WCMM.SYS@WCMMSERVERLINK
    ORA-00604: error occured at recursive SQL level 3
    ORA-12514: tns no listener
    ORA-06512: AT "SYS.DBMS_SNAPSHOT" line 1883
    can you guid me why the above error are occuring
    Regards
    Niranjan

  • Oracle 10g Enterprise Manager console giving Alert log

    Dear all
    I have One HP server running Oracle 10g on Redhat Enterprise Linux 3.0 and two other systems with Oracle 9i and 8i. I have written sql query in my Oracle10g system which updates the database in 9i.
    The sql statement is
    CREATE MATERIALIZED VIEW ADASNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM ADA@WCMMISLINK;
    CREATE MATERIALIZED VIEW BGTABSNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM BGTAB@WCMMISLIN;
    The above query is sheduled to run every day .
    and i get the following Alert log in 10g enterprise manager console
    Generic Alert log ORA-12012: error on auto execute of job 54
    ORA-04052: error occured when looking up remote object WCMM.SYS@WCMMSERVERLINK
    ORA-00604: error occured at recursive SQL level 3
    ORA-12514: tns no listener
    ORA-06512: AT "SYS.DBMS_SNAPSHOT" line 1883
    can you guid me why the above error are occuring
    the ORA-12514: tns no listener
    the above error why it is occuring , then listener is running on oracle 10g server and other 8i and 9i server also and i am able to connect from oracle10g to other oracle 8i and 9i from sql plus and viceversa..
    what could be the problem with tns listener
    Regards
    Niranjan

    Hi Ugonic
    Sorry both are same, it's spelling mistake it's " WCMMISLINK". Acutally, my database is getting updated but this alert log is getting generated in enterprise manager console of 10g.
    The sql statement is
    CREATE MATERIALIZED VIEW ADASNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM ADA@WCMMISLINK;
    CREATE MATERIALIZED VIEW BGTABSNAP REFRESH FAST START WITH SYSDATE NEXT SYSDATE+1 AS
    SELECT * FROM BGTAB@WCMMISLINK;
    The above query is sheduled to run every day .
    and i get the following Alert log in 10g enterprise manager console
    Generic Alert log ORA-12012: error on auto execute of job 54
    ORA-04052: error occured when looking up remote object WCMM.SYS@WCMMSERVERLINK
    ORA-00604: error occured at recursive SQL level 3
    ORA-12514: tns no listener
    ORA-06512: AT "SYS.DBMS_SNAPSHOT" line 1883
    can you guid me why the above error are occuring
    Regards
    Niranjan

  • Oracle 10g on suse 9.1 Professional

    I recently moved to Linux suse 9.1 from the Windows background and I need to install Oracle 10g Database on Suse. I'll be glad to get a step by step instruction on installing oracle10g on suse Linux 9.1

    On following the installation guide, I got these errors on trying to log in to SQLPLUS
    SQL> startup
    ORA-01078:Failure in processing system parameters
    LRM-00109:Could not open parameter file '/u01/app/oracle/product/10.1.0/db_1/dbs/initsalesora'
    I was only able to make an idle connection and on running any script (even on dual table) I got the following errors:
    ORA-01034:Oracle not available

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • Oracle 10g R2 - Metadata Issue With Version Controlled Resources

    We are trying to utilize the Oracle 10g R2 feature that allows user-defined metadata to be attached to XML DB resources. However, we are encountering errors when we try to append/attach metadata to a version-controlled resource (VCR). The following steps were followed:
    1. Register a new schema to be used for metadata (XMLSCHEMA.registerSchema).
    2. Add a new resource to to the XML DB and make it version controlled (DBMS_XDB.createResource and DBMS_XDB_VERSION.makeVersioned).
    3. Checkout the newly created version-controlled resource (DBMS_XDB_VERSION.checkout)
    4. Add metadata to the version-controlled resource (DBMS_XDB.appendResourceMetadata)
    However, after step 4, the errors shown below are encountered:
    ========================================================
    begin
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [qmxStrCopy: INLOB 2], [], [], [],
    ORA-06512: at "XDB.DBMS_XDB", line 890
    ORA-06512: at line 2
    ========================================================
    The steps followed for adding metadata to a resource were taken from Chapter 26 of the "Oracle XML DB Developer's Guide 10G Release 2" (http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_repos_meta.htm#sthref2302).
    Is is possible to append and maintain metadata to an XML DB version controlled resource (VCR)? If so, what are the correct steps to do this? Note that if this is tried with a resource that is not version controlled, then no errors are encountered.
    Thanks,
    Steve

    It appears that this issue has been solved in the next release of the database
    QL> spool testcase.log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> var resourcePath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'metadata.xsd';
      3    :schemaPath := '/public/metadata.xsd';
      4    :resourcePath := '/public/metadataTest.txt';
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
      6          <xs:element name="root" type="rootType" xdb:defaultTable="METADATA_TABLE"/>
      7          <xs:complexType name="rootType" xdb:SQLType="METADATA_ROOT_T">
      8                  <xs:sequence>
      9                          <xs:element name="child" type="childType"/>
    10                  </xs:sequence>
    11          </xs:complexType>
    12          <xs:complexType name="childType" xdb:SQLType="METADATA_CHILD_T">
    13                                  <xs:sequence>
    14                                          <xs:element name="Child1" type="xs:string"/>
    15                                          <xs:element name="Child2" type="xs:string"/>
    16                                  </xs:sequence>
    17          </xs:complexType>
    18  </xs:schema>
    19  ');
    20  begin
    21    if (dbms_xdb.existsResource(:schemaPath)) then
    22      dbms_xdb.deleteResource(:schemaPath);
    23    end if;
    24    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    25  end;
    26  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE,
      7      enableHierarchy=>DBMS_XMLSCHEMA.ENABLE_HIERARCHY_RESMETADATA
      8    );
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    res boolean;
      3  begin
      4    if dbms_xdb.existsResource(:resourcePath) then
      5      dbms_xdb.deleteResource(:resourcePath,4);
      6    end if;
      7    res := dbms_xdb.createResource(:resourcePath,'Mary Had a Little Lamb');
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> select xdbUriType(:resourcePath).getClob()
      2  from dual
      3  /
    XDBURITYPE(:RESOURCEPATH).GETCLOB()
    Mary Had a Little Lamb
    SQL> declare
      2    resid raw(16);
      3  begin
      4    resid := dbms_xdb_version.makeVersioned(:resourcePath);
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> begin
      2    dbms_xdb_version.checkout(:resourcePath);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> set long 10000 pages 0 lines 150
    SQL> --
    SQL> select r.res.getClobVal()
      2    from resource_view r
      3   where equals_path(res,:resourcePath) = 1
      4  /
    <Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd" Hidden="false" Inv
    alid="false" VersionID="1" ActivityID="0" Container="false" CustomRslv="false" V
    ersionHistory="false" StickyRef="true">
      <CreationDate>2006-06-10T05:01:25.355009</CreationDate>
      <ModificationDate>2006-06-10T05:01:25.355009</ModificationDate>
      <DisplayName>metadataTest.txt</DisplayName>
      <Language>en-US</Language>
      <CharacterSet>UTF-8</CharacterSet>
      <ContentType>text/plain</ContentType>
      <RefCount>1</RefCount>
      <ACL>
        <acl description="Public:All privileges to PUBLIC" xmlns="http://xmlns.oracl
    e.com/xdb/acl.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sch
    emaLocation="http://xmlns.oracle.com/xdb/acl.xsd                           http:
    //xmlns.oracle.com/xdb/acl.xsd">
          <ace>
            <grant>true</grant>
            <principal>PUBLIC</principal>
            <privilege>
              <all/>
            </privilege>
          </ace>
        </acl>
      </ACL>
      <Owner>SCOTT</Owner>
      <Creator>SCOTT</Creator>
      <LastModifier>SCOTT</LastModifier>
      <SchemaElement>http://xmlns.oracle.com/xdb/XDBSchema.xsd#binary</SchemaElement
    >
      <Contents>
        <text>Mary Had a Little Lamb</text>
      </Contents>
      <VCRUID>15DE79F263F7CC00E040578C2A0656F8</VCRUID>
    </Resource>
    SQL> begin
      2    dbms_xdb.appendResourceMetadata(:resourcePath,xmltype(
      3  '<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      4         xsi:noNamespaceSchemaLocation="metadata.xsd">
      5      <child>
      6        <Child1>AAA</Child1>
      7        <Child2>BBB</Child2>
      8      </child>
      9  </root>'));
    10  end;
    11  /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> select r.res.getClobVal()
      2    from resource_view r
      3   where equals_path(res,:resourcePath) = 1
      4  /
    <Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd" Hidden="false" Inv
    alid="false" VersionID="0" ActivityID="0" Container="false" CustomRslv="false" V
    ersionHistory="false" StickyRef="true">
      <CreationDate>2006-06-10T05:01:25.355009</CreationDate>
      <ModificationDate>2006-06-10T05:01:25.558913</ModificationDate>
      <DisplayName>metadataTest.txt</DisplayName>
      <Language>en-US</Language>
      <CharacterSet>UTF-8</CharacterSet>
      <ContentType>text/plain</ContentType>
      <RefCount>1</RefCount>
      <ACL>
        <acl description="Public:All privileges to PUBLIC" xmlns="http://xmlns.oracl
    e.com/xdb/acl.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sch
    emaLocation="http://xmlns.oracle.com/xdb/acl.xsd                           http:
    //xmlns.oracle.com/xdb/acl.xsd">
          <ace>
            <grant>true</grant>
            <principal>PUBLIC</principal>
            <privilege>
              <all/>
            </privilege>
          </ace>
        </acl>
      </ACL>
      <Owner>SCOTT</Owner>
      <Creator>SCOTT</Creator>
      <LastModifier>SCOTT</LastModifier>
      <SchemaElement>http://xmlns.oracle.com/xdb/XDBSchema.xsd#text</SchemaElement>
      <Contents>
        <text>Mary Had a Little Lamb</text>
      </Contents>
      <VCRUID>15DE79F263F7CC00E040578C2A0656F8</VCRUID>
      <Parents>15DE79F263F8CC00E040578C2A0656F8</Parents>
      <root xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNam
    espaceSchemaLocation="metadata.xsd">
        <child>
          <Child1>AAA</Child1>
          <Child2>BBB</Child2>
        </child>
      </root>
    </Resource>
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.0.0 - Alpha
    With the Partitioning and Data Mining options
    I've filed bug 5313655 for the 10.2.x behavoir. If this is important to you you might want to consider signing up for the forthcoming beta program for the next release of the database

  • Oracle 10g instalattion on new server

    I need to install Oracle Database Satnadard 10g on my new server Dell PowerEdge 2900.
    First I need to install the LINUX on it, can any tell me what is the best for the Oracle DB:
    - RedHat ES or Suse 9 or Suse 10, I work with slackware in preasent time.
    - ext3 or reiserfs ist best for DB
    - how I can make partitions for Linux and Oracle
    Oracle 10g Standard Edition
    Processor 2 GHz dual-core xeon
    Memory 2 GB Ram
    Storage controller Perc5i
    Hard Disk 76 GB X 6 10K Hot swap
    I think about:
    suse 10
    ext3
    2 x HDD on system in raid 0
    4 x HDD on oracle in raid 1+0
    partition: /boot, swap, /, /var, /usr, /home,
    swap 2MB

    RedHat ES or Suse 9 or Suse 10, I work with slackware in preasent time.RHEL 4 is simple and there is TONS of info on installing/supporting Oracle on it. I would use that.
    ext3 or reiserfs ist best for DBActually, this might surprise you but for the Oracle stuff you might want to use plain old ext2. Journaling on tablespace files (and redo logs) isn't so much fun. Use ext3 for your root partition though.
    how I can make partitions for Linux and OracleI would do /, /tmp, and /oracle at a minimum. If this is going to be an Oracle server and not something people have shell access to, you don't need /boot, /home, /var, and /usr to be separate partitions.
    Storage controller Perc5iDoes the perc5i allow more than 4 disks per volume? If so, do 6xHDD on a RAID10. Otherwise, to 2xHDD on a RAID1 for / and /tmp and do 4xHDD in a RAID10 for /oracle.
    ~Jer

Maybe you are looking for

  • MacBook Air won't wake after shutting lid

    Hey guys, My 11" Macbook air OsX 10.6.8 goes to sleep when I shut the lid with external monitor plugged in. The problem is, it will not un-sleep anymore. Usuall just opening the lid would do this, but now it just stays blank on both monitors. Pressin

  • Zen Stone Plus softw

    Hello I'm trying to download software for my Zen Stone Plus, but the Creative website gives me the famous "page can not be displayed". Can someone please send me the english installer or post a link that works? does not work -->? http://files2.europe

  • PETITION FOR NSU TO POST FIRMWARE CHANGELOG

    Won't it be better for the NSU to have changes/improvements of firmware so users if they wish to update can do so. Many users update firmware & then find it is not good then some users send there handset back to their retailer n get another handset w

  • How to identify token

    Hi, i am tokenizing a string... on the bases of pipe symbol( | ) if i get two consecutive pipe( | | )than how i ll identify this thing .

  • No biggie, but did anyone receive a cleaning cloth with their 3gs?

    I just sold my 3g and gave away my cloth with it, had I known I wouldn't get one back, I would have kept my old one. My GF didn't get one with heres either. I know it has the new oil resistant screen but, they Still recommend a lint free cloth to cle