Querying user enabled status from SSO tables
Hi guys,
I'm having issues trying to locate a table/view I can query to get specific SSO user information. In particular I am interested in listing usernames and their enabled/disabled status. In the OID front-end, under the user directory there is a column for 'Enabled' and this is what I am trying to find in the table structure.
Any help appreciated!
Cheers,
Chris
Thank you for that! I have extended this query to contain the ods.ct_uid table as follows as some users were being omitted. Also I have included a decode statement that changes the 'enabled' or 'disabled' to a 0 or 1.
SELECT
UPPER(cus.attrvalue) username,
DECODE(NVL(ena.attrvalue, 'enabled'), 'enabled', 1, 'disabled', 0) enabled
FROM
ods.ct_orclisenabled ena,
ods.ct_uid cus,
ods.ct_cn ctu
WHERE cus.entryid = ctu.entryid
AND ena.entryid (+) = ctu.entryid
Similar Messages
-
Querying users and their resource names from SSO tables
Hi,
Any ideas how to query the SSO tables so that i can extract all users and which "Resource Access Information" (for Forms based applications) is assigned to each user.?
A bit like the solution on the link below but also with a join to resource names (for Forms) that each user has.
Querying user enabled status from SSO tables
ThanksThank you for that! I have extended this query to contain the ods.ct_uid table as follows as some users were being omitted. Also I have included a decode statement that changes the 'enabled' or 'disabled' to a 0 or 1.
SELECT
UPPER(cus.attrvalue) username,
DECODE(NVL(ena.attrvalue, 'enabled'), 'enabled', 1, 'disabled', 0) enabled
FROM
ods.ct_orclisenabled ena,
ods.ct_uid cus,
ods.ct_cn ctu
WHERE cus.entryid = ctu.entryid
AND ena.entryid (+) = ctu.entryid -
Get User LockedOut Status from java code
Hi,
Our java application is using default security via weblogic 10.3 security realm. If the user enters wrong password more than 5 times in say 5 min interval, then the user is locked out for the next 30 minutes by weblogic. All the parameters are configurable & enabled in security realm from weblogic admin console.
My question is how can we get user 'isLockedOut' status from my java application so that I can display to the user that the reason you have not been able to login to the application is that the user has been locked out not because your current password is wrong.
I am looking from something like in here
http://weblogicserver.blogspot.com/2010/04/user-lockout-wlst.html
But I don't know how to get the handle to 'ServerSecurityRuntime()' from my java code.
Please advise.
Cheers,
tamuThanks Ravish & Faisal. Both the replies are useful but I had come across this before. I haven't tried them as I have reservation about 2 things for it to be used in production application.
(1) User credential to logon to admininstration console. It varies from environment to environment & it can change as well. If we have different files to store the passwords for different environments, it will be visible to everyone that have access to the file. It will have security implications.
(2) The passwords for the environments will keep on changing & if it is incorporated in code, it would require another deployment.
I am kind of thinking of not using weblogic lockout feature & incorporating within our application & store the values in our app database. This will however require more work. I was hoping I would have been able to catch some sort of exception from weblogic when user account is locked, so that I can display message to the client that the user is locked. -
How to write ABAP Logic in SAP Query to fetch records from many Tables
Hi Expert,
I have one requirement, want to display all BOM (Equipment BOM, Function Location BOM and Meterial BOM) from a particular plant.
List of tables as below:
EQST: Equipment to BOM Link
TPST: Link Between Functional Location and BOM
MAST: Material to BOM Link
STPO:BOM item
Requirement: When user enters Plant then SAP Query should execute and fetch all BOMs (as mentioned above) from STPO Table.
I have done so far is as follows:
I create User Group, Infoset and SAP Query.
While creating INFOSET, i used 4 tables (EQST,TPST,MAST & STPO) and link between then is as follows:
STPO-STLNR ---> EQST-STLNR : Left Outer Join
STPO-STLNR ---> TPST-STLNR : Left Outer Join
STPO-STLNR ---> MAST-STLNR : Left Outer Join
Now its showing all BOM from all plants though I enter one Plant value.
Please advise me to write SAP Query and Logic to fetch all BOM from selected Plant Value.
Thanks,
Jay.
Edited by: jaykrishna007 on Jul 29, 2011 11:41 AMHi FCannavo,
Thanks for your quick reply.
See, now I changed my Infoset design.
I added one Plant Table (T001W) and then
T001W-WERKS--->EQST-WERKS
T001W-WERKS--->MAST-WERKS
T001W-WERKS--->TPST-WERKS
and then
EQST-STLNR--->STPO-STLNR
MAST-STLNR--->STPO-STLNR
TPST-STLNR--->STPO-STLNR
on selection screen, user will enter Plant Value.
Now its showing some records, but i dont think so i would be correct output or not, please guide me whether it is correct or not?
Thanks,
Jay. -
Subject area security validating users and groups from external table
Hi all.
I don't have practice to put question here, but there is one problem, that seems don't work correctly in OBIEE.
I'm trying to put users in groups within external table and this works fine.
I put security on the subject area level like this:
SA1 -> GroupA allow, Everyone not allow
SA2 -> GroupB allow, Everyone not allow
External table:
User----------Group
A---------GroupA;GroupB
B---------GroupB
Users A, B and GroupA, GroupB exists in the RPD, but I didn't put users inside them, I want this from table.
From the init block, external table I'm taking users and join them in the group. Same name users and groups are also in the presentation service.
When i connect with user A i don't see any subject area, when go to My Account i see in Group Membership/GroupA and GroupB, so it's readed from the external table.
Why in this case the subject area permission is not working?
It works if I explicitly put users in groups, in the RPD.
I have read this blog entry http://kpipartners.blogspot.com/2009/07/groups-webgroups-and-delivers.html and it is said that this works, but I'm interested how.
What should we have in the presentation part, administration, Manage Privileges -> Access within Oracle BI Answers option for those two subject area?
This doesn't work or something is missing:
Re: Security on Subject Areas
Regards
Goran
http://108obiee.blogspot.comWhat should we have in the presentation part, administration, Manage Privileges -> Access within Oracle BI Answers option for those two subject area?Yes, you should remove Everyone and add the relevant groups to each Subject Area. You don't need to set privileges in the RPD, in fact that's probably why it doesn't work for you. Leave your RPD Presentation Catalog as "Everyone" = Read as you will controlling access from the Presentation Services and it should work.
-
How to write sql query for counting pairs from below table??
Below is my SQL table structure.
user_id | Name | join_side | left_leg | right_leg | Parent_id
100001 Tinku Left 100002 100003 0
100002 Harish Left 100004 100005 100001
100003 Gorav Right 100006 100007 100001
100004 Prince Left 100008 NULL 100002
100005 Ajay Right NULL NULL 100002
100006 Simran Left NULL NULL 100003
100007 Raman Right NULL NULL 100003
100008 Vijay Left NULL NULL 100004
It is a binary table structure.. Every user has to add two per id under him, one is left_leg and second is right_leg... Parent_id is under which user current user is added.. Hope you will be understand..
I have to write sql query for counting pairs under id "100001". i know there will be important role of parent_id for counting pairs. * what is pair( suppose if any user contains both left_leg and right_leg id, then it is called pair.)
I know there are three pairs under id "100001" :-
1. 100002 and 100003
2. 100004 and 100005
3. 100006 and 100007
100008 will not be counted as pair because it does not have right leg..
But i dont know how to write sql query for this... Any help will be appreciated... This is my college project... And tommorow is the last date of submission.... Hope anyone will help me...
Suppose i have to count pair for id '100002'. Then there is only one pair under id '100002'. i.e 100004 and 100005Sounds like this to me
DECLARE @ID int
SET @ID = 100001--your passed value
SELECT left_leg,right_leg
FROM table
WHERE (user_id = @ID
OR parent_id = @ID)
AND left_leg IS NOT NULL
AND right_leg IS NOT NULL
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Extension of LIS extractor - possible to delta enable field from Z-table?
Hi Experts
We have to get data from a date field in a custom Z-table (delivery related) in R/3 to BW.
We would like to get the date by extending a delivery LIS extractor with a new field and make some ABAP to lookup the correct value in the custom Z-table.
A requirement is though that if the date in Z-table is changed then we need to get the update value to BW. Therefore, we need to delta enable the new field in the append structure - but that ain't possible is it?
Alternatively will we have to make a new DataSource based on the custom Z-table and somekind of full load (with a fake delta).
Thanks.
Kind regards,
TorbenTorben,
If your custom Z-table does not contain too much data and doesn't change too often it might be an option to turn on DB logging (Technical settings -> Log data changes). Do not do this for large tables containing transactional data as the logs will consume a lot of diskspace!
Each insert/mod/deletion will be logged and in in a user-exit you can use FM DBLOG_READ_WITH_STATISTIC to check if something has changed and then append the corresponding data to your data package.
Grtx!
Marco -
Spatial Query with multiple geometries from 2 tables
Hi,
I'm using Oracle 8.1.7. I am trying to do a spatial query on two tables with multiple geometries. There are two spatial tables. One made up of points and one made up of polygons. There are 829551 rows in the table of points and 1817795 rows in the table with polygons...
I want to find all polygons where one of this points is within it...
This query is pretty intensive querying two large spatial tables against each other and so I need to find the most efficient way of running this query. I've been running variations of my query for the last two week and every time it's bombed out with various errors after 12-24 hrs processing like out of memory, out of tablespace, out of processing, invalid index etc etc etc. I need to get this query run asap... Any tips would be gratefully appreciated..
For the session running the query I've allocated 16M sort area with
ALTER SESSION SET SORT_AREA_SIZE=16777216;
Below is the query I'm running... How can I improve this please? BTW PARCEL_OVERLAPS contains the points and TP$_PARCEL_AREAS the polygons.
SELECT lu.LNU_PARCEL_ID
FROM
seventy.PARCEL_OVERLAPS po,
imap_topol.TP$_PARCEL_AREAS pa,
TP$_PARCEL_CENTROID_AREA pca,
TDCR_LAND_UNIT lu
WHERE
SDO_FILTER(po.geometry, pa.area,
'querytype=WINDOW') = TRUE and
sdo_within_distance(po.geometry,pa.area,'distance=0')='TRUE' and
pa.delete_date is null and
Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
pa.AREA_ID = pca.AREA_ID and
pca.DELETE_DATE IS NULL and
pa.DELETE_DATE IS NULL;Albert,
Thanks for your reply and the tips you've given. The tp$_parcel_areas table will always be bigger so I've changed the order to sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE'. The requested counts for those queries are
12:26:29 [email protected]:SQL> select count(*)
13:46:22 2 from seventy.PARCEL_OVERLAPS;
COUNT(*)
612
13:48:12 [email protected]:SQL> select count(*)
13:48:17 2 from imap_topol.TP$_PARCEL_AREAS pa,
13:48:21 3 TP$_PARCEL_CENTROID_AREA pca
13:48:21 4 where pca.DELETE_DATE IS NULL
13:48:21 5 and pa.DELETE_DATE IS NULL
13:48:21 6 and pa.AREA_ID = pca.AREA_ID;
COUNT(*)
1310665
There was no reason for both filter and within_distance. I did try use the anyinteract but for some reason that does not return the desired results(I've added one id row as a test to make sure it returns desired results). Plus Oracle have recomended using the within distance for better performance..
so the explan plan for
14:38:37 [email protected]:SQL> EXPLAIN PLAN FOR
14:38:50 2 SELECT lu.LNU_PARCEL_ID
14:38:50 3 FROM
14:38:50 4 seventy.PARCEL_OVERLAPS po,
14:38:50 5 imap_topol.TP$_PARCEL_AREAS pa,
14:38:50 6 TP$_PARCEL_CENTROID_AREA pca,
14:38:50 7 TDCR_LAND_UNIT lu
14:38:50 8 WHERE
14:38:50 9 sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE' and
14:38:50 10 pa.delete_date is null and
14:38:50 11 Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
14:38:50 12 pa.AREA_ID = pca.AREA_ID and
14:38:50 13 pca.DELETE_DATE IS NULL and
14:38:50 14 pa.DELETE_DATE IS NULL;
is
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 4G|32920G| 547M| | |
| NESTED LOOPS | | 4G|32920G| 547M| | |
| MERGE JOIN | | 547M| 2029G| 230124 | | |
| SORT JOIN | | 1M| 36M| 85014 | | |
| MERGE JOIN | | 1M| 36M| 50019 | | |
| SORT JOIN | | 1M| 17M| 21650 | | |
| TABLE ACCESS FULL |TP$_PARCE | 1M| 17M| 485 | | |
| SORT JOIN | | 1M| 22M| 28369 | | |
| TABLE ACCESS FULL |TDCR_LAND | 1M| 22M| 2127 | | |
| SORT JOIN | | 42K| 160M| 145111 | | |
| TABLE ACCESS FULL |TP$_PARCE | 42K| 160M| 12697 | | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
14:43:14 [email protected]:SQL> explain plan for
14:43:23 2 SELECT pa.AREA_ID
14:43:23 3 FROM seventy.PARCEL_OVERLAPS po,
14:43:23 4 imap_topol.TP$_PARCEL_AREAS pa
14:43:23 5 WHERE SDO_RELATE(po.geometry, pa.area,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
14:43:23 6 and pa.DELETE_DATE IS NULL;
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 6M| 50G| 10M| | |
| NESTED LOOPS | | 6M| 50G| 10M| | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
| TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
14:45:03 [email protected]:SQL> explain plan for
14:45:04 2 SELECT pa.AREA_ID
14:45:05 3 FROM seventy.PARCEL_OVERLAPS po,
14:45:05 4 imap_topol.TP$_PARCEL_AREAS pa
14:45:05 5 WHERE SDO_RELATE(pa.area, po.geometry,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
14:45:05 6 and pa.DELETE_DATE IS NULL;
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | 6M| 50G| 863554 | | |
| NESTED LOOPS | | 6M| 50G| 863554 | | |
| TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
| TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
-------------------------------------------------------------------------------- -
Trouble writing Query for Pivoting data from a table
I am having a little trouble writing a query for converting the below table data into a pivot data. I am trying to write a query for which if I give a single valid report_week date as input it should give me the data for that week and also provide two extra columns, one which gives the data of last week for the same countries and the second column which gives the difference of numbers in both the columns(i.e. COUNT - COUNT_LAST_WEEK).
REPORT_WEEK DIVISION COUNT
9/26/2009 country1 81
9/26/2009 country2 97
9/26/2009 country3 12
9/26/2009 country4 26
9/26/2009 country5 101
10/3/2009 country1 85
10/3/2009 country2 98
10/3/2009 country3 10
10/3/2009 country4 24
10/3/2009 country5 101
10/10/2009 country1 84
10/10/2009 country2 98
10/10/2009 country3 10
10/10/2009 country4 25
10/10/2009 country5 102
For example, if I give input as 10/10/2009, the output should be as give below.
REPORT_WEEK DIVISION COUNT COUNT_LAST_WEEK DIFFERENCE
10/10/2009 country1 84 85 -1
10/10/2009 country2 98 98 0
10/10/2009 country3 10 10 0
10/10/2009 country4 25 24 1
10/10/2009 country5 102 101 1
For example, if I give input as 10/3/2009, the output should be as give below.
REPORT_WEEK DIVISION COUNT COUNT_LAST_WEEK DIFFERENCE
10/3/2009 country1 85 81 4
10/3/2009 country2 98 97 1
10/3/2009 country3 10 12 -2
10/3/2009 country4 24 26 -2
10/3/2009 country5 101 101 0
Can anyone please shed some light on Query building for the above scenarios.
Thank you
SKP
Edited by: user11343284 on Oct 10, 2009 7:53 AM
Edited by: user11343284 on Oct 10, 2009 8:28 AMI assume there is no gap in report weeks. If so:
SQL> variable report_week varchar2(10)
SQL> exec :report_week := '10/10/2009'
PL/SQL procedure successfully completed.
with t as (
select to_date('9/26/2009','mm/dd/yyyy') report_week,'country1' division,81 cnt from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country2',97 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country3',12 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country4',26 from dual union all
select to_date('9/26/2009','mm/dd/yyyy'),'country5',101 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country1',85 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country2',98 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country3',10 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country4',24 from dual union all
select to_date('10/3/2009','mm/dd/yyyy'),'country5',101 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country1',84 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country2',98 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country3',10 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country4',25 from dual union all
select to_date('10/10/2009','mm/dd/yyyy'),'country5',102 from dual
select max(report_week) report_week,
division,
max(cnt) keep(dense_rank last order by report_week) cnt_this_week,
max(cnt) keep(dense_rank first order by report_week) cnt_last_week,
max(cnt) keep(dense_rank last order by report_week) - max(cnt) keep(dense_rank first order by report_week) difference
from t
where report_week in (to_date(:report_week,'mm/dd/yyyy'),to_date(:report_week,'mm/dd/yyyy') - 7)
group by division
order by division
REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
10-OCT-09 country1 84 85 -1
10-OCT-09 country2 98 98 0
10-OCT-09 country3 10 10 0
10-OCT-09 country4 25 24 1
10-OCT-09 country5 102 101 1
SQL> exec :report_week := '10/3/2009'
PL/SQL procedure successfully completed.
SQL> /
REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
03-OCT-09 country1 85 81 4
03-OCT-09 country2 98 97 1
03-OCT-09 country3 10 12 -2
03-OCT-09 country4 24 26 -2
03-OCT-09 country5 101 101 0
SQL> SY. -
QUERY - No Duplicate records from 2nd table ???
Hi Experts,
I really need help with this. I have 2 tables A and B. See below
<b>A -
B</b>
X -
XB1
XB2
XB3
Y----
YB
Z----
ZB
I select a record from A and get its record from B and give it on the output. For entry X I have 3 records in Table B. I want the output to give only 1 record from B for X. It can be any record. How can this be achieved in Query ?
Is there a special Join ? or can this be achieved by coding in Query ? If so how ?
I really appreciate your help.
Thanks !!First get the data from table A.
select * from table (A) into table i_a.
loop at i_a.
select single * from table B into table i_b.
move b reord to final internal table
append final internal table.
endloop. -
Query to read XML from CLOB table column
Hi
I want an SQL to get the following information extract from a CLOB table column.
MasterReport/sg:RptDef/sg:RptCell@RealDesc MasterReport/sg:RptDef/sg:RptCell@RealNum
credits 100
debits 100
Sample XML data from table column is:
<?xml version="1.0" encoding="UTF-8" ?>
<MasterReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sg="http://www.oracle.com/fsg/2002-03-20/" xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
<sg:LDGName>Vision Portugal</sg:LDGName>
<sg:SOBName>Vision Portugal</sg:SOBName>
<sg:DataAccessSetName>Vision Portugal</sg:DataAccessSetName>
<sg:InternalReportName>Model 30 Report</sg:InternalReportName>
<sg:CustomParam10 />
<sg:RowContext RowId="r100001">
<sg:RowName />
<sg:RowLineItem>Litigation Credits- Total amount from previous period</sg:RowLineItem>
<sg:RowDispUnit>1</sg:RowDispUnit>
<sg:RowDispFormat />
<sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
<sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
<sg:RowCurrencyType>T</sg:RowCurrencyType>
<sg:RowChangeSign>0</sg:RowChangeSign>
<sg:RowSeq>1.0000000000000</sg:RowSeq>
</sg:RowContext>
<sg:RowContext RowId="r100002">
<sg:RowName />
<sg:RowLineItem>Litigation credits- Taxed amounts from column2 for Previous period</sg:RowLineItem>
<sg:RowDispUnit>1</sg:RowDispUnit>
<sg:RowDispFormat />
<sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
<sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
<sg:RowCurrencyType>T</sg:RowCurrencyType>
<sg:RowChangeSign>0</sg:RowChangeSign>
<sg:RowSeq>2.0000000000000</sg:RowSeq>
</sg:RowContext>
<sg:ColContext ColId="c1000">
<sg:ColAmountType />
<sg:ColPeriod />
<sg:ColPerOffset />
<sg:ColChangeSign />
<sg:ColPosition />
<sg:ColSeq />
<sg:ColWidth>100</sg:ColWidth>
</sg:ColContext>
<sg:ColContext ColId="c1001">
<sg:ColName>Total</sg:ColName>
<sg:ColDescr />
<sg:ColDispUnit>1</sg:ColDispUnit>
<sg:ColUnitOfMeasure>EUR</sg:ColUnitOfMeasure>
<sg:ColLedgerCurrency>ANY</sg:ColLedgerCurrency>
<sg:ColCurrencyType>T</sg:ColCurrencyType>
<sg:ColDispFormat>999999999.99</sg:ColDispFormat>
<sg:ColAmountType>YTD-Actual</sg:ColAmountType>
<sg:ColPerOffset>0</sg:ColPerOffset>
<sg:ColAmntId>14</sg:ColAmntId>
<sg:ColParamId>-1</sg:ColParamId>
<sg:ColType>A</sg:ColType>
<sg:ColStyle>B</sg:ColStyle>
<sg:ColPeriod>10-08</sg:ColPeriod>
<sg:ColPeriodYear>2008</sg:ColPeriodYear>
<sg:ColPeriodNum>11</sg:ColPeriodNum>
<sg:ColPeriodStart>2008-10-01T00:00:00</sg:ColPeriodStart>
<sg:ColPeriodEnd>2008-10-31T00:00:00</sg:ColPeriodEnd>
<sg:ColChangeSign>0</sg:ColChangeSign>
<sg:ColHeadLine1>Totals</sg:ColHeadLine1>
<sg:ColHeadLine2 />
<sg:ColHeadLine3 />
<sg:ColHeadLine4 />
<sg:ColHeadLine5 />
<sg:ColHeadLine6 />
<sg:ColHeadLine7 />
<sg:ColHeadLine8 />
<sg:ColHeadLine9 />
<sg:ColPosition>99</sg:ColPosition>
<sg:ColSeq>1.0000000000000</sg:ColSeq>
<sg:ColWidth>14</sg:ColWidth>
</sg:ColContext>
<sg:RptDef RptId="p1001" RptDetName="Ledger=Vision PT (Vision Portugal)" RptPESegm="" RptPEVal="" RptTabLabel="Output 1 (Vision PT)">
<sg:RptLine RptCnt="p1001" RowCnt="r100001" LineRowSeq="1.0000000000000" LinCnt="l100001">
<sg:RptCell ColCnt="c1000" RealDesc="debits">debits</sg:RptCell>
<sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
</sg:RptLine>
<sg:RptLine RptCnt="p1001" RowCnt="r100002" LineRowSeq="2.0000000000000" LinCnt="l100002">
<sg:RptCell ColCnt="c1000" RealDesc="creditsd">credits</sg:RptCell>
<sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
</sg:RptLine>
</sg:RptDef>
<sg:TabCount>1</sg:TabCount>
</MasterReport>
Please help me.
Regards
Giri
Edited by: user576087 on Mar 18, 2012 11:54 PMI'm not sure if you want the values from the attribute or the element, but this should give you a good start :
SQL> alter session set nls_numeric_characters = ".,";
Session altered
SQL>
SQL> select x.*
2 from my_table t
3 , xmltable(
4 xmlnamespaces('http://www.oracle.com/fsg/2002-03-20/' as "sg")
5 , '/MasterReport/sg:RptDef/sg:RptLine'
6 passing xmltype(t.xmldoc)
7 columns type varchar2(30) path 'sg:RptCell[1]'
8 , amount number path 'sg:RptCell[2]'
9 ) x
10 ;
TYPE AMOUNT
debits 100
credits 100 -
Select query taking too much time to fetch data from pool table a005
Dear all,
I am using 2 pool table a005 and a006 in my program. I am using select query to fetch data from these table. i.e. example is mentioned below.
select * from a005 into table t_a005 for all entries in it_itab
where vkorg in s_vkorg
and matnr in s_matnr
and aplp in s_aplp
and kmunh = it_itab-kmunh.
here i can't create index also as tables are pool table...If there is any solutions , than please help me for same..
Thanks ,it would be helpful to know what other fields are in the internal table you are using for the FOR ALL ENTRIES.
In general, you should code the order of your fields in the select in the same order as they appear in the database. If you do not have the top key field, then the entire database is read. If it's large then it's going to take a lot of time. The more key fields from the beginning of the structure that you can supply at faster the retrieval.
Regards,
Brent -
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
Query to get details from Maintenance plans
Hi All,
Could some one please let me know, if there is any way to check whether
all databases option is selected under the maintenance plan other than using GUI. Below is the print screen for reference.
Maintenance plan includes rebuild Index, checkdb and update statistics steps, I have to check whether the All databases option is selected for each individual task.
I have a requirement wherein, I have to check this thing on around 5000 servers.
It would be great if someone lets me know the script to check this setting, so that it will save my time.
I have used below queries and tables to get the data, but they don't have the information which i'm looking for
sysdbmaintplan_databases
Contains one row for each database that has an associated upgraded database maintenance plan.
sysdbmaintplan_history
Contains one row for each upgraded database maintenance plan action performed.
sysdbmaintplan_jobs
Contains one row for each upgraded database maintenance plan job.
sysdbmaintplans
Contains one row for each upgraded database maintenance plan
select * from sysdbmaintplan_jobs
SELECT name,subplan_name,subplan_description
FROM msdb.dbo.sysmaintplan_plans AS s
INNER JOIN msdb.dbo.sysmaintplan_subplans AS sp ON sp.plan_id=s.id
Order by name,subplan_name
SELECT s.name AS MaintenancePlanName,
sp.subplan_name AS SubplanName,
subplan_description AS SubplanDescription,
sj.name AS JobName,
sj.enabled AS JobStatus,
ss.name AS ScheduleName
FROM msdb.dbo.sysmaintplan_plans AS s
LEFT JOIN msdb.dbo.sysmaintplan_subplans AS sp ON sp.plan_id = s.id
LEFT JOIN msdb.dbo.sysjobs AS sj ON sj.job_id = sp.job_id
LEFT JOIN msdb.dbo.sysschedules AS ss ON sp.schedule_id = ss.schedule_id
ORDER BY s.name,
sp.subplan_name
Thanks in Advance.
Regards, KranthiOn a different note, i think you can script the maintenance plan - ssis package and then insert into sysssiscatalog table and i think this will create the ssis - maintenance plan on the server. not sure ..this is just thought.... they can be compatibility
issue.
also, you can use the history - maintenance plans to get the data you need. but the caveat is the maintenance plan should have and history should exist and 'extended log information' must be checked on the plan. this can be done - checking a text box
in the plan properties.
try this query.. i used top 1 ..so, you can try... if all databases are used in the plan..it will just show all but if only some are used, i split that into multiple rows,(you might not need this)..there are some many other combinations possible,,
such selecting on some tables etc... you can query all that information from history tables,
try this query
use msdb
go
select top 1 @@SERVERNAME [servername],case when d.Succeeded=1 then 'Success' when d.succeeded=0 then 'Failed' End as Result,
name,b.subplan_name,D.line1,D.line2,replace(D.line3,'Databases: ','') as [DBs],D.line4,D.line5,D.start_time,D.end_time,D.command,d.Succeeded
into #test
from sysmaintplan_plans a inner join sysmaintplan_subplans b on a.id=b.plan_id
inner join sysmaintplan_log c on c.plan_id=b.plan_id and c.Subplan_id=b.subplan_id
inner join sysmaintplan_logdetail d on d.task_detail_id=c.task_detail_id
ORDER BY D.start_time DESC
GO
SELECT [ServerName],name,subplan_name,line2,
Split.a.value('.', 'VARCHAR(100)') AS String
FROM (SELECT [ServerName],name,subplan_name,line2,
CAST ('<M>' + REPLACE([DBs], ',', '</M><M>') + '</M>' AS XML) AS Dbs
FROM #test) AS A CROSS APPLY Dbs.nodes ('/M') AS Split(a);
drop table #test
anyways, on a side note, if you really have 5000 sql servers, you should looking at some tool or scripts to do this maintanence tasks than the builtin maintenance tasks as they provide better managebility. also, it is highly likely that you have multiple version,
which makes it even harder to script out....
Hope it Helps!! -
hi
How do I tell which user deleted data from a table ?
AndaleHai,
Users who have access write ABAP programs, has full access to the database and thus can delete all the data.
Additionally users with permission can use SE14 to delete table contents completely.
You can use STAD and ST03 to analyse what are all the tcodes executed in a particular period of time and by which user. Also you can use table logging on tables to log the activities on the table.
http://help.sap.com/saphelp_nw04/Helpdata/EN/7e/c81ebb52c511d182c50000e829fbfe/frameset.htm
Regards,
Yoganand.V
Edited by: Yoganand Vedagiri on Feb 6, 2009 11:54 AM
Maybe you are looking for
-
Issue in sorting data in already existing abap code
Hi all, I have a code which fetches the data into an internal table. The content of the internal table is as follows(example): 1) Header 1 amount 1 2) item1 amount 2 3) item1 amount 3 4) item1 amount 4 5) header 1 amount 5 6) item2 amount 6 7) item2
-
Edit an Existing Character format
Hi, I have a pblm to solve. In so10 transaction I have <text name> which is of text id PALT and I want to change a character format in that.Please help me. point will rewarded for useful answers. Thanks. regards, Arul
-
Method to identify the value difference
Dear Experts, We run a blocked invoices report (t-code ZMR0) from which the invoices are manually released. This report, among other details, is calculating and displaying the value difference for which the respective invoice got price blocked. As I
-
I'm looking to upgrade, and looking at the HTC Incredible 2 or possibly the Thunderbolt. What would you say the pro's and con's are? When using wifi do you have to put the phone in airplane mode? Is it easy to find apps for the phone. Like say m
-
INVOICE NOT SHOWING IN CUSTOMER A/C
hi all, pl help me out on the issue... I had made two Sales order against which made the invoice .I had got the invoice number also,but when I am going in the ledger of customer it is not showing there.also,if I checked this in VF03 it is showing do