High user input output (I/O) and physical reads
Hi guys
Recently we have noticed that our database performance degraded significantly. as we looked around in grid control we noticed that the user IO and Physical reads are really high which cause the database to be laggy.
at first we thought it was memory problem, so we added 2gb to sga. we have set sga to be automatic and it's been like this for the past 2 years.
how do i trouble shoot this problem. i haven't found any troubleshooting guide for it yet.
please instruct me on how to solve it
database: 10.2.0.4 sparc
regards
Sina
Top 5 Timed events
db file sequential read 23,582 679 29 46.3 User I/O
CPU time 626 42.7
db file scattered read 3,089 70 23 4.8 User I/O
db file parallel write 3,478 28 8 1.9 System I/O
log file parallel write 4,201 24 6 1.7 System I/O
SGA Memory Summary
SGA regions Begin Size (Bytes) End Size (Bytes) (if different)
Database Buffers 2,768,240,640 2,835,349,504
Fixed Size 2,050,240
Redo Buffers 14,721,024
Variable Size 3,657,439,040 3,590,330,176
Process Memory Summary
Category Alloc (MB) Used (MB) Avg Alloc (MB) Std Dev Alloc (MB) Max Alloc (MB) Hist Max Alloc (MB) Num Proc Num Alloc
B Other 569.22 0 2.62 3.14 22 24 217 217
Freeable 101.63 0.00 0.77 0.45 3 132 132
SQL 91.51 45.35 0.44 0.76 4 78 209 192
PL/SQL 12.50 5.57 0.06 0.07 0 4 217 217
JAVA 5.40 5.38 1.08 0.09 1 2 5 5
E Other 603.20 3.03 3.62 22 24 199 199
SQL 115.21 64.78 0.60 1.67 21 78 191 182
Freeable 112.31 0.00 0.83 0.43 3 135 135
PL/SQL 13.89 5.94 0.07 0.12 1 4 199 199
JAVA 8.93 8.89 1.12 0.23 2 2
for some reason i can't paste a table into this post but if you want i can email you above tables
Similar Messages
-
Difference between "Physical Read Total IO Requests Per Sec" and "Physical Read IO Requests Per Sec"
What is the difference between "Physical Read Total IO Requests Per Sec" and "Physical Read IO Requests Per Sec" metrics in dba_hist_sysmetric_summary?
From docs (Reference, Statistics Descriptions) :
physical read IO requests : Number of read requests for application activity (mainly buffer cache and direct load operation) which read one or more database blocks per request. This is a subset of "physical read total IO requests" statistic.
physical read total IO requests : Number of read requests which read one or more database blocks for all instance activity including application, backup and recovery, and other utilities. -
What causes BUFFER GETS and PHYSICAL READS in INSERT operation to be high?
Hi All,
Am performing a huge number of INSERTs to a newly installed Oracle XE 10.2.0.1.0 on Windows. There is no SELECT statement running, but just INSERTs one after the other of 550,000 in count. When I monitor the SESSION I/O from Home > Administration > Database Monitor > Sessions, I see the following stats:
BUFFER GETS = 1,550,560
CONSISTENT GETS = 512,036
PHYSICAL READS = 3,834
BLOCK CHANGES = 1,034,232
The presence of 2 stats confuses. Though the operation is just INSERT in database for this session, why should there be BUFFER GETS of this magnitude and why should there by PHYSICAL READS. Aren't these parameters for read operations? The BLOCK CHANGES value is clear as there are huge writes and the writes change these many blocks. Can any kind soul explain me what causes there parameters to show high value?
The total columns in the display table are as follows (from the link mentioned above)
1. Status
2. SID
3. Database Users
4. Command
5. Time
6. Block Gets
7. Consistent Gets
8. Physical Reads
9. Block Changes
10. Consistent Changes
What does CONSISTENT GETS and CONSISTENT CHANGES mean in a typical INSERT operation? And does someone know which all tables are involved in getting these values?
Thank,
...Flake wrote:
Hans, gracias.
The table just have 2 columns, both of which are varchar2 (500). No constraints, no indexes, neither foreign key references are in place. The total size of RAM in system is 1GB, and yes, there are other GUI's going on like Firefox browser, notepad and command terminals.
But, what does these other applications have to do with Oracle BUFFER GETS, PHYSICAL READS etc.? Awaiting your reply.Total RAM is 1GB. If you let XE decide how much RAM is to be allocated to buffers, on startup that needs to be shared with any/all other applications. Let's say that leaves us with, say 400M for the SGA + PGA.
PGA is used for internal stuff, such as sorting, which is also used in determing the layout of secondary facets such as indexes and uniqueness. Total PGA usage varies in size based on the number of connections and required operations.
And then there's the SGA. That needs to cover the space requirement for the data dictionary, any/all stored procedures and SQL statements being run, user security and so on. As well as the buffer blocks which represent the tablespace of the database. Since it is rare that the entire tablespace will fit into memory, stuff needs to be swapped in and out.
So - put too much space pressure on the poor operating system before starting the database, and the SGA may be squeezed. Put that space pressure on the system and you may enbd up with swapping or paging.
This is one of the reasons Oracle professionals will argue for dedicated machines to handle Oracle software. -
Executing windows executables with user Input / Output capabilities
Hi all,
I have a command that I can run on the DOS prompt with following output:
C:>runas /smartcard C:/WINDOWS/SYSTEM32/notepad.exe
Reading smart cards........
Using the card in reader 1. Enter the PIN:
Attempting to start C:/WINDOWS/SYSTEM32/notepad.exe as user "MyCertificates DN Printed Here" ...Then notepad opens...viola.
Heres the problem I have doing this in Java. I do not know how to tell Java that while reading
the inputStream (of StreamGobbler type) to prompt me for the PIN like above. It just prints everything out above as if
it is text in my IDE.
Here is my code:
import java.io.*;
class StreamGobbler extends Thread
InputStream is;
String type;
StreamGobbler(InputStream is, String type)
this.is = is;
this.type = type;
public void run()
try
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line=null;
while ( (line = br.readLine()) != null)
System.out.print(type + ">" + line);
} catch (IOException ioe)
ioe.printStackTrace();
public class WinCmd {
* @param args
public static void main(String[] args) {
//cannot have space in front
//String adCmd = "cscript.exe C:\\mailEnable.vbs"; //works
//String adCmd = "C:/WINDOWS/SYSTEM32/ipconfig.exe"; //works
String adCmd = "runas /smartcard C:/WINDOWS/SYSTEM32/notepad.exe";
boolean success = false;
int exitVal = 1; //0 is success, so we default to a nonzero.
try
String osName = System.getProperty("os.name" );
String[] cmd = new String[3];
//specify file to use for NT, XP, and Vista
if( osName.equals( "Windows NT" ) || osName.equals( "Windows XP" ) || osName.equals( "Windows Vista" ) || osName.equals("Windows 2003") ){
cmd[0] = "cmd.exe";
else if ( osName.equals("Windows 95")){
cmd[0] = "command.com";
else {
System.out.println("Must execute from Windows 95, NT, XP, 2003, or Vista system.");
System.exit(1);
cmd[1] = " /C "; //tells os to terminate process when complete.
cmd[2] = adCmd;
String[] cmdOther = new String[1];
cmdOther[0] = "runas /smartcard";
//Execute process
//Process proc = Runtime.getRuntime().exec(cmd);
Process proc = Runtime.getRuntime().exec(adCmd, cmdOther);
// any error message / output?
StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
//start output / error catching
errorGobbler.start();
outputGobbler.start();
// wait for process to finish and output exit value.
exitVal = proc.waitFor();
System.out.println("ExitValue: " + exitVal);
System.out.flush();
if (exitVal == 0) {
success = true;
else {
success = false;
} catch (Exception e) {
e.printStackTrace();
} Here is output:
OUTPUT>Reading smart cards...Using the card in reader 1. Enter the PIN:...
OUTPUT>
ExitValue: 1This output is what I see from my IDE, Elipse. Only difference is Java never prompted me to enter my PIN, it just output the "OUTPUT" stream as text...
ideas?
SKOkay, made a little progress.
I created a new subClass called OutputGobbler that should be able to send the pin back to the inputStream of the Process object.
I also created a set / get bean for storing the pin. It all works up till it executes, then I get an ExitValue of 1.
What I think is happening is that the OutputGobbler IS writing the pin correctly...but its just not in the correct format for the
runas executable. This is because the exit value is 1, which means invalid function, which is usually caused by bad syntax.
Here is the updated code, I am posting entire code since much has changed. Output is below.
import java.io.*;
class StreamGobbler extends Thread
InputStream is;
String type;
private String pin;
StreamGobbler(InputStream is, String type)
this.is = is;
this.type = type;
this.pin = "Hello";
public String getPin () {
return this.pin;
public void setPin (String pin) {
this.pin = pin;
public void run()
try
String localPin = null;
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line=null;
while ( (line = br.readLine()) != null) {
//try and find the request for PIN text in the output stream
int idx = 0;
idx = line.indexOf("Enter the PIN:");
//if found prompt user for input.
if (idx != -1) { //-1 means no match found.
System.out.print("Enter the PIN:");
BufferedReader stdin = new BufferedReader( new InputStreamReader( System.in ) );
localPin = stdin.readLine();
System.out.println("Pin entered: " + localPin);
this.setPin(localPin);
//System.out.println(type + "--" + line);
catch (IOException ioe)
ioe.printStackTrace();
class OutputGobbler extends Thread
String types;
OutputStream os;
String pin;
OutputGobbler(OutputStream os, String types, String pin)
this.os = os;
this.types = types;
this.pin = pin;
public void run()
try
OutputStreamWriter osw = new OutputStreamWriter(os);
BufferedWriter bw = new BufferedWriter(osw);
bw.write(pin);
bw.newLine();
catch (Exception ioe)
ioe.printStackTrace();
public class WinCmd {
* @param args
public static void main(String[] args) throws IOException {
//cannot have space in front
//String adCmd = "runas /smartcard C:/WINDOWS/SYSTEM32/notepad.exe";
String adCmd = "C:\\WINDOWS\\SYSTEM32\\runas.exe /smartcard C:\\WINDOWS\\SYSTEM32\\notepad.exe";
boolean success = false;
int exitVal = 1; //0 is success, so we default to a nonzero.
try
/*String osName = System.getProperty("os.name" );
String[] cmd = new String[3];
//specify file to use for NT, XP, and Vista
if( osName.equals( "Windows NT" ) || osName.equals( "Windows XP" ) || osName.equals( "Windows Vista" ) || osName.equals("Windows 2003") ){
cmd[0] = "cmd.exe";
else if ( osName.equals("Windows 95")){
cmd[0] = "command.com";
else {
System.out.println("Must execute from Windows 95, NT, XP, 2003, or Vista system.");
System.exit(1);
cmd[1] = " /C "; //tells os to terminate process when complete.
cmd[2] = adCmd;
String[] cmdOther = new String[1];
cmdOther[0] = "C:\\WINDOWS\\SYSTEM32\\runas.exe /smartcard";
//Execute process
//Process proc = Runtime.getRuntime().exec(cmd);
Process proc = Runtime.getRuntime().exec(adCmd, cmdOther);
// any error message / output?
StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
//start output / error catching and capture pin
errorGobbler.run();
outputGobbler.run();
//redirection pin to process
OutputGobbler oGobbler = new OutputGobbler(proc.getOutputStream(), "INPUT", outputGobbler.getPin());
System.out.println("Pin retrieved from getPin: " + outputGobbler.getPin());
oGobbler.run();
// wait for process to finish and output exit value.
exitVal = proc.waitFor();
System.out.println("ExitValue: " + exitVal);
System.out.flush();
if (exitVal == 0) {
success = true;
else {
success = false;
} catch (Exception e) {
e.printStackTrace();
}Output:
C:\Program Files\Java\jdk1.6.0_05\bin>java -cp "C:\MyJava" WinCmd
Enter the PIN:12345
Pin entered: 12345
Pin retrieved from getPin:12345
ExitValue: 1
C:\Program Files\Java\jdk1.6.0_05\bin>So it seems I can pass the pin between Thread objects successfully. But I do not know how to pass the Operating system the correct
format.
Currently I'm trying "bw.write(pin)" hoping that the pin (as String type) will be put in the correct format, but it is not.
I also tried:
bw.write(pin);
bw.newline();
also
bw.write(pin.toCharArray());
bw.newline();
All give same error of ExitValue 1.
Frustration is setting in...
SK -
Repeating User input (such as name and date) on each page automatically
Is there a way of having the information provided by the user on one page, such as name and date, automatically repeated on separate pages (perhaps as a header/footer.) The input would be via Reader only.
I have an application form of four pages, after the first page there is no direct unique evidence linking the remaining pages to the first.
Basically I want each page when printed to have an identifier, so that in the event of the pages getting mixed up, they can be put back together.
Any advice gratefully acceptedHi,
you can sole your problem with many way...
- You can use Global binding, so user nter data one time and every field with the same name automaticaly get the same value.
- You can use some Javascritp to obtain similar effects (more complicated but more fexible):
Create a Js Object (name it Global for Example).
Create some variables, i.e.: var field1;
Place one field in master pages and in their initialize event use the statement below:
Global.field1 = this;
In this way you obtayn a refernce that you can use everywhere in your form.
For example you can write: Global.field1.rawValue = "Hello word";
I hope this helps :-)
Bye.
Roberto.
(sorry for my poor english); -
Consistent gets and physical reads
Hi all,
I am tuning a DM SQL query, by comparing execution plans with STAR TRANSFORMATION enabled or disabled. I got the following results:
STAR TRANSFORMATION ON
74889 consistent gets
254365 physical reads
STAR TRANSFORMATION OFF
1945892 consistent gets
168028 physical reads
I thought a physical read would be counted as a logical read as well, because the data block would be read from disk (1 physical IO), placed in the buffer cache and then read from there (1 more logical IO or consistent get).
So, one physical IO does not cause a logical IO?
Thanks!
Edited by: user10634835 on 12-Jul-2011 08:40But shouldn't consistent gets be >= physical reads (Since, as per my understanding, 1 PIO causes at least 1 LIO)? In this case it is not.
74889 consistent gets
254365 physical readsJust clarifying for my knowledge.
regards -
Parrallel query and physical reads
Hi I have ran a query in uing OPQ degree 12 several time, but in subsiquent runs, im still seeing physical reads, should the data not be cached after the first run..
ie, run 4 is shown below:
Statistics
33 recursive calls
0 db block gets
4866 consistent gets
3146 physical reads
0 redo size
7373850 bytes sent via SQL*Net to client
293742 bytes received via SQL*Net from client
26668 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
400002 rows processedhttp://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1027523970333
parallel query may use direct io, it may not use direct io.
parallel query may use the buffer cache, it may bypass it.
And in the next followup.
Tom, in what conditions parallel query would entirely bypass buffer cache? Thanks.
Followup June 15, 2005 - 10am Central time zone:
when it does direct IO to read the blocks.
" -
User view output in IE and the output is in portrait but should be in landscape
No issue create BI template. Completed successfully run in oracle 11.5.10.2 and able to print it out in landscape as expected.. BUT when user click the "view output" button. The IE pop up open the output file. when user either save it or print it, it will save and print in Portrait even the BI template is landscape. Anything I can do to "fix" it so user save and print the output from IE stay in landscape?
FushanFirst, I would try disabling any Add-ons like Adblock Plus, or NoScript.
Second, possibly try disabling anti-virus
Third, if that didn't do it, I would then Restart FF in Safe Mode, and see if that worked.
Then, re-enable each individually, to see which is causing it. -
User input in short notation and then full description of it ...
Hi,
well I have solve this problem:
Notation:sorry something went wrong :)
Hi,
well I have solve this problem:
Notation: Meaning:
A Ace
2...10 Card values
J Jack
Q Queen
K King
D Diamonds
H Hearts
S Spades
C Clubs
The program shoul print the full description of the card, for example 4H -> Four of Heart
I tried this method to solve:
I Implemented a class Card with the constructor and a getDescription method (should return a description of the card)
if the the notation is not in the correct format the method should return "unknown" ...
here is what i tried can someone please help me I dont really know how the solve this:
public class Card {
* Construct a Notation object
* @param notation
public Card (String notation)
nota = notation ;
public void getDescription ()
if (nota == "A")
System.out.println("Ace of ");
String[] cv={"Ace","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Jack","Queen","King"};
String[] cb={"A","2","3","4","5","6","7","8","9","10","J","Q","K"};
String out="";
for (int j=0;j<cv.length;j++) {
if (nota.startsWith(cb[j])) {
out+=cv[j]+" of ";
break;
if (nota.endsWith("D")) out+="Diamonds";
else if (nota.endsWith("H")) out+="Hearts";
else if (nota.endsWith("S")) out+="Spades";
else out+="Clubs";
System.out.println(out);
}Then I want to use a CardTester Class to test the Class Card ...
public class CardTester {
public static void main (String[] args)
Card notation = new Card;
} -
Enable and encourage user input in PDFs (viewed with Adobe Reader)
with FrameMaker-to-Acrobat TimeSavers + Form Assistant
Half-hour webinar (free; no fluff, no hype, no nonsense)
Wednesday, June 5, starting 9am PDT
Register at: https://www3.gotomeeting.com/register/157658438
Enabling PDFs for various types of user input can strengthen the interaction between users and the content, and improve satisfaction due to greater user involvement/control. In addition, designated avenues for user input can contribute to documentation quality and provide outlet for frustration, for example by sending inputs regarding the documentation or the product directly from within the PDF.
Techniques demonstrated in this webinar include features that are all embedded in PDFs that are viewed with the free Adobe Reader:
• text fields where users can record data values and options
• checkboxes to track progress
• page marks and notes (optionally e-mailed)
• embedded grading/feedback forms
• storing of useful search queries within the PDF for future use
Shlomo Perets
MicroType, http://www.microtype.com
FrameMaker/Acrobat/Captivate training & consulting • FM-to-Acrobat TimeSavers/Assistantshttps://crash-stats.mozilla.com/report/index/bp-0a0b872f-5127-4ee1-a355-ca3cb2120721
https://crash-stats.mozilla.com/report/index/bp-9cd87dd7-205f-4844-9e6d-3ce262120721
https://crash-stats.mozilla.com/report/index/bp-8c07c846-b2ed-4535-8db4-4ee072120720
https://crash-stats.mozilla.com/report/index/bp-f29a89ed-f8b1-4a62-ba3e-983e22120720
https://crash-stats.mozilla.com/report/index/bp-e16d2b91-0f7d-4e5a-9e25-255852120718
https://crash-stats.mozilla.com/report/index/bp-1226c709-5f87-41c6-95d3-4310d2120718
https://crash-stats.mozilla.com/report/index/bp-4de2a0da-dd36-4ec8-8e53-c42742120714
https://crash-stats.mozilla.com/report/index/bp-e16d2b91-0f7d-4e5a-9e25-255852120718
https://crash-stats.mozilla.com/report/index/bp-4de2a0da-dd36-4ec8-8e53-c42742120714
https://crash-stats.mozilla.com/report/index/bp-eac1c5a5-2dce-4415-b645-07a1f2120714
https://crash-stats.mozilla.com/report/index/bp-1ede5bd3-8c72-4362-8d79-4f29c2120714
https://crash-stats.mozilla.com/report/index/bp-d4fd5dae-dacd-45f8-9549-2c3702120722
https://crash-stats.mozilla.com/report/index/bp-ca510991-de29-44b3-be02-0255a2120722
https://crash-stats.mozilla.com/report/index/bp-8600c221-3fd3-4eaa-a5af-a602b2120722
With Hardware Accelaration in Flash turned off. Still crashing. -
Dealing w/ User Input and Multiple Objects
I am trying to write a simple interface where a user inputs his/her name and id and then a Patron object is created based on their given input. I am having trouble when there are multiple patrons. My problem is referencing the different Patron objects with the different names and id's. I was wondering how I could maybe filter through the objects to retrieve the one that I want. He is some code.
With this works for me because each object has a unique name:
lib.addBook(book);
lib.addBook(book2);
lib.addPatron(patron);
lib.addPatron(patron2);
This does not work though because each patron object being added has the same name:
System.out.print("\nName: ");
name = br.readLine();
System.out.print("ID: ");
id = br.readLine();
pat = new Patron(name, id);
lib.addPatron(pat);
If I did not explain my problem well please let me know. Thanks.Without any interface I can create my objects like this giving them all unique names, such as patron1, patron2, patron3, and so on.
lib.addBook(book);
lib.addBook(book2);
lib.addPatron(patron);
lib.addPatron(patron2);
With and interface I am having trouble finding a way to give each object a unique name. This is my code for adding a new patron to the Hashset.
System.out.print("\nName: ");
name = br.readLine();
System.out.print("ID: ");
id = br.readLine();
pat = new Patron(name, id);
lib.addPatron(pat);
How can I reference a specific object in the Hashset? This is my problem. Thanks. -
Calling report from a form with user input parameters
Hello,
I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
vrepid := FIND_REPORT_OBJECT ('REPTEST');
vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
But this doesnt work.
Also, Should the parameters defined in the forms and reports have the same name?Thanks for the quick response Denis.
I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
My WHEN_BUTTON_PRESSED trigger is as below:
DECLARE
report_id report_object;
vrep VARCHAR2 (100);
v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
v_report_server VARCHAR2 (30) := 'repserver90';
BEGIN
report_id:= find_report_object('REPTEST');
-- Call the generic PL/SQL procedure to run the Reports
RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
END;
... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
PROCEDURE RUN_REPORT_OBJECT_PROC(
report_id REPORT_OBJECT,
report_server_name VARCHAR2,
report_format VARCHAR2,
report_destype_name NUMBER,
report_file_name VARCHAR2,
report_otherparam VARCHAR2,
reports_servlet VARCHAR2) IS
report_message VARCHAR2(100) :='';
rep_status VARCHAR2(100) :='';
vjob_id VARCHAR2(4000) :='';
hidden_action VARCHAR2(2000) :='';
v_report_other VARCHAR2(4000) :='';
i number (5);
c char;
c_old char;
c_new char;
BEGIN
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
c_old :='@';
FOR i IN 1..LENGTH(report_otherparam) LOOP
c_new:= substr(report_otherparam,i,1);
IF (c_new =' ') THEN
c:='&';
ELSE
c:= c_new;
END IF;
-- eliminate multiple blanks
IF (c_old =' ' and c_new = ' ') THEN
null;
ELSE
v_report_other := v_report_other||c;
END IF;
c_old := c_new;
END LOOP;
hidden_action := hidden_action ||'&'|| v_report_other;
hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
-- run Reports
report_message := run_report_object(report_id);
rep_status := report_object_status(report_message);
IF rep_status='FINISHED' THEN
vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
message('job id is'||vjob_id);pause;
WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
ELSE
--handle errors
null;
END IF;
In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
Thanks in advance.
Edited by: user10713842 on Apr 7, 2009 6:05 AM -
(High Ip input) on My router , I need to troubleshoot why CPU is high !!!!
=================
i have a cisco router 7200 NPEG2 processor , worked as LNS for PPPOVPDN circuits (Router for ADSL clients)
i have "high ip input on my processor" and there is alot of differnce on my router between operations done by cef and operations done by router cpu
as an example , lets make show cpu process sorted
CPU utilization for five seconds: 67%/54%; one minute: 67%; five minutes: 68%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
87 10837056 46891299 231 6.31% 6.04% 6.32% 0 IP Input
122 4081972 38214106 106 2.47% 2.36% 2.46% 0 L2X Data Daemon
270 467844 2089101 223 0.79% 0.78% 0.79% 0 PPP Events
275 1862224 2102444 885 0.71% 0.73% 0.71% 0 SNMP ENGINE
112 627104 93588 6700 0.39% 0.36% 0.37% 0 CEF: IPv4 proces
273 854004 4207368 202 0.31% 0.26% 0.24% 0 IP SNMP
52 453256 12321 36787 0.31% 0.31% 0.31% 0 Compute load avg
258 295540 701580 421 0.23% 0.17% 0.15% 0 RADIUS
142 45792 14107303 3 0.23% 0.21% 0.21% 0 HQF Shaper Backg
78 86532 166975 518 0.23% 0.17% 0.13% 0 ACCT Periodic Pr
260 483164 248673 1942 0.23% 0.19% 0.24% 0 L2TP mgmt daemon
272 63980 1073491 59 0.15% 0.16% 0.15% 0 IPHC Admin
77 111560 184597 604 0.15% 0.08% 0.06% 0 AAA ACCT Proc
261 330572 217566 1519 0.15% 0.12% 0.15% 0 L2TUN Applicatio
274 450584 2102164 214 0.15% 0.15% 0.15% 0 PDU DISPATCHER
16 152352 1081873 140 0.07% 0.08% 0.19% 0 EnvMon
279 229040 27298 8390 0.07% 0.10% 0.11% 0 VTEMPLATE Backgr
40 23704 53593 442 0.07% 0.03% 0.02% 0 Net Background
95 4512 55604 81 0.07% 0.00% 0.00% 0 PPP Hooks
109 6844 62029 110 0.07% 0.00% 0.00% 0 IP Background
269 21384 1931910 11 0.07% 0.06% 0.07% 0 PPP manager
271 116 60672 1 0.07% 0.00% 0.00% 0 Multilink PPP
23 98400 321 306542 0.00% 0.07% 0.03% 0 AAA high-capacit
=====================
as we see above , we have high "IP Input" about differnece in cpu =67-54=13 % , which is high value process in software .
i follwed the article here :
http://www.cisco.com/c/en/us/support/docs/routers/7500-series-routers/41160-highcpu-ip-input.html
i check and found that my router is fine ,
no arp calls.
no routing loops.
no flapping links.
i checked that my router has cef enabled and no enormous routing protocol updates
i found that i have big differnce between hardware & software process on the router which is 13 %
but when the traffic is more and more , the cpu reach reach 93 % and begin to have drops.
i just want to ask , how can i debug the operations that are done on the cpu processor of the router ???
i mean that if i know that traffic , i can estimate and know the problem that increasing my cpu !!!
another question :
how to debug the packest that has a ttl exceeded 50 or ttl exceeded 100 ?????
i dont wan tto make debug ip packed , because i have a huge traffic and it will let my router hanged due to large debug !!
===============
righ now i will post my router config and some verification:
drvirus#sh running-config
Building configuration...
Current configuration : 12291 bytes
upgrade fpd auto
version 12.4
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
no service dhcp
hostname drvirus
boot-start-marker
boot system flash disk2:c7200p-adventerprisek9-mz.124-24.T7.bin
boot system flash disk2:c7200p-adventerprisek9-mz.124-24.T8.bin
boot-end-marker
logging message-counter syslog
aaa new-model
aaa group server radius radiusservers
server-private 10..f.f.f auth-port 1812 acct-port 1813 key 7 weifuhjkefkjdbhfjkasbfjka
aaa authentication login adminstaff local
aaa authentication login sdm_vpn_xauth_ml_1 group radius
aaa authentication login ahmad local
aaa authentication ppp vpdn group radiusservers local
aaa authentication ppp drvirus local
aaa authentication ppp vpdn1 local group radiusservers
aaa authentication ppp ddd none
aaa authentication ppp dddd none
aaa authentication ppp anyok none
aaa authorization network default group radius local
aaa authorization network vpdn group radiusservers local
aaa authorization network sdm_vpn_group_ml_1 local
aaa authorization network drvirus local
aaa authorization network vpdn1 local group radiusservers
aaa authorization network ddd none
aaa authorization network anyok none
aaa accounting delay-start
aaa accounting update newinfo periodic 10
aaa accounting network vpdn
action-type start-stop
broadcast
group radiusservers
aaa server radius dynamic-author
client xxxxxxxx
client 10.xxxxxx
client 10.xxxxxxxxx
server-key 7 dihcbsdjkbvcsdhmbvhsdbvsdhmbvsd
auth-type any
aaa session-id common
clock timezone GMT+3 3
no ip subnet-zero
no ip source-route
no ip gratuitous-arps
ip cef
no ip bootp server
ip domain name drvirus
ip name-server x.x.x.x.x
ip name-server 8.8.8.8
login block-for 180 attempts 3 within 60
login quiet-mode access-class telnet
login on-failure log
login on-success log
no ipv6 cef
ipv6 dhcp pool vvv
prefix-delegation pool version6
address prefix 3333::/64
dns-server 4444::1
multilink bundle-name authenticated
vpdn enable
vpdn logging
vpdn logging local
vpdn history failure table-size 50
vpdn-group eeeeeeeeeeee
accept-dialin
protocol l2tp
virtual-template 1
terminate-from hostname qqqqqq
local name rrrrrrr
lcp renegotiation on-mismatch
l2tp tunnel password 7ekfhjjeklfnlenfl
l2tp tunnel timeout no-session 60
ip mtu adjust
username drvirus@!34`!512&$8#$232!^@^FGsdGD privilege 0 password 7 000sdkjhvsdkjvnah94313085g2355091407458E32425D
interface Loopback1
ip address ttttttt 255.255.255.255
interface GigabitEthernet0/1
description ttttttt
ip address 10.60.60.2 255.255.255.0 secondary
ip address 10.200.200.200 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
load-interval 30
duplex auto
speed auto
media-type rj45
negotiation auto
interface GigabitEthernet0/1.4
encapsulation dot1Q 4
ip address ttttttttt 255.255.255.224
interface GigabitEthernet0/1.14
encapsulation dot1Q 14
ip address 192.168.50.3 255.255.255.0
interface FastEthernet0/2
no ip address
shutdown
duplex auto
speed auto
interface GigabitEthernet0/2
ip address 10.160.150.2 255.255.255.0
duplex auto
speed auto
media-type rj45
negotiation auto
interface GigabitEthernet0/3
description rrrrrrr
ip address xxxxxxx 255.255.255.252
no ip redirects
no ip unreachables
no ip proxy-arp
load-interval 30
duplex full
speed 1000
media-type sfp
negotiation auto
interface Virtual-Template1
ip unnumbered Loopback1
ip tcp adjust-mss 1412
no logging event link-status
peer default ip address pool xxxxx xxxxxx
ppp mtu adaptive
ppp authentication pap vpdn1
ppp authorization vpdn1
ppp accounting vpdn
router eigrp 2
redistribute connected metric 1 2 1 2 1
passive-interface default
no passive-interface GigabitEthernet0/1
network 10.200.200.200 0.0.0.0
no auto-summary
eigrp router-id 2.2.2.2
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.200.200.2
ip route dddddddddd 255.255.255.0 fffffff
ip route ddddddddd 255.255.255.0 ffffff
no ip http server
no ip http secure-server
ip radius source-interface GigabitEthernet0/2
radius-server attribute nas-port format d
radius-server configure-nas
radius-server host ddddddddddd auth-port 1812 acct-port 1813 key 7 dddddddddd
radius-server retransmit 0
radius-server key 7 dddddddddddddddddd
radius-server vsa send cisco-nas-port
radius-server vsa send accounting
radius-server vsa send authentication
control-plane
drvirus#sh ip traffic
IP statistics:
Rcvd: 92454889 total, 5908020 local destination
0 format errors, 94 checksum errors, 3789577 bad hop count
0 unknown protocol, 23360 not a gateway
0 security failures, 0 bad options, 3730347 with options
Opts: 0 end, 0 nop, 0 basic security, 0 loose source route
0 timestamp, 0 extended security, 0 record route
0 stream ID, 0 strict source route, 3730347 alert, 0 cipso, 0 ump
0 other
Frags: 1409002 reassembled, 485 timeouts, 0 couldn't reassemble
4542214 fragmented, 9089659 fragments, 2659413 couldn't fragment
Bcast: 6024 received, 0 sent
Mcast: 56503 received, 31033 sent
Sent: 15839581 generated, 2407203241 forwarded
Drop: 23 encapsulation failed, 0 unresolved, 0 no adjacency
0 no route, 0 unicast RPF, 0 forced drop
0 options denied
Drop: 0 packets with source IP address zero
Drop: 0 packets with internal loop back IP address
0 physical broadcast
ICMP statistics:
Rcvd: 0 format errors, 0 checksum errors, 0 redirects, 4 unreachable
140579 echo, 33742 echo reply, 0 mask requests, 0 mask replies, 0 quench
0 parameter, 0 timestamp, 0 timestamp replies, 0 info request, 0 other
0 irdp solicitations, 0 irdp advertisements
0 time exceeded, 0 info replies
Sent: 0 redirects, 3530 unreachable, 33744 echo, 140579 echo reply
0 mask requests, 0 mask replies, 0 quench, 0 timestamp, 0 timestamp replies
0 info reply, 46795 time exceeded, 0 parameter problem
0 irdp solicitations, 0 irdp advertisements
TCP statistics:
Rcvd: 19285 total, 0 checksum errors, 7 no port
Sent: 39402 total
BGP statistics:
Rcvd: 0 total, 0 opens, 0 notifications, 0 updates
0 keepalives, 0 route-refresh, 0 unrecognized
Sent: 0 total, 0 opens, 0 notifications, 0 updates
0 keepalives, 0 route-refresh
IP-EIGRP statistics:
Rcvd: 39154 total
Sent: 39275 total
PIMv2 statistics: Sent/Received
Total: 0/0, 0 checksum errors, 0 format errors
Registers: 0/0 (0 non-rp, 0 non-sm-group), Register Stops: 0/0, Hellos: 0/0
Join/Prunes: 0/0, Asserts: 0/0, grafts: 0/0
Bootstraps: 0/0, Candidate_RP_Advertisements: 0/0
Queue drops: 0
State-Refresh: 0/0
IGMP statistics: Sent/Received
Total: 0/0, Format errors: 0/0, Checksum errors: 0/0
Host Queries: 0/0, Host Reports: 0/0, Host Leaves: 0/0
DVMRP: 0/0, PIM: 0/0
Queue drops: 0
UDP statistics:
Rcvd: 5632168 total, 0 checksum errors, 9605 no port
Sent: 15536481 total, 0 forwarded broadcasts
OSPF statistics:
Rcvd: 0 total, 0 checksum errors
0 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
Sent: 0 total
0 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
ARP statistics:
Rcvd: 36012 requests, 25 replies, 0 reverse, 0 other
Sent: 3590 requests, 1883 replies (41 proxy), 0 reverse
Drop due to input queue full: 0
drvirus#sh interfaces switching
GigabitEthernet0/1 ffff
Throttle count 0
Drops RP 29334 SP 0
SPD Flushes Fast 183378 SSE 0
SPD Aggress Fast 0
SPD Priority Inputs 196591 Drops 0
Protocol IP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 50222652 1410586379 38933488 2377282438
Cache misses 0 - - -
Fast 2501299905 502401799 1732463443 1178236678
Auton/SSE 0 0 0 0
Protocol DEC MOP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 104 8008
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol ARP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 36178 2170680 3643 233084
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol CDP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 1039 385469 2067 772027
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol Other
Switching path Pkts In Chars In Pkts Out Chars Out
Process 2266 138297 6179 370740
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
NOTE: all counts are cumulative and reset only after a reload.
Interface FastEthernet0/2 is disabled
GigabitEthernet0/2
Throttle count 0
Drops RP 0 SP 0
SPD Flushes Fast 785 SSE 0
SPD Aggress Fast 0
SPD Priority Inputs 1900 Drops 0
Protocol IP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 382927 34296776 382540 106683985
Cache misses 0 - - -
Fast 198 31569 0 0
Auton/SSE 0 0 0 0
Protocol DEC MOP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 104 8008
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol ARP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 1900 114000 1813 108780
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol CDP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 1030 378010 1031 378377
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol Other
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 6180 370800
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
NOTE: all counts are cumulative and reset only after a reload.
GigabitEthernet0/3 drvirus
Throttle count 0
Drops RP 15 SP 0
SPD Flushes Fast 22435 SSE 0
SPD Aggress Fast 0
SPD Priority Inputs 194236 Drops 0
Protocol IP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 40507058 2970006619 56462488 1872816742
Cache misses 0 - - -
Fast 1758170357 386468928 2449949282 3706868609
Auton/SSE 0 0 0 0
Protocol DEC MOP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 105 8085
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol ARP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 5 300 7 420
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol CDP
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 1034 379478
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
Protocol Other
Switching path Pkts In Chars In Pkts Out Chars Out
Process 0 0 6180 370800
Cache misses 0 - - -
Fast 0 0 0 0
Auton/SSE 0 0 0 0
NOTE: all counts are cumulative and reset only after a reload.
drvirus#sh ip route summary
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Overhead Memory (bytes)
connected 1 1644 105280 250040
static 3 0 192 456
eigrp 2 0 0 0 0
internal 5 5860
Total 9 1644 105472 256356
Removing Queue Size 0
drvirus#sh ip route summary
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Overhead Memory (bytes)
connected 1 1645 105344 250192
static 3 0 192 456
eigrp 2 0 0 0 0
internal 5 5860
Total 9 1645 105536 256508
Removing Queue Size 0
drvirus#sh ip route summary
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Overhead Memory (bytes)
connected 1 1645 105344 250192
static 3 0 192 456
eigrp 2 0 0 0 0
internal 5 5860
Total 9 1645 105536 256508
Removing Queue Size 0
drvirus#sh ip route summary
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Overhead Memory (bytes)
connected 1 1645 105344 250192
static 3 0 192 456
eigrp 2 0 0 0 0
internal 5 5860
Total 9 1645 105536 256508
Removing Queue Size 0
drvirus#
ANy help ??????!!!!!can some one determin if :
122 9166144 120227216 76 3.30% 2.81% 2.42% 0 L2X Data Daemon
has a relation to my high cpu
her is agian my cpu process :
drvirus#sh processes cpu sorted
CPU utilization for five seconds: 69%/51%; one minute: 62%; five minutes: 59%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
87 22165548 147317354 150 7.60% 6.54% 5.74% 0 IP Input
16 682988 2637213 258 3.61% 0.70% 0.37% 0 EnvMon
122 9166144 120227216 76 3.30% 2.81% 2.42% 0 L2X Data Daemon
270 484700 4987094 97 0.76% 0.84% 0.86% 0 PPP Events
260 746640 483367 1544 0.30% 0.51% 0.51% 0 L2TP mgmt daemon
112 1082540 228491 4737 0.30% 0.31% 0.31% 0 CEF: IPv4 proces
190 596 755 789 0.30% 0.02% 0.00% 2 SSH Process
279 461184 78909 5844 0.30% 0.39% 0.45% 0 VTEMPLATE Backgr
52 954592 29823 32008 0.30% 0.31% 0.31% 0 Compute load avg
272 53744 2782461 19 0.23% 0.17% 0.16% 0 IPHC Admin
261 513524 428266 1199 0.23% 0.38% 0.37% 0 L2TUN Applicatio
142 31888 35627222 0 0.23% 0.19% 0.20% 0 HQF Shaper Backg
258 570384 1602872 355 0.15% 0.18% 0.17% 0 RADIUS
78 43280 392561 110 0.15% 0.10% 0.08% 0 ACCT Periodic Pr
281 52340 385568 135 0.07% 0.08% 0.09% 0 IP-EIGRP: PDM
40 37300 138153 269 0.07% 0.09% 0.10% 0 Net Background
77 145860 443602 328 0.07% 0.06% 0.07% 0 AAA ACCT Proc
110 31060 53876 576 0.07% 0.03% 0.02% 0 IP RIB Update
45 11868 52400 226 0.07% 0.01% 0.00% 0 IF-MGR control p
115 20164 103667 194 0.07% 0.02% 0.00% 0 PPP IPCP
102 181600 489310 371 0.07% 0.14% 0.15% 0 SSM connection m
143 3148 1461382 2 0.07% 0.01% 0.00% 0 RBSCP Background
80 19488 22128 880 0.07% 0.02% 0.00% 0 CDP Protocol
23 189412 10771 17585 0.00% 0.15% 0.04% 0 AAA high-capacit
22 0 1 0 0.00% 0.00% 0.00% 0 CEF MIB API
21 0 2 0 0.00% 0.00% 0.00% 0 ATM Idle Timer
20 376 153594 2 0.00% 0.00% 0.00% 0 ARP Background
24 0 2 0 0.00% 0.00% 0.00% 0 AAA_SERVER_DEADT
25 0 1 0 0.00% 0.00% 0.00% 0 Policy Manager
26 1376 26590 51 0.00% 0.00% 0.00% 0 DDR Timers
31 4 30 133 0.00% 0.00% 0.00% 0 EEM ED Syslog
27 0 5 0 0.00% 0.00% 0.00% 0 Entity MIB API
33 324 147392 2 0.00% 0.00% 0.00% 0 GraphIt
34 0 2 0 0.00% 0.00% 0.00% 0 Dialer event
28 0 2 0 0.00% 0.00% 0.00% 0 Serial Backgroun
36 0 2 0 0.00% 0.00% 0.00% 0 XML Proxy Client -
Date difference calculation with user input variable
Hi,
I have the following requirement in BEx:
The user inputs a date value and I have to calculate the difference between the date entered by the user with the Due Date in the cube, to determine the number of backlog days. Basically, I need to calculate Past Due in number of days. I need to display the Amount due for the Time buckets like 1 -10 days, 11 -30 days.
The report output has to be in the format below:
Columns:
1 u2013 10 days Past Due $100.00
11 u2013 30 days Past Due $15.00
Rows:
Customer#
The cube has data from Jan 2005 to June 2008.
For Eg: User Input Date = 04/30/2008.
It should compare the input date to the due date for each record in the cube.
Any suggestions are appreciated.Hi Kumar,
We have developed simar reports in our previous projects.
You need to follow the following steps.
1. Create a new restricted key figure globally on Past Due $100. Restriction details I will let you know in the ensuing steps.
2. Create another restricted key figure globally on Past Due $15. Restriction details I will let you know in the ensuing steps.
3. Create a Z varuable on Calday and offset it -1 (use the button next to exclude button).
4.Create another Z varuable on Calday and offset it -10 (use the button next to exclude button).
5. Create another Z varuable on Calday and offset it -11 (use the button next to exclude button).
6. Create another Z varuable on Calday and offset it -30(use the button next to exclude button).
7 Restrict the RKF past due 100$ (defined in sl 1)between the variable range defined in 3 and 4.
8. Restrict the RKF past due 15$ (defined in sl 2) between the variable range defined in 5 and 6
Now drag and drop those two RKF to column and you will get the desired result in C1 and C2 as follows:
Columns:
C1 :1 u2013 10 days Past Due $100.00
C2 :11 u2013 30 days Past Due $15.00
If the above info serves your purpose, please reward me with the point.
Regards,
Subha -
Using User Input Rather Than "strStartFolder".
Hi guys!
This script is very simple but it's part of a project I've been working on for some time now. Any VBS guru (or novice for that matter) will be able to tell what it does after a brief scan of the code. Again, like I said, this is a very simple
script.
For newcomers, this script siimply looks for duplicate files in a folder on one or more of your drives.
However, I'm having 2 issues...
First, I need to change the script to where the Wscript engine is used to ask for user input via an InputBox and for that data to be read into a variable which could be "strStartFolder"? If
not, any variable will do, but having to enter in location you wish to search by editing the script manually is not practical.
strStartFolder instead of someone having to edit the code manually each time and enter the path to the folder you wish to scan. In this example, I have last scanned the "Largest Vidz Appz and Musik Folder" on drive H:\. I did this manually
of course...
I have played with this using several methods which all only seemed to work "partially".
The second issue I am having is that you cannot scan just a drive. It MUST be a folder. If you input, for example, "H:\" you will receive an error stating that either permission has been denied or the path cannot be found.
Still being somewhat of a noob myself when it comes to scripting I'm sure there is some simple parameter I can/could have entered to fix this but I tried, "H:\*", H:\*\", H:\*.xxx"\ (.xxx being the extension of course) and other things).
Nothing seems to work but I believe that is because of who the original VBS was coded initially. Again, this is why I come to the greatest resource on the net.
One more thing, when all is said and done the script should ask for a user's input via Wscript so that an InputBox greets them with a message such as, "Please enter the location you wish to scan for duplicates:". And then, depending on their
answer (being of correct syntax, etc, etc) the script runs and outputs a file named "dups.txt" using the Cscript engine.
Please note that I have been running the script as follows to allow for output to a text document. "C:\cscript //nologo FindDuplicates.vbs > duplicates.txt", I would like to avoid having to do this as well if possible but it's ok if not.
Running this script by "double clicking" can be a disaster if you have tons of duplicate files. So asking for user input is the only area where Wscript need be used. But hey, this is why I'm here. For guidance...
This is cake for most of you so I will be interested in seeing the different ways you all come up with resolving this issue.
Anyway, here is the script! Thanks in advance for your help!
Dave
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strStartFolder = "H:\Largest Vidz, Appz and Musik Folder"
Set objFolder = objFSO.GetFolder(strStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
strName = objFile.Name
strPath = objFile.Path
If Not objDictionary.Exists(strName) Then
objDictionary.Add strName, strPath
Else
objDictionary.Item(strName) = objDictionary.Item(strName) & ";" & strPath
End If
Next
ShowSubfolders objFSO.GetFolder(strStartFolder)
For Each strKey in objDictionary.Keys
strFileName = strKey
If InStr(objDictionary.Item(strFileName), ";") Then
arrPaths = Split(objDictionary.Item(strFileName), ";")
Wscript.Echo strFileName
For Each strFilePath in arrPaths
Wscript.Echo strFilePath
Next
Wscript.Echo
End If
Next
Sub ShowSubFolders(Folder)
For Each Subfolder in Folder.SubFolders
Set objFolder = objFSO.GetFolder(Subfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
strName = objFile.Name
strPath = objFile.Path
If Not objDictionary.Exists(strName) Then
objDictionary.Add strName, strPath
Else
objDictionary.Item(strName) = objDictionary.Item(strName) & ";" & strPath
End If
Next
ShowSubFolders Subfolder
Next
End Sub
Again, thank you in advance for your help.. And why is some of my text here in this post showing in smaller font than other text? It seems to be dependent on the line you type on? This is,
of course, not the problem I came here to resolve, I am only curious. ;-)
DB
PAinguINThank you for your response!
So if I used the "MyMessage" variable after the "=" in the line below then the users input should be the folder that is searched as long as your lines are added before this line correct?
Thanks again!
DB
strStartFolder = "H:\Largest Vidz, Appz and Musik Folder"
PAinguIN
Maybe you are looking for
-
Student needing URGENT help with flash presentation...
I am working on a flash presentation with galleries buttons ...basically the full lot. The presentation brief is for a Kiosk - computer in a museum, which when its not being used will go onto a screensaver. So my question is ...after ive done the scr
-
Separate events by date in iPhoto?
I have one event in iPhoto that covers a few days. Is there any way to "separate" the days in the same event so I know which picture was on what day? I would like to not have to click "show photo info" each time and the "split" feature only seems to
-
Collection in where not working
Hi guys, I haven't manage to figure out why this code does not work... maybe I'm missing something and I do not see it declare type tn is table of number; --n tn; -- not good => pls 00642 local type collection n ar_utl2.table_of_num
-
Invoking BPEL process: how to decide it's two way or one way operation
Hi, I'm using IDeliveryService to invoke BPEL process. Is there API available that allows me to check whether the operation is two way so I call IDeliveryService.request() or is one way so I call IDeliveryService.post()? Thanks, Qian
-
Example Servlet XML loader?
I was wondering if anyone might have a good example of a servlet based XML loader routine. I have to write a load routine that will take a XML file, read it into a DOM and then navigate throught doing various validations before putting the info (via