DDL Query for ANY EVALUATION CONTEXT and ...

Hi there,
this is a cross posting from SQL: maybe I will have more luck here:
Problem: there is a grant in my DB:
GRANT CREATE ANY EVALUATION CONTEXT to "MYNAME";
Which DDL can I use to get this grant:
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','MYNAME') from dual;
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT', 'MYNAME') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('ROLE_GRANT', 'MYNAME') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT', 'MYNAME') FROM DUAL;
are NOT working. BTW: same for
GRANT DROP ANY EVALUATION CONTEXT to "MYNAME";
GRANT CREATE ANY EVALUATION CONTEXT to "MYNAME";
GRANT EXECUTE ANY EVALUATION CONTEXT to "MYNAME";
Also I am searching for the DLL for
CREATE OR REPLACE CONTEXT CONTEXT_COE USING MYNAME.PKG_CONTEXT
Any ideas are very welcome!!!!
Thanks,
H

Hi H,
It looks like a bug to me (or at least a feature). I got the same behaviour as you. I tried an expdp of the schema and then an impdp to a sqlfile and the text of the sqlfile does not contain any mention of evaluation contexts. expdp uses dbms_metadata to create all it's ddl so it looks like dbms_metatdata does not handle this particulat type of grant.
Looks like you might have to generate some ddl based on the contents of DBA_SYS_PRIVS. Or maybe it's fixed in 12c......
Regards,
Harry
http://dbaharrison.blogspot.com

