Database modeling and -concepts

Hello,
I'm still quite new to Oracle Databases.
At the moment I'm looking into the topics round "database modeling", "database concepts", e.g. rules to design the tables and relationships and so on.
Maybe someone can help me where I can find some whitepapers, documentations on Oracle sites which show me the best or basic ways how to define tables and relationships between database objects in an Oracle Database?
For example, i heard it would be a good way to put all "not null" columns of a table to the beginning when defining it with "CREATE TABLE"-statement.
Does anyone know where i can find helpful whitepapers or documentations on these topics in the ORacle Technology Network or somewhere else?
Thanks a lot for your help in advance!
Rgds

First of all you need to distinguish between data modelling and implementation. Because many tools only deal with the physical side of database design (tables, columns, indexes) it is quite common for beginners to miss this distinction.
Data modelling (entities, attributes and relationships) is not a product specific topic and you might be best off looking at generic sites. William Kent wrote a simple introduction to the five Normal Forms. Then check out DataModel.org. Alf Pedersen has some good papers on an assortment of database design issues. If you want a head start on modelling, Barry Willaims has[b]published more sample designs than you could shake a stick at (they are for MSSQL but still quite helpful).
Cheers, APC

Similar Messages

  • Problems with database modelling and primary keys

    Hi,
    I use JDeveloper exclusively for data modelling and generating the sql to build my db.
    Its good but i have found a bug that can be rather annoying:
    If i change the primary key of a table, the change does not seem to register within the model. So when i try and create a foreign key relationship to another table, the type is of the old type (say i went from varchar2 to number).
    The only way around this is to delete the table and create it again. This also causes problems because the db generation wizard will then refuse to open properly (because it does not know that a table has been deleted).
    Is this a known issue?
    Cheers
    Rakesh

    Is this forum meant for reporting bugs or not? This issue i have stated is repeatable and in the current version.
    R

  • Database Modeling and Design with Sql Developer

    Hi
    After attending Open World and the session wrt the above, is it possible to obtain a stand alone beta version? We are in between tools and would really like to present the above to our team as an option.
    Thanks.
    Leon.
    Edited by: Leond on Oct 1, 2008 6:10 AM

    You may want to Google "RSS".
    You need a Feed Reader - something like Google Reader or Thunderbird.
    Then, you need to click the orange square up in the URL box. If you have a feed reader, it will walk you through the setup, etc.
    --s                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Importing Models and DataBase Schema

    JDeveloper 10.1.3.0.3.342
    I have a model generated some minutes ago. I move the model to another position.
    Then I delete the reference into the project.
    I import the files.
    I try to open the UML/DataBase model and I receive this error.
    But when I check the structure, it is correct (also links between classes seemt to be there).
    What could be the problem?
    Stefano
    Message
    BME-99003: An error occurred, so processing could not continue.
    Cause
    The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.NullPointerException
         at oracle.bm.common.BaseCmnAppContext.getPackageName(Unknown Source)
         at oracle.bm.jcm.resolve.JCMBridge.attach(Unknown Source)
         at oracle.bm.addinUtil.IDEAppContext.manageModelBridges(Unknown Source)
         at oracle.bm.addinUtil.IDEAppContext.open(Unknown Source)
         at oracle.bm.common.BaseCmnAppContext.open(Unknown Source)
         at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:240)
         at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:148)
         at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:91)
         at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
         at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
         at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
         at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:278)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1261)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
         at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1131)
         at oracle.ideimpl.editor.EditorManagerImpl.whenOpenEditor(EditorManagerImpl.java:2332)
         at oracle.ideimpl.editor.EditorManagerImpl.handleDefaultAction(EditorManagerImpl.java:1893)
         at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:354)
         at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1504)
         at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:1841)
         at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:1862)
         at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:176)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Action
    If further errors occur, you should restart the application.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.
    ________________________________________________________________________________

    Hi,
    You can open the designer and go to the models tab. You have to import a set of tables in a model folder with the help of a reverse knowledge module or RKM. Please check the getting started guide for more information.
    Thanks

  • EAV modelling approach on database tables and how to use it in Forms Dvl

    Hello,
    I am dealing with two tables in data modell which are structured on EAV ( Entity-Attribute-Value ) modelling approach.
    Survey( Survey# number not null,
    Start_Date_Of_Survey date not null ,
    End_Date_Of_Survey date null,
    Sts_Of_Survey varchar2( 4 ) not null ,
    Contractor_Partner# number not null, -- reference foreign key, to Partner's Table
    Survey_Report CLOB ) ;
    Survey# primary key of Survey.
    Meta_Survey_Parameter_Register( Parameter# varchar2( 40 ) not null,
    Additional_Parameter_Desc varchar2( 240 ) null,
    Type_Of_Value varchar2( 60 ) not null,
    Data_Type varchar2( 10 ) not null,
    Unit varchar2( 10 ) null,
    High_Value varchar2( 20 ) null,
    Low_Value varchar2( 20 ) null );
    Type_Of_Value Is restricted to : ATOMIC_VALUE, INTERVAL_VALUE_FROM_TO
    Data_Type is restricted to: Date, time, number( X,Y ), varchar2,
    Unit is varchar2 value not resstricted: for example: %, kg as kilo, m as meter, m/s as meter per second, null
    This table is meta table so it suppose to be used as some register - static part of the schema.
    Then I have table which attaches Parameters to the Survey as the association table
    Survey_Parameters( Survey#, Parameter#, Value, Comment );
    Primary key( Survey#, Parameter# );
    I need to implement this in Forms and Reports.
    My question is how to implement it to maximally make good use of Oracle forms 10g or 11g features and Oracle Reports 10g:
    a) when fulfilling the survey and use of parsing rules supplied in Meta_Survey_Parameter_Register
    b) at the producing as the survey report with reports
    c) in data analyisis in data warehouse impementations.

    Hello Craig,
    Thank you Craig for your answer.
    I must confess that I am also not familiar with EAV theoretical background and concept. Till recently I even did not know that this kind of problem could be placed
    in theoretical background called EAV. This put smile nad releive on my mind. Because since this moment I do not feel this kind of problem as some exception or
    some exceptional tools or data design ( object modelling and object databases ) suppose to be used. This way I can still counted on concepts in RDBMS databases
    and applications. Well I guess so.
    Let me comment and answer on your text between your lines.
    I am only conceptually familiar with EAV modeling, so I don't claim to be an expert! ;-) Given the abstract way in which data is stored with EAV, I would suggest that you first create a SQL Query that will produce the desired record set.
    Ok. But I guess you have in mind to transform vertical set of values to horizontal ( pivoting, transposing )?
    View has cast operator that transform data type of each parameter from general ( e.g. varchar2 ) to the one that is registered in the
    Meta_Parameter_Register. This way it is provided to get the survey with the list of assigned parameters in horizontal shape?
    Once you have this, you can either use the Query as the source of a Database View and then base your Forms data block on this view or you can use the query in a Procedure and base your Forms data block on the procedure or lastely, you could use the query directly and base your Forms data block on the query using the "From Clause" option.
    Ok, I think I understand it.
    So When I have horizontal list there is challenge during
    - insert
    - delete
    - update
    operations how to handle these operations to transform to vertical operation.
    This could only be done with Forms data block based on procedure and instead of triggers?
    The simplest option would be to create a DB view and base your block on the view. You will not be able to update the data however. If you need to be able to change or add new data, I would suggest you use a Procedure based block. Take a look at these links for additional information on using Procedure and From Clause based blocks.
    Ok Craig, sounds like it makes sense.
    IT seems your suggestion is caling for some simpler example with the same characteristic of the problem.
    Like two tables:
    Master( Master#, ..... )
    Detail( Master#, Detail#, value_low_or_just_value, value_high, data_type )
    Forms: How to base a block on a FROM clause Query
    Forms: How to base a data block on a Procedure
    Ok,
    Hope this helps,
    I see your point and it makes sense , it is only the challenge to see how much of flexibility I can reach and how cheap workarounds are to preserve
    the level of flexibility in the tools that are not naturally supporting EAV ( like forms and reports ).
    If someone's response is helpful or correct, please mark it accordingly.
    Sure...
    We are on the line.
    I am sure there is someone else in the community that experienced this kind of challenge.

  • Good database design and modelling books

    Hi ,
    I need to work on designing a database from the scratch by creating logical database design and then physical database design.I'm new to database design.
    Can someone please point me to some good database design and modelling related books /tutorials.
    Regards,
    Bharath.

    bharathDBA wrote:
    Hi Girish Thanks for the information.
    I would definitely look into this book later.
    I don't mind paying any amount of money,if that book gives me the knowledge I want.
    As this book is international edition,for shipping it is taking 8-10 business days and by that time I need to complete designing my database and probably I might need to some other book.
    Is this a school assignment? I hope so. Referring back to your opening statement "I need to work on designing a database from the scratch by creating logical database design and then physical database design.I'm new to database design." I can only say that database design is a very big subject. If you are starting from a position of no knowledge at all, I'm afraid there is nothing that is going to give you the knowledge you need in the time frame you have. I will say you need to start by learning the rules of Data Normalization. Make your logical design Third Normal Form. Good can be your friend. There is actually a pretty good write-up on Data Normalization on Wikipedia.

  • Create repository from database model- snowflake facts and dimension joins

    I am working on a project that has a database model similar to the image in the link below.
    There are other few tables around it, but this generally represent the spine or major database model. This is not exactly a snowflake schema as there are no intrinsic hierarchy in the dimension tables. As you can see dim2 and dim4 has one to many relationship with dim3. there are joins between the fact tables as well.
    From some blogs and forum threads, I found out that I can create one fact/dimension table by joining many fact/dimension tables. Is this a right approach? Any thoughts on this model please?
    Thanks,
    Rakesh
    ps: I am using Windows XP Pro and OBIEE 10.1.4.3.1 and right now analyzing the data to create a repository.

    Hi Rakesh,
    As above post says you combine all fact tables into single fact table with other dimension tables so it would become a simple start schema .Go throught these blogs for further information .
    http://forums.oracle.com/forums/thread.jspa?threadID=2124061&tstart=0
    http://www.obinotes.com/2010/08/joins-within-logical-table-sources-in.html#comment-form
    Hope it helps you.Seems your new to forum you sud follow these rules http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • Insert XML file into Relational database model without using XMLTYPE tables

    Dear all,
    How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
    I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
    However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
    We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
    The database does and will not contain XMLTYPES, only plain RDBMS tables.
    Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
    Constraints : Input via XML files defined by third party
    Storage : relational database model with hundreds of tables and thousands of existing queries that can not be touched. The model must not be altered.
    Target : get this XML into the database on a daily basis via an automated process.
    Cheers.
    Luc.

    Luc,
    your Doomed !
    If you would try something like DBMS_XMLSTORE, you probably would be into serious performance problems in your case, very fast, and it would be very difficult to manage.
    If you would use a little bit of XMLType stuff, you would be able to shred the data into the relational model very fast and controlable. Take it from me, I am one of those old geezers like Mr. Tom Kyte way beyond 40 years (still joking). No seriously. I started out as a classical PL/SQL, Forms Guy that switched after two years to become a "DBA 1.0" and Mr Codd and Mr Date were for years my biggest hero's. I have the utmost respect for Mr. Tom Kyte for all his efforts for bringing the concepts manual into the development world. Just to name some off the names that influenced me. But you will have to work with UNSTRUCTURED data (as Mr Date would call it). 80% of the data out there exists off it. Stuff like XMLTABLE and XML VIEWs bridge the gap between that unstructured world and the relational world. It is very doable to drag and drop an XML file into the XMLDB database into a XMLtype table and or for instance via FTP. From that point on it is in the database. From there you could move into relational tables via XMLTABLE methods or XML Views.
    You could see the described method as a filtering option so XML can be transformed into relational data. If you don't want any XML in your current database, then create an small Oracle database with XML DB installed (if doable 11.1.0.7 regarding the best performance --> all the new fast optimizer stuff etc). Use that database as a staging area that does all the XML shredding for you into relational components and ship the end result via database links and or materialized views or other probably known methodes into your relational database that isn't allowed to have XMLType.
    This way you would keep your realtional Oracle database clean and have the Oracle XML DB staging database do all the filtering and shredding into relational components.
    Throwing the XML DB option out off the window beforehand would be like replacing your Mercedes with a bicycle. With both you will be able to travel the distance from Paris to Rome, but it will take you a hell of lot longer.
    :-)

  • Differences between operational systems data modeling and data warehouse da

    Hello Everyone,
    Can anybody help me understand the differences between operational systems data modeling and data warehouse data modeling>
    Thanks

    Hello A S!
    What you mean is the difference between modelling after normal form like in operational systems (OLTP) e. g. 3NF and modelling a InfoCube in a data warehouse (OLAP)?
    While in a OLTP you want to have data tables free of redundance and ready for transactions meaning writing and reading few records often, in an OLAP-system you need to read a lot of data for every query you do on a database. Often in an OLAP-system you aggregate these amounts of data.
    Therefore you use another principle for these database scheme. This is called star schema. This means that you have one central table (called fact table) which holds the key figures and have keys to another tables with characteristics. These other tables are called dimension tables. They hold combinations of the characteristics. Normally you design it that your dimensions are small, so the access  on the data is more efficent.
    the star scheme in SAP BI is a little more complex than explained here but it follows the same concept.
    Best regards,
    Peter

  • Direct database request and session variable value

    Hi,
    I have a problem by doing the following : idea is to have report with a list of all tables in user schema (which are not all in repository physical layer).
    By clicking on the name of any, should bring answer report which is done as direct database request doing basically select * from table_clicked (this will be basically the same table with sufix _err holding error rows).
    What I'm trying to do is having some kind report for error rows which can be in different tables in my database. So i had in mind to construct name of table i need , and pass it to database request through session variable. Am i doing right by doing direct database request like this :
    select * from 'VALUEOF(NQ_SESSION.TestVar2)'
    Is there another easyer way of doing this? I know this can be done by gourl by passing parameters but not sure how when i can't filter columns in direct database request (this can be different tables with different names of columns). I hope i didn't complicated this too much.
    Thnx in adwance

    Hi,
    I know this is a hack, and would be much more easy to create one table with dimension and measures, but this is intended to be used with code generator, which can produce different error tables with different column names in different time: It is not conviniet for somebody to add them to repository every 5 minutes. For example : i run my workflow and for first run I have errors in table1(let us say customer table with 30 columns) and if click on the table name in some answer report, i want to see all the bad records in the table. Tomorrow after the run, there are bad records in table1 and in table2 (lets say products) so I would have choice to pick table 1 or table2 and see al the bad records in any of these tables. This means that I can not now which tables will I have tomorrow, and as it is generic, I can manually add some tables in my model, and would have to add err table also as a possibility to have error rows?
    I saw post saying that you can pass parameter value by using go url functionality, by modifying configinstance file, but didn't suceed - http://gerardnico.com/wiki/dat/obiee/logical_sql/obiee_session_variable_go_url . Maybe some mistake or any better solution? I created session variable TestVar2, also modified instanceconfig.xml by adding this before </ServerInstance>
    <ParamList>
    <Param name="NQ_SESSION.TestVar2" source="url" nameInSource="SETVAR"/>
    </ParamList>
    and used go url in column formula : ''||"Physical Targets"."Physical Table"||''
    Can I use @1 for using first column value?
    Thnx

  • Install instructions for Search Modeler and integrating with Apps 11i

    Below are all the steps I took for creating integrating Search Modeler with an Oracle E-Business Suite 11.5.10.2 ATG RUP 7 instance called ERNIE.
    Much thanks to Oracle Support ( Rajesh Ghosh, Vikas Soolapani and Roger Ford), as this simply wouldn't have been possible without them.
    There are a few things in this document that may not be pertinent to your environment if you're doing this. I've made attempts to clarify those possibly optional sections in the documentation.
    I've broken the document down into the following multiple parts
    o Setting up a new RedHat 4.8 x86 server called ausSEARCHdev (The server is in AUStin, TX, is dedicated to SEARCH, and is for our DEV environment)
    o SES (Secure Enterprise Search 10.1.8.2 install
    o SES 10.1.8.4 patchset install
    o SES CPU patch apply
    o Standalone OC4J and ADF installation
    o Search Modeler installation and configuration
    o Configure ERNIE Apps instance to be on valid self-signed SSL certificate
    o Import ERNIE SSL certificate into SES and Search Modeler
    using aussearchdev initially
    rh4 x86, default oracle build
    ** htop and collectl are open source free performance monitoring packages we utilize**
    --start
    install htop and collectl
    wget http://dag.wieers.com/rpm/packages/htop/htop-0.7-1.el4.rf.i386.rpm
    rpm -ivh htop-0.7-1.el4.rf.i386.rpm
    wget http://downloads.sourceforge.net/project/collectl/collectl/collectl-3.4.0-4/collectl-3.4.0-4.noarch.rpm?use_mirror=voxel
    rpm -ivh collectl-3.4.0-4.noarch.rpm
    chkconfig collectl on
    service collectl start
    **We still need to install the necessary rpms so that collectl logs are compressed
    --end
    useradd -u 501 oracle
    groupadd -g 504 dba
    usermod -G 504 oracle
    verification:
         [root@aussearchdev ~]# su - oracle
         [oracle@aussearchdev ~]$ id
         uid=501(oracle) gid=501(oracle) groups=501(oracle),504(dba)
    passwd oracle
    ** /mnt/oraclebackup is a network dumpspot we use to hold Software installs, RPMs, etc
    ** /mnt/rpms is a network dumpspot we use to hold ISOs for OS software such as Redhat Linux
    mkdir /mnt/oraclebackup
    mkdir /mnt/rpms
    add the following to /etc/fstab
    XXXXXXX:/patches/oraclebackup /mnt/oraclebackup nfs defaults,hard,nolock 0 0
    XXXXXXX:/esxpress/nfs /mnt/rpms nfs rw,addr=XXX.XXX.XXX.XXX 0 0
    mount /mnt/rpms
    Next need to install various oracle needed RPMs.
    cd /mnt/rpms/rh40_upd8/RedHat/RPMS/
    rpm -ivh perl-Compress-Zlib-1.42-1.el4.i386.rpm
    rpm -ivh libaio-devel-0.3.105-2.i386.rpm
    rpm -ivh sysstat-5.0.5-25.el4.i386.rpm
    rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
    service collectl restart
    cd /tmp
    wget http://oss.oracle.com/el4/oracle-validated/oracle-validated-1.0.0-18.el4.i386.rpm
    rpm -ivh oracle-validated-1.0.0-18.el4.i386.rpm
    Now we should have all the RPMs we need.
    cd /etc/sysconfig/oracle-validated
    ./oracle-validated-verify
    cd /var/log/oracle-validated/results
    more orakernel.log
    uname -a
    should return 2.6.9 or higher
    rpm -qa|grep gcc-
    should return 3.4.3 or higher
    rpm -qa|grep glibc
    should return 2.3.4-2.9 or higher
    rpm -qa|grep make
    should return 3.80 or higher
    rpm -qa|grep binutils
    should return 2.15.92.0.2 or higher
    rpm -qa|grep openmotif
    should return 2.2.3-9.RHEL4.1 or higher
    rpm -qa|grep compat-db
    should return 4.1.25-9 or higher
    rpm -qa|grep setarch
    should return 1.6-1 or higher
    cat /proc/sys/kernel/sem
    should return 250 32000 100 128 or higher (250 32000 100 142 in our case)
    cat /proc/sys/kernel/shmall (1073741824 in our case)
    should return 2097152 or higher
    cat /proc/sys/kernel/shmmax
    should return half the size of physical memory (4294967295 in our case - NO LARGER on 32-bit OS)
    cat /proc/sys/kernel/shmmni
    should return 4096
    cat /proc/sys/fs/file-max
    should return 65536 (327679 in our case)
    cat /proc/sys/net/ipv4/ip_local_port_range
    should return 1024 65000
    values in /etc/security/limits.conf set by oracle-validated rpm, no changes necessary
    add the following line to /etc/pam.d/login
    session required /lib/security/pam_limits.so
    add the following to /etc/profile
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    mkdir -p /d01/oracle
    chmod 777 /d01/oracle
    init 6 the box (aka reboot)
    Time to start the SES 10.1.8.2 installer
    running SES 10.1.8.2 installer
    as oracle
    cd /mnt/oraclebackup/deathstar_patches/SES/SES10182
    ./runInstaller
    search server name sesprod
    administrative password XXXXXXXX for dev,
    http port 7777
    destination path /d01/oracle/10.1.8/sesdev (dev)
    data storage path /d01/oracle/sesdevdata (dev)
    next
    inventory /d01/oracle/oraInventory
    dba group
    run orainstroot.sh as requested
    continue
    all tests should pass, continue
    finished clean
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    Now we need to get to 10.1.8.4 of SES
    (yes, you need to keep the system up)
    cd /mnt/oraclebackup/deathstar_patches/SES/SES10184/ses_10184pst_linux/
    ./runInstaller
    Destination, choose sesdev
    Next
    Patchset successful
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    Apply CPU Patch to SES
    CPU JAN 10 says patch 9119261 is required - but patch requires extended support contract
    CPU OCT 09 says patch 8836540 is required - but patch requires extended support contract
    CPU JUL 09 says patch 8534394 is required - but patch requires extended support contract
    CPU APR 09 says patch 8290534 is required - and you can actually download it
    Need opatch from 6880880
    cp -r /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/OPatch $ORACLE_HOME
    export PATH=$ORACLE_HOME/OPatch:$PATH
    shut down everything
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/8290534
    opatch apply
    cd $ORACLE_HOME/cpu/CPUApr2009
    **Note: your sys password is what you set for your administrative password above
    sqlplus "sys/XXXXXX" as sysdba;
    startup
    @catcpu
    @?/rdbms/admin/utlrp
    shutdown immediate
    exit
    cd /d01/oracle/10.1.8/sesdev/cpu/view_recompile/
    sqlplus "sys/XXXXXXX" as sysdba;
    startup upgrade;
    @view_recompile_jan2008cpu.sql
    @?/rdbms/admin/utlrp
    shutdown immediate
    cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/ext
    mv mail.jar $HOME/mail.jar.backup02222010
    mv mailapi.jar $HOME/mailapi.jar.back02222010
    cp /d01/oracle/10.1.8/sesdev/search/lib/mail.jar .
    SES 10.1.8.4 is now installed and updated with latest available CPU
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    we're going to go with the standalone OC4j 10.1.3.3 and Oracle ADF 10.1.3.3 method
    The URLs for these products are
    http://blogs.oracle.com/ebssearch/2009/10/available_now_oracle_search_modeler_11_for_oracle_e-business_suite_11i.html
    and specifically
    OC4J - http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    ADF - http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller10133.html
    OC4J install
    First you need to have Java 1.5 on the machine. Latest is 1.5.0_22. Package is in /mnt/oraclebackup/deathstar_patches/SES
    as root on aussearchdev
    cd /usr/local
    cp /mnt/oraclebackup/deathstar_patches/SES/jdk-1_5_0_22-linux-i586.bin .
    chmod 700 jdk-1_5_0_22-linux-i586.bin
    ./jdk-1_5_0_22-linux-i586.bin
    yes
    install OC4J just by copying over the directory
    as oracle on aussearchdev
    mkdir -p /d01/oracle/oc4j
    cd /d01/oracle/oc4j
    cp -r /mnt/oraclebackup/deathstar_patches/SES/oc4j/* .
    ADF install
    vi /mnt/oraclebackup/deathstar_patches/SES/adf/adfinstaller.properties
    change the following
    OracleHome = /mnt/oraclebackup/deathstar_patches/SES/adf
    DesHome = /d01/oracle/oc4j/
    type = OC4J
    as root
    cd /usr/bin
    rm java
    (yes)
    ln -s /usr/local/jdk1.5.0_22/bin/java
    su - oracle
    java -version     should now return 1.5.0_22
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    cd /mnt/oraclebackup/deathstar_patches/SES/adf
    java -jar runinstaller.jar -version
    returns The version for the ADF libraries being installed is 10.1.3.41.57 - yes, that is apparently 10.1.3.3.
    java -jar runinstaller.jar adfinstaller.properties
    output looks good, do not be concerned by
    WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/bc4j' whilst deleting bc4j application
    WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/datatags' whilst deleting datatags application
    as it was trying to delete the old version that didn't exist
    Start OC4J
    as oracle on aussearchdev
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    cd $ORACLE_HOME/bin
    ./oc4j -start
    you will be prompted for password - we're setting it. use XXXXXXXXXX
    after it's up, kill it (ctrl-c) and restart it with
    nohup ./oc4j -start &
    last lines in nohup.out is
    Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
    10/02/23 03:22:38 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    So now on to search modeler installation, going by Installation steps in Note 781366.1
    8326128 - This is not a patch to be applied to the Apps, keep reading
    as oracle on aussearchdev
    cd /mnt/oraclebackup/deathstar_patches/SES/8326128
    mkdir -p /d01/oracle/oc4j/uploaded
    vi build.properties, changing
    installation.type=OC4J
    oracle.home=/d01/oracle/oc4j
    deploy.server=aussearchdev.domainname.com
    deploy.port=23791
    web.port=7777
    password=XXXXXXXXX
    extra.classpath=/d01/oracle/oc4j/uploaded
    now set the following environment values in your ssh session
    export ORACLE_HOME=/d01/oracle/oc4j
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
    ant main
    whole bunch of stuff to screen, errors due to undeploy something that doesn't exist. Finished after a minute with
    BUILD SUCCESSFUL
    Total time: 58 seconds
    Now on to post install steps
    restart OC4j
    cd $ORACLE_HOME/bin
    ./modeler.sh -shutdown -port 23791 -password r*l*r*0*
    export ORACLE_HOME=/d01/oracle/oc4j
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
    nohup ./modeler.sh -start &
    end of nohup.out should show
    Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
    Try going to http://aussearchdev:8888/modeler/faces/ModelerHome.jsp
    Should get login screen, but wait, we haven't installed Oracle Apps interface yet...
    Next let's do the Apps side of things
    Going by note 953378.1
    Using ERNIE (a development instance of E-Business Suite running 11.5.10.2 ATG RUP 7)
    as applmgr on ausernieapp (ausernieapp is our app tier)
    shut down apps services
    apps patch 8225631
    verify all the pre-req patches are in ERNIE
    select * from ad_bugs where bug_number = '5903765';
    select * from ad_bugs where bug_number = '6372396';
    select * from ad_bugs where bug_number = '3219567';
    select * from ad_bugs where bug_number = '3264822';
    select * from ad_bugs where bug_number = '3261254';
    select * from ad_bugs where bug_number = '5161676';
    select * from ad_bugs where bug_number = '3036401';
    select * from ad_bugs where bug_number = '3263588';
    select * from ad_bugs where bug_number = '3264818';
    select * from ad_bugs where bug_number = '3218526';
    select * from ad_bugs where bug_number = '3263645';
    select * from ad_bugs where bug_number = '4206794';
    select * from ad_bugs where bug_number = '3262486';
    select * from ad_bugs where bug_number = '3261243';
    select * from ad_bugs where bug_number = '2614213';
    select * from ad_bugs where bug_number = '3262159';
    select * from ad_bugs where bug_number = '2819091';
    select * from ad_bugs where bug_number = '3412795';
    patch went in smooth
    Log in to ERNIE Apps GUI as sysadmin user responsibility
    Give users such as sysadmin FND Search Crawler responsibility
    Go to system profile options, set
    set FND: Search Enabling Flag to Y at site level
    as applmgr on ausernieapp
    cd /d01/oracle/ernieappl/fnd/11.5.0/patch/115/sql
    sqlplus apps/$APPS_PWD @AFSRCHCF
    Enter SES endpoint URL [e.g. http://ap637atg.us.oracle.com:7780]: http://aussearchdev.domainname.com:7777
    Enter Apps Admin username [e.g. sysadmin]: sysadmin
    Enter Apps Admin password: sysadmin_password
    Enter SES Admin username [e.g. eqsys]: eqsys
    Enter SES Admin password: eqsyspassword <-- This is the same as sys's password
    on aussearchdev as oracle
    had to kill modeler and start all the processes, so
    kill -9 the modeler oc4j process, then
    cd $ORACLE_HOME/bin
    ./searchctl startall
    enter the password when prompted
    in IE browser go to
    http://aussearchdev.domainname.com:7777/search/admin
    log in with eqsys password
    global settings tab
    identity management setup
    click circle next to oracle.search.plugin.security.identity.ebs.EBS12IdentityPliginMgr
    (yes, we're going with 12 even though we use Oracle Apps 11i)
    http end point https://ausernieapp.domainname.com:8443/webservices/AppSearch/SecurityService
    username sysadmin
    password XXXXXXX
    finish
    Global Settings
    Federation Trusted Entitites
    ####entity name sysadmin
    ####Entity Password XXXXXXXX
    According to web conference with Oracle, this should NOT be eqsys but instead be sysadmin from above.
    Select the Use Entity Plug-in for authentication check box
    add
    Trying to go to http://aussearchdev.domainname.com:7777/search/query/search and login (sysadmin / password)
    stop midtier on both SES and Apps
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    ./adstpall.sh apps/$APPS_PWD on EBS app tier
    start midtier on both SES and Apps
    cd $ORACLE_HOME/bin
    ./searchctl startall
    ./adstrtal.sh apps/$APPS_PWD on EBS app tier
    Now try and log in to Oracle SES user interface to verify the configuration
    http://aussearchdev.domainname.com:7777/search/query
    Now start up modeler again
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    export PATH=$ORACLE_HOME/bin:$PATH
    cd $ORACLE_HOME/bin
    nohup ./modeler.sh -start &
    Works now.
    Now go to http://aussearchdev.domainname.com:8888/modeleradmin/AdminHome.jsp log in as oc4jadmin/XXXXXXX
    Configure new target
    Target Type 11i
    Description ERNIE
    Name ERNIE
    EBS Database Host Name auserniedb
    EBS Database Port 1521
    EBS Database SID ERNIE
    username apps
    password XXXXXXXXx
    oc4jadmin XXXXXXXx
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    export PATH=$ORACLE_HOME/bin:$PATH
    cd $ORACLE_HOME/j2ee/home
    java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXXXX -addDataSourceConnectionPool -name "ERNIE2-pool" -factoryClass "oracle.jdbc.pool.OracleDataSource" -dbUser "apps" -dbPassword "XXXXXXX" -url "jdbc:oracle:thin:@auserniedb.domainname.com:1521:ERNIE" -applicationName appsearch
    java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXX -addManagedDataSource -name "ERNIEDS" -jndiLocation "jdbc/ERNIEDS" -connectionPoolName "ERNIE2-pool" -applicationName appsearch
    http://aussearchdev.domainname.com:8888/modeler/faces/ModelerHome.jsp
    So, creating a self signed SSL certificate for ERNIE EBS instance (this will not work if you use an SSL certificate for another server like say, PROD)
    doing this on ausernieapp
    openssl genrsa -des3 -out ausernieapp.key 1024
    PEM key is ausernieapp
    openssl req -new -key ausernieapp.key -out ausernieapp.csr
    PEM key is ausernieapp
    Country US
    State Texas
    Locality Austin
    Organization Name Corporation
    Organizational Unit Name Information Technology
    Common Name ausernieapp.domainname.com
    Email address [email protected]
    No challenge password
    No optional company name
    Now let's remove the passphrase from the key
    cp ausernieapp.key ausernieapp.key.orig
    openssl rsa -in ausernieapp.key.orig -out ausernieapp.key
    Now let's generate a self-signed certificate
    openssl x509 -req -days 1000 -in ausernieapp.csr -signkey ausernieapp.key -out ausernieapp.crt
    Install the private key and certificate
    cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.crt
    cp server.crt server.crt.backup.03102010
    chown applmgr:applmgr server.crt.backup.03102010
    cp $HOME/ausernieapp.crt /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.crt/server.crt
    cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.key/
    cp server.key server.key.backup.03102010
    cp $HOME/ausernieapp.key /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.key/server.key
    chown applmgr:applmgr server.key.backup.03102010
    bounce apache as applmgr
    cd /d01/oracle/erniecomn/admin/scripts/ERNIE_ausernieapp
    ./adapcctl.sh stop
    ./adapcctl.sh start
    In IE
    https://ausernieapp.domainname.com:8443
    Continue
    Click on Certificate Error next to URL bar
    Install Certificate -> Next-> Place all certificates in the following store -> trusted root certificate authorities ->finish
    close browser, back to https://ausernieapp.domainname.com:8443
    no errors,
    Next step will be to import key into the SES and Search modelers
    as oracle on aussearchdev
    cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/security/
    cp cacerts cacerts.backup.03102010
    scp root@ausernieapp:/root/ausernieapp.crt .
    export LANG=c
    export PATH=$ORACLE_HOME/jdk/bin:$PATH
    keytool -keystore ./cacerts -storepass changeit -alias rootausernieapp -import -trustcacerts -file ausernieapp.crt
    --output
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:XX:A6:05:90:F6:XX:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:XX:E1:EA:E4:75:AE:CC:4F:4A:10:2F:8A:FE:9B
    Trust this certificate? [no]: yes
    Certificate was added to keystore
    Now load our cert
    keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
    keytool -list -v -keystore ./cacerts now shows
    Alias name: rootausernieapp
    Creation date: Mar 10, 2010
    Entry type: trustedCertEntry
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:CB:XX:05:90:F6:78:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:FA:9E:10:2F:8A:FE:9B
    Now we need to load it into the search modeler keystore
    as root on aussearchdev
    export JAVA_HOME=/usr/local/jdk1.5.0_22/
    export PATH=$JAVA_HOME/bin:$PATH
    cd /usr/local/jdk1.5.0_22/jre/lib/security/
    scp root@ausernieapp:/root/ausernieapp.crt .
    output
    keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
    Enter keystore password: changeit
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:CB:A1:05:90:F6:78:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:4F:9E:10:2F:8A:FE:9B
    Trust this certificate? [no]: yes
    Certificate was added to keystore
    [root@aussearchdev security]#
    output
    For troubleshooting, if you go to end of /d01/oracle/10.1.8/sesdev/search/data/config/crawler.dat
    you can modify the logLevel from the default of 4 to 2 to get better debug data. No services need to be restarted, it will become active with the next crawl.
    While talking with Oracle, they mentioned the following patches
    The patches identified 8321527 and 7586924 are SES patches to help with indexing
    They also identified patch 9103851 which is an apps patch dealing with responsibilities <-- This is not yet available
    Applying patch 7586924
    as oracle on aussearchdev
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/7586924
    opatch apply
    cd $ORACLE_HOME/bin
    ./searchctl startall
    sqlplus eqsys/XXXXXX@SESDEV
    define SCH_NAME=EQSYS
    define PROXY_USER=EQPROXY
    define INST_USER=EQ_TEST
    @$ORACLE_HOME/search/admin/eq0pkh.sql
    @$ORACLE_HOME/search/admin/eq0plb.sql
    @$ORACLE_HOME/search/admin/eq0bug_7586924.sql
    cd $ORACLE_HOME/search/data/config/
    cp crawler.dat crawler.dat.backup.03102010
    vi crawler.dat
    We're using the Oracle E-Business Suite R12 crawler, so we will add the line
    USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
    as the line immediately preceding IMPORT -
    so the end of the file looks like this:
    # system properies: separated by space for multiple system properties or define multiple SYSTEM_PROPERTIES
    # logLevel values: DEBUG(2), INFO(4), WARN(6), ERROR(8), FATAL(10)
    SYSTEM_PROPERTIES -Doracle.search.logLevel=4 -Doracle.search.log=oracle.search.util.Log4jImpl
    USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
    IMPORT -
    Now on to patch 8321527
    cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/8321527
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd -
    opatch apply
    cd $ORACLE_HOME/bin
    ./searchctl startall
    sqlplus eqsys/XXXXXXX@SESDEV
    define SCH_NAME=EQSYS
    define PROXY_USER=EQPROXY
    select object_name from user_objects where status = 'INVALID';
    --should be no rows selected
    @$ORACLE_HOME/search/admin/eq0pkh.sql
    @$ORACLE_HOME/search/admin/eq0plb.sql
    --should be no rows selected
    restart SES
    cd -
    ./searchctl stopall
    ./searchctl startall

    Below are all the steps I took for creating integrating Search Modeler with an Oracle E-Business Suite 11.5.10.2 ATG RUP 7 instance called ERNIE.
    Much thanks to Oracle Support ( Rajesh Ghosh, Vikas Soolapani and Roger Ford), as this simply wouldn't have been possible without them.
    There are a few things in this document that may not be pertinent to your environment if you're doing this. I've made attempts to clarify those possibly optional sections in the documentation.
    I've broken the document down into the following multiple parts
    o Setting up a new RedHat 4.8 x86 server called ausSEARCHdev (The server is in AUStin, TX, is dedicated to SEARCH, and is for our DEV environment)
    o SES (Secure Enterprise Search 10.1.8.2 install
    o SES 10.1.8.4 patchset install
    o SES CPU patch apply
    o Standalone OC4J and ADF installation
    o Search Modeler installation and configuration
    o Configure ERNIE Apps instance to be on valid self-signed SSL certificate
    o Import ERNIE SSL certificate into SES and Search Modeler
    using aussearchdev initially
    rh4 x86, default oracle build
    ** htop and collectl are open source free performance monitoring packages we utilize**
    --start
    install htop and collectl
    wget http://dag.wieers.com/rpm/packages/htop/htop-0.7-1.el4.rf.i386.rpm
    rpm -ivh htop-0.7-1.el4.rf.i386.rpm
    wget http://downloads.sourceforge.net/project/collectl/collectl/collectl-3.4.0-4/collectl-3.4.0-4.noarch.rpm?use_mirror=voxel
    rpm -ivh collectl-3.4.0-4.noarch.rpm
    chkconfig collectl on
    service collectl start
    **We still need to install the necessary rpms so that collectl logs are compressed
    --end
    useradd -u 501 oracle
    groupadd -g 504 dba
    usermod -G 504 oracle
    verification:
         [root@aussearchdev ~]# su - oracle
         [oracle@aussearchdev ~]$ id
         uid=501(oracle) gid=501(oracle) groups=501(oracle),504(dba)
    passwd oracle
    ** /mnt/oraclebackup is a network dumpspot we use to hold Software installs, RPMs, etc
    ** /mnt/rpms is a network dumpspot we use to hold ISOs for OS software such as Redhat Linux
    mkdir /mnt/oraclebackup
    mkdir /mnt/rpms
    add the following to /etc/fstab
    XXXXXXX:/patches/oraclebackup /mnt/oraclebackup nfs defaults,hard,nolock 0 0
    XXXXXXX:/esxpress/nfs /mnt/rpms nfs rw,addr=XXX.XXX.XXX.XXX 0 0
    mount /mnt/rpms
    Next need to install various oracle needed RPMs.
    cd /mnt/rpms/rh40_upd8/RedHat/RPMS/
    rpm -ivh perl-Compress-Zlib-1.42-1.el4.i386.rpm
    rpm -ivh libaio-devel-0.3.105-2.i386.rpm
    rpm -ivh sysstat-5.0.5-25.el4.i386.rpm
    rpm -ivh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
    service collectl restart
    cd /tmp
    wget http://oss.oracle.com/el4/oracle-validated/oracle-validated-1.0.0-18.el4.i386.rpm
    rpm -ivh oracle-validated-1.0.0-18.el4.i386.rpm
    Now we should have all the RPMs we need.
    cd /etc/sysconfig/oracle-validated
    ./oracle-validated-verify
    cd /var/log/oracle-validated/results
    more orakernel.log
    uname -a
    should return 2.6.9 or higher
    rpm -qa|grep gcc-
    should return 3.4.3 or higher
    rpm -qa|grep glibc
    should return 2.3.4-2.9 or higher
    rpm -qa|grep make
    should return 3.80 or higher
    rpm -qa|grep binutils
    should return 2.15.92.0.2 or higher
    rpm -qa|grep openmotif
    should return 2.2.3-9.RHEL4.1 or higher
    rpm -qa|grep compat-db
    should return 4.1.25-9 or higher
    rpm -qa|grep setarch
    should return 1.6-1 or higher
    cat /proc/sys/kernel/sem
    should return 250 32000 100 128 or higher (250 32000 100 142 in our case)
    cat /proc/sys/kernel/shmall (1073741824 in our case)
    should return 2097152 or higher
    cat /proc/sys/kernel/shmmax
    should return half the size of physical memory (4294967295 in our case - NO LARGER on 32-bit OS)
    cat /proc/sys/kernel/shmmni
    should return 4096
    cat /proc/sys/fs/file-max
    should return 65536 (327679 in our case)
    cat /proc/sys/net/ipv4/ip_local_port_range
    should return 1024 65000
    values in /etc/security/limits.conf set by oracle-validated rpm, no changes necessary
    add the following line to /etc/pam.d/login
    session required /lib/security/pam_limits.so
    add the following to /etc/profile
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    mkdir -p /d01/oracle
    chmod 777 /d01/oracle
    init 6 the box (aka reboot)
    Time to start the SES 10.1.8.2 installer
    running SES 10.1.8.2 installer
    as oracle
    cd /mnt/oraclebackup/deathstar_patches/SES/SES10182
    ./runInstaller
    search server name sesprod
    administrative password XXXXXXXX for dev,
    http port 7777
    destination path /d01/oracle/10.1.8/sesdev (dev)
    data storage path /d01/oracle/sesdevdata (dev)
    next
    inventory /d01/oracle/oraInventory
    dba group
    run orainstroot.sh as requested
    continue
    all tests should pass, continue
    finished clean
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    Now we need to get to 10.1.8.4 of SES
    (yes, you need to keep the system up)
    cd /mnt/oraclebackup/deathstar_patches/SES/SES10184/ses_10184pst_linux/
    ./runInstaller
    Destination, choose sesdev
    Next
    Patchset successful
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    Apply CPU Patch to SES
    CPU JAN 10 says patch 9119261 is required - but patch requires extended support contract
    CPU OCT 09 says patch 8836540 is required - but patch requires extended support contract
    CPU JUL 09 says patch 8534394 is required - but patch requires extended support contract
    CPU APR 09 says patch 8290534 is required - and you can actually download it
    Need opatch from 6880880
    cp -r /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/OPatch $ORACLE_HOME
    export PATH=$ORACLE_HOME/OPatch:$PATH
    shut down everything
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd /mnt/oraclebackup/deathstar_patches/SES/CPUAPR09/8290534
    opatch apply
    cd $ORACLE_HOME/cpu/CPUApr2009
    **Note: your sys password is what you set for your administrative password above
    sqlplus "sys/XXXXXX" as sysdba;
    startup
    @catcpu
    @?/rdbms/admin/utlrp
    shutdown immediate
    exit
    cd /d01/oracle/10.1.8/sesdev/cpu/view_recompile/
    sqlplus "sys/XXXXXXX" as sysdba;
    startup upgrade;
    @view_recompile_jan2008cpu.sql
    @?/rdbms/admin/utlrp
    shutdown immediate
    cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/ext
    mv mail.jar $HOME/mail.jar.backup02222010
    mv mailapi.jar $HOME/mailapi.jar.back02222010
    cp /d01/oracle/10.1.8/sesdev/search/lib/mail.jar .
    SES 10.1.8.4 is now installed and updated with latest available CPU
    tried logging in to admin console at http://aussearchdev:7777/search/admin - worked fine
    tried bringing up search query at http://aussearchdev:7777/search/query/search - worked fine
    we're going to go with the standalone OC4j 10.1.3.3 and Oracle ADF 10.1.3.3 method
    The URLs for these products are
    http://blogs.oracle.com/ebssearch/2009/10/available_now_oracle_search_modeler_11_for_oracle_e-business_suite_11i.html
    and specifically
    OC4J - http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    ADF - http://www.oracle.com/technology/software/products/jdev/htdocs/adfinstaller10133.html
    OC4J install
    First you need to have Java 1.5 on the machine. Latest is 1.5.0_22. Package is in /mnt/oraclebackup/deathstar_patches/SES
    as root on aussearchdev
    cd /usr/local
    cp /mnt/oraclebackup/deathstar_patches/SES/jdk-1_5_0_22-linux-i586.bin .
    chmod 700 jdk-1_5_0_22-linux-i586.bin
    ./jdk-1_5_0_22-linux-i586.bin
    yes
    install OC4J just by copying over the directory
    as oracle on aussearchdev
    mkdir -p /d01/oracle/oc4j
    cd /d01/oracle/oc4j
    cp -r /mnt/oraclebackup/deathstar_patches/SES/oc4j/* .
    ADF install
    vi /mnt/oraclebackup/deathstar_patches/SES/adf/adfinstaller.properties
    change the following
    OracleHome = /mnt/oraclebackup/deathstar_patches/SES/adf
    DesHome = /d01/oracle/oc4j/
    type = OC4J
    as root
    cd /usr/bin
    rm java
    (yes)
    ln -s /usr/local/jdk1.5.0_22/bin/java
    su - oracle
    java -version     should now return 1.5.0_22
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    cd /mnt/oraclebackup/deathstar_patches/SES/adf
    java -jar runinstaller.jar -version
    returns The version for the ADF libraries being installed is 10.1.3.41.57 - yes, that is apparently 10.1.3.3.
    java -jar runinstaller.jar adfinstaller.properties
    output looks good, do not be concerned by
    WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/bc4j' whilst deleting bc4j application
    WARNING: 'Could not delete: /d01/oracle/oc4j/BC4J/redist/datatags' whilst deleting datatags application
    as it was trying to delete the old version that didn't exist
    Start OC4J
    as oracle on aussearchdev
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    cd $ORACLE_HOME/bin
    ./oc4j -start
    you will be prompted for password - we're setting it. use XXXXXXXXXX
    after it's up, kill it (ctrl-c) and restart it with
    nohup ./oc4j -start &
    last lines in nohup.out is
    Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
    10/02/23 03:22:38 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    So now on to search modeler installation, going by Installation steps in Note 781366.1
    8326128 - This is not a patch to be applied to the Apps, keep reading
    as oracle on aussearchdev
    cd /mnt/oraclebackup/deathstar_patches/SES/8326128
    mkdir -p /d01/oracle/oc4j/uploaded
    vi build.properties, changing
    installation.type=OC4J
    oracle.home=/d01/oracle/oc4j
    deploy.server=aussearchdev.domainname.com
    deploy.port=23791
    web.port=7777
    password=XXXXXXXXX
    extra.classpath=/d01/oracle/oc4j/uploaded
    now set the following environment values in your ssh session
    export ORACLE_HOME=/d01/oracle/oc4j
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
    ant main
    whole bunch of stuff to screen, errors due to undeploy something that doesn't exist. Finished after a minute with
    BUILD SUCCESSFUL
    Total time: 58 seconds
    Now on to post install steps
    restart OC4j
    cd $ORACLE_HOME/bin
    ./modeler.sh -shutdown -port 23791 -password r*l*r*0*
    export ORACLE_HOME=/d01/oracle/oc4j
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export PATH=$ORACLE_HOME/ant/bin:$ORACLE_HOME/bin:$PATH
    nohup ./modeler.sh -start &
    end of nohup.out should show
    Starting OC4J from /d01/oracle/oc4j/j2ee/home ...
    Try going to http://aussearchdev:8888/modeler/faces/ModelerHome.jsp
    Should get login screen, but wait, we haven't installed Oracle Apps interface yet...
    Next let's do the Apps side of things
    Going by note 953378.1
    Using ERNIE (a development instance of E-Business Suite running 11.5.10.2 ATG RUP 7)
    as applmgr on ausernieapp (ausernieapp is our app tier)
    shut down apps services
    apps patch 8225631
    verify all the pre-req patches are in ERNIE
    select * from ad_bugs where bug_number = '5903765';
    select * from ad_bugs where bug_number = '6372396';
    select * from ad_bugs where bug_number = '3219567';
    select * from ad_bugs where bug_number = '3264822';
    select * from ad_bugs where bug_number = '3261254';
    select * from ad_bugs where bug_number = '5161676';
    select * from ad_bugs where bug_number = '3036401';
    select * from ad_bugs where bug_number = '3263588';
    select * from ad_bugs where bug_number = '3264818';
    select * from ad_bugs where bug_number = '3218526';
    select * from ad_bugs where bug_number = '3263645';
    select * from ad_bugs where bug_number = '4206794';
    select * from ad_bugs where bug_number = '3262486';
    select * from ad_bugs where bug_number = '3261243';
    select * from ad_bugs where bug_number = '2614213';
    select * from ad_bugs where bug_number = '3262159';
    select * from ad_bugs where bug_number = '2819091';
    select * from ad_bugs where bug_number = '3412795';
    patch went in smooth
    Log in to ERNIE Apps GUI as sysadmin user responsibility
    Give users such as sysadmin FND Search Crawler responsibility
    Go to system profile options, set
    set FND: Search Enabling Flag to Y at site level
    as applmgr on ausernieapp
    cd /d01/oracle/ernieappl/fnd/11.5.0/patch/115/sql
    sqlplus apps/$APPS_PWD @AFSRCHCF
    Enter SES endpoint URL [e.g. http://ap637atg.us.oracle.com:7780]: http://aussearchdev.domainname.com:7777
    Enter Apps Admin username [e.g. sysadmin]: sysadmin
    Enter Apps Admin password: sysadmin_password
    Enter SES Admin username [e.g. eqsys]: eqsys
    Enter SES Admin password: eqsyspassword <-- This is the same as sys's password
    on aussearchdev as oracle
    had to kill modeler and start all the processes, so
    kill -9 the modeler oc4j process, then
    cd $ORACLE_HOME/bin
    ./searchctl startall
    enter the password when prompted
    in IE browser go to
    http://aussearchdev.domainname.com:7777/search/admin
    log in with eqsys password
    global settings tab
    identity management setup
    click circle next to oracle.search.plugin.security.identity.ebs.EBS12IdentityPliginMgr
    (yes, we're going with 12 even though we use Oracle Apps 11i)
    http end point https://ausernieapp.domainname.com:8443/webservices/AppSearch/SecurityService
    username sysadmin
    password XXXXXXX
    finish
    Global Settings
    Federation Trusted Entitites
    ####entity name sysadmin
    ####Entity Password XXXXXXXX
    According to web conference with Oracle, this should NOT be eqsys but instead be sysadmin from above.
    Select the Use Entity Plug-in for authentication check box
    add
    Trying to go to http://aussearchdev.domainname.com:7777/search/query/search and login (sysadmin / password)
    stop midtier on both SES and Apps
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    ./adstpall.sh apps/$APPS_PWD on EBS app tier
    start midtier on both SES and Apps
    cd $ORACLE_HOME/bin
    ./searchctl startall
    ./adstrtal.sh apps/$APPS_PWD on EBS app tier
    Now try and log in to Oracle SES user interface to verify the configuration
    http://aussearchdev.domainname.com:7777/search/query
    Now start up modeler again
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    export PATH=$ORACLE_HOME/bin:$PATH
    cd $ORACLE_HOME/bin
    nohup ./modeler.sh -start &
    Works now.
    Now go to http://aussearchdev.domainname.com:8888/modeleradmin/AdminHome.jsp log in as oc4jadmin/XXXXXXX
    Configure new target
    Target Type 11i
    Description ERNIE
    Name ERNIE
    EBS Database Host Name auserniedb
    EBS Database Port 1521
    EBS Database SID ERNIE
    username apps
    password XXXXXXXXx
    oc4jadmin XXXXXXXx
    export JAVA_HOME=/usr/local/jdk1.5.0_22
    export ORACLE_HOME=/d01/oracle/oc4j
    export PATH=$ORACLE_HOME/bin:$PATH
    cd $ORACLE_HOME/j2ee/home
    java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXXXX -addDataSourceConnectionPool -name "ERNIE2-pool" -factoryClass "oracle.jdbc.pool.OracleDataSource" -dbUser "apps" -dbPassword "XXXXXXX" -url "jdbc:oracle:thin:@auserniedb.domainname.com:1521:ERNIE" -applicationName appsearch
    java -jar admin_client.jar deployer:oc4j:aussearchdev oc4jadmin XXXXXXX -addManagedDataSource -name "ERNIEDS" -jndiLocation "jdbc/ERNIEDS" -connectionPoolName "ERNIE2-pool" -applicationName appsearch
    http://aussearchdev.domainname.com:8888/modeler/faces/ModelerHome.jsp
    So, creating a self signed SSL certificate for ERNIE EBS instance (this will not work if you use an SSL certificate for another server like say, PROD)
    doing this on ausernieapp
    openssl genrsa -des3 -out ausernieapp.key 1024
    PEM key is ausernieapp
    openssl req -new -key ausernieapp.key -out ausernieapp.csr
    PEM key is ausernieapp
    Country US
    State Texas
    Locality Austin
    Organization Name Corporation
    Organizational Unit Name Information Technology
    Common Name ausernieapp.domainname.com
    Email address [email protected]
    No challenge password
    No optional company name
    Now let's remove the passphrase from the key
    cp ausernieapp.key ausernieapp.key.orig
    openssl rsa -in ausernieapp.key.orig -out ausernieapp.key
    Now let's generate a self-signed certificate
    openssl x509 -req -days 1000 -in ausernieapp.csr -signkey ausernieapp.key -out ausernieapp.crt
    Install the private key and certificate
    cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.crt
    cp server.crt server.crt.backup.03102010
    chown applmgr:applmgr server.crt.backup.03102010
    cp $HOME/ausernieapp.crt /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.crt/server.crt
    cd $IAS_ORACLE_HOME/Apache/Apache/conf/ssl.key/
    cp server.key server.key.backup.03102010
    cp $HOME/ausernieapp.key /d01/oracle/ernieora/new/iAS/Apache/Apache/conf/ssl.key/server.key
    chown applmgr:applmgr server.key.backup.03102010
    bounce apache as applmgr
    cd /d01/oracle/erniecomn/admin/scripts/ERNIE_ausernieapp
    ./adapcctl.sh stop
    ./adapcctl.sh start
    In IE
    https://ausernieapp.domainname.com:8443
    Continue
    Click on Certificate Error next to URL bar
    Install Certificate -> Next-> Place all certificates in the following store -> trusted root certificate authorities ->finish
    close browser, back to https://ausernieapp.domainname.com:8443
    no errors,
    Next step will be to import key into the SES and Search modelers
    as oracle on aussearchdev
    cd /d01/oracle/10.1.8/sesdev/jdk/jre/lib/security/
    cp cacerts cacerts.backup.03102010
    scp root@ausernieapp:/root/ausernieapp.crt .
    export LANG=c
    export PATH=$ORACLE_HOME/jdk/bin:$PATH
    keytool -keystore ./cacerts -storepass changeit -alias rootausernieapp -import -trustcacerts -file ausernieapp.crt
    --output
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:XX:A6:05:90:F6:XX:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:XX:E1:EA:E4:75:AE:CC:4F:4A:10:2F:8A:FE:9B
    Trust this certificate? [no]: yes
    Certificate was added to keystore
    Now load our cert
    keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
    keytool -list -v -keystore ./cacerts now shows
    Alias name: rootausernieapp
    Creation date: Mar 10, 2010
    Entry type: trustedCertEntry
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:CB:XX:05:90:F6:78:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:FA:9E:10:2F:8A:FE:9B
    Now we need to load it into the search modeler keystore
    as root on aussearchdev
    export JAVA_HOME=/usr/local/jdk1.5.0_22/
    export PATH=$JAVA_HOME/bin:$PATH
    cd /usr/local/jdk1.5.0_22/jre/lib/security/
    scp root@ausernieapp:/root/ausernieapp.crt .
    output
    keytool -keystore ./cacerts -import -trustcacerts -file ausernieapp.crt
    Enter keystore password: changeit
    Owner: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Issuer: [email protected], CN=ausernieapp.domainname.com, OU=Information Technology, O=Corporation, L=Austin, ST=Texas, C=US
    Serial number: b4e92089cf73076f
    Valid from: Wed Mar 10 13:22:38 CST 2010 until: Tue Dec 04 13:22:38 CST 2012
    Certificate fingerprints:
    MD5: 2C:6B:EE:1A:63:6D:CB:A1:05:90:F6:78:DD:88:F7:80
    SHA1: F8:DC:E5:2A:3E:68:9C:CE:EA:4E:75:AE:CC:4F:9E:10:2F:8A:FE:9B
    Trust this certificate? [no]: yes
    Certificate was added to keystore
    [root@aussearchdev security]#
    output
    For troubleshooting, if you go to end of /d01/oracle/10.1.8/sesdev/search/data/config/crawler.dat
    you can modify the logLevel from the default of 4 to 2 to get better debug data. No services need to be restarted, it will become active with the next crawl.
    While talking with Oracle, they mentioned the following patches
    The patches identified 8321527 and 7586924 are SES patches to help with indexing
    They also identified patch 9103851 which is an apps patch dealing with responsibilities <-- This is not yet available
    Applying patch 7586924
    as oracle on aussearchdev
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/7586924
    opatch apply
    cd $ORACLE_HOME/bin
    ./searchctl startall
    sqlplus eqsys/XXXXXX@SESDEV
    define SCH_NAME=EQSYS
    define PROXY_USER=EQPROXY
    define INST_USER=EQ_TEST
    @$ORACLE_HOME/search/admin/eq0pkh.sql
    @$ORACLE_HOME/search/admin/eq0plb.sql
    @$ORACLE_HOME/search/admin/eq0bug_7586924.sql
    cd $ORACLE_HOME/search/data/config/
    cp crawler.dat crawler.dat.backup.03102010
    vi crawler.dat
    We're using the Oracle E-Business Suite R12 crawler, so we will add the line
    USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
    as the line immediately preceding IMPORT -
    so the end of the file looks like this:
    # system properies: separated by space for multiple system properties or define multiple SYSTEM_PROPERTIES
    # logLevel values: DEBUG(2), INFO(4), WARN(6), ERROR(8), FATAL(10)
    SYSTEM_PROPERTIES -Doracle.search.logLevel=4 -Doracle.search.log=oracle.search.util.Log4jImpl
    USE_IN_MEMORY_QUEUE Oracle E-Business Suite R12
    IMPORT -
    Now on to patch 8321527
    cd /mnt/oraclebackup/deathstar_patches/SES/post_patches/8321527
    cd $ORACLE_HOME/bin
    ./searchctl stopall
    cd -
    opatch apply
    cd $ORACLE_HOME/bin
    ./searchctl startall
    sqlplus eqsys/XXXXXXX@SESDEV
    define SCH_NAME=EQSYS
    define PROXY_USER=EQPROXY
    select object_name from user_objects where status = 'INVALID';
    --should be no rows selected
    @$ORACLE_HOME/search/admin/eq0pkh.sql
    @$ORACLE_HOME/search/admin/eq0plb.sql
    --should be no rows selected
    restart SES
    cd -
    ./searchctl stopall
    ./searchctl startall

  • Sql server will not start - Database 'model' cannot be opened. It is in the middle of a restore.

    Sql server service will not start after server reboot:
    2009-08-13 14:15:43.94 spid7s      SQL Trace ID 1 was started by login "sa".
    2009-08-13 14:15:43.97 spid7s      Starting up database 'mssqlsystemresource'.
    2009-08-13 14:15:43.97 spid7s      The resource database build version is 10.00.1600. This is an informational message only. No user action is required.
    2009-08-13 14:15:44.30 Server      A self-generated certificate was successfully loaded for encryption.
    2009-08-13 14:15:44.30 spid7s      Server name is 'WIN-37R9WFWAJIB\MSDB1'. This is an informational message only. No user action is required.
    2009-08-13 14:15:44.32 spid10s     Starting up database 'model'.
    2009-08-13 14:15:44.32 Server      Server is listening on [ 'any' <ipv6> 49167].
    2009-08-13 14:15:44.33 Server      Server is listening on [ 'any' <ipv4> 49167].
    2009-08-13 14:15:44.33 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSDB1 ].
    2009-08-13 14:15:44.33 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
    2009-08-13 14:15:44.35 spid10s     The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
    2009-08-13 14:15:44.38 Server      Server is listening on [ ::1 <ipv6> 49168].
    2009-08-13 14:15:44.38 Server      Server is listening on [ 127.0.0.1 <ipv4> 49168].
    2009-08-13 14:15:44.38 Server      Dedicated admin connection support was established for listening locally on port 49168.
    2009-08-13 14:15:44.39 spid10s     Error: 927, Severity: 14, State: 2.
    2009-08-13 14:15:44.39 spid10s     Database 'model' cannot be opened. It is in the middle of a restore.
    2009-08-13 14:15:44.49 spid10s     Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
    2009-08-13 14:15:44.50 spid10s     SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informa
    there is plenty of room on the server, so i dont think its a disk space issue.  i am able to start the service as such:
    C:\Users\Administrator>net start MSSQL$MSDB1 /c /m /T3608
    The SQL Server (MSDB1) service is starting.
    The SQL Server (MSDB1) service was started successfully
    sqlcmd -e
    1> select name, status from sysdatabases;
    2> go
    select name, status from sysdatabases;
    name
                                                     status
    master
                                                           65544
    tempdb
                                                           65544
    model
                                                           65568
    msdb
                                                      1073807368
    SS_DBA_Dashboard
                                                      1073807368
    (5 rows affected)
    model is in RESTORING state and I dont know how to fix it.  I am running simple backups, so I have a somewhat recent backup of model.bak but when I attempt to restore it I get an error:
    1> restore database model
    2> go
    restore database model
    Msg 3112, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 1
    Cannot restore any database other than master when the server is in single user
    mode.
    Msg 3013, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 1
    RESTORE DATABASE is terminating abnormally.
    other forums suggest manually updating the status column but i dont know if my syntax is wrong or it just cant be done in sql server 2008:
    1> begin transaction
    2> update sysdatabases set status=16 where name='model'
    3> ;
    4> go
    begin transaction
    update sysdatabases set status=16 where name='model'
    Msg 4406, Level 16, State 1, Server WIN-37R9WFWAJIB\MSDB1, Line 2
    Update or insert of view or function 'sysdatabases' failed because it contains a
     derived or constant field.
    1>
    yet another forum suggested taking a cleanly shut down model.mdf and model.ldf from another sql server 2008 instance and placing those in the data directory while moving the 'restoring' ones to a backup location.  this didnt work either.  any help is appreciated im new to sql server and this is very frustrating!  thanks in advance!

    I have the same issue on SQL Server 2008R2, after a server reboot, but none of the NET START commands or command line attempts are successful to start the Service.
    NET START command results in "Access Denied" "System Error 5" and the Command line attempts result in
     Server      Error: 17058, Severity: 16, State: 1.
     Server      initerrlog: Could not open error log file ''.
    Any help?
    SQL Error log file:
    2011-03-29 16:50:49.40 Server      (c) Microsoft Corporation.
    2011-03-29 16:50:49.40 Server      All rights reserved.
    2011-03-29 16:50:49.40 Server      Server process ID is 7292.
    2011-03-29 16:50:49.40 Server      System Manufacturer: 'Dell Inc.', System Model: 'PowerEdge T710'.
    2011-03-29 16:50:49.40 Server      Authentication mode is MIXED.
    2011-03-29 16:50:49.40 Server      Logging SQL Server messages in file 'E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
    2011-03-29 16:50:49.40 Server      This instance of SQL Server last reported using a process ID of 7448 at 3/29/2011 4:30:06 PM (local) 3/29/2011 8:30:06 PM (UTC). This is an informational message only; no user action is required.
    2011-03-29 16:50:49.40 Server      Registry startup parameters:
      -d E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf
      -e E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG
      -l E:\MSSQL\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
      -T 4616
    2011-03-29 16:50:49.42 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2011-03-29 16:50:49.42 Server      Detected 24 CPUs. This is an informational message; no user action is required.
    2011-03-29 16:50:49.84 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2011-03-29 16:50:49.84 Server      Lock partitioning is enabled.  This is an informational message only. No user action is required.
    2011-03-29 16:50:49.86 Server      Node configuration: node 0: CPU mask: 0x0000000000fff000:0 Active CPU mask: 0x0000000000fff000:0. This message provides a description of the NUMA configuration for this computer. This is an informational
    message only. No user action is required.
    2011-03-29 16:50:49.86 Server      Node configuration: node 1: CPU mask: 0x0000000000000fff:0 Active CPU mask: 0x0000000000000fff:0. This message provides a description of the NUMA configuration for this computer. This is an informational
    message only. No user action is required.
    2011-03-29 16:50:49.89 spid9s      Starting up database 'master'.
    2011-03-29 16:50:49.95 spid9s      CHECKDB for database 'master' finished without errors on 2011-03-18 08:46:34.257 (local time). This is an informational message only; no user action is required.
    2011-03-29 16:50:49.95 spid9s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
    2011-03-29 16:50:49.97 spid9s      SQL Trace ID 1 was started by login "sa".
    2011-03-29 16:50:49.97 spid9s      Starting up database 'mssqlsystemresource'.
    2011-03-29 16:50:49.99 spid9s      The resource database build version is 10.50.1600. This is an informational message only. No user action is required.
    2011-03-29 16:50:50.20 spid13s     Starting up database 'model'.
    2011-03-29 16:50:50.20 spid9s      Server name is 'XXXX'. This is an informational message only. No user action is required.
    2011-03-29 16:50:50.21 Server      The certificate [Cert Hash(sha1) "C41DC20703F049763778AC2842C3C8A3A2C6EED4"] was successfully loaded for encryption.
    2011-03-29 16:50:50.21 Server      Server is listening on [ 'any' <ipv6> 1433].
    2011-03-29 16:50:50.21 Server      Server is listening on [ 'any' <ipv4> 1433].
    2011-03-29 16:50:50.21 Server      Server local connection provider is ready to accept connection on [
    \\.\pipe\SQLLocal\MSSQLSERVER ].
    2011-03-29 16:50:50.21 Server      Server named pipe provider is ready to accept connection on [
    \\.\pipe\sql\query ].
    2011-03-29 16:50:50.21 Server      Server is listening on [ ::1 <ipv6> 1434].
    2011-03-29 16:50:50.21 spid13s     The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
    2011-03-29 16:50:50.21 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434].
    2011-03-29 16:50:50.21 spid13s     Error: 927, Severity: 14, State: 2.
    2011-03-29 16:50:50.21 spid13s     Database 'model' cannot be opened. It is in the middle of a restore.
    2011-03-29 16:50:50.21 Server      Dedicated admin connection support was established for listening locally on port 1434.
    2011-03-29 16:50:50.22 spid13s     Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in
    the event log that may indicate why the tempdb files could not be initialized.
    2011-03-29 16:50:50.22 spid13s     SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

  • Insert XML file into Relational database model - no XMLTYPE!

    Dear all,
    How can I store a known complex XML file into an existing relational database WITHOUT using xmltypes in the database ?
    I read the article on DBMS_XMLSTORE. DBMS_XMLSTORE indeed partially bridges the gap between XML and RDBMS to a certain extent, namely for simply structured XML (canonical structure) and simple tables.
    However, when the XML structure will become arbitrary and rapidly evolving, surely there must be a way to map XML to a relational model more flexibly.
    We work in a java/Oracle10 environment that receives very large XML documents from an independent data management source. These files comply with an XML schema. That is all we know. Still, all these data must be inserted/updated daily in an existing relational model. Quite an assignment isn't it ?
    The database does and will not contain XMLTYPES, only plain RDBMS tables.
    Are you aware of a framework/product or tool to do what DBMS_XMLSTORE does but with any format of XML file ? If not, I am doomed.
    Cheers.
    Luc.
    Edited by: user6693852 on Jan 13, 2009 7:02 AM

    In case you decide to follow my advice, here's a simple example showing how to do this.. (Note the XMLTable syntax is the preferred approach in 10gr2 and later..
    SQL> spool testase.log
    SQL> --
    SQL> connect / as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = XDBTEST
    SQL> --
    SQL> def PASSWORD = XDBTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user XDBTEST cascade
    User dropped.
    Elapsed: 00:00:00.59
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASS
    ORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &
    ASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDB
    EST
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> var SCHEMAURL varchar2(256)
    SQL> var XMLSCHEMA CLOB
    SQL> --
    SQL> set define off
    SQL> --
    SQL> begin
      2    :SCHEMAURL := 'http://xmlns.example.com/askTom/TransactionList.xsd';
      3    :XMLSCHEMA :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
      7     <xs:element name="TransactionList" type="transactionListType" xdb:defaultTable="LOCAL_TABLE"/>
      8     <xs:complexType name="transactionListType"  xdb:maintainDOM="false" xdb:SQLType="TRANSACTION_LIST_T">
      9             <xs:sequence>
    10                     <xs:element name="Transaction" type="transactionType" maxOccurs="unbounded" xdb:SQLCollType="TRANSACTION_V"
    >
    11             </xs:sequence>
    12     </xs:complexType>
    13     <xs:complexType name="transactionType" xdb:maintainDOM="false"  xdb:SQLType="TRANSACTION_T">
    14             <xs:sequence>
    15                     <xs:element name="TradeVersion" type="xs:integer"/>
    16                     <xs:element name="TransactionId" type="xs:integer"/>
    17                     <xs:element name="Leg" type="legType" maxOccurs="unbounded" xdb:SQLCollType="LEG_V"/>
    18             </xs:sequence>
    19             <xs:attribute name="id" type="xs:integer" use="required"/>
    20     </xs:complexType>
    21     <xs:complexType name="paymentType"  xdb:maintainDOM="false" xdb:SQLType="PAYMENT_T">
    22             <xs:sequence>
    23                     <xs:element name="StartDate" type="xs:date"/>
    24                     <xs:element name="Value" type="xs:integer"/>
    25             </xs:sequence>
    26             <xs:attribute name="id" type="xs:integer" use="required"/>
    27     </xs:complexType>
    28     <xs:complexType name="legType"  xdb:maintainDOM="false"  xdb:SQLType="LEG_T">
    29             <xs:sequence>
    30                     <xs:element name="LegNumber" type="xs:integer"/>
    31                     <xs:element name="Basis" type="xs:integer"/>
    32                     <xs:element name="FixedRate" type="xs:integer"/>
    33                     <xs:element name="Payment" type="paymentType" maxOccurs="unbounded"  xdb:SQLCollType="PAYMENT_V"/>
    34             </xs:sequence>
    35             <xs:attribute name="id" type="xs:integer" use="required"/>
    36     </xs:complexType>
    37  </xs:schema>';
    38  end;
    39  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> set define on
    SQL> --
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(:XMLSCHEMA);
      4  begin
      5    dbms_xmlschema.registerSchema
      6    (
      7      schemaurl => :schemaURL,
      8      schemadoc => xmlSchema,
      9      local     => TRUE,
    10      genTypes  => TRUE,
    11      genBean   => FALSE,
    12      genTables => TRUE,
    13      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    14    );
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.26
    SQL> desc LOCAL_TABLE
    Name                                                                   Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/askTom/TransactionList.xsd" Element "TransactionList") STORAGE Object-rela
    ional TYPE "TRANSACTION_LIST_T"
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TradeVersion/text()') tradeversion,
      5    extractvalue(x.column_value,'/Transaction//text()') transactionid
      6  from
      7    local_table,
      8    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x
      9  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/Basis/text()') leg_basis,
      6    extractValue(y.column_value,'/Leg/FixedRate/text()') leg_fixedrate
      7  from
      8    local_table,
      9    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    10    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y
    11  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW
      2  as
      3  select
      4    extractvalue(x.column_value,'/Transaction/TransactionId/text()') transactionid,
      5    extractvalue(y.column_value,'/Leg/LegNumber/text()') leg_legnumber,
      6    extractvalue(z.column_value,'/Payment/StartDate/text()') pay_startdate,
      7    extractValue(z.column_value,'/Payment/Value/text()') pay_value
      8  from
      9    local_table,
    10    table(xmlsequence(extract(OBJECT_VALUE,'/TransactionList/Transaction'))) x,
    11    table(xmlsequence(extract(x.column_value,'/Transaction/Leg'))) y,
    12    table(xmlsequence(extract(y.column_value,'/Leg/Payment'))) z
    13  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW
    Name                                                                   Null?    Type
    TRADEVERSION                                                                    NUMBER(38)
    TRANSACTIONID                                                                   VARCHAR2(4000)
    SQL> --
    SQL> desc TRAN_LEG_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_BASIS                                                                       NUMBER(38)
    LEG_FIXEDRATE                                                                   NUMBER(38)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW
    Name                                                                   Null?    Type
    TRANSACTIONID                                                                   NUMBER(38)
    LEG_LEGNUMBER                                                                   NUMBER(38)
    PAY_STARTDATE                                                                   DATE
    PAY_VALUE                                                                       NUMBER(38)
    SQL> --
    SQL> create or replace VIEW TRAN_VIEW_XMLTABLE
      2  as
      3  select t.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRADE_VERSION  NUMBER(4) path 'TradeVersion/text()',
    11            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()'
    12         ) t
    13  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_VIEW_XMLTABLE
      2  as
      3  select t.TRANSACTION_ID, L.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           LEG_BASIS      NUMBER(4) path 'Basis/text()',
    20           LEG_FIXED_RATE NUMBER(4) path 'FixedRate/text()'
    21         ) l
    22  /
    View created.
    Elapsed: 00:00:00.01
    SQL> create or replace VIEW TRAN_LEG_PAY_VIEW_XMLTABLE
      2  as
      3  select TRANSACTION_ID, L.LEG_NUMBER, P.*
      4    from LOCAL_TABLE,
      5         XMLTable
      6         (
      7            '/TransactionList/Transaction'
      8            passing OBJECT_VALUE
      9            columns
    10            TRANSACTION_ID NUMBER(4) path 'TransactionId/text()',
    11            LEG            XMLType   path 'Leg'
    12         ) t,
    13         XMLTABLE
    14         (
    15           '/Leg'
    16           passing LEG
    17           columns
    18           LEG_NUMBER     NUMBER(4) path 'LegNumber/text()',
    19           PAYMENT        XMLType   path 'Payment'
    20         ) L,
    21         XMLTABLE
    22         (
    23           '/Payment'
    24           passing PAYMENT
    25           columns
    26           PAY_START_DATE     DATE      path 'StartDate/text()',
    27           PAY_VALUE          NUMBER(4) path 'Value/text()'
    28         ) p
    29  /
    View created.
    Elapsed: 00:00:00.03
    SQL> desc TRAN_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRADE_VERSION                                                                   NUMBER(4)
    TRANSACTION_ID                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    LEG_BASIS                                                                       NUMBER(4)
    LEG_FIXED_RATE                                                                  NUMBER(4)
    SQL> --
    SQL> desc TRAN_LEG_PAY_VIEW_XMLTABLE
    Name                                                                   Null?    Type
    TRANSACTION_ID                                                                  NUMBER(4)
    LEG_NUMBER                                                                      NUMBER(4)
    PAY_START_DATE                                                                  DATE
    PAY_VALUE                                                                       NUMBER(4)
    SQL> --
    SQL> set long 10000 pages 100 lines 128
    SQL> set timing on
    SQL> set autotrace on explain
    SQL> set heading on feedback on
    SQL> --
    SQL> VAR DOC1 CLOB
    SQL> VAR DOC2 CLOB
    SQL> --
    SQL> begin
      2    :DOC1 :=
      3  '<TransactionList>
      4    <Transaction id="1">
      5      <TradeVersion>1</TradeVersion>
      6      <TransactionId>1</TransactionId>
      7      <Leg id="1">
      8        <LegNumber>1</LegNumber>
      9        <Basis>1</Basis>
    10        <FixedRate>1</FixedRate>
    11        <Payment id="1">
    12          <StartDate>2000-01-01</StartDate>
    13          <Value>1</Value>
    14        </Payment>
    15        <Payment id="2">
    16          <StartDate>2000-01-02</StartDate>
    17          <Value>2</Value>
    18        </Payment>
    19      </Leg>
    20      <Leg id="2">
    21        <LegNumber>2</LegNumber>
    22        <Basis>2</Basis>
    23        <FixedRate>2</FixedRate>
    24        <Payment id="1">
    25          <StartDate>2000-02-01</StartDate>
    26          <Value>10</Value>
    27        </Payment>
    28        <Payment id="2">
    29          <StartDate>2000-02-02</StartDate>
    30          <Value>20</Value>
    31        </Payment>
    32      </Leg>
    33    </Transaction>
    34    <Transaction id="2">
    35      <TradeVersion>2</TradeVersion>
    36      <TransactionId>2</TransactionId>
    37      <Leg id="1">
    38        <LegNumber>21</LegNumber>
    39        <Basis>21</Basis>
    40        <FixedRate>21</FixedRate>
    41        <Payment id="1">
    42          <StartDate>2002-01-01</StartDate>
    43          <Value>21</Value>
    44        </Payment>
    45        <Payment id="2">
    46          <StartDate>2002-01-02</StartDate>
    47          <Value>22</Value>
    48        </Payment>
    49      </Leg>
    50      <Leg id="22">
    51        <LegNumber>22</LegNumber>
    52        <Basis>22</Basis>
    53        <FixedRate>22</FixedRate>
    54        <Payment id="21">
    55          <StartDate>2002-02-01</StartDate>
    56          <Value>210</Value>
    57        </Payment>
    58        <Payment id="22">
    59          <StartDate>2002-02-02</StartDate>
    60          <Value>220</Value>
    61        </Payment>
    62      </Leg>
    63    </Transaction>
    64  </TransactionList>';
    65    :DOC2 :=
    66  '<TransactionList>
    67    <Transaction id="31">
    68      <TradeVersion>31</TradeVersion>
    69      <TransactionId>31</TransactionId>
    70      <Leg id="31">
    71        <LegNumber>31</LegNumber>
    72        <Basis>31</Basis>
    73        <FixedRate>31</FixedRate>
    74        <Payment id="31">
    75          <StartDate>3000-01-01</StartDate>
    76          <Value>31</Value>
    77        </Payment>
    78      </Leg>
    79    </Transaction>
    80  </TransactionList>';
    81  end;
    82  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC1))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> insert into LOCAL_TABLE values ( xmltype(:DOC2))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1
    | Id  | Operation                | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT         |             |     1 |   100 |     1   (0)| 00:00:01 |
    |   1 |  LOAD TABLE CONVENTIONAL | LOCAL_TABLE |       |       |            |          |
    SQL> select * from TRAN_VIEW_XMLTABLE
      2  /
    TRADE_VERSION TRANSACTION_ID
                1              1
                2              2
               31             31
    3 rows selected.
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 650975545
    | Id  | Operation          | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS      |                                |     3 |   168 |     3   (0)| 00:00:01 |
    |*  2 |   TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   138 |     3   (0)| 00:00:01 |
    |*  3 |   INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       3 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER  LEG_BASIS LEG_FIXED_RATE
                 1          1          1              1
                 1          2          2              2
                 2         21         21             21
                 2         22         22             22
                31         31         31             31
    5 rows selected.
    Elapsed: 00:00:00.04
    Execution Plan
    Plan hash value: 1273661583
    | Id  | Operation           | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |*  1 |  HASH JOIN          |                                |     5 |   560 |     7  (15)| 00:00:01 |
    |   2 |   NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  3 |    TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  4 |    INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  5 |   TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   295 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       3 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       4 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       5 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL> select * from TRAN_LEG_PAY_VIEW_XMLTABLE
      2  /
    TRANSACTION_ID LEG_NUMBER PAY_START  PAY_VALUE
                 1          1 01-JAN-00          1
                 1          1 02-JAN-00          2
                 1          2 01-FEB-00         10
                 1          2 02-FEB-00         20
                 2         21 01-JAN-02         21
                 2         21 02-JAN-02         22
                 2         22 01-FEB-02        210
                 2         22 02-FEB-02        220
                31         31 01-JAN-00         31
    9 rows selected.
    Elapsed: 00:00:00.07
    Execution Plan
    Plan hash value: 4004907785
    | Id  | Operation            | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  1 |  HASH JOIN           |                                |     9 |  1242 |    10  (10)| 00:00:01 |
    |*  2 |   HASH JOIN          |                                |     5 |   480 |     7  (15)| 00:00:01 |
    |   3 |    NESTED LOOPS      |                                |     3 |   159 |     3   (0)| 00:00:01 |
    |*  4 |     TABLE ACCESS FULL| SYS_NTGgl+TKyhQnWoFRSrCxeX9g== |     3 |   129 |     3   (0)| 00:00:01 |
    |*  5 |     INDEX UNIQUE SCAN| SYS_C0010174                   |     1 |    10 |     0   (0)| 00:00:01 |
    |*  6 |    TABLE ACCESS FULL | SYS_NTUmyermF/S721C/2UXo40Uw== |     5 |   215 |     3   (0)| 00:00:01 |
    |*  7 |   TABLE ACCESS FULL  | SYS_NTelW4ZRtKS+WKqCaXhsHnNQ== |     9 |   378 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0000900010$")
       2 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000800009$")
       4 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       5 - access("NESTED_TABLE_ID"="LOCAL_TABLE"."SYS_NC0000800009$")
       6 - filter("SYS_NC_TYPEID$" IS NOT NULL)
       7 - filter("SYS_NC_TYPEID$" IS NOT NULL)
    Note
       - dynamic sampling used for this statement
    SQL>Out of interest why are you so against using XMLType...
    Edited by: mdrake on Jan 13, 2009 8:25 AM

  • Difference between OBIEE Logical Modelling and physical modelling

    HI.
    what is the difference between logical modeling (BMM) and physical modelling(Physical layer) in obiee admin tool
    please narrate it in definition format
    thank you
    rakesh

    Hi rakesh,
    Administrator tool consists of 3 layers
    Physcial layer:-It is typically first layer built in the repository.Contains objects representing the physical data sources to which the BI server submits queries.It may conatin multiple data sources.The common way is to import metadat from different databases.You can define joins after import if they are not defined.
    Business model and mapping layer:-It is defined as business or logical models of data and specifies the mapping between the physical and business layers.This is where the physical schemas are simplified to form the basis for the end user.We can say data is seperated into facts and dimension tables
    Presentation layer:-simplifies and organizes the business model to make it easy for users to understand and query
    go through the user guides for all the definition and subject
    Hope it helps you.my points?
    By,
    Kranthi
    Edited by: Kranthi.K on Sep 1, 2009 10:22 PM

  • Logical Database design and physical database implementation

    Hi
    I am an ORACLE DBA basically and we started a proactive server dashboard portal ,which basically reports all aspects of our infrastructure (Dev,QA and Prod,performance,capacity,number of servers,No of CPU,decomissioned date,OS level,Database patch level) etc..
    This has to be done entirely by our DBA team as this is not externally funded project.Now i was asked to do " Logical Database design and physical Database
    implementation"
    Even though i know roughly what's that mean(like designing whole set of tables in star schema format) ,i have never done this before.
    In my mind i have a rough set of tables that can be used but again i think there is lot of engineering involved in this area to make sure that we do it properly.
    I am wondering you guys might be having some recommendations for me in the sense where to start?are there any documents online , are there any book on this topic?Are there any documents which explain this phenomena with examples ?
    Also exactly what is the difference between logical database design vs physical database implementation
    Thanks and Regards

    Logical database design is the process of taking a business or conceptual data model (often described in the form of an Entity-Relationship Diagram) and transforming that into a logical representation of that model using the specific semantics of the database management system. In the case of an RDBMS such as Oracle, this representation would be in the form of definitions of relational tables, primary, unique and foreign key constraints and the appropriate column data types supported by the RDBMS.
    Physical database implementation is the process of taking the logical database design and translating that into the actual DDL statements supported by the target RDBMS that will create the database objects in a target RDBMS database. This will generally include specific physical implementation details such as the specification of tablespaces, use of specialised indexing (bitmap, clustered etc), partitioning, compression and anything else that relates to how data will actually be physically stored inside the database.
    It sounds like you already have a physical implementation? If so, you can reverse engineer this implementation into a design tool such as SQL Developer Data Modeller. This will create a logical design by examining the contents of the Oracle data dictionary. Even if you don't have an existing database, Data Modeller is a good tool to use as a starting point for logical and even conceptual/business models.
    If you want to read anything about logical design, "An Introduction to Database Systems" by Date is always a good starting point. "Database Systems - A Practical Approach to Design, Implementation and Management" by Connolly & Begg is also an excellent reference.

Maybe you are looking for

  • I got a new MacBook pro and want to install my lightroom and elements 11.

    I uninstalled both programs on my old computer and this computer were set to factory setting and sold. When I try to install on my new computer - after informing my serial numbers, I get the answer, that this number is not correct. II of course check

  • Business Catalyst and Facebook problem

    I have seen threads on this subject as well as the articles, but I am not certain the problem was answered. I have added a Facebook "like" button to my Large Product Display (and the button works). The large product display has several upsell/cross-s

  • Changing MAC address (spoofing)

    Hello, I want to change the MAC address on a Mac Book Pro running OS X Leopard utilizing the command: +sudo ifconfig en0 lladdra 00:11:22:33:44:55+ Even though the command does not give a warning, nor an error message, the MAC is not changed. In Tige

  • Tranferring music from windows xp hard drive to window 8 hard drive

    Is there an easy way to transfer the files from my old windows xp hard drive (able to connect through USB) to my new windows 8 computer's Itunes? I uploaded hundreds of my own CDs. I found a manual way but I can't select but one CD at a time when try

  • White balance feature in Photoshop CS4?

    Is there a white balance feature in Photoshop CS4 [like in Lightroom]?