Including in expdp oracle 11g r2

hi gurus,
schema level backup including some objects in oracle 11g r2
]$expdp scott/tiger dumpfile=schema.dmp logfile=schema.log schemas=scott directory=dpdump include=table:"in ('EMP', 'DEPT')"
it is saying badly include parameter mentioned. is there any thing wrong in this query.
thank you!

When you use either single quotes ' or double quotes ", you sometimes have to escape them. Depending on the operating system. When I use them, I either have to fight with the escaping, or I put them in a parameter file. If you were to create a file
expdp_params.par
==============
nclude=table:"in ('EMP', 'DEPT')"
and then use:
]$expdp scott/tiger dumpfile=schema.dmp logfile=schema.log schemas=scott directory=dpdump parfile=expdp_params.par
It should work fine.
As for what this query will do... It should be the same as saying:
]$expdp scott/tiger dumpfile=schema.dmp logfile=schema.log directory=dpdump TABLES=SCOTT.EMP,SCOTT.DEPT
When you specify include=table then the only objects that get exported are table types of objects. (tables, grants, indexes, etc.) That is the same set of objects that get exported when you say tables=tabnames.
Dean

Similar Messages

  • Wich  version of APEX is included in the ORACLE 11G R1  ON WINDOWS OS ?

    APEX 301 OR APEX 3.1 ?
    MFOConsulting
    [email protected]
    www.iec.ch

    mfoconsulting,
    APEX 3.1 will be released as an OTN download, and will support database versions 9.2.0.3 and higher. When the next version of the database is released, the latest available version of Application Express will also be included.
    Joel

  • Installing Oracle 11g R2 on RHEL 5.9 server

    Hi,
        I've been trying to install Oracle 11g R2 on a Red Hat Enterprise Linux 5.9 server but have not succeeded thus far. The server meets all the software and hardware requirements for Oracle 11g Release 2 and when it also has all the prerequisite packages/ RPM's on it, when checked manually. I have set up the various kernel, semaphore and local port range parameters in accordance with the Oracle guides for installing Oracle on RHEL 5. I also followed the online guides to create the "oracle" user and set up the groups (oinstall, dba, oper and asm).
        However, when I run the installer, it shows "Failed" for all the prerequisite checks. I tried to ignore this and install Oracle but it failed at 37% and gave multiple errors, related to invoking target 'XYZ' of different files including makefile and gcc.
         I suspect that either the installer is unable to detect these packages as they already exist on our server or it is something to do around permissions to the groups. I read on these forums that it might be because of a "cvu" folder created inside /tmp that requires '777' permission but am not sure if that's what's causing our installation to fail.
         Please let me know how to proceed with the installation and guide me through this.
    Thanks.

    Hi, its Oracle 11g R2 -  2.0.3.6 .
    The O.S is Linux x86_64
    server: RHEL 5.9 (Takinga) with kernel: 2.6.18
    I've been working on this all day today and have managed to overcome the errors regarding the missing/ failed packages. I've also verified that my kernel parameters are correct; I had missed the kernel shmmni parameter yesterday.
    The installer now detects all the packages & runs till 86% when it gives the error: "error invoking target client_sharedlib of makefile".
    Kindly let me know how to proceed. Thanks in advance !

  • How to Create Manual Standby for a Oracle 11g RAC with ASM to Single Instan

    Hi All,
    I have a task to configure a Single Instance Standby Database with ASM for 2-node Primary RAC+ASM database.
    Version using : 11.1.0.6 Oracle 11g --- *" STANDARD EDITION "* Please note datagaurd will not be supported in standard edition.
    Primary database - 2 -Node RAC using ASM storage (All datafiles, redologs, controfile and archive logs)
    Need to setup a single instance standby database manually and than using scripts to transfer the archive logs from primary server to standby server to do recovery time to time.
    Please let me know if there are any configuration document(s) which can help me to set the manual standby? or need your kind help to give your valuable ideas how to go in above situation.
    Thanks in advance

    Niall Litchfield wrote:
    El DBA wrote:
    Well if the archive logs are stored in ASM on the primary nodes, you almost definitely want to be using RMAN to access them. Then to transfer between primary and standby there are many options, this is essentially the step that Data Guard takes care of - so if you (and I) are running Standard Edition, this is the part to "worry" about.
    I'm not really sure what you mean by this:
    As in standard edition the archive destination will be on ASMI don't think the Edition of Oracle (Standard or Enterprise) dictates where and how you store your archive logs, but it's possible I've misunderstood what you mean...SE dictates that database storage for RAC will be ASM, including archive log files. Anything else is not officially supported. I haven't tested but it may be that you can use LOG_ARCHIVE_DUPLEX_DEST to specify a local filesystem for archive log files as well.
    If that doesn't work you'll have to script rman "backup as copy" jobs regularly and then transport the results of that.
    Niall Litchfield
    http://www.orawin.info/
    By the way, it seems Robert has been pretty helpful, it's polite to give him some points dude. And since this is your thread, not mine, give him a "helpful" from me too :p
    El DBA
    Incidentally if you are forced down the RMAN backup as copy route then this will likely throw your current backup retention strategy somewhat, you'll need to think carefully about when an archivelog can be deleted following backup, how many times it might be backed up and so on. I do understand, and have argued for, the use of SE RAC. I also understand and have argued for and implemented manually managed standby a number of times. However by the time your primary database is a RAC instance and you need a standby for DR etc then you really have to look very seriously at whether Standard Edition is still the right investment or not. You will be spending a lot of DBA time managing and troubleshooting this, and you will find that it is less reliable than the off the shelf solution. I suspect that you are very close to the point where an EE installation becomes a worthwhile investment here.
    Niall Litchfield
    http://www.orawin.info/

  • Post installation issues in Oracle 11g

    Hi,
    i have installed oracle 11g on my windows vista- ultimate OS. installation was successful without any error, but after the completion of installation i found that sqlplus.exe file's icon was not proper. it is like a default .exe icon of vista. moreover this, when i executed it, i am getting a command prompt window instead of regular SQL window that we get in any previous versions of oracle. Though everything is working fine.
    So, could anyone please tell me what's wrong? Why i am getting such an interface?

    With 11g, the SLQPlusW is no longer available. SQLPlus in command prompt is what we have left. However you now have SQLDeveloper automatically included.

  • Oracle 11g SOA-BPM PS3 Installation Help

    I'm not a super techie, so installing the latest release from Oracle was a challenge, but I encountered a number of problems and kept notes of what I did to solve it. Many of these hints came from the Forum, but nothing had all of the relevant info under one thread. So here is what I pieced together. If this is helpful to anybody, I'd love to hear it - either on this thread or at my e-mail address of [email protected]. My thanks to Linus Chow of Oracle for some help and allowing me to think I could do this!
    Comments/Suggestions on Oracle 11g SOA-BPMN PS3 Installation_
    Suggest downloading all files into a common directory. I stuck this folder at the root (C:) drive. At collectively just over 5 GBs, the downloading will take several hours (for me it was a full day, as did the installation). You will need an OTN account to be able to download the software. A good overview of PS3 is at the following link: http://blogs.oracle.com/bpm/2011/01/bpm_suite_11gr1_ps3_released.html.
    General comment/suggestion. Be sure to name the aforementioned folder without any spaces (big problems if this is done because of how unzipped files do/don’t work with a path name with spaces in it). As the installs get started, note that an Oracle directory (under the root) with a default name for the middleware directory, named Middleware, is created as the default.
    The link with the installation is actually helpful, but it is incomplete (http://www.oracle.com/technetwork/middleware/bpm/downloads/index.html). Some of the detail needed is in the quick installation guide (http://download.oracle.com/docs/cd/E17904_01/install.1111/e14318/toc.htm, and I suggest downloading the PDF version), but the order conflicts with the previous information. I resolved this by using the latter for detail, but the former for the sequence. I also had to turn to several blogs/forums (the main one being: http://blogs.oracle.com/SOA/2009/08/installing_oracle_soa_suite_11.html) to get help on troubleshooting problems with the installation (see below for others).
    I have a Windows 7 Professional 64-bit version, but I ended up following the path for the 32-bit install path (see the main link cited above), mostly because it was unclear to me what the 64-bit path would be. I also already had the 32-bit version of the JRE installed. The following links cover identifying the differences and what you may have installed as well as alternative versions to download: http://www.java.com/en/download/faq/index_general.xml?user_os=Windows%207; http://www.java.com/en/download/faq/java_win64bit.xml; and http://www.java.com/en/download/manual.jsp.
    Another general comment/suggestion. I found it useful to reboot after each step. It shut down services that I would otherwise have to search for and shut down manually. Some of the installations require services activated by previous steps to be turned off, so you’re better off doing something like this rather than encountering such an error in a subsequent step.
    Step 1: Installing the XE database. The file is an .exe file, and will execute upon a double click. However, the instruction regarding RCU is best saved until the 3rd step, doing it just before you install the RCU. More importantly, there are some things to keep in mind about the database install. First, after installation, you should sign on to the DB, using the Go To DB Home Page option under the Express Edition (XE) folder or set of menu options (created as part of the installation), under the SYSTEM user account. During installation, you’ll have to have given a password for this account, so make sure it is one you can remember. After signing on as SYSTEM, give the SYS user account another (or same) password that you can remember. You will use the SYS account in subsequent steps. Second, there is a parameter for the database that must be changed from the default. This is covered in the links below: http://blogs.oracle.com/tridib_samanta/2010/03/rcu-6107db_init_param_prerequisite_failure_for_processes.html and http://cn.forums.oracle.com/forums/thread.jspa?threadID=1004605. To solve this, select SQL button on the DB home page, then SQL Commands button on the next page, paste/enter into the pane at the top the following command, “ALTER SYSTEM SET processes=300 SCOPE=SPFILE;” (but without the quotes), and then click on the Run button. (The parameter must be greater than or equal to 200, but I found references to setting in equal to 300 or 500.) Then you can log out and close the web page.
    At times, the DB might not be started when you are expecting it to be running (e.g., after a reboot), which is covered in this link: Oracle 10g database homepage not working? (You’ll know that it is isn’t running if you try to open the Go To DB Home Page option and it won’t open, displaying an error page instead.) I found that the simplest way to fix this was to go to the Control Panel, Administrative Tools, Services, and then look to see if the OracleServiceXE service is started. If not, then restart by right-clicking on that service listing and choosing the appropriate option to execute.
    Step 2: Installing WebLogic Server. Either before or during this process, you will need to set up an Oracle Support Account. However, you need a customer ID to be able to create a profile. I was thus not able to complete a profile, so the WLS installation defaulted to the Anonymous registration option. This still needed an e-mail address though, the same one with which you would create the Oracle Support profile, so you should have one at the ready. (It would not accept the e-mail address for my OTN account.) As far as I can tell, the consequence of this path is that I cannot automatically get patches and such. I figure this is a problem to be solved another day. The Oracle Support links are: https://support.oracle.com/CSP/ui/faq_en.html#SignIn and https://support.oracle.com/CSP/ui/flash.html.
    If you go with the default, the middleware directory is just Middleware under the Oracle directory. If you select a different name or location, you will need to remember where it is and what the name is. You should also note the folder name for where the JDK was stuck, which for me was JDK160_21 under the Middleware directory.
    Step 3:  Installing RCU. The trickiest of the steps. Unlike with the previous two steps, this installation first happens after the downloaded file is unzipped. You MUST unzip into a directory for which the full path name (and not just the one you create upon extraction) is without any spaces. (You can use the underscore symbol instead of a space to indicate separation.) Unzip the folder/files, and then open the Command Prompt window. Using the cd command, work your way to the full path name to where you just unzipped these files. Next, continue to work your way down to subfolders created during the extraction process. You want to end up at the rcuHome\BIN\ subfolder. THEN do the RCU-related command cited in Step 1. Type in at the prompt the following command and hit enter: set RCU_JDBC_TRIM_BLOCKS = TRUE. Then, type in rcu.bat at the prompt and hit enter, which will run the installation and configuration sequence. This is realized through a series of windows that open for you to input information and make selections. Use the document at the following link of specific guidance as to what the configuration screens should have entered on them: http://blogs.oracle.com/SOA/2009/08/installing_oracle_soa_suite_11.html. This includes things like the service name (XE) and the host name (localhost) to enter, assuming you are installing this on a laptop or PC for local use only. Some other helpful links for troubleshooting the RCU installation are located at: http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14259/rcu.htm#CIHGHDBG; http://oraclebi.blogspot.com/2010/08/rcu-and-what-it-means-for-you.html ; Re: RCU 11.1.1.4 install fails on Oracle XE and http://cn.forums.oracle.com/forums/thread.jspa?threadID=2162409&tstart=0&messageID=9336791.
    The RCU sets up DB schemas and the like for the BPMN and SOA stuff. The screenshots in the previously mentioned document should be followed exactly. You can also refer to pp. 5-6 of the Quick Installation Guide. You should use the SYS user account (the default, I think), so have the password handy.
    I also found it more comforting to shutdown the RCU installation/configuration via the cancel option than to keep going back a screen to fix something. This may not have been necessary, but it made me feel better. Be prepared for interim screens that pop up to show that the installation/configuration is happening, which will also tell you there are errors. One such screen says that XE isn’t supported for RCU, but you can ignore that (as the supporting guidelines indicate).
    Step 4:  Installing JDev. This is an executable, and you just install with all of the defaults. This process will start the WLS as part of the installation, so you must turn it off before going to the next step. Again, I just rebooted to do this.
    Step 5:  Installing SOA Extensions for JDev. Instructions on the page at the main link are clear and correct. The 2 screen shots must be reviewed and adhered to completely in checking off options. The first selection defines the areas where updates are to be sought out, while the second selection is from the available option(s) from those areas. In this case, you are only installing the SOA Composite Editor, though there are several other updates/extensions from which to select (but don’t, at least for now).
    Step 6: Installing BPM Extensions for JDev. Same comment as for Step 5, except that the option you want to select is not as what is indicate (the BPM Composite Editor) but the BPM Process Studio! I would advise against doing these as part of the same update sequence. In fact, I closed out JDev completely (though I did not reboot) between Step 5 and Step 6.
    Step 7 and 8:  Installing SOA Suite. I suggest unzipping both of the downloaded zip files. Again, it is critical that the full path name into which files are extracted contains no spaces. Once unzipped, you should navigate to the Disk1 folder under the directory into which the first zip file was extracted, but you should do this with the Command Prompt window and the cd command. From this prompt, you should type in “setup.exe -jreLoc {location of JDK}” (without the quotes) and hit enter. The {location of JDK} is where the JDK was installed as part of the WLS installation. For me this was in folder JDK160_21 under the Middleware folder in the Oracle directory. Refer to pp. 12-15 of the Quick Installation Guide. This took me a couple of tries before I actually got the installation screen to show up correctly. Some of what this looks like is also in the following link: http://blogs.oracle.com/SOA/2009/08/installing_oracle_soa_suite_11.html.
    What you may eventually figure out is that 5 installation disks are stretched across two zip files. Once the installation of disks 1 and 2 are done, a popup window will ask you to browse to the folder where each of the next 3 disks are, which is in the folder created by the extraction of files/folders from the second zip file for the SOA Suite. As with previous steps, I rebooted after all of this was done.
    Step 9:  Installing the Business Process Converter. Unzip the downloaded file, and open the Installation Instructions Word file. It will instruct you to point JDev’s update sequence to another zip file extracted during the unzipping of the downloaded zip file for the converter. JDev will install this without much fuss or muss, but this installation is to the Studio and not to BPA. (For installation to BPA, you need to have installed BPA, and followed the other guidance in the instructions.) To get to JDev’s update sequence, follow the same first step as in Step 5, but check the option to browse for and upload from a local file. This local file will be the previously mentioned other zip file.
    -------------------------------------------------

    Create a new user oracle and proceed with the installation
    --> useradd -g oinstall oracle
    If your are forwarding your GUI using xming or vnc you would need to copy the xauth of root user and set it to oracle
    [server1:root] xauth list
    bangvmpllE.com/unix:11 MIT-MAGIC-COOKIE-1 b23d63374fe25a3577751b6b95b2210e
    [server1:root] sudo su - oracle
    [server1:oracle] export DISPLAY=localhost:10.0
    [server1:oracle] xauth add bangvmpllE.com/unix:11 MIT-MAGIC-COOKIE-1 b23d63374fe25a3577751b6b95b2210e

  • Oracle 11g RAC on Windows 2008 R2 VMware EXS 3.5 virtual machines

    Hi,
    We are planning to Install Oracle 11g R2 RAC on two VMware EXS 3.5 Windows 2008 R2 servers.
    Having trouble while assigning the storage to the servers, the Raw Device Mapping feature in the VMware is greyed out and we cannot assign the disks to the Virtual servers, the disks are allocated to the Vmware Host machine from the SAN (HP EVA).
    Please guide me the best approach for the RAC configuration on VMware EXS 3.5 Win 2008 R2 Guest servers.
    any help will be highly appreceiated.
    Thanks.

    Hi,
    Is this implementation to production environment?
    Be aware:
    Is Oracle RAC on VMware supported? No, we do not support Oracle Software including Oracle RAC on VMWare.
    Aside from the support restrictions for the database on VMWare outlined in Metalink Note 249212.1, there are technical restrictions that prevent the certification of Oracle RAC in a VMWare environment.
    *RAC: Frequently Asked Questions [ID 220970.1]*
    Having trouble while assigning the storage to the servers, the Raw Device Mapping feature in the VMware is greyed out and we cannot assign the disks to the Virtual servers, the disks are allocated to the Vmware Host machine from the SAN (HP EVA).Check if below can help you.
    http://vmzare.wordpress.com/2007/02/19/vmware-raw-device-mappingrdm/
    Regards,
    Levi Pereira

  • Oracle 11g R2 Install on Windows 7 64 bit setup.exe does not work.

    Hi
    I am trying to install Oracle 11g R2 on my Windows 7 Ultimate 64 bit. When I execute setup.exe as Administrator the command window flashes and exits. I could not even see what the message is. Also tried command prompt. Can anyone help me resolve this issue?
    Appreciate your support.
    Regards

    user1484609 wrote:
    Installation Successful after executing the install from C:\temp and not within users. Even if you execute as Admin Oracle Install does not have access to the folders in C:\Users...
    Finally the install is successful.Congratulations.
    And thank you for posting your solution. The security issue was quite a surprise to me as well, although it ties into a PC World article I read today.
    To continue, please make sure you have a static IP address. If your system uses DHCP, that may mean setting up Loopback Adapter, configuring a static IP address other than 127.0.0.1 for that (for example you can use 192.168.123.101), and updating C:\windows\system32\drivers\etc\hosts. (note - no 3 char 'type on the hosts file) to include an entry like '192.168.123.101 myhost.example.com myhost', and perhaps setting your ORACLE_HOSTNAME variable. This is all described well in the Install documentaiton at http://download.oracle.com/docs/cd/E11882_01/install.112/e10843/reqs.htm#BABIAEEC

  • Oracle 11g: Oracle insert/update operation is taking more time.

    Hello All,
    In Oracle 11g (Windows 2008 32 bit environment) we are facing following issue.
    1) We are inserting/updating data on some tables (4-5 tables and we are firing query with very high rate).
    2) After sometime (say 15 days with same load) we are feeling that the Oracle operation (insert/update) is taking more time.
    Query1: How to find actually oracle is taking more time in insert/updates operation.
    Query2: How to rectify the problem.
    We are having multithread environment.
    Thanks
    With Regards
    Hemant.

    Liron Amitzi wrote:
    Hi Nicolas,
    Just a short explanation:
    If you have a table with 1 column (let's say a number). The table is empty and you have an index on the column.
    When you insert a row, the value of the column will be inserted to the index. To insert 1 value to an index with 10 values in it will be fast. It will take longer to insert 1 value to an index with 1 million values in it.
    My second example was if I take the same table and let's say I insert 10 rows and delete the previous 10 from the table. I always have 10 rows in the table so the index should be small. But this is not correct. If I insert values 1-10 and then delete 1-10 and insert 11-20, then delete 11-20 and insert 21-30 and so on, because the index is sorted, where 1-10 were stored I'll now have empty spots. Oracle will not fill them up. So the index will become larger and larger as I insert more rows (even though I delete the old ones).
    The solution here is simply revuild the index once in a while.
    Hope it is clear.
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]Hmmm, index space not reused ? Index rebuild once a while ? That was what I understood from your previous post, but nothing is less sure.
    This is a misconception of how indexes are working.
    I would suggest the reading of the following interasting doc, they are a lot of nice examples (including index space reuse) to understand, and in conclusion :
    http://richardfoote.files.wordpress.com/2007/12/index-internals-rebuilding-the-truth.pdf
    "+Index Rebuild Summary+
    +•*The vast majority of indexes do not require rebuilding*+
    +•Oracle B-tree indexes can become “unbalanced” and need to be rebuilt is a myth+
    +•*Deleted space in an index is “deadwood” and over time requires the index to be rebuilt is a myth*+
    +•If an index reaches “x” number of levels, it becomes inefficient and requires the index to be rebuilt is a myth+
    +•If an index has a poor clustering factor, the index needs to be rebuilt is a myth+
    +•To improve performance, indexes need to be regularly rebuilt is a myth+"
    Good reading,
    Nicolas.

  • Oracle 11g bug ?!

    We are trying to execute a simple query of the form
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%'
    The data does exist in the table but the query does not return values.
    Sometimes the count(*) on that table returns the correct number but the actual select statement does not return data.
    We have added a dummy where clause
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%' or lower(attr2) like 'WB%' and the data does show up.
    We are on Oracle 11g 11.2.0.2 and have migrated recently from 10g. And this issue has started appearing after the migration.
    Any thoughts on what could be causing this issue ?
    Thanks
    Surya
    Edited by: Surya on 09-Mar-2011 06:11

    user11180582 wrote:
    We have added a dummy where clause
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%' or lower(attr2) like 'WB%' and the data does show up. Hm. difficult but I doubt that you have a bug. I guess you have either some strange values or there is something in the full statement that is missing in your example.
    For example please be aware that the AND operator has a higher priority then the OR operator (is this way since oracle 7 at least).
    So if your real statement would include an and condition, this could produce unwanted outcome.
    select * from sometable
    where upper(attr1) like 'WB%'
         or upper(attr2) like 'WB%'
         or upper(attr3) like 'WB%'
         and lower(attr5) = 'XY' This is identical to:
    select * from sometable
    where upper(attr1) like 'WB%'
         or upper(attr2) like 'WB%'
         or (upper(attr3) like 'WB%' and lower(attr5) = 'XY' )But usually you want
    select * from sometable
    where (upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%')
            and lower(attr5) = 'XY' Some additon. Your condition could also be written like this. Maybe this helps to find the real cause of the error.
    select * from sometable
    where 'WB' in (substr(upper(attr1),1,2)
                       ,substr(upper(attr2),1,2)
                       ,substr(upper(attr3),1,2)
                       )I find this often to be better readable then a long LIKE + OR expression.

  • Oracle 11g advantages for performance

    Hello,
    I am doing test of Client side result set cache on oracle 11 g rel2 ,O/S- RHEL
    i am doing test as below on 2 Oracle 11g rel2 test servers on RHEL
    one oracle 11g rel2 instance is used as server1,from other oracle 11g rel2 server2, i am running queries connecting to server1 through sqlplus,listener(tnsnames )
    i run query few times without any client cache settings then
    i have set init.ora paras for oracle 11g rel2 for client result cache,cache size/cache lag
    i run the same query few times
    in both the cases after each run i am noting statistics
    select * from V$RESULT_CACHE_OBJECTS;
    select * from V$CLIENT_RESULT_CACHE_STATS;
    select * from gv$cpool_conn_info;
    also autotrace,plan etc
    but after using cache this views are getting poplulated ,autiotrace plan shows cache is used
    but i cant see any improvement in performance after using client cache like speed,reduce network trip, etc
    in fact without using cache/with no hint ,query executes faster
    let me know if i am missing something,i believe sqlplus internally using OCI
    thanks

    >
    I tested with custom code using java/jdbc thin driver ,connecting same as between 2 oracle 11g2 instance 1 as client other server,running code calling queries from client connecting to server
    >
    Unless you plan to provide the information ask for about what it is you are doing there really isn't any point in providing status updates that: you test this, you tested that. You made several statements about what you were doing
    >
    i have set init.ora paras for oracle 11g rel2 for client result cache,cache size/cache lag
    i run the same query few times
    in both the cases after each run i am noting statistics
    select * from V$RESULT_CACHE_OBJECTS;
    select * from V$CLIENT_RESULT_CACHE_STATS;
    select * from gv$cpool_conn_info;
    also autotrace,plan etc
    >
    and were asked to provide specific information that you haven't provided nor have you provided the query.
    >
    You say you are doing a bunch of things
    But you don't post any of those results so we can see what it is you are looking at.
    No one can comment on things they can't see.
    >
    You have to be using OCI for client side caching so if you use the Java thin driver but don't use OCI there won't be any cacheing. There also won't be any if it is not enabled or if the query has certain constraints as listed in the doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#CHDGGFEF
    >
    Queries that are not Cached
    There are queries that are not cached on the OCI client even if the result cache hint is specified. Such queries may be cached on the database if the server result cache feature is enabled (see Oracle Database Concepts, "SQL Query Result Cache" for more information). If a SQL query includes any of the following, then the result set of that query is not cached in the OCI client result cache:
    •Views
    •Remote objects
    •Complex types in the select list
    •Snapshot-based or flashback queries
    •Queries executed in a serializable, read-only transaction, or inside a flashback session
    •Queries that have PL/SQL functions in them
    •Queries that have VPD policies enabled on the tables
    >
    This Oracle-Developer.net article author doesn't seem to have any trouble caching results.
    http://www.oracle-developer.net/display.php?id=503

  • Oracle 11g - Problem in referring ROWNUM in the SQL

    Hello All,
    We are facing a strange problem with Oracle 11g (11.2.0.1.0).
    When we issue a query which refers the rownum, it returns a invalid record ( which is not exists in the table).
    The same sql is working fine once we analyze the table
    Note: The same sql is working fine with oracle 10g (Before analyze also).
    The script to reproduce the issue:
    DROP TABLE BusinessEntities;
    CREATE TABLE BusinessEntities
    business_entity_id VARCHAR2(25) PRIMARY KEY,
    business_entity_name VARCHAR2(50) NOT NULL ,
    owner_id VARCHAR2(25) ,
    statutory_detail_id NUMBER ,
    address_id NUMBER NOT NULL
    DROP TABLE BusEntityRoles;
    CREATE TABLE BusEntityRoles
    business_entity_id VARCHAR2(25) NOT NULL,
    role_id VARCHAR2(10) NOT NULL,
    PRIMARY KEY (business_entity_id, role_id)
    INSERT
    INTO businessentities ( business_entity_id , business_entity_name, owner_id , statutory_detail_id , address_id)
    VALUES
    ( 'OWNER', 'OWNER Corporation Ltd', NULL , 1, 1 );
    INSERT
    INTO businessentities ( business_entity_id , business_entity_name, owner_id , statutory_detail_id , address_id)
    VALUES
    ( 'ALL_IN_ALL', 'ALL IN ALL Corporation Ltd', 'OWNER' , 2, 2 );
    INSERT INTO busentityroles(business_entity_id, role_id) VALUES ('TEST' , 'OWNER');
    INSERT INTO busentityroles (business_entity_id,role_id) VALUES ('TEST','VENDOR');
    INSERT INTO busentityroles(business_entity_id, role_id) VALUES ('ALL_IN_ALL' , 'VENDOR');
    SELECT *
    FROM
    (SELECT raw_sql_.business_entity_id, raw_sql_.business_entity_name, raw_sql_.owner_id, raw_sql_.address_id,
    rownum raw_rnum_
    FROM
    (SELECT *
    FROM BusinessEntities
    WHERE (business_entity_id IN
    (SELECT business_entity_id
    FROM BusinessEntities
    WHERE business_entity_id = 'OWNER'
    OR owner_id = 'ALL_IN_ALL'
    AND business_entity_id NOT IN
    (SELECT business_entity_id FROM BusEntityRoles
    ORDER BY business_entity_id ASC
    ) raw_sql_
    WHERE rownum <= 5
    WHERE raw_rnum_ > 0;
    OUTPUT Before Analyzing
    BUSINESS_ENTITY_ID: OWNER
    BUSINESS_ENTITY_NAME: NULL
    OWNER_ID: OWNER
    ADDRESS_ID: NULL
    RAW_RNUM_: 1
    Note: There is no record in the table with the value business_entity_id as 'OWNER' and OWNER_ID as 'OWNER' and the address_id as NULL
    OUTPUT : After analyzed the table Using the below mentioned command
    ANALYZE TABLE "BUSENTITYSUPPLYCHAINROLES" ESTIMATE STATISTICS
    ANALYZE TABLE "BUSINESSENTITIES" ESTIMATE STATISTICS
    BUSINESS_ENTITY_ID: OWNER
    BUSINESS_ENTITY_NAME: OWNER Corporation Ltd
    OWNER_ID: NULL
    ADDRESS_ID: 1
    RAW_RNUM_: 1
    Any clue why Oracle 11g is behaving like this.

    Hi,
    it's a good practice to give aliases for tables, as well as name query blocks. Here it is (and formatted for convinience):
    select --/*+ gather_plan_statistics optimizer_features_enable('10.2.0.4') */
      from (select /*+ qb_name(v2) */
                   raw_sql_.business_entity_id
                  ,raw_sql_.business_entity_name
                  ,raw_sql_.owner_id
                  ,raw_sql_.address_id
                  ,rownum raw_rnum_
              from (select /*+ qb_name(v1) */ *
                      from businessentities b1
                     where (b1.business_entity_id in
                           (select /*+ qb_name(in) */ b2.business_entity_id
                               from businessentities b2
                              where business_entity_id = 'OWNER'
                                 or owner_id = 'ALL_IN_ALL'
                                and business_entity_id not in
                                   (select /*+ qb_name(not_in) */ r.business_entity_id from busentityroles r)))
                     order by business_entity_id asc) raw_sql_
             where rownum <= 5)
    where raw_rnum_ > 0;You are facing some bug - definitely - and, possibly, it is caused by [join elimination|http://optimizermagic.blogspot.com/2008/06/why-are-some-of-tables-in-my-query.html]. As a workaround you should rewrite the query to eliminate unnecessary join manually; or you may include a hint to not eliminate join (it's not documented):
    SQL>
    select -- /*+ gather_plan_statistics optimizer_features_enable('10.2.0.4') */
      from (select /*+ qb_name(v2)  */
                   raw_sql_.business_entity_id
                  ,raw_sql_.business_entity_name
                  ,raw_sql_.owner_id
                  ,raw_sql_.address_id
                  ,rownum raw_rnum_
              from (select /*+ qb_name(v1) no_eliminate_join(b1) */ *
                      from businessentities b1
                     where (b1.business_entity_id in
                           (select /*+ qb_name(in) */ b2.business_entity_id
                               from businessentities b2
                              where business_entity_id = 'OWNER'
                                 or owner_id = 'ALL_IN_ALL'
                                and business_entity_id not in
                                   (select /*+ qb_name(not_in) */ r.business_entity_id from busentityroles r)))
                     order by business_entity_id asc) raw_sql_
             where rownum <= 5)
    20   where raw_rnum_ > 0;
    BUSINESS_ENTITY_ID        BUSINESS_ENTITY_NAME                               OWNER_ID                  ADDRESS_ID  RAW_RNUM_
    OWNER                     OWNER Corporation Ltd                                                                 1          1Strange thing is executing a transformed query gives correct result too:
    SELECT "from$_subquery$_001"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
           "from$_subquery$_001"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
           "from$_subquery$_001"."OWNER_ID" "OWNER_ID",
           "from$_subquery$_001"."ADDRESS_ID" "ADDRESS_ID",
           "from$_subquery$_001"."RAW_RNUM_" "RAW_RNUM_"
      FROM  (SELECT /*+ QB_NAME ("V2") */
                    "RAW_SQL_"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
                    "RAW_SQL_"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
                    "RAW_SQL_"."OWNER_ID" "OWNER_ID","RAW_SQL_"."ADDRESS_ID" "ADDRESS_ID",
                    ROWNUM "RAW_RNUM_"
               FROM  (SELECT /*+ QB_NAME ("V1") */
                            "SYS_ALIAS_1"."BUSINESS_ENTITY_ID" "BUSINESS_ENTITY_ID",
                            "SYS_ALIAS_1"."BUSINESS_ENTITY_NAME" "BUSINESS_ENTITY_NAME",
                            "SYS_ALIAS_1"."OWNER_ID" "OWNER_ID",
                            "SYS_ALIAS_1"."STATUTORY_DETAIL_ID" "STATUTORY_DETAIL_ID",
                            "SYS_ALIAS_1"."ADDRESS_ID" "ADDRESS_ID"
                       FROM "TIM"."BUSINESSENTITIES" "SYS_ALIAS_1"
                      WHERE ("SYS_ALIAS_1"."BUSINESS_ENTITY_ID"='OWNER'
                          OR "SYS_ALIAS_1"."OWNER_ID"='ALL_IN_ALL' AND  NOT
                             EXISTS (SELECT /*+ QB_NAME ("NOT_IN") */ 0
                                       FROM "TIM"."BUSENTITYROLES" "R"
                                      WHERE "R"."BUSINESS_ENTITY_ID"="SYS_ALIAS_1"."BUSINESS_ENTITY_ID")
                      ORDER BY "SYS_ALIAS_1"."BUSINESS_ENTITY_ID") "RAW_SQL_"
             WHERE ROWNUM<=5) "from$_subquery$_001"
    26   WHERE "from$_subquery$_001"."RAW_RNUM_">0
    27  /
    BUSINESS_ENTITY_ID        BUSINESS_ENTITY_NAME                               OWNER_ID                  ADDRESS_ID  RAW_RNUM_
    OWNER                     OWNER Corporation Ltd                                                                 1          1

  • Oracle 11g spatial query

    An Oracle 11g spatial database with 5 features in it. A doughnut, triangle, line, trapezium, pentagon.
    I want to query what coordinates of features exist in a rectange box including the last point that intersects the rectangle box.
    It really difficult to explain without pictures. Please look at this page.
    http://www.h2ss.co.uk/q/question.jsp
    Thanks, I appreciate it.

    Thanks for the replies.
    I acknowledge that what bkzar and jsharma say will work. But in real terms it is impractical for me to create a new table with the SDO_GEOMETRY's. I have over a thousand polygons, each with over 5000 points in my spatial table.
    Let me give you a background to what I am trying to achieve.
    I am trying to extract features from 11g and render them on Google Maps. However some of my polygons are huge and have over 5000 points, Google cannot render them effectively, however Google does give me the coordinates of the visible view, i.e the current rectangle view.
    My idea was that if you are zoomed right into Google Map and a particular feature intersects the rectangle view than I can query for a portion of the feature, including the first and last points that fall outside of the rectangle box.
    I need to be able to somehow filter the SDO_GEOMETRY that don't exist in the rectangle box.
    Thanks

  • Oracle 11g Client and XML DB

    We have moved our applications in a mix environment (DB on Linux and App. Server on Windows) on Oracle 11g.
    On the past we have tested the applications and they were working, now seems nothing is ok, it is like the 10g instant client on Windows is unable to communicate with Oracle 11g DB working on XMLDB.
    May I ask if someone have seen the same problems?
    Testing on Windows all the environment it was all working, but it was installed all on the same machine.
    Stefano

    Ozark DBA wrote:
    Just need confirmation that the old 10g Java based Enterprise Manager is gone forever with 11g and there is no management console in the 11g client installation (at least I cannot find one). Confirmed. Same as in the Database install.
    And after searching the threads ond Oracle documentation, it appears that I can install 11g database on my local pc and then have a dbconsole (not grid control). Please confirm that this dbconsole only points to the specific database installed on the same local pc, and it cannot be used to manage remotely located 10 or 11g databases. Confirmed. The DB Console is tied to one ORACLE_HOME one one HOST for one INSTANCE. The HOST and INSTANCE are used in the directory naming (of all stupidity) and configuration file contents under the ORACLE_HOME.
    I am still in the planning stages for grid control installation and would like to use the smaller enterprise manager - java control. But again, there is no such Oracle application for 11g now? I must use grid control to manage multiple databases?Confirmed. Fortunately, the Grid Control is included in the Database license as per the database Licensing manual, and you can put the Grid Control on a separate machine. Since the Grid Control is fed using a single agent for all product (database, and anything else) on the target host, the Grid Control puts on a much smaller footprint on a database machine than even the old Java console.
    Note that the 11g Grid Control will be (at least) announced tomorrow by WebCast - check OTN.

  • How do I migrate views from MS SQL 2008 to Oracle 11g through SQL Developer

    Is there any way to migrate the views from MS SQL 2008 to Oracle 11g through SQL Developer? Please give me some detail steps. Thanks for your help.
    Kevin

    Hi Kevin,
    user13531850 wrote:
    Hi Turloch,
    When I use migrate to oracle, I got a problem, the migrate tool create a new schema for me in my case (AZTECA_KSMMS), it migrates all the stuffs under that schema (AZTECA_KSMMS). However my application need the all the Oracle data under schema AZTECA instead of AZTECA_KSMMS. Is there any way to specify specific schema (AZTECA) for target oracle database? Schema remapping is available:
    First Capture (separately) then during right click convert on the captured model there is a Specify the conversion options with a Object Naming tab where the schema (and other) name changes are editable.
    I have not used this recently.
    Also during the migration process, when I choose repository, there is a check box for truncate to reset repository to empty state, Do I need to check that truncate Check Box so the repository will be cleared from last migration?The repository can hold multple migration attempts. Check truncate to get rid of previous attempts information. This cleans up the repository - not the destination database.
    There are also online database and offline database options during the migration process, what are the difference between these two choices? After I migrated to Oracle, all my views has a red cross icon next to it. Does that mean the view migration is failed or not? Please give me your comments. Thanks for your help.offline: for big (amount of data) databases with simple data types,
    uses bcp + files + scripts + sqlldr.
    online: for small (amount of data) databases (easier),
    uses (Java) jdbc.
    The view is likely to be broken - recompiling it may help.
    The Oracle schema is created using a .sql file - see under generated in the directory you gave originally in the wizard. There is a .out file that contains the result of running this script including any errors. During conversion there are also likely to be warnings displayed on the UI.
    There may be a single issue that is causing multiple issues - if viewa depends on functionb, and functionb is broken, viewa will also fail.
    >
    Kevin-Turloch
    SQLDeveloper Team

Maybe you are looking for