Similar Messages

  • QUERY FOR CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE

    Hi Friends,
       I need query for CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE for selection criteria from date and to date.
       I know the Trial Balance Report will sort out this issue... but i need routeday wise report
    1. Business Partner Master Data - i created one UDF field called U_Routeday (MONDAY, TUESDAY, WEDNESDAY,THURSDAY,FRIDAY)
    2. The query should be like selection criteria 
                                  - Routeday [%0]
                                  - Posting Date [%1]                           
                                  - Posting Date [%2]
    CardCode
    Debit
    Credit
    Balance
    D10503
    25031.50
    24711.50
    2962.00
    D10641
    5466.00
    7460.00
    285.00
    D10642
    2866.00
    142.00
    give any helpful query ASAP... Thanks in advance

    Hi,
    Try this query:
    Declare
    @fromdate as datetime
    Declare
    @Todate as datetime
    Declare
    @Code as nvarchar(25)
    set
    @fromdate = ( select min(Ta.[RefDate]) from OJDT ta where
    Ta.[RefDate] >= [%0])
    set
    @Todate = ( select max(Tb.[RefDate]) from OJDT tb where Tb.[RefDate]
    <= [%1])
    set
    @code = (select max(Tc.[ShortName]) from JDT1 tC where Tc.[ShortName]
    = [%2])
    SELECT
    [Name] as AcctName, [Jan]= sum([1]), [Feb]= sum([2]), [Mar]=
    sum([3]), [Apr]= sum([4]),  [May]= sum([5]), [June]= sum([6]),
    [July]= sum([7]), [Aug]= sum([8]), [Sept]= sum([9]), [Oct]=
    sum([10]), [Nov]= sum([11]), [Dec]= sum([12]), total = sum
    (isnull([1],0)+ isnull([2],0) + isnull([3],0) + isnull([4],0) +
    isnull([5],0) + isnull([6],0) + isnull([7],0) + isnull([8],0) +
    isnull([9],0)+ isnull([10],0) + isnull([11],0) + isnull([12],0))
    from
    (SELECT
    T0.[ShortName] as Name, sum(T0.[Debit]-T0.[Credit]) as T,
    month(T2.[RefDate]) as month FROM JDT1 T0  INNER JOIN OACT T1 ON
    T0.Account = T1.AcctCode INNER JOIN OJDT T2 ON T0.TransId =
    T2.TransId WHERE T2.[RefDate] between @fromdate and @todate and
    T0.[ShortName]  = @code  GROUP BY T0.[ShortName],T2.[RefDate] ) S
    Pivot
    (sum(T)
    For  Month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
    group
    by [Name],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]
    Let me know your result.
    Thanks & Regards,
    Nagarajan

  • Microsoft Query for Office 2013 Home and Business

    Where can I get Microsoft Query for Office 2013 Home and Business version?  I have used it for years on my old XP machine with Office 2003.
    Thank you, Sue

    Hi,
    You seem got an error like "Microsoft query could not be started because it isn’t installed" when you used it. 
    It may be not installed yet. We can go to "Control Panel\All Control Panel Items\Programs and Features\Office 2013 Home and Business\change\Microsoft tools\MS query" and check if it is installed/enabled.
    If it is not installed, please use the Install CD/ full installation copy to reinstall it.
    http://social.technet.microsoft.com/Forums/office/en-US/eb7bfe7d-8fa4-4faf-8563-13ae8b04346d/microsoft-query-could-not-be-started-because-it-isnt-installed?forum=excel (It
    also applies to Excel 2013)
    Regards,
    George Zhao
    TechNet Community Support

  • SharePoint PPS 2013 Dashboard Designer error "Please check the data source for any unsaved changes and click on Test Data Source button"

    Hi,
    I am getting below error in SharePoint PPS 2013 Dashboard Designer. While create the Analysis Service by using "PROVIDER="MSOLAP";DATA SOURCE="http://testpivot2013:9090/Source%20Documents/TestSSource.xlsx"
    "An error occurred connecting to this data source. Please check the data source for any unsaved changes and click on Test Data Source button to confirm connection to the data source. "
    I have checked all the Sites and done all the steps also. But still getting the error.Its frustrating like anything. Everything is configured correctly but still getting this error.
    Thanks in advance.
    Poomani Sankaran

    Hi Poomani,
    Thanks for posting your issue,
    you must have to Install SQL Server 2012 ADOMD.Net  on your machine and find the browse the below mentioned URL to create SharePoint Dashboard with Analysis service step by step.
    http://www.c-sharpcorner.com/UploadFile/a9d961/create-an-analysis-service-data-source-connection-using-shar/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • SAP Quickviewer query for pricing records - V12L and KONH / KONP

    Has anyone used the logical database 'V12L' for pricing queries? There seems to be an issue with this logical database with some vague warning messages.. When I tried to create a simple table join query with KONH and KONP there are again some vague errors. I need to see the following fields in the query output.
    KONH-KNUMH, KONH-KOTABNR, KONH-KSCHL, KONP-KBETR, KONP-KONWA, KONP-KPEIN, KONP-KMEIN.
    Are there any other simple and robust way to query KONH and KONP simultaneously? Thanks in advance.

    Hi Dhanaraj,
    I tried linking KONH and KONP and it just gave me just warning errors that won't affect your query. Disregard those errors since your not using it anyway and proceed as usual.
    Try not to query directly to these tables as much as possible for obvious reason, IT"S HUGE....
    I suggest to start with AXXX pricing tables and then link KONP with it. It's faster and you can directly identify the key combinations used.
    Enjoy!
    Arnel

  • Help needed for javax.naming.Context and javax.naming.InitialContext

    I need help on this two..
    I am currently doing a project which required Connection Pooling. And this is the first time i'm exposed to all this.. I know nothing about these files.. But, i manage to get help from someone on DataSource. But i can't find any for naming.context and naming.InitialContext.. Can anyone help me? I need to know where i can get these 2 files or how to configure it.. Thanks! ;p

    This'll help you:
    http://java.sun.com/products/jndi/tutorial/

  • Program should work for any DB..and give me the space detials..!

    Hi All,
    I have a requirement like, whatever the SAP Report program im going to write that should work for any underlying DB.
    Like I have bunch of tables like LFA1, MARA etcu2026
    I wll check like if sy-dbs = u2018ORACLEu2019
    Here I need some code (Table) / FM (ORA) should be there to give me the used space and free space of that particular table like LFA1.
    Else I wll check like if sy-dbs = u2018DB2u2019
    Some code/FM like above to give me used space and free space.
    Else I wll check like if sy-dbs = u2018Sybaseu2019
    Some code/FM like above to give me used space and free space.
    I wll check like if sy-dbs = u2018Informixu2019
    Some code/FM like above to give me used space and free space.
    I wll check like if sy-dbs = u2018MaxDBu2019
    Some code/FM like above to give me used space and free space.
    I need Some DB Table / FM for each DB, which should give me the space details.
    Please let me know.

    Careful here Pradeep, this is not valid syntax.
    status = case endtime
    when null then "error"
    when not null then "successfull"
    endYou want:
    SQL> select case
      2            when endtime is null then 'error'
      3            when endtime is not null then 'successful'
      4         end
      5  from t;
    CASEWHENEN
    error
    (and you don't really need both conditions since they are mutually exclusive)

  • Query for items on hold and items that are inactive for past 18 months.

    Hi Experts,
    We are on the process of initializing a new database due to database size, our client requested that we extract items from the current live database but only those items that are not On Hold and has been active for past 18 months. Those items that does not have transaction for the past 18months and currently on hold will be dropped. What will be the query to extract based on this filter? Please help. Thank you.
    Regards

    Hi,
    You may try this first:
    Select  t0.itemcode, t0.itemname, t0.onhand
    from dbo.oitm t0
    where t0.itemcode not in
    (select distinct itemcode from dbo.oinm  where DateDiff(DD,DocDate,GetDate()) < 548 group by itemcode)
    and t0.InvntItem = 'Y' and t0.Frozenfor = 'Y'
    Thanks,
    Gordon

  • Query for getting Responsibility, Menu and submenus

    Hi,
    I need one query for getting Responsibilites, menus, submenus agian submenus like that..
    Pls share the query any body have.
    Thanks in advance,
    Hanimi.

    See user487104's post in Re: How to check a function is accessible under responsibility? .
    He has given a script to build the output.

  • Splitting and executing the query for each 1 lac and executing parallel.

    Hi All,
    We have a table with around 10 keys and each key is having more than millions of records for a given date.
    And my requirement is to find the sum of the sale_price of each keys.
    ( example :
    Select key, sum(sale_price) from table1 where date1=sysdate
    group by key
    Since, each set of key contains more than a millions of records, It's time consumption is too high.
    Is thr any way to achieve as below,
    For key 1 (assume 1 million records)
    and we will spilt these into 100 parts and execute parallelly.
    At the end get sum of all 100 parts.
    Similarly for other keys....
    Is it possible to divide the records into 1 lac each and give it for parallel execution ?

    If the key column is also the partition key, I would expect that to work well with parallel query. What have you tried that isn't working? Also what is your Oracle version?

  • Standard Query for Top 10 queries and Users

    Hi Experts,
    Is there any query which gives the details like ,
    1. Top 10 queries executed in a month
    2. Top 10 users ( By no of queries executed )
    Regards,
    Bhadri M.

    1. Top 10 queries executed in a month
    Use Query 0TCT_MCA1_Q0142.
    In this report you will have to filter variable BI Object to Queries and also it gives stats for the last 30 days, you have have to remove the SAP User exit variable in case you do not want to use the 30 days option. And then you will have to define Condition for Top 10.
    2. Top 10 users ( By no of queries executed )
    Use Query 0TCT_MCA1_Q0141.
    Similarly you have to modify this query.
    -Neelesh

  • Query for finding Oracle CPU and memory utilization and

    I want to gather the report using Oracle views in the same formatas of the report which the top utility gives for Sun-Solaris OS processes.
    I want the same type of report for Orcale database processes including all the user processes and the oracle internal processes.
    can any body tell me if it is possible.
    I am writing the top utility report format below and its contents:
    CPU-processor number
    TTY-Terminal interfaces used
    PID-Process id number
    USERNAME-Name of the owner of the process
    PRI- Current priority of the process
    NI- Nice value
    SIZE- total size of process (text+data+stack)
    RES-resident size of process
    STATE- current state of process
    TIME-number of system and CPU seconds the process has consumed
    %WCPU-weighted CPU
    %CPU-raw CPU
    COMMAND- name of the command
    thanks in advance

    See this thread Re: Oracle Shared DB instance utilization

  • Query For Finding Yearly Opening and Closing Balance for All the Items

    Hi Experts,
    I am working on Query Based Report for finding the Yearly Opening and Closing Stock for all the Items
    i will give yearwise selection and I want opening and closing stock in between that years
    Warm Regards,
    Sandip Kokate
    Edited by: Sandipk on May 20, 2011 1:58 PM

    Hi,
    Declare @SDate DateTime
    Declare @EDate DateTime
    Declare @Whse nvarchar(10)
    Set @SDate= (SELECT min(F_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[1%]' )
    Set @EDate= (SELECT max(T_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[%1]' )
    Set @Whse=(Select Max(s2.Warehouse) from OINM S2 Where S2.Warehouse = '[%2]')
    BEGIN
    Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as ItemName,
    sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
    ((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,
    (Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
    from( Select N1.Warehouse, N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
    as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1
    Where N1.DocDate < @SDate and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,
    N1.Dscription Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
    sum(N1.inqty) , 0 as OUT From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <= @EDate
    and N1.Inqty >0 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription
    Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
    From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <=@EDate and N1.OutQty > 0
    and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
    where a.ItemCode=I1.ItemCode
    Group By a.Itemcode Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0 Order By a.Itemcode
    END
    I hope this will work for you.
    In above query you can also user OFPR.Code, OFPR, Category OFPR.Indicator instead of OFPR.Name.
    Regards
    Vaibhav Anharwadkar
    Edited by: Vaibhav Ancharwadkar on May 24, 2011 9:23 AM

  • SQL Query for full paid invoices and payed out credit notes

    Hi alltogether,
    I have some problems with a sql query.
    I want to export all closed (full paid) invoices and credit notes in a table with the paid date.
    The problem is that I have several internal reconciliations for one invoice or credit note.
    So with my current query I get all these dates in the result but only for invoices, not for credit notes.
    I only need the last internal reconciliation date as payment date for all invoices and credit notes where the open amount is 0.
    In SAP B1 the finance team has service invoices and credit notes imported out of an ERP system.
    These documents are marked with an 'Y" in the coloumn "U_I_Imported" in the table "OINV" or "ORIN".
    SELECT
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
    SELECT
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
    FROM
    OJDT inner join
    ORCT on OJDT.BaseRef = ORCT.DocNum inner join
    RCT2 on ORCT.DocNum = RCT2.DocNum inner join
    OINV on RCT2.BaseAbs = OINV.DocEntry
    where
    OINV.DocTotal - OINV.PaidToDate = 0 and  OINV.U_I_Imported = 'Y'
    group by
    OINV.NumatCard, OINV.DocTotal - OINV.PaidToDate, OINV.U_I_Imported, ORCT.DocDate
    order by
    ORCT.DocDate
    I hope you can help me.
    Kind regards,
    Max

    The solution for my problem:
    select
    OINV.DocTotal - OINV.PaidToDate as 'Offen', OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer',  max(ORCT.DocDate) as 'Zahlungsdatum', case when ORCT.DocCurr = (select MainCurncy from OADM) then RCT2.DcntSum else RCT2.DcntSumFC end as 'SkontoRechnungswährung',
        RCT2.DcntSum as 'SkontoFirmenwährung'
    from
        JDT1 inner join
        OJDT on JDT1.TransId = OJDT.TransId inner join
        ORCT on OJDT.BaseRef = ORCT.DocNum inner join
        RCT2 on ORCT.DocNum = RCT2.DocNum inner join
        OINV on RCT2.BaseAbs = OINV.DocEntry
    where
    JDT1.TransType in ('24') and
    OINV.U_I_Imported = 'Y' and
    OINV.DocTotal - OINV.PaidToDate = 0
    group by
    OINV.NumAtCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate, ORCT.DocCurr, RCT2.DcntSum, RCT2.DcntSumFC
    union all
    select
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer',  max(OITR.ReconDate) as 'Zahlungsdatum',
        0.0 as 'SkontoRechnungswährung',
        0.0 as 'SkontoFirmenwährung'
    from
    OITR inner join
    ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
    OINV on ITR1.SrcObjAbs = OINV.DocEntry
    where
    OINV.DocTotal - OINV.PaidToDate = 0 and ITR1.SrcObjTyp = 13 and OINV.U_I_Imported = 'Y'
    group by
    OINV.NumatCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate
    union all
    select
    ORIN.DocTotal - ORIN.PaidToDate as Offen, ORIN.CardCode as 'Kundennummer', ORIN.NumAtCard as 'DIAMOD Rechnungsnummer', ORIN.DocNum as 'Dokumentennummer',  max(OITR.ReconDate) as 'Zahlungsdatum',
        0.0 as 'SkontoRechnungswährung',
        0.0 as 'SkontoFirmenwährung'
    from
    OITR inner join
    ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
    ORIN on ITR1.SrcObjAbs = ORIN.DocEntry
    where
    ORIN.DocTotal - ORIN.PaidToDate = 0 and ITR1.SrcObjTyp = 14 and ORIN.U_I_Imported = 'Y'
    group by
    ORIN.NumatCard, ORIN.DocNum, ORIN.CardCode, ORIN.DocTotal - ORIN.PaidToDate

Maybe you are looking for

  • Report in OOPS

    Hi,    I am new to oops I have created a small program to display data. I have declared a small struture in the Public section. but when I see the internal table in the debugging mode it contains 2 fields as KEYPART    FUNCPART  instead of fields whi

  • I'm trying to download the free trial for photoshop, but its telling me that I do not meet the system requirements, can anybody help me?

    I have a mac version of 10.6.8

  • Apple tv vs roku vs ps3

    Now that the new apple tv is priced more reasonably... I *may consider getting one. Note: right now we're using our kids ps3 machine to navigate to netflix instant play and it works FINE, albeit we had to get over the learning curve regarding the gam

  • Leading zeroes dropped in Excel

    Hello folks I've got an issue with using downloading data onto an Excel file using the FM GUI_Download. The leading zeroes of the PERNR field get truncated when opening the file with MS Excel. However the zeroes are in place when the downloaded file

  • Error in BDOC

    Dear Sir, I run t-code : smw01 and found the error " Mapping Error" How to correct it? Please kindly advise . I don' t know how to investigate the problem Thank you and best regards, Vimol