Collection in dba advisor tables
I have an Oracle 10g R2, I have been looking into tables dba_advisor tables example dba_advisor_actions and dba_advisor_tasks. But what I don’t seem to understand is that I see can a hurdle of problems being identified at one specific time, example
At 23:00:54 I see 10 Sql Tuning and 15 Host Configuration problems. This time has been taken from table dba_advisor_tasks column name execution_start while Sql Tuning and Host Configuration from table dba_advisor_recommendations column name type.
Could the collection method be inappropriate or incorrect?
Thank you
Adith
Thank you for your precise answer.
Adith
Similar Messages
-
Collect message into internal table
Hi,
does any one knows how BAPIs or CALL TRANSACTIONs collect messages into internal table.
My problem is that some BI with CALL TRANSACTION doesn't collect right message into return table and I would like to collect this last message after CALL TRANSACTION and therefore be sure that everything went OK.....
thx
mariohi
good
check this
Call Transaction p_trans using ZBDC_Table
Mode p_mode
Update p_update
Messages into p_messages.
Move sy-subrc to w__subrc.
Scan the messages in YDCRAISES to see if we need to
change the message class.
Loop at p_messages.
Select single msgtyp
into w__msgtp
from zdcraise
where tcode = p_messages-tcode and
msgid = p_messages-msgid and
msgnr = p_messages-msgnr.
If sy-subrc = 0.
Move w__msgtp to p_messages-msgtyp.
Modify p_messages.
EndIf.
EndLoop.
Dump the message table ?
If w__ydcset-dumpmsg = True.
thanks
mrutyun^ -
Help,why brconnect do not collect statistics for mseg table?
I found "MSEG" table`s statistics is too old.
so i check logs in db13,and the schedule job do not collect statistics for "MSEG".
Then i execute manually: brconnect -c -u system/system -f stats -t mseg -p 4
this command still do not collect for mseg.
KS1DSDB1:oraprd 2> brconnect -c -u system/system -f stats -t mseg u2013f collect -p 4
BR0801I BRCONNECT 7.00 (46)
BR0154E Unexpected option value 'u2013f' found at position 8
BR0154E Unexpected option value 'collect' found at position 9
BR0806I End of BRCONNECT processing: ceenwjre.log 2010-11-12 08.41.38
BR0280I BRCONNECT time stamp: 2010-11-12 08.41.38
BR0804I BRCONNECT terminated with errors
KS1DSDB1:oraprd 3> brconnect -c -u system/system -f stats -t mseg -p 4
BR0801I BRCONNECT 7.00 (46)
BR0805I Start of BRCONNECT processing: ceenwjse.sta 2010-11-12 08.42.04
BR0484I BRCONNECT log file: /oracle/PRD/sapcheck/ceenwjse.sta
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.11
BR0813I Schema owners found in database PRD: SAPPRD*, SAPPRDSHD+
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.12
BR0807I Name of database instance: PRD
BR0808I BRCONNECT action ID: ceenwjse
BR0809I BRCONNECT function ID: sta
BR0810I BRCONNECT function: stats
BR0812I Database objects for processing: MSEG
BR0851I Number of tables with missing statistics: 0
BR0852I Number of tables to delete statistics: 0
BR0854I Number of tables to collect statistics without checking: 0
BR0855I Number of indexes with missing statistics: 0
BR0856I Number of indexes to delete statistics: 0
BR0857I Number of indexes to collect statistics: 0
BR0853I Number of tables to check (and collect if needed) statistics: 1
Owner SAPPRD: 1
MSEG
BR0846I Number of threads that will be started in parallel to the main thread: 4
BR0126I Unattended mode active - no operator confirmation required
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.16
BR0817I Number of monitored/modified tables in schema of owner SAPPRD: 1/1
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.16
BR0877I Checking and collecting table and index statistics...
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.16
BR0879I Statistics checked for 1 table
BR0878I Number of tables selected to collect statistics after check: 0
BR0880I Statistics collected for 0/0 tables/indexes
BR0806I End of BRCONNECT processing: ceenwjse.sta 2010-11-12 08.42.16
BR0280I BRCONNECT time stamp: 2010-11-12 08.42.17
BR0802I BRCONNECT completed successfully
the log says:
Number of tables selected to collect statistics after check: 0
Could you give some advices? thanks a lot.Hello,
If you would like to force the creation of that stats for table MSEG you need to use the -f (force) switch.
If you leave out the -f switch the parameter from stats_change_threshold is taken like you said correctly:
[http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/02/0ae0c6395911d5992200508b6b8b11/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/02/0ae0c6395911d5992200508b6b8b11/content.htm]
[http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/cb/f1e33a5bd8e934e10000000a114084/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/cb/f1e33a5bd8e934e10000000a114084/content.htm]
You have tried to do this in your second example :
==> brconnect -c -u system/system -f stats -t mseg u2013f collect -p 4
Therefore you received:
BR0154E Unexpected option value 'u2013f' found at position 8
BR0154E Unexpected option value 'collect' found at position 9
This is the correct statement, however the hyphen in front of the f switch is not correct.
Try again with the following statement (-f in stead of u2013f) you will see that it will work:
==> brconnect -c -u system/system -f stats -t mseg -f collect -p 4
I hope this can help you.
Regards.
Wim -
Select from a collection of collections SELECT - CAST - MULTISET - TABLE
Does someone have a suggestion for the SELECT statement which is performing a CAST?
I am on Oracle 10.2.0.1.0. The goal is to take a collection of a nested table and order it by color, then descr, then grown_by, saving it into an ordered collection (v_List2). Am getting error with ORA-22907 Invalid cast to a type that is not a nested table.
CREATE OR REPLACE TYPE ot_fruit
AS OBJECT
descr VARCHAR2(100)
,color VARCHAR2(50)
,grown_by VARCHAR2(50)
CREATE OR REPLACE TYPE tab_fruitList AS TABLE OF ot_fruit;
CREATE OR REPLACE TYPE ot_tab_fruit
AS OBJECT
fruit tab_fruitList
DECLARE
v_List ot_tab_fruit := ot_tab_fruit(tab_fruitList(ot_fruit('apple','red','tree'),
ot_fruit('blueberry','blue','bush')
v_List2 ot_tab_fruit := ot_tab_fruit(tab_fruitList());
BEGIN
SELECT CAST ( MULTISET ( SELECT * FROM TABLE(v_List)
ORDER BY 2, 3, 1
<b> -- This compiles with ORA-22907 error
AS ot_tab_fruit</b>
) INTO v_List2
FROM DUAL;
FOR i IN v_List2.FIRST..v_List2.LAST
LOOP
DBMS_OUTPUT.PUT_LINE('i='||i||' descr='||v_List2(i).fruit.descr ||' color='||
v_List2(i).fruit.color||' grown_by='||v_List2(i).fruit.grown_by);
END LOOP;
END;Thanks, Kate
Message was edited by:
johnsokThis solution, which works perfectly by the way, came from Avi Abrami. I've highlighted the necessary changes to make the SELECT of a collection of objects work properly.
create or replace type OT_FRUIT as object (
DESCR varchar2(100)
,COLOR varchar2(50)
,GROWN_BY varchar2(50)
create or replace type TAB_FRUITLIST as table of OT_FRUIT;
create or replace type OT_TAB_FRUIT as object (
FRUIT TAB_FRUITLIST
DECLARE
v_List ot_tab_fruit := ot_tab_fruit(tab_fruitList(ot_fruit('apple','red','tree'),
ot_fruit('blueberry','blue','bush')
v_List2 ot_tab_fruit := ot_tab_fruit(tab_fruitList());
BEGIN
SELECT CAST ( MULTISET ( SELECT * FROM TABLE(v_List.fruit)
ORDER BY 2, 3, 1
AS tab_fruitlist
) INTO v_List2.fruit
FROM DUAL;
FOR i IN v_List2.fruit.FIRST..v_List2.fruit.LAST
LOOP
DBMS_OUTPUT.PUT_LINE('i='||i||' descr='||v_List2.fruit(i).descr ||' color='||
v_List2.fruit(i).color||' grown_by='||v_List2.fruit(i).grown_by);
END LOOP;
END;
/ -
How i can keep my code after %dba standard table in sap query
hi expert,
how i can keep my code after %dba standard table in sap query..
add 1 to %count-VBRP.
%linr-VBRP = '01'.
extract %fg01.
%linr-VBRP = '02'.
extract %fg02.
%linr-VBRP = '04'.
extract %fg04.
%linr-VBRP = '05'.
extract %fg05.
%ext-VBRP05 = 'X'.
extract %fgwrVBRP05.
endselect.
i want keep my code after filling the standard table generated by sap abap query
Thanks & regards
Sajad AhmadHi,
the above code is excuted succesfully, but if i have
return "Navigation" ;
it is not working
any idea why?????????? -
GATHER_STATS job collect stats for 'static' tables
Oracle version: 10gR2
If a business table hasn't changed (No DML) in the last 10 days, will oracle's default stats collection job
DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROCstill collect stats of this table?The answer is no, unless you have modified the default optimizer stats collecting statistics, as about 10% of the data must have undergone change before the table is elgible for new statistics.
See the following int he Performance and Tuning manual section 14.2.1 GATHER_STATS_JOB:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#sthref1068
HTH -- Mark D Powell -- -
Reg: Collect statement in internal table
Hi,
Can any one tell me wether we can use the collect statement in an internal table which has no header line
if it can be used can anyone please send me a sample snippet
Thanks In ADVANCE
Guhapriyan SubrahmanyamHi Guhapriyan,
I have used the collect statement in the way as shown..
DATA : BEGIN of I_ALLOCATIONS OCCURS 0,
PSPNR LIKE PRPS-PSPNR,
PSPID LIKE PROJ-PSPID,
PSPHI LIKE PRPS-PSPHI,
POST1 LIKE PROJ-POST1,
ZZLOB LIKE PROJ-ZZLOB,
WERKS LIKE PROJ-WERKS,
SOBID LIKE HRP1001-SOBID,
OBJID LIKE HRP1001-OBJID,
BEGDA LIKE HRP1001-BEGDA,
ENDDA LIKE HRP1001-ENDDA,
PROZT LIKE HRP1001-PROZT,
LOB LIKE HRP1000-STEXT,
TEMP TYPE P decimals 2,
TYPE(3),
ZROLE LIKE PA0001-ZROLE,
HOLID TYPE P decimals 2,
LEAVE TYPE P decimals 2,
DAYS TYPE P decimals 2,
END of I_ALLOCATIONS.
DATA: I_ALLOCATION LIKE I_ALLOCATIONS OCCURS 0 WITH HEADER LINE.
************Populate I_ALLOCATIONS **************
LOOP AT I_ALLOCATIONS.
COLLECT I_ALLOCATIONS INTO I_ALLOCATION.
ENDLOOP.
Actually i had requirement like u, but this one is rather simple...
Get the required data in an I_Table which dont require Header line..
Later on collect this particular I_Table in other I_Table1 with the Header Line...
Regards,
Abhishek -
Two collect statement from internal table
Dear Experts,
I want populate values to two internal tables from a internal table.
can i use two collect statement for different internal table from a single internal table.
advise please.
Thanks in advance.
R.Rajendranhi there....
well u can very well use this thing.....
use the two colect statements inside the loop which u will use to read the records of the input table.
hope it helps.
do reward if it does. -
Using COLLECT on a internal table
Hello,
I have fetched records from a table into my internal table through, " SELECT * FROM .... INTO TABLE FOR ALL ENTRIES IN ...... "
There are two columns in my internal table against which i need a total of the column. COLLECT sums the amounts . But how can i use COLLECT in this scenario ?
Can anyone kindly guide me ...Thanks
Shehryar DaharHi,
COLLECT add the numeric entries for the corresponding table keys..
Example.
DATA: BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
COUNT TYPE I,
END OF ITAB.
ITAB-MATNR = 'ABC'.
ITAB-COUNT = 2.
COLLECT ITAB.
ITAB-MATNR = 'ABC'.
ITAB-COUNT = 1.
COLLECT ITAB.
ITAB-MATNR = 'ABCD'.
ITAB-COUNT = 2.
COLLECT ITAB.
ITAB-MATNR = 'ABCD'.
ITAB-COUNT = 3.
COLLECT ITAB.
LOOP AT ITAB.
WRITE: / ITAB-MATNR, ITAB-COUNT.
ENDLOOP.
For more information on Collect, check this site:
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm
Hope this would help you out.
Regards,
Varun. -
Collect in an internal table with keys plant and material
Hi ,
I have an output internal table with material , plant and var quantitites .
I would like to use Collect statement and sum the quantities but do it by plant and material .
How do I specify that i want to do it on plant or material ?
Thanks !hi here is an example like urs..
DATA: BEGIN OF seats,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
seatsocc TYPE sflight-seatsocc,
END OF seats.
DATA seats_tab LIKE HASHED TABLE OF seats
WITH UNIQUE KEY carrid connid.
SELECT carrid connid seatsocc
FROM sflight
INTO seats.
COLLECT seats INTO seats_tab.
ENDSELECT.
check for help..
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm
regards,
venkat -
Bulk collect in pl/sql table SOLVED
Hi All,
TYPE r_nparameter IS RECORD( col1 tab.col1%TYPE, col2 tab.col2%TYPE);
TYPE t_no_seq IS TABLE OF r_nparameter INDEX BY BINARY_INTEGER;
the t_no_seq is not initialized.
My Question is
If we use t_itn_seq, in a BULK COLLECT operation in a select statement as...
SELECT col1, col2 BULK COLLECT INTO t_no_seq
and there is no record found for this query and exception is taken care of....thereafter we use this table in for loop as..
FOR icount IN 1..t_no_seq.COUNT
will this count raise any exception?
Best Regards.
Message was edited by:
user560602It's not difficult to test this yourself...
SQL> declare
2 type t_x is table of number index by binary_integer;
3 v_x t_x;
4 begin
5 select rownum
6 bulk collect into v_x
7 from dual
8 connect by rownum <= 10;
9 for i in 1..v_x.count
10 loop
11 dbms_output.put_line(to_char(v_x(i)));
12 end loop;
13 end;
14 /
1
2
3
4
5
6
7
8
9
10
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 declare
2 type t_x is table of number index by binary_integer;
3 v_x t_x;
4 begin
5 select rownum
6 bulk collect into v_x
7 from dual
8 where 1=0;
9 for i in 1..v_x.count
10 loop
11 dbms_output.put_line(to_char(v_x(i)));
12 end loop;
13* end;
SQL> /
PL/SQL procedure successfully completed. -
Runtime Errors COLLECT_OVERFLOW_TYPE_P
Except. CX_SY_ARITHMETIC_OVERFLOW
Date and Time 27.07.2009 18:31:32
Short text
An internal table field has been defined too small.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_ARITHMETIC_OVERFLOW', was not
caught in
1506 ASSIGN TAB_GLT3-KSLVT INCREMENT INT_GLS3_ADD-OFFSET TO <FELD>
1507 RANGE TAB_GLT3 CASTING TYPE P.
1508 MOVE INT_GLS3-KSL TO <FELD> .
>>>>> COLLECT TAB_GLT3 .
1510 ENDLOOP.
1511
1512
1513 IF SY-ONCOM = 'P'.
1514 PERFORM NEW_UPDATE_GLT3 .
ABOVE EROOR clearly says that The name of the field is "KSL07" and TABLE is GLT3 is exceeding ,
but we checked the file as well table , their is no large value in SAP . file is uploading using RFBIBL00 program
Please advise why this type of errors occurs.
ThanksHI,
The amount which is getting calculated is too big to be accomodated in the field KSL07.
Check whether the decimal places are being considered properly.
Regards,
Ankur Parab -
Select collection then delete several tables
BEGIN
;WITH MyResult AS
SELECT containerID AS barCode, dbo.fn_checkExpiration(containerID) AS containerExpired
FROM [Barcode].[dbo].ContainerHistory
WHERE dateEntered >= DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP) -1, 0)
AND dateEntered < DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP), 0)
AND stateID = 1
DELETE FROM PalletBarcodes WHERE barcode IN (
SELECT barCode FROM MyResult WHERE containerExpired = 1)
DELETE FROM LotContainers WHERE barcode IN (
SELECT barCode FROM MyResult WHERE containerExpired = 1)
barCode FROM MyResult WHERE containerExpired = 1)
END
This TSQL code works for what I have to do of deleting records from several tables, except I get an error when executing this as a stored procedure. Why can't I use the collection select query MyResult without having to do the MyResult collection
query a 2nd time for the 2nd DELETE of LotContainers ?Please follow basic Netiquette and post the DDL we need to answer this. Do you know how to follow industry and ANSI/ISO standards. You should follow ISO-11179 rules for naming data elements. You have no idea! You should follow ISO-8601 rules for displaying
temporal data. Avoid dialect in favor of ANSI/ISO Standard SQL.
Please do not use UDFs. It is bad declarative programming, cannot port and cannot be optimized. Even worse, the “fn_” prefix is taken from FORTRAN I and II and from 1960's BASIC. These compilers were so weak they had to use the prefixes as a signal! But OO
programmers who never learned to think in SQL use them to mimic methods from their “native language”
Please learn basic RDBMS; a data element has one and only one name! Is it a “bar_code” or a “container_id” in this data model? Since bar codes are a data format and not a logical data element, this is a real design problem.
As an aside we no longer use camelCase; it has ISO problems in many standards and does not work. Your eyes jump to the uppercase letter, then twitches back to the start of the word. It is painful to read.
But the worst problem is “state_id”, so wrong! A column can be “<something in particular>_status” or “<something in particular>_id” but never some weird hybrid chain of what ISO-11179 calls attribute properties. This looks like noob with a 1950's
assembly language bit flag used in his bad SQL.
An SQL programmer would have an “expiration_date” and not use a silly “container_expiry_flg” you have. We use predicates to get facts; assembly language looks for flags that were set and might be current.
Since we have a DATE data type, you can write: entry_date = CAST (CURRENT_TIMESTAMP AS DATE).
Since you did not have the Netiquette to post DDL, I will guess that the deletions you did in separate statements should have been done with ON DELETE CASCADE clauses!
>> This TSQL code works for what I have to do of deleting records [sic] from several tables, .. <<
Rows are not records! You really have no idea how to write SQL, do you? Want to try again and be polite?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Collections stored as Nested tables
I have created a Table with XMLTYPE column and the
column is defined as Object against a registered Schema.
I have also created nested tables for all collection types
and created appropriate indexes on the Nested tables
based on Nested_table_Id and array_index.
CREATE TABLE STATEMENT_DATA
TEST SYS.XMLTYPE
XMLTYPE COLUMN TEST STORE AS OBJECT RELATIONAL
XMLSCHEMA "StatementData.xsd"
ELEMENT "StatementData"
varray TEST."XMLDATA"."MessagePayload"."BillDeterminant"
STORE AS table BillDeterminant
( varray "AttributeList" STORE AS table BillDtr_AttrList,
varray "ChargeProfileData" STORE AS table BillDtr_ProfData )
varray TEST."XMLDATA"."MessagePayload"."MarketStatement"
STORE AS table MarketStatement
(varray "MarketStatementLineItem" STORE AS table marketlineitm
( varray "PassThroughBill"."AttributeList" STORE AS table Lineitm_ChargeProf_AttrList,
varray "PassThroughBill"."ChargeProfile" STORE AS table Lineitm_ChargeProfile
(varray "ChargeProfileData" STORE AS table ChargeProfileData),
varray "AttributeList" STORE AS table Lineitm_AttributeList),
varray "RTO" STORE AS table Rto
(varray "ErpAddress" STORE AS table rto_ErpAddress,
varray "ErpPerson" STORE AS table rto_Erpperson
(varray "ErpTelephoneNumber" STORE AS table rto_ErpTelephoneNumber)) ,
varray "Customer" STORE AS table Customer
(varray "ErpAddress" STORE AS table Cust_ErpAddress,
varray "ErpPerson" STORE AS table cust_Erpperson
(varray "ErpTelephoneNumber" STORE AS table cust_ErpTelephoneNumber)) ,
varray "ActivityRecord" STORE AS table ActivityRecord)
Sample Index :
CREATE UNIQUE INDEX MARKETLINEITM_indx1 ON MARKETLINEITM d
( d.NESTED_TABLE_ID,d.array_index);
Now when I tried to execute a sample query involving some of the
nested tables , Explain Plan shows that it is not using the indexes
I have created.
The following parameters are also set in the Database.
query_rewrite_enabled : TRUE
query_rewrite_integrity : TRUSTED.
I am using Oracle 9.2.0.5.0.
Can somebody tell me if I am missing something?
Thanks,
ArunThanks for the reply. XMPTYPE based column is not using the
indexes even after gathering Index statistics. However the Statistics
gathering is helping queries based on XMLTYPE based tables.
Any suggestion for XMLTYPE based columns ? Has anybody
been able to successfully use the indexes in 10g ?
Arun -
Data load / Collection of R/3 Table filelds to BW
Hi,
Here is the situation...I have to pull data from sap R/3 tables like VBRP, VBAK,VBKD TO BW on monthly basis. Can anyone of you gurus tell me what I have to do, to load these data from R/3 to cube in BW. Can you please help us by step by step procedure in detail way like the Basic steps we have to do and steps to do in BW..
Thanks,
DavidHi David,
You could do this in 2 ways:
Either by using SAP delivered standard data sources i.e. 2LIS_13_VDITM and 2LIA_11_VAHDR. Or by creating Generic extractor either using Views or function modules.
If you decide to use SAP delivered standard extractors then you can see them in RSA5. Activate those and you can use them. You can test in RSA3 extract checker.
If you decide to use generic extractor then go to RSO2 and create a data source of your own with necessary fields.
Once this is done in R/3 side, you can check the data in RSA3 extractor checker.
Now in BW side replicate the data source in your source system.
Create transfer structure, communication structure then cube. Join the cube and transfer structure with update rules. Mappings should be clear.
Create info package and schedule the job.
Hope this helps you,
Bye,
Naga.
Maybe you are looking for
-
How can i validate the data in the control file?
Consider that the SQLLoader reads the Input data File from the path and it loads the data into the tables based up on the descrition specified in the control File. First, the table to be filled is created: create table sql_loader_1 ( load_time date,
-
Standard VAT report bug (s_ALR_87012357 )
Hi all, the standard report s_ALR_87012357 might be creating confusion.. in that report there is 6 report blocks available that is input tax out put tax...and so on.... our one document having I2 and I5 tax code but why this tax is calculation in ou
-
I have searched all over to see how this is done. I found one other response to this question, but it was not complete. Basically what I am wondering is, how do I set up my text field so that there is a default text to signify what the user should ty
-
German keyboard/ characters
I'm a really new mac user! I need to be able to type German accents EASILY and can't figure out how to do this? Reset my keyboard or ... HELP!
-
Can not sign in online from Photoshop Elements 10
can not sign in online from Photoshop Elements 10