Need query for refresh test database.

Hi,
I want refresh production database to test database refresh using expdp dumpfile. Please provide steps this is the requirement
This request is to refresh the Tecnomatix test database MFEM which is
on the NATEST server wnmcdwtk.natest.gm.com. This database needs to
be refreshed using an Oracle full backup dump file from the Tecnomatix
production database MFEP which runs on the production NAENG server
wnmcdds8.naeng.gm.com. The MFEM and MFEP databases are both at Oracle
v10.2.0.4.

Hi,
You have posted to the wrong section of the forum. This forum us for Berkeley DB.
Regards,
Alex Gorrod
Oracle Berkeley DB

Similar Messages

  • Need Query for empty partitions

    I am having nearly 700 partitions for a table.Now i want to find out only the empty partitions.I need query for that.
    Thankx..

    Not the most elegant solution, but it works:
    declare
    rc number;
    str varchar2(200);
    begin
    for i in (select table_owner, table_name, partition_name from dba_tab_partitions) loop
    str := 'select count(*) from ' || i.table_owner || '.' || i.table_name || ' partition (' || i.partition_name || ')';
    execute immediate str into rc;
    if rc = 0 then
    dbms_output.put_line(i.table_owner || '.' || i.table_name);
    end if;
    end loop;
    end;

  • Query for  to get  database size, used size, freesize, db size after drop

    Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
    I have to get result like this
    Total size, used size, free size ,tablespace size of RQ tables alone
    Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
    Pls reply
    S

    i tried with
    SELECT
    --fs.tablespace_name name,
    df.totalspace/1024/1024 mbytes,
    (df.totalspace - fs.freespace)/1024/1024 used,
    fs.freespace/1024/1024 free
    FROM
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) TotalSpace
    FROM
    dba_data_files
    ) df,
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) FreeSpace
    FROM
    dba_free_space
    ) fs
    i AM GETTING total bytes, used bytes, free bytes
    I WANT TO include one more column.. database size after deleting rq tables
    Pls reply
    S
    Edited by: AswinGousalya on Jul 10, 2009 2:17 PM

  • Authorizations for Profit center in a query for a TEST user

    Dear SAP BI Gurus
    I have a query which has to be tested by the different user based on the region & the profit center that they belong to in SAP BI 7.0
    for this i have to create a user id for the test user under he/she should be able to view only his/her profit center data.
    The following are the steps that  i  tried out.
    1.created a role .
    2. in the change role - authorization , i have added authorization object "ZPROFIT" to the RSR . & restricted the ZPROFIT for the given values of the profit centers.
    3. Added this role to the User ID.
    But still the user is able to view all the profit center in the query.
    This is bugging me up.....
    Can anyone help me out.
    Best Regards,
    Ramesh

    Dear chetan/ravi
    i did create all the authorization objects & filled in the values in them.
    Also a authorization variable has been created in the Query.
    But i dont know how this variable has to be linked to the Auth Objects in Rsecadmin.
    Can you explain me the steps involved in it.
    Best Regards,
    Ramesh

  • Query for Tracking the database

    Hai
    i am entering Some process in Client Application. Each process some records get updated in database tables.
    How can i fiind it? for example if i am updating engine menu of the application. engine table and some other tables are get updated. i dont have source code of application with me. how can i monitor that what are the tables get affected in the database.
    we have to work from database side.
    one thing i can do... write the query for table and count(*) after every process so that i can get which table get affected by identifying the row count.
    but i want only particular table get affected on particular process.
    Kindly give ur suggesiton
    S

    Well, you can connect as privileges user and issue:
    ALTER SYSTEM SET SQL_TRACE=TRUE;This will enable trace of every user session. So it is better if you are the only one using application and database. To find trace files location issue:
    SQL> select value from v$parameter where name = 'user_dump_dest';Trace files will have all SQL statements issued by a session. You can either read them raw (trace files are text files) or use Oracle supplied tkprof utility to format them.
    SY.
    P.S. Do not forget to turn off trace after you are done:
    ALTER SYSTEM SET SQL_TRACE=FALSE;

  • Need Query for this

    Report Builder Version:10g
    Hi Guys Good Morning to one and all
    I have a table Named Onlsuvdet which captures the answers from
    an online survey front end which has multiple choice questions.
    the table structure is as follows
    create table onlsuvdet(shloid number,questno char(5),respo1 char(5),respo2 char(5));
    and the sample data is as follows
    SHLOID QUEST RESPO RESPO
    9315 1 2
    9315 2 3
    9315 3 4
    9315 3 5
    9315 4 1
    9315 5 2
    9315 5 1
    Now i want the result as follows
    shlogid quest1 quest2 q3 q4 q5
    9315     2 3 4,5 1 2,1
    So my requirement is a query which displays this data as above.
    Please helpppp
    Any help will be appreciated :)
    Thanks & Regards

    Hi,
    user123 wrote:
    Report Builder Version:10g
    Hi Guys Good Morning to one and all
    I have a table Named Onlsuvdet which captures the answers from
    an online survey front end which has multiple choice questions.
    the table structure is as follows
    create table onlsuvdet(shloid number,questno char(5),respo1 char(5),respo2 char(5));Thanks for posting the CREATE TABLE statement. That helps.
    Why are you using the CHAR datatype, rather than VARCHAR2? CHAR is nothing but trouble.
    and the sample data is as follows
    SHLOID QUEST RESPO RESPO
    9315 1 2
    9315 2 3
    9315 3 4
    9315 3 5
    9315 4 1
    9315 5 2
    9315 5 1Always post your data in a form people can use to re-create the problem and test their solutions. for example:
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '1    ', '2    ', NULL);
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '2    ', '3    ', NULL);
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '3    ', '4    ', NULL);
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '3    ', NULL, '5    ');
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '4    ', '1    ', NULL);
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '5    ', '2    ', NULL);
    INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '5    ', NULL, '1    ');I'm making a lot of guesses about the data. for example, I'm guessing there will never be more than 2 rows with the same shloid and questno.
    Why do you have 2 columns, respo1 and respo2? Is exactlyly one of them always NULL? If respo1 is NULL, will there always be another row with the same shloid and questno, but with a NULL respo2?
    Now i want the result as follows
    shlogid quest1 quest2 q3 q4 q5
    9315     2 3 4,5 1 2,1Be consistent with the column names; either call them all questn (like I did below) or call them all qn.
    So my requirement is a query which displays this data as above.Perhaps something like this:
    WITH     joined_data     AS
         SELECT     r1.shloid
         ,     r1.questno
         ,     RTRIM ( r1.respo1 || ',' || r2.respo2
                    )     AS respo
         FROM                onlsuvdet     r1
         LEFT OUTER JOIN     onlsuvdet     r2  ON     r1.shloid     = r2.shloid
                                         AND     r1.questno     = r2.questno
                                         AND     r1.respo1     IS NOT NULL
                                 AND     r2.respo2     IS NOT NULL
    SELECT       shloid
    ,       MAX (CASE WHEN questno = '1    ' THEN respo END)     AS quest1
    ,       MAX (CASE WHEN questno = '2    ' THEN respo END)     AS quest2
    ,       MAX (CASE WHEN questno = '3    ' THEN respo END)     AS quest3
    ,       MAX (CASE WHEN questno = '4    ' THEN respo END)     AS quest4
    ,       MAX (CASE WHEN questno = '5    ' THEN respo END)     AS quest5
    FROM       joined_data
    GROUP BY  shloid
    I hope this answers your question.
    If not, point out a few places where the query above gets the wrong results. Post the correct results (formatted, between \ tags, as explained in the FAQ
    http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
    ) and explain how you get the correct results from the given data.  Correct or add to the sample data that I psoted, if necessary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need Query for Item Relationship of Oracle Apps

    Hello Team,
    I need the Query to select the Item Relationship.
    In Oracle Apps we have different tyes of Structure
    ItemA -> ItemB
    ItemB -> ItemC
    ItemC -> ItemD
    ItemG -> ItemH
    ItemK -> ItemL
    ItemW -> ItemQ
    and this also is possible (meand many to one relationship)
    ItemA -> ItemB
    ItemB -> ItemC
    ItemC -> ItemD
    ItemT -> ItemD
    and in the Select Query i want the below result
    ItemA -> ItemB 1
    ItemB -> ItemC 2
    ItemC -> ItemD 3
    ItemG -> ItemH 1
    ItemK -> ItemL 2
    ItemW -> ItemQ 1
    and this also is possible (means many to one relationship)
    ItemA -> ItemB 1
    ItemB -> ItemC 2
    ItemC -> ItemD 3
    ItemT -> ItemD 1
    means i want the Hierarchy number also
    Please help me to in order to get the relationship by sql query.
    Kind Regards,

    thanks for the quick response and i would love to spend time perusing the forum for this question but i didn't have time today.  i'll do that now though.
    what i'm mostly interested in is a chronological view (lastUpdateDate) of the change to pricing for an item in the system.  there is a lot of activity in our system around price changes for promotions and i want to keep track of when it's changed in the source system and pair that with our other downstream systems.
    i'm assuming we can add this functionality through a udf some way or maybe sp_TransNotification proc?

  • Need query for requistion and rfq numbers

    Dear All,
    I need a query to list all requisition number for which RFQ is created and RFQ  is partially converted to PO, if RFQ is fully converted to PO, it should not fetch the details.please help me on this.
    Thanks
    Debendra

    Are you referring to sourcing RFQ or core quotations?

  • OTM  filter/query for the test cases with Test Steps seciton = Empty?

    Hi Folks,
    How to query/ fliter for all those test cases which does not have any test steps. They Test Step Section is empty. How to acheive this in OTM?

    this happens particularly when multiple people work on the same test case to update it from multiple machines.
    Edited by: OATS Explorer on Feb 22, 2012 4:10 AM

  • Need Sql for terda data database

    Can any one help send me the sql for teradata database. for creating the variables. I need to create variables for Last month begin date and last month end date.

    I am trying this tera data Sql this is for curent month date.
    select cast(current_date as date) - (extract (day from cast(current_date as date)) - 1) + interval '1' month - 1
    I need tera data sql for Last month begin date and last month end date. I searched various forums but could not get the answer. Any suggesstions please.

  • SeqContextCVI - do I need it for every test?

    Assum there are 5 tests in the TS sequence.
    Assume that each of the test requires access to the TS.
    Question: Does every test has a different handle? and if so, I guess I must "handle" it to the CVI via a parameter like:
    void __declspec(dllexport) __stdcall testNumLimit(CAObjHandle seqContextCVI, double *measurement,
    char reportText[1024], short *errorOccurred, long *errorCode, char errorMsg[1024])
    Will it work if I only do it in the first test, store the seqContextCVI as a global veriable and use it in the other 4 tests?
    Thanks
    Rafi

    Rafi -
    ActiveX/COM objects are reference counted, i.e. when the last reference to the object is released, the object is destoyed (memory deallocated).
    In CVI, an CAObjHandle represents a reference to an object. When TestStand creates a CAObjHandle parameter to pass to a code module, CVI adds a COM reference to the object. When TestStand releases the CAObjHandle using CA_DiscardObjHandle, CVI releases the reference.
    In a code module, if you want to maintain a handle that is passed to you and the caller releases what they pass, you must get your own CAObjHandle using the CVI function CA_DuplicateObjHandle. You are also expected to properly and timely call CA_DiscardObjHandle on the new CAObjHandle when it is no longer needed so the
    object can be destroyed correctly, otherwise you have the potential for a memory leak because objects are no being released.
    The problem with placing the object in a global is that you need to make sure that the release is done. If you are expecting a step later in the sequence to do it, what happens if the step is not called because of a error or a termination in the sequence?
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • Need Query for Update

    CREATE TABLE TEST_MATCH
    MTCH1 NUMBER(9),
    MTCH2 NUMBER(9),
    UPDT_MTCH CHAR(2 BYTE),
    UPDT_NBR NUMBER(10)
    SET DEFINE OFF;
    Insert into TEST_MATCH
    (MTCH1, MTCH2, UPDT_MTCH)
    Values
    (2616131, 300137070, '02');
    Insert into TEST_MATCH
    (MTCH1, MTCH2, UPDT_MTCH)
    Values
    (2571056, 300129277, '02');
    Insert into TEST_MATCH
    (MTCH1, MTCH2)
    Values
    (2623529, 300175046);
    COMMIT;
    i need to update the column UPDT_NBR which is currently NULL
    UPDATE TEST_MATCH
    SET UPDT_NBR =
    NVL(2616131, 300137070) FOR THESE TWO MATCHES-> (1234567),
    (2571056, 300129277) FOR THESE TWO MATCHES -> (1111111),
    (2623529, 300175046) FOR THESE TWO MATCHES ->(222222);
    Thanks for all your help in my previous post. And thanks again for looking into my post.

    Hi,
    If it is just three records it would be better if you fire individual update statement 3 times.
    But if it is a sample data only and you have many updates to do then only way I think it is is possible is either by creating temporary table or using subfactoring(same as creating temporary table)
    Regards
    Anurag

  • Need query for Item - Price Change History

    I need help finding information around Price Change History by Price List. 
    Information of interest is Date of Update and By Whom.    Also, if a Datasource is 'N-Unknown', what does this generally mean?
    select
    i.itemcode,
    i.itemname,
    iphist.price,
    pl.listname,
    pl.datasource as 'ChangeSource',
    '' as 'PriceChangeUpdateDate',
    '' as 'UpdateByUser'
    from  ait1 iphist, oitm i, opln pl
    where 1=1
    and iphist.pricelist = pl.listnum
    and i.itemcode = iphist.itemcode
    and iphist.itemcode in ('1234')
    and pl.listnum in (6)
    thanks in advance...

    thanks for the quick response and i would love to spend time perusing the forum for this question but i didn't have time today.  i'll do that now though.
    what i'm mostly interested in is a chronological view (lastUpdateDate) of the change to pricing for an item in the system.  there is a lot of activity in our system around price changes for promotions and i want to keep track of when it's changed in the source system and pair that with our other downstream systems.
    i'm assuming we can add this functionality through a udf some way or maybe sp_TransNotification proc?

  • Need query for this logic..

    Hi,
    Need a SQL query to achieve this..
    Ex:
    Select object_name from user_objects where object_name in('EMP','DEPT')
    You will get 2 table names.
    DEPT
    EMP
    Now I want to count how many records are there in each table
    Output should be like
    DEPT 4
    EMP 13
    Please let me know how can we write it ?
    Thanks in Advance
    Devender

    You need to create a function to cout rows.
    Here is an example
    CREATE OR REPLACE
    FUNCTION get_rows (
         t_owner IN varchar2 default user,
        t_name IN varchar2
    RETURN  integer
    IS
         outVal integer;
    BEGIN
         select null
         into outVal
         from dba_tables
         where ( owner=t_owner )
              and ( table_name=t_name );
        execute immediate 'select count(*) from '||t_owner||'.'||t_name into outVal;
        RETURN outVal;
    EXCEPTION
         WHEN no_data_found THEN
              return null;
    END;
    /And here is the query.
    Processing ...
    select owner,object_name,get_rows(owner,object_name) n_rows
    from dba_objects
    where object_name in('EMP','DEPT')
    Query finished, retrieving results...
           OWNER                       OBJECT_NAME                                          ROWS                
    SCOTT                    EMP                                                                       14
    SCOTT                    DEPT                                                                       4
    2 row(s) retrieved

  • Need query for connecting flights

    Hi all.
    My requirement is as follows
    suppose my itnery is AAA-BBB-CCC.And there are few flights between AAA-BBB and BBB-CCC.I need all the valid connecting flights everyday.My table data is as follows
    orig dest fltno arrivaldate depdate legno itid
    AAA BBB 121 23-05-2011 15:40:00(arrical ar BBB) 1 x
    AAA BBB 123 23-05-2011 16:40:00(arrical ar BBB) 1 x
    BBB CCC 212 24-05-2011 04:05:00(arrical ar CCC) 23-05-2011 19:50:00(depat from BBB) 2 x
    BBB CCC 213 24-05-2011 13:05:00 (arrical ar CCC) 24-05-2011 04:50:00(depat from BBB) 2 x
    now i need to get for legno 1 all the flights in leg 2, whose depdate is grater than arrival date in leg 1.
    Thanks.

    Hi,
    Whenever you have a problem, please post CREATE TABLE and INSERT statements for the sample data. Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.
    If I understand the problem, then you can use somehting like this:
    SELECT     l2.*
    FROM     table_x       l1
    JOIN     table_x       l2   ON   l2.legeno     = l1.legno + 1
                     AND  l2.orig     = l1.dest
                     AND  l2.depdate     > l1.arrivaldate
    WHERE     l1.legno     = 1
    ;A self-join, like this, will work if you're looking for a specific leg. If you're interested in all legs (or all legs after a certain point), regardless of whether that's 1, 2, 3 or more, then use CONNECT BY instead of a self-join.

Maybe you are looking for