Use of q operator in oracle 11g

Hi,
I am looking for following data Rewards–ALL (UK/IE,US,Germany & China). even though i have used q operator. when report is generated using following query
and UTL_FILE in excel sheet it show following data
Rewards–ALL (UK/IE,US,Germany & China)here is the query. sql developer worksheet result tab shows Rewards–ALL (UK/IE,US,Germany & China) though
SELECT 'c' temp,q'#Rewards–ALL (UK/IE,US,Germany & China)#'
FROM memberhistory mlhthanks
sandy
Edited by: Sandy310 on Apr 27, 2010 5:10 PM
Edited by: Sandy310 on Apr 27, 2010 5:10 PM

First, it appears you have an illegal ASCII character after REWARDS - the "–" character.
Did you SET ESCAPE ON ?
Here is what I did after changing out the illegal character in SQL Developer, I executed it as a script.
set escape on
SELECT  'c' temp
        ,q'[Rewards-ALL (UK/IE,US,Germany \& China)]'  search_string
FROM
         dual   ;
TEMP SEARCH_STRING                         
c    Rewards-ALL (UK/IE,US,Germany & China)I don't know why you are using the q operator. It is designed to eliminate the need for doubling up single quotes - the string you have does not have any quotes.

Similar Messages

  • Not able to create a database link using the database gateway of oracle 11g

    HI,
    While trying to create a database link to SQL server from Oracle ,using the database gateway provided with 11g, i am getting the following error while making use of it in selecting columns from tables :
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    These are the steps i have followed for setting up:
    1.Ran the set up for the Database gateway.and mentioned the SQL server name and database .ALos set up a listener.
    2. Added the following in the Listener.ora of Oraclehome 11/NETWORK/ADMIN:
    LISTENER_SQL_FCD =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost) (PORT = 1541)
    SID_LIST_LISTENER_SQL_FCD =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=dg4msql)
    (ORACLE_HOME= D:\app\20537\product\11.1.0\db_3)
    (PROGRAM=dg4msql)
    3.Added the following in tnsnames.ora inOracle home/NETWORK/ADMIN:
    dg4msql=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1541))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
    4. Following is the entry in initdg4msql.ora in C:\product\11.1.0\tg_5\dg4msql\admin:
    HS_FDS_CONNECT_INFO=10.148.45.242:1433//SalesDemo
    HS_FDS_TRACE_LEVEL=DEBUG
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    5. Created the database link :
    create database link dblink
    connect to "sa" identified by "<pswd>"
    using 'dg4msql'
    On running :select * from test1@dblink i get the following error:
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    Is there any issue with the set or definition that I get the above error?

    What is the version of the Oracle database in which you have specified/and use the database link?
    If it is for example 10.2.0.3.0 you need to apply the mandatory patch for RDBMS bug 5965763 first before being able to use an 11g gateway. Have a look at MetaLink note 457808.1 for details about this patch.
    Regards,
    Ed

  • Practical use of Flashback Archive in Oracle 11g

    Hi all,
    <br>
    <br>
    With Oracle 11g, I have a conclusion on Flashback Archive and I'd like to know your opinion about it.
    <br>
    <br>
    With the following limitation:
    <br>
    "For a table with Flashback Archiving enabled, you cannot issue the following DDL commands: <br>
    ALTER TABLE (except adding a column), DROP TABLE, RENAME TABLE, TRUNCATE TABLE"
    <br>
    <br>
    <b>I think Flashback Archive object cannot practically replace auditing mechanism we used to use in the database <br>
    level by creating triggers on the audited table. What do you think?</b>

    Hi all,
    <br>
    <br>
    With Oracle 11g, I have a conclusion on Flashback
    Archive and I'd like to know your opinion about it.
    <br>
    <br>
    With the following limitation:
    <br>
    "For a table with Flashback Archiving enabled, you
    cannot issue the following DDL commands: <br>
    ALTER TABLE (except adding a column), DROP TABLE,
    RENAME TABLE, TRUNCATE TABLE"
    <br>
    <br>
    <b>I think Flashback Archive object cannot
    practically replace auditing mechanism we used to use
    in the database <br>
    level by creating triggers on the audited table. What
    do you think?</b>I think it depends on the app. ALTER TABLE is a fairly significant restriction I'd imagine for most people. On the other hand most user defined auditing answers the 'what happened here?' question that auditors ask, but not the 'what did the data look like then?' associated question (except by hard graft).
    Niall Litchfield
    http://www.orawin.info/

  • Produce Message to AQ Queue using standalone Java client in Oracle 11g FMW

    I have a Java client that creates a TextMessage and tries to post it to AQ queue using the server context. Please find the sample code below:
    QueueSession jmsSession = null;
    QueueConnection queueConnection = null;
    try {
    Properties parm = new Properties();
    parm.setProperty("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
    parm.setProperty("java.naming.provider.url","t3://10.209.125.23:8001");
    parm.setProperty("java.naming.security.principal","weblogic");
    parm.setProperty("java.naming.security.credentials","weblogic1");
    Context ctx = new InitialContext(parm);
    System.out.println("Weblogic Initial Context obtained : " + ctx);
    //DataSource ds = (DataSource)ctx.lookup(datasourceJNDI);
    QueueConnectionFactory queueConnfactory = (QueueConnectionFactory)ctx.lookup(QCF) ;
    System.out.println("QueueConnectionFactory from QCF jndi lookup : " + queueConnfactory);
    queueConnection = queueConnfactory.createQueueConnection();
    System.out.println("QueueConnection obtained : " + queueConnection);
    //Make QueueSession
    jmsSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
    System.out.println("QueueSession obtained : " + jmsSession);
    //Start QueueConnection else no messages will be delivered
    queueConnection.start();
    Queue aqQueue = (Queue)ctx.lookup(QUEUE_JNDI);
    System.out.println("Queue obtained from lookup: " + aqQueue);
    QueueSender sender = ((AQjmsSession)jmsSession).createSender(aqQueue);
    System.out.println("QueueSender obtained: " + sender);
    File file = new File("C:
    Documents and Settings\\Apara\\Desktop\\EH_Mig\\development
    Resub.xml");
    XmlObject object = XmlObject.Factory.parse(file);
    String payloadString = object.toString();
    System.out.println("Message to be sent : " + payloadString);
    Message message = jmsSession.createTextMessage(payloadString);
    sender.send(message);
    jmsSession.commit();
    System.out.println("Message sent : " + message.toString());
    catch(Exception ex) {
    ex.printStackTrace();
    finally {
    if (jmsSession != null)
    jmsSession.close();
    if (queueConnection != null)
    queueConnection.stop();
    queueConnection.close();
    The code gives a runtime exception when it reaches the statement sender.send() as below :
    weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.physicalConnectionWithin(Unknown Source)
    at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.physicalConnectionWithin(Unknown Source)
    at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:817)
    at oracle.sql.TypeDescriptor.<init>(TypeDescriptor.java:622)
    at oracle.sql.StructDescriptor.<init>(StructDescriptor.java:317)
    at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:200)
    at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:168)
    at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:137)
    at oracle.jpub.runtime.MutableStruct.toDatum(MutableStruct.java:113)
    at oracle.jms.AQjmsGenMessage_C.toDatum(AQjmsGenMessage_C.java:46)
    at oracle.jms.AQjmsProducer.jdbcEnqueue(AQjmsProducer.java:1027)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:747)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:517)
    at co.uk.morrisons.errorhospital.util.QueueTest.sendMessageUsingServerContextAndQCF(QueueTest.java:245)
    at co.uk.morrisons.errorhospital.util.QueueTest.main(QueueTest.java:293)
    Caused by: java.rmi.MarshalException: error marshalling return; nested exception is:
    java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
    ... 15 more
    Caused by: java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:618)
    at weblogic.utils.io.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:63)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_WLSkel.internalInvoke2(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_WLSkel.internalInvoke1(Unknown Source)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    I am using a ForeignServer configuration which is targeted to a JMS Server. This a Weblogic 10.3.2 feature. Please see if you can help me to enqueue the message.
    Thanks,
    Aparajeeta

    It finally got resolved with help from Edwin Biemond and Oracle docs. I have made a blog out of it @
    http://technicknacks.blogspot.com
    Edited by: oraaps on Mar 26, 2010 5:33 PM

  • How to store and use the BLOB data in Oracle 11G?

    Recentlly,when I tested the Blob data in Oracle11G ,I found that there were too many differences between the SQL
    Server and the Orcale on the capabilities.In Orcale ,I created the table like this:
    create table point
    xid number(10) primary key,
    North number(30,15) default null,
    West number(30,15) default null,
    South number(30,15) default null,
    East number(30,15) default null,
    Area number(30,15) default null,
    Len number(30,15) default null,
    Geometry BLOB default null
    organization index overflow
    tablespace "Tab1"
    lob (Geometry) store as securefile
    tablespace "Tab1"
    enable storeage in row
    chunk 4096
    pctversion 20
    nocache
    no logging
    compress high
    and I stored 10248 rows in this table,
    then ,I used "select geometry from point where xid > ? and xid < ?" as the testing SQL langauage in Java and the
    programme runed once per 5000 pieces of memory.
    the total time used in Orcale is twice more than that in SQLServer.In my Application programs, once the same
    orders runed,their differences were three times and more.As usually,the capability of Orcale is more strongger
    than the SQLServer.Why?

    select geometry from point where xid > ? and xid < ?"Does an index on XID exist?
    Are statistics current for table & indexes?

  • Oracle 11g : Directory and UTL_FILE - ORA-29280: invalid directory path

    Hi,
    I have Oracle 11g server on a UNIX box and im accessing it through an Oracle client on a windows box.
    Im new to File operations in Oracle 11g. Have couple of questions;
    1. Can i create a directory in Oracle using CREATE DIRECTORY statment which points to my local machine (windows: on which Oracle client is running).
    for e.g. CREATE OR REPLACE DIRECTORY c_temp AS 'd:\test';
    2. If i can create such a directory, can i use the UTL_FILE.fopen command to open a file from the windows machine and append some text to it.
    Or
    We can only create direcories that are present in the Oracle Server?
    Your help is appreciated.
    Thanks.
    Edited by: user533016 on Feb 1, 2011 3:14 AM

    user533016 wrote:
    Hi,
    I have Oracle 11g server on a UNIX box and im accessing it through an Oracle client on a windows box.
    Im new to File operations in Oracle 11g. Have couple of questions;
    1. Can i create a directory in Oracle using CREATE DIRECTORY statment which points to my local machine (windows: on which Oracle client is running).
    for e.g. CREATE OR REPLACE DIRECTORY c_temp AS 'd:\test';
    2. If i can create such a directory, can i use the UTL_FILE.fopen command to open a file from the windows machine and append some text to it.Though it is not recommended, you could do this with a samba share (I haven't tried it myself yet).
    Or
    We can only create direcories that are present in the Oracle Server?That's what is recommended for various reasons.

  • Oracle 11g installation on Oracle Enterprise Linux, 64bit version.

    Hi
    I want to install oracle 11g on Oracle Enterprise Linux, 64bit version.
    Do I need to set kernel parameters in this operating system, since it is not standart Linux editions.
    or
    Can I have a step by step documentation for installing oracle 11g on this operating system?

    Hello,
    Yes you do need to set kernal parameters in order to meet pre-requisites, otherwise your installation will fail and oracle might not work or unstable.
    Here is the best place to find out stepwise installation instruction and kernel parameter configuration
    Quick Installation Guide*
    http://download.oracle.com/docs/cd/B28359_01/install.111/b32285/toc.htm
    Kernel parameter configuration*
    http://download.oracle.com/docs/cd/B28359_01/install.111/b32285/toc.htm#CEGFBCFD
    You can use this tutorial to install oracle 11g*
    http://www.oracle.com/technology/obe/11gr1_db/install/dbinst/dbinst.htm#o
    Regards

  • Anyone inserted data directly from Oracle 11g to MySQL?

    Hi There,
    We work mainly on Oracle 11g. However, there is a requirement to now connect to an external MySQL database from our company's Oracle Database. Would be trying to do this for the first time. The process would be to download the data using PL/SQL from the ORacle 11g DB and then insert the data into the MySQL DB table. Had a few questions,
    1. Are there any known issues with connections between ORacle as source and MySQL as target. Anything that needs to be kept in mind?
    2. How do we send the data to MySQL, I mean in PL/SQL we can have the procedure create the insert statements. But can we directly fire the insert on MySQL ? If yes, any suggestions on what the commands would be?
    3.Any way to figure out if the insert was successful?
    4. We might also have to do other operations like update/delete etc.
    5. Any possible reference or sample code on this would also help.
    Thanks

    Well, the simplest and most direct approach would be to create a java function in the database to perform the operation and call it from pl/sql. I've done it before and there are examples out there and its a pretty straight-forward process.
    A quick example from [this website|http://w2.syronex.com/jmr/edu/db/oracle-and-java]
    import java.io.*;
    import java.sql.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@machine_name:1521:database_name",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("
            INSERT INTO BOOKS VALUES
            'A Tale of Two Cities',
            'William Shakespeare',
            4567891231,
            '5-JAN-1962'
          s.close();
          con.close();
       } catch(Exception e){e.printStackTrace();}
    }Check out Oracle's Java tutorial at http://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html for more in-depth information.
    If you're going to be doing this for more than a handful of tables under very controlled circumstances keeping it synchronized is going to be a mess, however.
    Edited by: Bill Haverberg on Jun 20, 2012 8:05 AM

  • 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/

  • 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 dumpfile to be imported in 10g

    Hi ,
    I am using windows server 2003 and oracle 11g R1 .
    There is an old dump file taken using oracle export utility whch I need to import in oracle 10g R2 .
    Command I am using in 10g for doing this is
    imp tkcsowner/tkcsowner@wfcdbtst file=D:\Backups\Hold_Backups\wfcdbtst_export.dmp log=D:\Backups\Hold_Backups\wfcdbtst_export.log fromuser=tkcsowner touser=tkcsowner statistics=none
    But , it is throwing me the below error ..
    IMP-00010: not a valid export file, header failed verification
    IMP-00000: Import terminated unsuccessfully
    If I use the same dump file in 11g , it imports fine .
    Can , someone tell me if it is not possible to import an 11g dumpfile to 10g , if possible then please lete me know the steps . Thanks

    sourav wrote:
    Hi ,
    I am using windows server 2003 and oracle 11g R1 .
    There is an old dump file taken using oracle export utility whch I need to import in oracle 10g R2 .
    Command I am using in 10g for doing this is
    imp tkcsowner/tkcsowner@wfcdbtst file=D:\Backups\Hold_Backups\wfcdbtst_export.dmp log=D:\Backups\Hold_Backups\wfcdbtst_export.log fromuser=tkcsowner touser=tkcsowner statistics=none
    But , it is throwing me the below error ..
    IMP-00010: not a valid export file, header failed verification
    IMP-00000: Import terminated unsuccessfully
    If I use the same dump file in 11g , it imports fine .
    Can , someone tell me if it is not possible to import an 11g dumpfile to 10g , if possible then please lete me know the steps . Thanksis the export taken using exp or expdp?

  • Oracle 11g driver to be configured to weblogic9.2

    Hi All,
    I need oracle 11g driver to be configured to weblogic9.2...
    Surfing for this found we need to add ojdbc5_g.jar; but no luck.
    Can u advise here if u have any idea?
    Thanks in advance.

    sourav wrote:
    Hi ,
    I am using windows server 2003 and oracle 11g R1 .
    There is an old dump file taken using oracle export utility whch I need to import in oracle 10g R2 .
    Command I am using in 10g for doing this is
    imp tkcsowner/tkcsowner@wfcdbtst file=D:\Backups\Hold_Backups\wfcdbtst_export.dmp log=D:\Backups\Hold_Backups\wfcdbtst_export.log fromuser=tkcsowner touser=tkcsowner statistics=none
    But , it is throwing me the below error ..
    IMP-00010: not a valid export file, header failed verification
    IMP-00000: Import terminated unsuccessfully
    If I use the same dump file in 11g , it imports fine .
    Can , someone tell me if it is not possible to import an 11g dumpfile to 10g , if possible then please lete me know the steps . Thanksis the export taken using exp or expdp?

  • Set periodically database (oracle 11g) statistics updates in EP7.0

    Hello gurus,
    I am trying to make database statistics update periodically in SAP standalone J2EE engine, anyone plz tell me the process.
    I am using netweaver 7.0 with oracle 11g database in solaris sparc
    if there is any script for stat updates plase post that script.
    Thanks in advance

    This is certainly a major problem. The issue is rather simple, SQL Developer is only retrieving as many rows as are specified in the preferences "SQL Array Fetch Size" (under preferences, database, advanced). A simple query on a table with 10,000 rows will only give stats on at most a retrieval of 500 rows since this is the max setting for the array fetch size. I'm not buying the argument that we don't want to wait for the entire result set. I suppose if your are only interested in seeing if the query is syntactically correct then not waiting for the entire set is fine. But the whole idea of AUTO TRACE is to see the statistics of the entire run so you can know what resources were used to compete the SQL. Seeing only the resources use to get the first set of rows is very misleading. And if you change the array fetch size to be smaller, your SQL will appear to run "better" when in reality you don't know who well it's running at all.
    We need to be able to have AUTO TRACE retrieve all rows, not just the setting of array fetch size. There is currently no way to get AUTO TRACE to show the stats of a compete run.

  • Index not being used in Oracle 11g

    Hi,
    I executed an SQL in Oracle 9i based on a Materialized View with an index. Execution plan shows it used Index and did Range scan. But the same query if I executed in Oracle 11g, it did full table scan and ignored the index. Finally, I used /*+Index*/ hint to tell compiler to use the index. Can anyone tell why it happended like this.
    below is the query.
    SELECT TYPE,NAME,PARENT_ID,CHILD_ID,UNIT_OF_MEASURE,QUANTITY,POSITION_NUMBER
    FROM MVIEW_BOM_CHILD_ATTRIBUTES
    WHERE BREAKDOWN_LIMIT = 'FALSE'
    CONNECT BY PRIOR CHILD_ID = PARENT_ID START WITH PARENT_ID IN ('7325','34676','10121','35154','34370','4909','5494','28714','2273','22551','36465','35416','7148','34774',' 23290','18225','24415','35774','34772','20108','19072','8134','14688','31751','12669','26450','34716','768 4','26004','8770','34001','32614','3816','19801','30329','13822','15784','9296','17147','35423','6181','3477 3','18683','20780','35191','17990','7788','1559','7691','35449','34640','35432','35829','14161','9412','2039 2','593','23744','15741','35850','4177','36420','34695','33027','34655','31315','13552','23089','14025','901 2','22930','36182','13413','13839','32502','2392','19666','35183','32174','35170','20545','14344','29190','1 8163','19124','35448','32171','23498','2694','31101','4357','30421','35826','17976','13218','34770','35778' ,'16112','36408','34797','3294','9600','23524','3663','36412','34674','26715','2886','3204','15928','4510','8 112','27232','14966','35217','6281','1610','16359','25906','10262','3291','35777','11789','34675','24208','1 0093','28479','2928','23396','19702','32716','29813','2536','2349','34639','18610','35175','9796','26915','6 041','4745','34718','17946','3285','34308','9451','29689','17903','34642','35166','4630','35760','35761','34 696','27958','5912','35549','17695','31595','8028','24020','16025','8004','6430','36391','3580','32433','354 94','27368','15801','35583','35488','18807','34180','26626','20629','34767','14771','28746','34728','4948',' 34355','14000','34734','35820','36449','4904','11136','35177','27740','8016','13883','36402','35233','2614 7','21089','33152','35162','11320','32843','7336','34654','35602','32026','35582','24500','10573','33778','1 651','22781','25784','30124','10798','15930','28652','1513','745','35415','30404','21990','20872','2272','16 273','4234','35601','35581','22088','15543','3362','7713','35431','34719','27710','33104','20482','16801','1 686','35658','16545','32681','8722','20046','8950','34799','31605','21299','19572','445','35489','35656','35 546','7414','13369','35455','35434','35438','19383','10591','24698','14607','25715','27913','1046','15511',' 36386','6801','25134','2717','2083','35288','15851','14538','35398','11575','35156','35435','4232','36380',' 18406','32862','20879','5695','4229','24132','7081','35420','34694','22474','30047','29352','34735','2305',' 36409','18040','13472','31481','29246').
    Thanks

    SBH wrote:
    My doubt is only that is it possible that a SQL query with same index proprties uses different access path to execute. Is it dependent on oracle version also.
    Yes, it is possible.
    It is even possible on the same Oracle version - look at simple examples:
    case 1
    create table test as
    select level l, 'test' test from dual
    connect by level < 1000;
    create index test_ix on test(l);
    explain plan for
    select * from test where l < 50;
    select * from table(dbms_xplan.display);
    Plan hash value: 1408842701
    | Id  | Operation                   | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |         |    49 |   931 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| TEST    |    49 |   931 |     3   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | TEST_IX |    49 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("L"<50)
    Note
       - dynamic sampling used for this statement (level=2)case 2
    drop table test;
    create table test as
    select * from (
      select level l, 'test' test from dual
      connect by level < 1000
    ) order by dbms_random.value(0,100);
    create index test_ix on test(l);
    explain plan for
    select * from test where l < 50;
    select * from table(dbms_xplan.display);
    Plan hash value: 1357081020
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |    49 |   931 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| TEST |    49 |   931 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("L"<50)
    Note
       - dynamic sampling used for this statement (level=2)The same query on the same table containing the same data in it. And the same index.
    The only difference is records order in the table.
    In the first case CBO decided that index range scan would be reasonable.
    In the second case CBO preferred FTS as less costly.

  • Help with oracle 11g pivot operator

    i need some help with oracle 11g pivot operator. is it possible to use multiple columns in the FOR clause and then compare it against multiple set of values.
    here is the sql to create some sample data
    create table pivot_data ( country_code number , dept number, job varchar2(20), sal number );
    insert into pivot_data values (1,30 , 'SALESMAN', 5000);
    insert into pivot_data values (1,301, 'SALESMAN', 5500);
    insert into pivot_data values (1,30 , 'MANAGER', 10000);     
    insert into pivot_data values (1,301, 'MANAGER', 10500);
    insert into pivot_data values (1,30 , 'CLERK', 4000);
    insert into pivot_data values (1,302, 'CLERK',4500);
    insert into pivot_data values (2,30 , 'SALESMAN', 6000);
    insert into pivot_data values (2,301, 'SALESMAN', 6500);
    insert into pivot_data values (2,30 , 'MANAGER', 11000);     
    insert into pivot_data values (2,301, 'MANAGER', 11500);
    insert into pivot_data values (2,30 , 'CLERK', 3000);
    insert into pivot_data values (2,302, 'CLERK',3500);
    using case when I can write something like this and get the output i want
    select country_code
    ,avg(case when (( dept = 30 and job = 'SALESMAN' ) or ( dept = 301 and job = 'SALESMAN' ) ) then sal end ) as d30_sls
    ,avg(case when (( dept = 30 and job = 'MANAGER' ) or ( dept = 301 and job = 'MANAGER' ) ) then sal end ) as d30_mgr
    ,avg(case when (( dept = 30 and job = 'CLERK' ) or ( dept = 302 and job = 'CLERK' ) ) then sal end ) as d30_clrk
    from pivot_data group by country_code;
    output
    country_code          D30_SLS               D30_MGR               D30_CLRK
    1      5250      10250      4250
    2      6250      11250      3250
    what I tried with pivot is like this I get what I want if I have only one ( dept,job) for one alias name. I want to call (30 , 'SALESMAN') or (301 , 'SALESMAN') AS d30_sls. any help how can I do this
    SELECT *
    FROM pivot_data
    PIVOT (SUM(sal) AS sum
    FOR (dept,job) IN ( (30 , 'SALESMAN') AS d30_sls,
              (30 , 'MANAGER') AS d30_mgr,               
    (30 , 'CLERK') AS d30_clk
    this is a simple example .... my real life scenario is compliated with more fields and more combinations .... So something like using substr(dept,1,2) won't work in my real case .
    any suggestions get the result similar to what i get in the case when example is really appreciated.

    Hi,
    Sorry, I don't think there's any way to get exactly what you requested. The values you give in the PIVOT ... IN clause are exact values, not alternatives.
    You could do something like this to map all alternatives to a common value:
    WITH     got_dept_grp     AS
         SELECT     country_code, job, sal
         ,     CASE
                  WHEN  job IN ('SALESMAN', 'MANAGER') AND dept = 301 THEN 30
                  WHEN  job IN ('CLERK')               AND dept = 302 THEN 30
                                                                     ELSE dept
              END     AS dept_grp
         FROM     pivot_data
    SELECT     *
    FROM     got_dept_grp
    PIVOT     (     AVG (sal)
         FOR     (job, dept_grp)
         IN     ( ('SALESMAN', 30)
              , ('MANAGER' , 30)
              , ('CLERK'   , 30)
    ;In your sample data (and perhaps in your real data), it's about as easy to explicitly define the pivoted groups individually, like this:
    WITH     got_pivot_key     AS
         SELECT     country_code, sal
         ,     CASE
                  WHEN  job = 'SALESMAN' AND dept IN (30, 301) THEN 'd30_sls'
                  WHEN  job = 'MANAGER'  AND dept IN (30, 301) THEN 'd30_mgr'
                  WHEN  job = 'CLERK'    AND dept IN (30, 302) THEN 'd30_clrk'
              END     AS pivot_key
         FROM    pivot_data
    SELECT     *
    FROM     got_pivot_key
    PIVOT     (     AVG (sal)
         FOR     pivot_key
         IN     ( 'd30_sls'
              , 'd30_mgr'
              , 'd30_clrk'
    ;Thanks for posting the CREATE TABLE and INSERT statements; that really helps!

Maybe you are looking for

  • Distributed Cache synchronization with JMS

    Hello, The documentation on Cache Synchronization using JMS lists steps to setting up JMS in the JMSClusteringService but does not list steps as to how to connect or setup connections to the various different servers inorder to synchronize between th

  • Successful Multi-Base Station Setup!

    So this might be old hat to a lot of you in here, but I've had my TC for a few days now, and I'm quite proud of the fact I was able to successfully set up my home wireless network to take full advantage of my TC, Mushroom AEBS, and AX wireless router

  • How do I view the contents of my iPad in Mountain Lion?

    How do I view the contents of my iPad in Mountain Lion?

  • Ipad 2 ios 6 airport networks not working

    I have around 19 ipad2 that i supervise with apple configurator.  Today i programmed approx 16 of the using configurator, it automatically upgraded then to ios6 even though i told it to use ios 5.1.1 Now when i connect them to any of our airport expr

  • Delays while using safari

    Hello, while using Safari (6.0.1) with OS 10.8.2 I have to wait for 2-3sec while scrolling at a website. The website is fully loaded, I want to scroll, then the 'beach ball' comes and I have to wait 2-3 sec. Then I can scroll. This happens on nearly