Query to show relation between archive and backuppiece

I want to query the RMAN-repository by using SQL. I am looking for a query showing me the releation between a archived logfile and a backuppiece. A bit like 'list backups' but in SQL.
Offcourse I played around with SQL, but it is quite hard to create a query showing this information.
Anyone out there who has a such a query? Thanks!

Hi pvenpven,
I hope this query answers your original question:
SELECT d.handle , a.name
FROM rman.rc_archived_log a,
rman.rc_backup_redolog b,
rman.rc_backup_set c,
rman.rc_backup_piece d
WHERE a.db_name = '&db_name'
AND d.handle = '&piece_name'
AND a.first_change# = b.first_change#
AND b.set_stamp = c.set_stamp
AND c.set_stamp = d.set_stamp
GROUP BY d.handle , a.name
ORDER BY d.handle
(Might be you figured this out yourself.)
Regards,
Tycho

Similar Messages

  • Table showing relation between BP and Org Unit

    Hello,
      I need to get the sales organozation for specific business partner .Is there any func module or can u please tell the name of the table which has these two entries.Please consider as ugnt.
    Neeraj

    Hi Neeraj,
    The FM CRM_BUPA_SELECT_BP_SALES_AREAS will get you the Sales Organization for the particular business partner Guids.
    The business partner guids you can get from the table BUT000 using the Business Partner Id.
    Hope this helps.
    Please let me know, if you have found out any alternate solution.
    Thanks.
    Best Regards,
    Arun Sankar.

  • Relation between ODPI and OINV

    Hello all,
    I have a problem. I want to make a report in Crystal report. This report will show a list of invoice and downpayment which is related to this invoice. I dont know how to get downpayment which is use on invoice. I dont find relation between invoice and downpayment.
    Can you help me?

    Hi Vit,
    I used SQL Profiler to extract the query that is used to get the records when the ... button is pressed. I am not sure if this is what you're looking for, but here is the query:
    SELECT T0.* 
    FROM [dbo].[ODPI] T0
    WHERE (T0.CardCode = N'CARDCODE       ' 
    OR  T0.FatherCard = N'CARDCODE       ' 
    AND  T0.FatherType = N'P' )
    AND  T0.CANCELED = N'N' 
    AND  T0.DpmStatus = N'O' 
    AND  T0.DocCur = N'GBP' 
    AND  T0.PaidSum <> 0 
    AND  T0.DocStatus = N'C' 
    AND  T0.Posted = N'Y'
    Hope it helps,
    Adele

  • Is There any Relation Between PCD and SSO

    Hi,
      Is there any relation between PCD and SSO, why because if i am try to connect from portal to R/3 in the user mapping i got one error i.e some pcd error.
    pls tell me how to rectify that.
    Regards,
    Jagadish Babu Kanikanti.

    Hi Jagadish
    The PCD is only a central persistance for storing Portal objects. There is no such relation between PCD and SSO that could create a problem. You can however check for the PCD error in this manner.
    1. In the system administration role, choose System Administration -> Support. The Support Desk appears.
    2. Select the area Portal Content Directory.
    3. Click on PCD Configuration in the test and configuration tools. The next screen shows all the parameter values currently maintained for the PCD.
    4. To reload the configuration, choose Reload.
    Hope that helped.
    Best Regards
    Priya

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Set relation between list and document library?

    I have a requirement that I want to show pop up/ modal dialog when I click on list item column "upload/Edit" (in EditForm.aspx) . In Modal Dialog I have to show upload button and also existed items if any. Here the attachments will store into document
    library's folder .The list item ID should be the folder name in document library.
    How do I set relation between list and doc lib ?
    Appreciate if suggests any links.
    Thank you.

    Hi Saurav,
    pls check below
    What version of SharePoint 2010 "SP 2010 Foundation or SP 2010 Server" you need to have SP 2010 server and to have the "User Profile service application".
    How do you configure the "User Profile service application" did you add the "Social Tagging Database"
    Create, edit, or delete a User Profile service application (SharePoint Server 2010)" 
    http://technet.microsoft.com/en-us/library/ee721052.aspx
    When you access to "Application Management>Manage service applications>User Profile Service Application>Manage User Permissions" validate if the all authenticated users Group have the "use Social Features" checked.
    Also validate in Central Administration in Farm Features if you have social tags and notes activated.
    http://sharepoint.stackexchange.com/questions/17546/tagging-feature-not-working
    https://social.technet.microsoft.com/Forums/office/en-US/c11cda96-091b-4b96-91bc-ccd8000238f4/tags-and-notes-sharepoint-2010-not-visible?forum=sharepointadminprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Relation between Responsibility and Business Area

    Hi,
    I have a requirement wherein i have to make a particular workbook available in specific responsibilities.
    Now when i have to create a folder then how do i know in which Business Area should i create the folder.
    Basically i need to know the relation between Responsibility and Business Area i.e which Business Area i should create the folder so that it is visible in desired responsibilities.
    Is there any way possible i can know this.
    Regards,
    Shruti

    Hi,
    You can do that in two ways:
    1. Go to the administrator and check the sharing BA for each responsibility you require.
    2. Query the database to retrieve the sharing.
    Do whatever you find easier.
    For the database option you can run the following (change it to your own schema name):
    select distinct
    t.ba_name,
    t.ba_id,
    t.ba_description,
    case when substr(t.ba_created_by,1,1)='#' then fu.user_name else t.ba_created_by end as CREATED_BY,
    disco_users.eu_username,
    case when instr(disco_users.eu_username,'#')=0 then disco_users.eu_username
    when instr(disco_users.eu_username,'#')>0 and instr(disco_users.eu_username,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_users.eu_username,2,5))
    else (select resp.responsibility_name from fnd_responsibility_tl resp where resp.responsibility_id=substr(disco_users.eu_username,2,5))
    end as "Shared Name / Responsibility"
    from eul_us.eul5_bas t,
    apps.fnd_user fu,
    eul_us.eul5_access_privs disco_shares,
    eul_us.eul5_eul_users disco_users
    where substr(t.ba_created_by,2,10)=to_char(fu.user_id(+))
    and t.ba_id=disco_shares.gba_ba_id
    and disco_users.eu_username(+) NOT IN ('EUL5', 'PUBLIC')
    AND disco_users.eu_id(+) = disco_shares.ap_eu_id
    Hope it helps
    Tamir

  • Relation between plant and shipping point

    Hi all,
    my simple question is,  what is the relation between plant and shipping point ?
    in book i read, it is                      many to many,
    but in some web link it is showing 1 to many
    what is the logic behind these two ans.
    pls tell me the ans...
    Regards
    Avinash

    Hi Hegal . K . Charles,
    it is correct,  as we discussed above it may be MANY to MANY .
    Suppose, we hv 2 plant 1 in delhi and 2nd in nagpur. and this company want to export via inland water ways, in this case we can assign mumbai port to delhi and nagpur plant as well.
    as you said it is correct, It is just  not to overload the master data maintenance 
    Ex- In case of Sales Org. Its is always advisable to keep it minimum to per company code. Because master data records are multiplied by each additional org. element.

  • Relation between PLAF and MSEG

    Hi
    Can anyone provide me with a relation between PLAF and MSEG table
    Thanks
    VRV

    HI VRV,
    I don't know if you have already got the response to your query. But for your requirement, i believe you should be looking at PLAF & tables like AFKO, AFPO, AFRU.
    AFKO is order header, AFPO for the order details & AFRU for the confirmations.
    From the PLAF you can get planned order details, from the others you can get the order & qty which has been converted to production order, the qty which has been confirmed.
    Have a look at these tables & if you need any further inputs, message back & will try my best to be of some help.
    Regards,
    Vivek

  • Relation between AUDSID and USERENV('SESSIONID')

    please can someone tell me the relation between AUDSID and USERENV('SESSIONID') , i was trying to understand the below query.
    SELECT USERNAME,PROGRAM into session_var,prog FROM V$SESSION WHERE AUDSID = USERENV('SESSIONID') and USERNAME is not null;

    can someone tell me the relation between AUDSID and USERENV('SESSIONID')What is unclear with that?
    userenv('SESSIONID') (which should actually be replaced with sys_context('userenv','sessionid')) returns »The auditing session identifier«, which is the same as v$sessions.audsid.

  • Relation between Eban and Erev tables

    Hi,
       What is the Relation between Eban and Erev tables?
    Thanks and Regards,
    Parvatha Reddy

    Hi,
    if you have activated version management for purchase requisitions (spro - mm - purchasing - version mgmt - set up ver mgmt for PR), then if any changes are made to the fields as specified in the customizing, then an entry is made in EREV table. EBAN is the pur. reqn table.
    Hope it answers your query.
    Regards,
    Vivek

  • Relation between ser03 and rihequi_list

    Hi,
    whats the relation between ser03 and rihequi_list tables.can u tell me.

    Hi Vit,
    I used SQL Profiler to extract the query that is used to get the records when the ... button is pressed. I am not sure if this is what you're looking for, but here is the query:
    SELECT T0.* 
    FROM [dbo].[ODPI] T0
    WHERE (T0.CardCode = N'CARDCODE       ' 
    OR  T0.FatherCard = N'CARDCODE       ' 
    AND  T0.FatherType = N'P' )
    AND  T0.CANCELED = N'N' 
    AND  T0.DpmStatus = N'O' 
    AND  T0.DocCur = N'GBP' 
    AND  T0.PaidSum <> 0 
    AND  T0.DocStatus = N'C' 
    AND  T0.Posted = N'Y'
    Hope it helps,
    Adele

  • Relation between BKPF and MKPF

    I want relation between BKPF and MKPF,
    because i want account document number on storage location basis.
    if anyone know the solution or any standard report pl. tell me.

    Hi Omar,
    For all tables if you wan to find the table relation shipss...
    use the T-Code -->SQVI--> select table join--> enter first the table name--> enetr another tbale name..
    it will show the possible relation ship between the tables
    Regards,
    Prabhduas

  • What's the relations between BEGIN_BALANCE_DR_BEQ and  BEGIN_BALANCE_DR ?

    hello, these days I am learning gl.
    I'm confused about what's the relations between BEGIN_BALANCE_DR_BEQ and BEGIN_BALANCE_DR if CURRENCY_CODE is a foreign currency and TRANSLATED_FLAG = 'R'?
    the trm describes BEGIN_BALANCE_DR_BEQ as 'Beginning debit balance, base currency'.
    where is the BEGIN_BALANCE_DR_BEQ amount come from?
    where is the BEGIN_BALANCE_DR amount come from?
    thank you very much!
    peter

    I'm not sure exactly what you're asking. The query
    UPDATE WH_T_ITEMS A
       SET BALANCE_QTY =MAX(ITEM_QTY)
    WHERE STORE_ID = V_STORE_ID
       AND ITEM_SERIAL = V_ITEM_SERIAL   ;is not valid Oracle SQL. Aggregate functions like MAX cannot be used in a query like that because Oracle has no idea what you are aggregating by. There is nothing that prevents Oracle from modifying the syntax of the SQL language to allow an aggregate to be used in that manner but there would generally be no reason to extend the SQL language like that.
    You could assign the result of a query that included an aggregate to the BALANCE_QTY column, i.e.
    UPDATE WH_T_ITEMS A
       SET BALANCE_QTY = (SELECT MAX(ITEM_QTY) FROM <<some table>> WHERE <<some condition>>)
    WHERE STORE_ID = V_STORE_ID
       AND ITEM_SERIAL = V_ITEM_SERIAL   ;As I believe I've mentioned in some of your previous threads, a data model where you have an ITEMS table that has both an ITEM_QTY and BALANCE_QTY seems suspect. The fact that you're assigning the value of the ITEM_QTY column to the BALANCE_QTY on the same row only increases the concern.
    Justin

  • Table relations between vbrk and bkpf for  Accounting Document Number

    hello,
    i am using 4 tables to get data into my programs.
    vbrk,vbrp konv and bkpf.
    i want to get belnr from bkpf.i found relation between vbrk and belnr.but in vbrk table belnr's value is initial.
    can anybody tell me that how should i relate vbrk and bkpf or how to get Accounting Document Number(belnr) from bkpf for Billing Document(vbeln).
    regards,
    soniya s.

    hi,
    chekc this. its working for me.
    data : WA_AWKEY LIKE BKPF-AWKEY.
    data :  WA_BELNR LIKE BKPF-BELNR.
    data : LENGTH TYPE I.
    *BREAK MTABAP.
    LENGTH = STRLEN( IT_VBRK-VBELN ).
    if  LENGTH = '10' .
    MOVE it_vbrk-VBELN TO WA_AWKEY.
    SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
      WHERE AWKEY = WA_AWKEY
      AND AWTYP = 'VBRK'
      and blart = 'RV'.
    it_final-acc_doc = WA_BELNR.
      CLEAR WA_BELNR .
      CLEAR WA_AWKEY .
    else.
    CONCATENATE '0' it_vbrk-vbeln INTO wa_awkey.
    SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
      WHERE AWKEY = WA_AWKEY
      AND AWTYP = 'VBRK'
      and blart = 'RV'.
    it_final-acc_doc = WA_BELNR .
      CLEAR WA_BELNR .
      CLEAR WA_AWKEY.
    endif.

Maybe you are looking for