How to find how much memory used by particular procedure or function.
Hi,
How can we find out memory used by particular procedure or function?
If procedure or function is called many times in particular interver, wil it be cached in memory?
and how will it affect performance?
what type of pl/sql statement will take more time than normal sql statement?
Hi
There are several different memory issues to consider:
- the code itself (stored in the shared pool)
- simple variables defined in the code
- complex variables (eg VARRAY, TABLE etc)
There's a helpful note on PL/SQL profiling here - http://www.oratechinfo.co.uk/tuning.html - which mentions how to measure memory use (session PGA and UGA - that's program and user global areas)
You can find out more about shared pool memory structures here - http://download-east.oracle.com/oowsf2005/003wp.pdf.
Calling a function many times - yes, the function code will be cached (if possible). Session state (for a package) will also be retained (ie global package variables).
If many users call the same function, there will be one copy of the code but many copies of the private state.
Finally: PL/SQL statements that can take a long time include:
- anything that does heavy processing inside a tight loop;
- anything that waits (select for update; read from a pipe or dequeue from AQ etc)
Probably the most common mistake is to use PL/SQL for relational processing that can be done from SQL itself (eg writing nested PL/SQL loops to join data that could have been queried in a single SQL statement. Try to minimise context switches between PL/SQL and SQL:
- use bulk collect where possible
- use set operations in SQL
Good luck, HTH
Regards Nigel
Similar Messages
-
How to find out total memory used by each database ?
I have two databases in one unix server.
1) I need to know total memory used by each database.
2) secondly, I want to know the detail used in each database.
thanksFor a database using dedicated shared servers, we can say total memory = 1 * SGA + sum (PGA) for all dedicated server processes (this excludes the size of the Oracle binary)
For SGA, see
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref401
or
ipcs -mob | grep <oracle account> gives the SGA sizes for the 2 databases.
for PGA,
see PGA_USED_MEM column http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2022.htm#sthref3837
it's difficult to rely on Unix top/ps command because some Unix will add the shared memory to each dedicated server connection, some not. -
How to find how much space is required for backup.
Hi,
I have 7 gb of space available but on backup it is saying space not avialable,
Please tel me following
1) how to find how much backup space is required.
2) and i think it does not currup the old backup set when backup fails?so i can feel good that my old backup is ok?
3) which folder i should copy, to keep backup of backup on other machine.(C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE)
4) and also tel me where orignal files of database is present i will backup that also like in MSSQL.
5)please also tel me how to change the backup location to other drive.
yours sincerely
Edited by: 944768 on Dec 19, 2012 9:16 PM
Edited by: 944768 on Dec 19, 2012 10:55 PM1)this you can check from your old backup size.add a little to it and that is your backup space requirement.
2)if space is not there then failed backup is corrupt.other old backups remain intect.
3)you need to shutdown database for copying folder or put data files in backup mode(id archivelogs are enable on database).
4)you can check original database files dba_data_files,v$controlfile views and as point 3 is valid on them if you using copy paste rather then RMAN.
5)when taking backup from rman use
RMAN> RUN {
ALLOCATE CHANNEL d1 DEVICE TYPE DISK
FORMAT '/u01/backups/%U';
BACKUP DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL;
}In format clause you can give disk location. -
How to find CPU and Memory Utilization
Hi,
How to find CPU and Memory Utilization of my application which is
running in solaris workstation.My application has a management console in which we need to update the cpu and memory periodically.
(Notr : Usage of JNI is restrcited)
Thnx and Rgds,
MohanThere is no CPU usage API in Java. You need some JNI code. For memory usage see the Runtime methods:
* Get information of memory usage: max, total, free and (available/used).
* <ul>
* <li>Max is the maximum amount of bytes the application can allocate (see also java options -Xmx). This value is fixed.
* If the application tries to allocate more memory than Max, an OutOfMemoryError is thrown.
* <li>Total is the amount of bytes currently allocated from the JVM for the application.
* This value just increases (and doesn't decrease) up to the value of Max depending on the applications memory
* requirements.
* <li>Free is the amount of memory that once was occupied by the application but is given back to the JVM. This value
* varies between 0 and Total.
* <li>The used amount of memory is the memory currently allocated by the application. This value is always less or equal
* to Total.
* <li>The available amount of memory is the maximum number of bytes that can be allocated by the application (Max - used).
* </ul>
* In brief: used <= total <= max
* <p>
* The JVM can allocate up to 64MB (be default) system memory for the application. If more is required, the JVM has to be started with the Xmx option
* (e.g. "java -Xmx128m" for 128 MB). The amount of currently allocated system memory is Total. As the JVM can't give back unallocated memory
* to the operating system, Total can just increase (up to Max).
* @return Memory info.
static public String getMemoryInfo() {
StringBuilder sb = new StringBuilder();
sb.append("Used: ");
sb.append(toMemoryFormat(getUsedMemory()));
sb.append(", Available: ");
sb.append(toMemoryFormat(getAvailableMemory()));
sb.append(" (Max: ");
sb.append(toMemoryFormat(Runtime.getRuntime().maxMemory()));
sb.append(", Total: ");
sb.append(toMemoryFormat(Runtime.getRuntime().totalMemory()));
sb.append(", Free: ");
sb.append(toMemoryFormat(Runtime.getRuntime().freeMemory()));
sb.append(")");
return sb.toString();
}//getMemoryInfo() -
How to find out the Transactions used per month & the USER who used that
Hi,
1)How to find out the Transactions used per month & the USER who used that?
2)and can i get the above same for minimum 20 month?
System : SAP- Enterprise Core Component.You can use my program...
*& Report Z_ABAP_TCODE_MONITOR
*****& Program Type : Report *
*****& Title : Z_ABAP_TCODE_MONITOR *
*****& Transaction code : ZTCODE_USAGE *
*****& Developer name : Shailendra Kolakaluri *
*****& Deveopment start date : 26 th Dec 2011 *
*****& Development Package : ZDEV *
*****& Transport No : DEVK906086 *
*****& Program Description : This program is to display
*List all tcodes executed during previous day.
*& Show the number of users executing tcodes
*& Modification history
REPORT Z_ABAP_TCODE_MONITOR.
*& List all tcodes executed during previous day.
*& Show the number of users executing tcodes
TYPE-POOLS : slis.
DATA: ind TYPE i,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
layout TYPE slis_layout_alv,
variant TYPE disvariant,
events TYPE slis_t_event WITH HEADER LINE,
heading TYPE slis_t_listheader WITH HEADER LINE.
*REPORT z_report_usage.
TYPES: BEGIN OF zusertcode,
date TYPE swncdatum,
user TYPE swncuname,
mandt TYPE swncmandt,
tcode TYPE swnctcode,
report TYPE swncreportname,
count TYPE swncshcnt,
END OF zusertcode.
*data : date type n.
DATA: t_usertcode TYPE swnc_t_aggusertcode,
wa_usertcode TYPE swncaggusertcode,
wa TYPE zusertcode,
t_ut TYPE STANDARD TABLE OF zusertcode,
wa_result TYPE zusertcode,
t_result TYPE STANDARD TABLE OF zusertcode.
PARAMETER: month TYPE dats DEFAULT sy-datum.
*PARAMETER: date TYPE dats.
*select-options : username for wa_usertcode-account.
START-OF-SELECTION.
PERFORM get_data.
PERFORM get_fieldcatalog.
PERFORM set_layout.
PERFORM get_event.
PERFORM get_comment.
PERFORM display_data.
FORM get_data .
*date = sy-datum - 2 .
After start-of-selection add this line (parameter Month required 01 as day).
concatenate month+0(6) '01' into month.
CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
EXPORTING
component = 'TOTAL'
ASSIGNDSYS = 'DEV'
periodtype = 'M'
periodstrt = month
TABLES
usertcode = t_usertcode
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
wa-date = month.
*wa-date = date.
wa-mandt = sy-mandt.
wa_usertcode-account = username.
LOOP AT t_usertcode INTO wa_usertcode.
wa-user = wa_usertcode-account.
IF wa_usertcode-entry_id+72 = 'T'.
wa-tcode = wa_usertcode-entry_id.
wa-report = space.
ELSE.
wa-tcode = space.
wa-report = wa_usertcode-entry_id.
ENDIF.
COLLECT wa INTO t_ut.
ENDLOOP.
SORT t_ut BY report ASCENDING.
CLEAR: wa, wa_result.
endform.
FORM get_fieldcatalog .
fcat-tabname = 't_ut'.
fcat-fieldname = 'DATE'.
fcat-seltext_l = 'Date'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'MANDT'.
fcat-seltext_l = 'Client'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'USER'.
fcat-seltext_l = 'User Name'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'TCODE'.
fcat-seltext_l = 'Transaction Code'.
fcat-key = 'X'.
APPEND fcat.
ENDFORM.
*& Form SET_LAYOUT
text
--> p1 text
<-- p2 text
FORM set_layout .
layout-colwidth_optimize = 'X'.
ENDFORM. " SET_LAYOUT
*& Form GET_EVENT
text
--> p1 text
<-- p2 text
*FORM get_event .
events-name = slis_ev_top_of_page.
events-form = 'TOP_OF_PAGE'.
APPEND events.
*ENDFORM. " GET_EVENT
**& Form GET_COMMENT
text
--> p1 text
<-- p2 text
*FORM get_comment .
DATA: text(30).
text = 'Billing Report'.
heading-typ = 'H'.
heading-info = text.
APPEND heading.
*ENDFORM. " GET_COMMENT
**& Form top_of_page
text
--> p1 text
<-- p2 text
*FORM top_of_page .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading[]
I_LOGO =
I_END_OF_LIST_GRID =
*ENDFORM. " top_of_page
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
sort t_ut[].
DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = layout
it_fieldcat = fcat[]
i_save = 'A'
is_variant = variant
it_events = events[]
TABLES
t_outtab = t_ut
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " DISPLAY_DATA -
How to find out query name using Elements of the query builder.
Hi SDNers,
how to find out query name using Elements of the query .
thanks,
satyaaHi,
For having a look at the relation between BEx tables,check the link below:
http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
-Vikram -
How to find the File name using the FTP Adapter
hi all,
how to find the File name using the FTP Adapter with BPEL.
RegardsFound the solution for this.
First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
Thanks for the posts -
How to find the query name using infoset name
Hi Experts
Iam new to the sap queries(SQ01,SQ02), some queries already created.
now i want to do some modification, my problem is i am not able to find the query name.
I know the infoset name, can you tell me how to find the query name using the infoset name, is ther any table for this.
i tried in sq01 also, but its confusion, pls advice me on this.
thanks in advance.
regards
rajaramHi
try like this..
SQ02 --> go to --> Query Directory..
from there you can get all the queries belong to a Infoset. -
How to find which datasource are using tables AFRU ,CAUFV and AUFM
*how to find which datasource are using tables AFRU ,CAUFV and AUFM*
Hi,
You can enter your table names in SE11 transaction and click "Display" and again click "Where -Used-List". Then it will show all the places where these tables are used(Datasources)
Hope this helps.....
Regards,
SUman -
How to save OTF to Memory using E_PRINT_PO?
HI All,
How to save OTF to Memory using this FM: ME_PRINT_PO.
Please let me know.
AshokNo, it should be there, becos inside that FM this fm is also calling, SAVE_OTF_TO_MEMORY. but it is calling in Enhancement point. im not able to put the break point there. i think that code is not executing.
im getting this error: Breakpoint not set since enhancement ISAUTO_SCH_EMM_SAPLMEDRUCK is switched off.
Please help me on this.
Ashok.. -
How to find reports which are using sales tables
Hi Guys,
we are using OBIEE 10g version.Here i need to identify the the reports which are using sales tables.
Table names are given but how to find which report is using these tables.Is there any method to find
or we have to check all reports manually?
Could any one pls suggest me here!
Regards,
sk
Edited by: 912736 on Jun 8, 2012 1:24 PMHi SK,
You can run a report from catalog manager that willl give you all answers requests and the subject area columns in use, you can map these back to the sales tables either manually or by linking (vlookup) to an RPD report that you can run from the Admin tool.
The Usage Tracking method is pretty good but you will have to match up the reports using the Logical SQL.
I'd do both methods and cross ref your results to ensure nothing slips the net.
Regards
Alastair -
How to find all the infotypes used for LSO?
Folks,
Can anyone help me on how to find the related infotypes used for LSO?
Thank
SHi,
In addition to puneet's information:
Training and Event Mgmt infotypes:
Prices (Infotype 1021)
Availability Indicators (Infotype 1023)
Capacity (Infotype 1024)
Depreciation Meter/Validity (Infotype 1025)
Business Event Info (Infotype 1026)
Site-Dependent Additional Info (Infotype 1027)
Address (Infotype 1028)
Business Event Type Info (Infotype 1029)
Procedure (Infotype 1030)
Mail Address (Infotype 1032)
Name Format (Infotype 1034)
Schedule (Infotype 1035)
Costs (Infotype 1036)
Billing/Allocation Info (Infotype 1037)
Business Event Blocks (Infotype 1041)
Schedule Model (Infotype 1042)
Demand (Infotype 1060)
Web Link (Infotype 1061)
Knowledge Link (Infotype 1062)
Business Event Group Info (Infotype 1063)
Thanks,
Anil.G -
How to find a annotation object using plugin API?
How to find a annotation object using plugin API?
You would use PDPage methods to find out how many on a page, and to
get them in turn.
Aandi Inston -
How to find the NodeManager Status using WLST
Hi All,
can anyone please let me know how to find the nodemanager status using wlst, the nodemanager status whether it is 'Reachable' or not.
Thank you.Hi Bob,
As James pointed, we faced the same. We could not find any mbean to find the Node Manager Stat that we can monitor from Weblogic console.
The best I can suggest, use the below WLST command after connecting to 'Node Manager:
nm()
Currently connected to Node Manager to monitor the domain xxxdomain.Grep for 'connected to Node Manager to monitor the domain <Your WLS domain name>' and if successfull, your node manager is UP & Connected other wise not 'Reachable'.
Regards,
qumar -
How to find which datasource is using table JCDS?
How to find which datasource is using table JCDS?
Hi,
Please find the below link and identify whether will it meet your requirement or not ... If it meets your requirement then I can provide you more documents related to the same which we have in our project. We were using the same for Plant Maintanance project...
For this report the required information is gathering from the different data sources from the ECC system. This report requires object status functional location attributes, Equipment attributes and some specific information apart from normal transaction data for an order.
u2022 Main feeding data sources for this report are 2LIS_17_ORDER and 2LIS_18_ORDER.
u2022 Requires the object status data (system status, number object status and un-number system status) is feeding from different DSO where the status data is staging with different data flow.
u2022 Requires the Order planned end date which is dependent on the operation planned completion date. so we are feeding this field from Operationu2019s DSO where the planned date is staging with different data flow.
u2022 Required characteristic data and attributes of the Functional location is getting from the master data .The 0FUNCT_LOC is updating by master data data sources
u2022 Required standard class of the functional location is updating from other DSO where the classification data is staging with the help of different data flow.
2LIS_17_ORDER and 2LIS_18_ORDER Data flow Details : No enhancement was done for these data sources .
Status Data Flow Details:
The status data is staged because ,this dat is required for the reports based on the Orders, Operations , Notifications, Functional Location and Equipment.
To load suitable data to different DSOs from the Status DSO we maintain the Filters for status profile and status at DTP level.
Required status change dates are deriving based on changed on date ,system status while loading from status DSO to Order DSO.
The system status ,Number object status and un- numberd object status are feeding from status DSO only.The status DSO is updating by u20180TE_OBJ_STATUS_HISTu2019.This Is based on the tables JCDS,JSTO and T000.
JCDS MANDT = JSTO MANDT
JCDS OBJNR = JSTO OBJNR
T000 MANDT = JCDS MANDT
This DS has enhanced for the below two fields
1. Order Number
2. Operation/Activity Number
The Logic to populate the above two fileds is as below.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e4/1522bae6aa46b8802dca454e846d58/frameset.htm
regards
BVR
Maybe you are looking for
-
Do i need to do "something" for my mac mini to see my sata drive?
Hi guys Problem: After replacing a failing HDD, I have connected a sata cable from inside my mini to an external sata drive and my mini does not recognise my new drive as an internal drive or in disk utility. Modification: I have removed my failing i
-
I think I have an issue with my hard disk.
Hey guys, I have a macbook pro 2011, 6GB RAM, 500GB HDD running 10.8.5. I seem to have a strange problem. Any song or video I play off my itunes or internal hard disk freezes and skips on both itunes and Quicktime player. However if I play the same s
-
My iPad screen went dark. Still dark when I try powering on and off. Tried charging, hear the sound but screen stays dark, doesnt react to button - any idea?
-
TS1292 It just won't work!(app store gift cards code)
Please help!!!!!!
-
[svn:osmf:] 10703: Extending regions unit tests some more.
Revision: 10703 Author: [email protected] Date: 2009-09-29 16:35:07 -0700 (Tue, 29 Sep 2009) Log Message: Extending regions unit tests some more. Modified Paths: osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/gateways/TestR