How to avoid Deadlocks ?
Hello friends,
When I'm loading
the data, primarily we are disabling constraints on all tables in a database, after data
loaded into the target tables we are
enabling all constraints on all tables in a database. But the user running a query against tables during the constraints enabling Then there is deadlock
. why there is deadlock? How to
resolve that?
Regards
Anji
>Use batch loading , that during the gap , user would access the table.
That is the best solution.
Deadlock prevention:
http://www.sqlusa.com/bestpractices/deadlock/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012
Similar Messages
-
HOw to avoid DeadLocks when you schedule a Sql Server Agent Job and calling SSIS packages
Hi All,
I have scheduled 2 packages in in Sql Server Agent jobs .
First job which is having Package 1 executing at 11 AM and where I am inserting the data in the table.
Second job which is having Package 2 executing at 12 AM and where I am updating the data in the table based on the first job inserted records.
When I am executing my first job it taking more time and executing till 12 AM and from 12 AM my job 2 also starting ,so getting deadlocks conflicts because inserting happening from job1 and updating happening from Job 2.
How to avoid deadlocks and fix the issue.
Please Suggest .
Thanks & Regards,
AnandHi Anand,
Here is another solution, you can set the Job 2 not to run based on a schedule, and create another SQL Server Agent Job which starts at 12 AM and run with a specified time interval to execute a SQL statement in which you do the following steps:
1. Get the status information of Job 1 using the statement:
DECLARE @i int;
EXEC @i = msdb.dbo.sp_help_job @job_name = ‘Job Name'
2. If the value of @i is 1 which means the status of job 1 is success and current time is, then start the job 2. So, the statement is as follows:
IF @I = 1
EXEC msdb.dbo.sp_start_job @job_name= ‘Job Name’
Regards,
Mike Yin
TechNet Community Support -
How to avoid deadlock - ORA-00060 in trigger
Hi,
We are using 11.2.0.3 and have a trigger which acts upon a mutex table.
Trying to catch when value from other program has changed locked value from 0 to 1 to indicate they have finished.
Once they finished we need to lock the mutex table by updating locked value.
Code below gives error ORA-00060 - deadlock.
Any idea how to avoid but allow us to updat ethe mutex table in trigger at star t to say we are locking and at end to indicate we are finished.
Thanks
CREATE OR REPLACE TRIGGER example_trg AFTER UPDATE
ON por_zic_flags
FOR EACH ROW
when (NEW.locked = '0' and old.locked = '1')
declare
PRAGMA AUTONOMOUS_TRANSACTION;
I INTEGER;
v_locked por_zic_flags.locked%type;
begin
select locked
into v_locked
from por_zic_flags
--where tabname = ‘table name’
for update;
update por_zic_flags set locked = '2';--, guid = '100'; -- unique seq#
commit;
-- call procedure do processing on other tables
-- Now indicate finished processing
select locked
into v_locked
from por_zic_flags
for update;
update por_zic_flags set locked = '0';--, guid = '100'; -- unique seq#
commit;
end;>
Trying to catch when value from other program has changed locked value from 0 to 1 to indicate they have finished.
Once they finished we need to lock the mutex table by updating locked value.
Code below gives error ORA-00060 - deadlock.
Any idea how to avoid but allow us to updat ethe mutex table in trigger at star t to say we are locking and at end to indicate we are finished.
>
Triggers should not be used for non-transactional purposes like this.
A simple SELECT . . . WHERE (myLock = 'UNLOCKED') FOR UPDATE can be used to query the record and lock it if the lock is not already set. Then your code can update the lock value and that will prevent the same query by other users from being successful.
But you haven't really provided any information about what you are trying to do.
If you want to prevent two processes from executing at the same time you can use Oracle's LOCK functionality.
See this thread for how to use DBMS_LOCK to create your own locks that can serialize access to your procedures.
Re: possible to lock stored procedure so only one session may run it at a time? -
I have two portions of codes, code 1.1 simply call the wait() for x, and wait for x to complete some tasks. Code 1.2 calls notify() after all tasks have been completed. The problem is that code 1.1 may miss the notify() from code 1.2. For example, in a network environment, x.wait() may be executed after x.notify(), or the notify() is simply lost. How can I handle this problem? I am thinking about starting a thread(add it as an attribute to x) after the nofify call in code 1.2 to tell the waiters not to wait stop waitting, but the wait() is a final method, I can't overwrite it. It seems that I can't do it that way. Any suggestion? Thank you in advance.
//code 1.1
//x needs to perform some tasks
//let's wait for it to complete
synchronized (x){
x.wait();
//code 1.2
//x completes its tasks
//let's notify the guy who is waiting
synchronized (x){
x.notify();
}First, that's not really deadlock.
How you solve it depends on your requirements.
If it's just that you need 1.1 not to be stuck forever, but it's okay for 1.1 to execute to completion before 1.2 gets to the notify, then you have 1.2 set a flag before calling notify. 1.1 checks that flag before calling wait. If it hasn't been set--meaning 1.2 hasn't gotten around to calling notify--then 1.1 can wait. If the flag has been set--1.2 has already called notify--then 1.1 doesn't wait, and just moves on. -
How to avoid deadlock when multithreading updates one table same time?
Multithreading calls the stored procedure at the same time to update data in one table. For a instance,
Table1
Col1 Col2 Col3
C1 1 1
C1 2 2
C1 3 3
C2 1 1
Table2
Col1 Col2 Col3
C1 1 10
C1 2 4
C1 3 3
C2 1 1
There are several steps I want:
1. Get the data in Table1 where Col1 = C1 in a cursor which has Col1 column and Col2 column.
2. Cycle them one by one, and get the Col3 data from Table2 where Col1 = C1 and Table2.Col2 = Table1.Col2. (Due to deadlock is my concern, we use temp table, definityly it is not a good way. :( )
3. Update Table1 Set Col3 = Table2.Col3.
My new idea is when I get the collection from Table1 which Col1 = C1, I use this way below.
First I set transaction in below way.
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
Then
select * from Table1 where Col1 = C1 for update nowait;
In my opinion, if one thread lock the data for update, other thread won't select out that locked data. Does it work?
Thank you.
Best regards,
AndreasWhy is the data submitted as a collection in the first place?
A collection is great as a program data structure - dealing with program variables. It is a very poor choice to use it to deal with Oracle data in a CRUD fashion.
The purpose, ito dealing with Oracle data, of a PL/SQL collection is for one thing and one thing only - context switching.
To reduce the number of times you need to step out of PL/SQL and into the SQL engine in order to pass data from one to the other. A collection allows you a bigger buffer area and thus less context switches.
And that's it.
A client (Java, C#, etc) that submits data to Oracle to be CRUD via a collection is a design flaw. A collection resides in "expensive" dedicated, non-sharable and non-scalable server memory.
In order to CRUD a collection, you either need to write bare bones feature methods yourself, or cast that collection into a SQL structure and use more powerful and flexible and feature rich SQL against it.
Which then begs the question - why did the client not submit that data directly to the SQL engine, either into a permanent table or a temporary table?
Performance and scalability are issues that need to be addressed at core design level. It is not something that can be tacked on and "fixed" after the fact. So you need to make very sure that your reasons for not wanting to use a temp table (for example), are valid and sound technical reasons. -
i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
SQL> desc sms1;
Name Null? Type
MOBILE NUMBER
RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
SNO NUMBER
INDATE DATE
From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
SQL> desc smssplit;
Name Null? Type
R VARCHAR2(2 CHAR)
C VARCHAR2(2 CHAR)
S VARCHAR2(1 CHAR)
TC VARCHAR2(3 CHAR)
NA VARCHAR2(3 CHAR)
TC2 VARCHAR2(3 CHAR)
NA2 VARCHAR2(3 CHAR)
TC3 VARCHAR2(3 CHAR)
NA3 VARCHAR2(3 CHAR)
TC4 VARCHAR2(3 CHAR)
NA4 VARCHAR2(3 CHAR)
WTHER VARCHAR2(10 CHAR)
SNO NUMBER
INSERTDATA VARCHAR2(25 CHAR)
Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
CREATE OR REPLACE PROCEDURE SPLITSMS
AS
BEGIN
INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
END;
Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
DECLARE
X NUMBER;
JobNumber NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
job => X
,what => 'scott.SPLITSMS;'
,next_date => SYSDATE+1/1440
,interval => 'SYSDATE+1/1440 '
,no_parse => FALSE
:JobNumber := to_char(X);
END;
Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
Now I do not want the duplicate values to be updated ...and want them to ignore them.....
please I need a help on this query........How to avoid the duplicate values............Look at the posts closely:might not be needed if formatted ;)
create or replace procedure splitsms as
begin
insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
select substr(rcstcnatcnatcnatcnawther,1,2) r,
substr(rcstcnatcnatcnatcnawther,3,2) c,
substr(rcstcnatcnatcnatcnawther,5,1) s,
substr(rcstcnatcnatcnatcnawther,6,3) tc,
substr(rcstcnatcnatcnatcnawther,9,3) na,
substr(rcstcnatcnatcnatcnawther,12,3) tc2,
substr(rcstcnatcnatcnatcnawther,15,3) na2,
substr(rcstcnatcnatcnatcnawther,18,3) tc3,
substr(rcstcnatcnatcnatcnawther,21,3) na3,
substr(rcstcnatcnatcnatcnawther,24,3) tc4,
substr(rcstcnatcnatcnatcnawther,27,3) na4,
substr(rcstcnatcnatcnatcnawther,30,10) wther,
sno
from scott.sms1 a
where sno = (select max(sno)
from sms1
where sno != a.sno
); ---------------> added where clause with table alias.
end;Regards
Etbin -
How to avoid Line Items(fields) in BAPI mapping.
Hi
Does any body help me for mapping between header and line items in BAPI..
my scenario is filerfcmail(wokflow)!
File is CSV based :
(ex: 001150,,1123,JERM,08122006,,,
,,,ANN,,01082006,
If you look at example csv file , there is some fields mixed with header and line items. But in RFC header can be 1 to 1 and line item should be 0 to Unbound.
Now my problem is if I sent above example csv file as source :
The payload coming like this(sxmb_moni) :
</HEADERDATA>
- <GLACCOUNTDATA>
- <item>
<COSTCENTER />
<PROFIT_CTR />
</item>
- <item>
<GL_ACCOUNT>738100</GL_ACCOUNT>
<ITEM_AMOUNT>60000</ITEM_AMOUNT>
<COMP_CODE>001150</COMP_CODE>
<ITEM_TEXT>*777-8030-861</ITEM_TEXT>
<COSTCENTER>7320</COSTCENTER>
<PROFIT_CTR>7320</PROFIT_CTR>
<ALLOC_NMBR />
</item>
- <item>
<GL_ACCOUNT>738100</GL_ACCOUNT>
<ITEM_AMOUNT>40000</ITEM_AMOUNT>
<COMP_CODE>001151</COMP_CODE>
<ITEM_TEXT>*777-8030-861</ITEM_TEXT>
<COSTCENTER>6010</COSTCENTER>
<PROFIT_CTR>6010</PROFIT_CTR>
<ALLOC_NMBR />
</item>
<item />
</GLACCOUNTDATA>
You can find there is one more item coming after headerdata with null values. It means map reading first line and one by one , if any field found in rows which belogs to GLAccount(Line item), then it writing one more item after headerdata with that fields only.
Remainig GLAccount data coming as per map after the item .
Can you tell me how to avoid extra line items.
Thanks,
SankarYes, It exist..
I cross checked ..with out givig fileds and giving some fields...its writing another items in after headerdata tag.
hope you understand , what my problem..
See: GLACCOUNTDATA under subnode
item is 0 to unbound in BAPI side, because of this its reading all rows , and if find any field which belongs to GLAccount , then it writing another item tag after headerr data.
Thnaks,
Sankar -
Please let me know how to avoid receiving the spam (from the spam folder on the server) into my email accounts on the iPad. It is very annoying!
My server puts it in a spam folder and I do not receive it in the Ms Outlook on my desk computer...why do I get it on the iPad? Is it avoidable and how?bYou actually cannot do anything to your ipad when its locked but look at pictures the time and date, you need to restore it, and if it dosent let you restore, good luck chuck Heres how to restore it: Okay, i only know the itunes way soz, lol. Try to connect your ipad to itunes, if it does let you then you should be able to select the device you have in the corner somewhere, once you do that you should see a screen that looks sort of like your ipads setting, you should have a button that says "Restore" click that and your ipad should be restored. If that dosent work you should try going to your regular office depot or something. Good Luck!
-
How to avoid printing a blank page when there is 'no data' in the report.
how to avoid printing a blank page when there is 'no data' in the report.
try like this
if@section:IND=1
this template
end ifsectionbreak
if@section:IND=2
this template
end if -
How to avoid creation of _(file.*), coping from tiger to pc?
how to avoid the creation of this file for ever on a pc environment??
I explain: as i copy any image file, it goes to a spooler directory and that begins instantly to process the file to an OPI server, separating CMYK channels, converting it to high and low resolution...
but as this _(file) is created (same name and extension, but 0Kb and with this _ underscore in the beggining of it name), it begins to process it, and as it really does not exists as an image itself, it crashes the OPI server, forcing us to restart it...
and then, you can imagine the mess, because we're a newspaper, with more than 100 machines logged in two cities simultaneously...
thanks for those who replied last topic I posted about some softwares to delete it! it really worked!!
but now, can anyone have a clue how to DON'T create this file?
thanks in advance!
alex borba
[email protected]I believe that command is supposed to stop the creation .DS_Store files on servers. Also, I think the plist file gets written to the user ~/Library/Pref, it probably ought to exist both there and in the /Library/Pref folder to really work.
I didn't think the Save for Web option would work for your purposes. I don't believe anything will work except to strip the resource fork off the files before you send them. There is an Applescript that will do it, using a UNIX command in the script. You select a folder, run the Applescript, and it strips the resource fork off all files in the folder and creates a sub-folder called Stripped with resourceless copies of the files in the original:
-- Strip resource fork and metadata in Tiger for one file.
-- If a folder is selected creates an unresourced subfolder of the selected folder
tell application "Finder"
try
set aFile to the selection as alias
set aFolder to the container of aFile
on error
display dialog "Select a file"
return
end try
set aFile to the quoted form of POSIX path of aFile
do shell script "rsync -a " & aFile & " " & aFile & "Stripped; mv " & aFile & "Stripped " & aFile
update aFolder
end tell
The "do shell script" line must be all a single line in Script Editor. It might wrap funny in the browser. Anyway, copy it, paste into Script Editor, hit compile, and save it as an application. I've only fooled with it a little tiny bit, so I'm not sure whether the rsync process would have any strange effects on complex Photoshop and EPS files or not.
As far as I know the only way to send Mac files without resource forks to a server is to strip them from the files.
Francine -
How can avoid the problem of Parameter Prompting when I submitting ?
I am developing web application in visual studio 2008 in csharp.How can avoid the issue or problem of Parameter Prompting when I send parameters programaticaly or dyanmicaly? I am sending the values from .net web form to crystal report but it is still asking for parameters. so when i submit second time that is when the reports is being genereated. How can i solve this problem. Please help. The code Iam using is below.
1. using System;
2. using System.Collections;
3. using System.Configuration;
4. using System.Data;
5. using System.Linq;
6. using System.Web;
7. using System.Web.Security;
8. using System.Web.UI;
9. using System.Web.UI.HtmlControls;
10. using System.Web.UI.WebControls;
11. using System.Web.UI.WebControls.WebParts;
12. using System.Xml.Linq;
13. using System.Data.OleDb;
14. using System.Data.OracleClient;
15. using CrystalDecisions.Shared;
16. using CrystalDecisions.CrystalReports.Engine;
17. using CrystalDecisions.Web;
18.
19.
20. public partial class OracleReport : System.Web.UI.Page
21. {
22. CrystalReportViewer crViewer = new CrystalReportViewer();
23. //CrystalReportSource crsource = new CrystalReportSource();
24. int nItemId;
25.
26. protected void Page_Load(object sender, EventArgs e)
27. {
28. //Database Connection
29. ConnectionInfo ConnInfo = new ConnectionInfo();
30. {
31. ConnInfo.ServerName = "127.0.0.1";
32. ConnInfo.DatabaseName = "Xcodf";
33. ConnInfo.UserID = "HR777";
34. ConnInfo.Password = "zghshshs";
35. }
36. // For Each Logon parameters
37. foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)
38. {
39. cnInfo.ConnectionInfo = ConnInfo;
40.
41. }
42.
43.
44.
45.
46.
47.
48. //Declaring varibles
49. nItemId = int.Parse(Request.QueryString.Get("ItemId"));
50. //string strStartDate = Request.QueryString.Get("StartDate");
51. //int nItemId = 20;
52. string strStartDate = "23-JUL-2010";
53.
54. // object declration
55. CrystalDecisions.CrystalReports.Engine.Database crDatabase;
56. CrystalDecisions.CrystalReports.Engine.Table crTable;
57.
58.
59. TableLogOnInfo dbConn = new TableLogOnInfo();
60.
61. // new report document object
62. ReportDocument oRpt = new ReportDocument();
63.
64. // loading the ItemReport in report document
65. oRpt.Load("C:
Inetpub
wwwroot
cryreport
CrystalReport1.rpt");
66.
67. // getting the database, the table and the LogOnInfo object which holds login onformation
68. crDatabase = oRpt.Database;
69.
70. // getting the table in an object array of one item
71. object[] arrTables = new object[1];
72. crDatabase.Tables.CopyTo(arrTables, 0);
73.
74. // assigning the first item of array to crTable by downcasting the object to Table
75. crTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[0];
76.
77. dbConn = crTable.LogOnInfo;
78.
79. // setting values
80. dbConn.ConnectionInfo.DatabaseName = "Xcodf";
81. dbConn.ConnectionInfo.ServerName = "127.0.0.1";
82. dbConn.ConnectionInfo.UserID = "HR777";
83. dbConn.ConnectionInfo.Password = "zghshshs";
84.
85. // applying login info to the table object
86. crTable.ApplyLogOnInfo(dbConn);
87.
88.
89.
90.
91.
92.
93. crViewer.RefreshReport();
94.
95. // defining report source
96. crViewer.ReportSource = oRpt;
97. //CrystalReportSource1.Report = oRpt;
98.
99. // so uptill now we have created everything
100. // what remains is to pass parameters to our report, so it
101. // shows only selected records. so calling a method to set
102. // those parameters.
103. setReportParameters();
104. }
105.
106. private void setReportParameters()
107. {
108.
109. // all the parameter fields will be added to this collection
110. ParameterFields paramFields = new ParameterFields();
111. //ParameterFieldDefinitions ParaLocationContainer = new ParameterFieldDefinitions();
112. //ParameterFieldDefinition ParaLocation = new ParameterFieldDefinition();
113.
114. // the parameter fields to be sent to the report
115. ParameterField pfItemId = new ParameterField();
116. //ParameterField pfStartDate = new ParameterField();
117. //ParameterField pfEndDate = new ParameterField();
118.
119. // setting the name of parameter fields with wich they will be recieved in report
120.
121. pfItemId.ParameterFieldName = "RegionID";
122.
123. //pfStartDate.ParameterFieldName = "StartDate";
124. //pfEndDate.ParameterFieldName = "EndDate";
125.
126. // the above declared parameter fields accept values as discrete objects
127. // so declaring discrete objects
128. ParameterDiscreteValue dcItemId = new ParameterDiscreteValue();
129. //ParameterDiscreteValue dcStartDate = new ParameterDiscreteValue();
130. //ParameterDiscreteValue dcEndDate = new ParameterDiscreteValue();
131.
132. // setting the values of discrete objects
133.
134.
135. dcItemId.Value = nItemId;
136.
137. //dcStartDate.Value = DateTime.Parse(strStartDate);
138. //dcEndDate.Value = DateTime.Parse(strEndDate);
139.
140. // now adding these discrete values to parameters
141. //paramField.HasCurrentValue = true;
142.
143.
144.
145. //pfItemId.CurrentValues.Clear();
146. int valueIDD = int.Parse(Request.QueryString.Get("ItemId").ToString());
147. pfItemId.Name = valueIDD.ToString();
148.
149. pfItemId.CurrentValues.Add(dcItemId);
150. //ParaLocation.ApplyCurrentValues;
151. pfItemId.HasCurrentValue = true;
152.
153. //pfStartDate.CurrentValues.Add(dcStartDate);
154. //pfEndDate.CurrentValues.Add(dcEndDate);
155.
156. // now adding all these parameter fields to the parameter collection
157. paramFields.Add(pfItemId);
158.
159. //paramFields.Add(pfStartDate);
160. //paramFields.Add(pfEndDate);
161. /////////////////////
162. //Formula from Crystal
163. //crViewer.SelectionFormula = "{COUNTRIES.REGION_ID} = " + int.Parse(Request.QueryString.Get("ItemId")) + "";
164. crViewer.RefreshReport();
165. // finally add the parameter collection to the crystal report viewer
166. crViewer.ParameterFieldInfo = paramFields;
167.
168.
169.
170. }
171. }Keep your post to under 1200 characters, else you loose the formatting. (you can do two posts if need be).
Re. parameters. First, make sure yo have SP 1 for CR 10.5:
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
Next, see the following:
[Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
CR Dev help file:
http://msdn2.microsoft.com/en-us/library/bb126227.aspx
Samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup -
How to avoid db file parallel read for nestloop?
After upgraded to 11gr2, one job took more than twice as long as before on 10g and 11gr1 with compatibility being 10.2.0.
Same hardware. (See AWR summary below). My analysis points to that Nestloop is doing index range scan for the inner table's index segment,
and then use db file parallel read to read data from the table segment, and for reasons that I don't know, the parallel read is very slow.
AVG wait is more than 300ms. How can I fluence optimier to choose db file sequential read to fetch data block from inner table by tweaking
parameters? Thanks. YD
Begin Snap: 13126 04-Mar-10 04:00:44 60 3.9
End Snap: 13127 04-Mar-10 05:00:01 60 2.8
Elapsed: 59.27 (mins)
DB Time: 916.63 (mins)
Report Summary
Cache Sizes
Begin End
Buffer Cache: 4,112M 4,112M Std Block Size: 8K
Shared Pool Size: 336M 336M Log Buffer: 37,808K
Load Profile
Per Second Per Transaction Per Exec Per Call
DB Time(s): 15.5 13.1 0.01 0.01
DB CPU(s): 3.8 3.2 0.00 0.00
Redo size: 153,976.4 130,664.3
Logical reads: 17,019.5 14,442.7
Block changes: 848.6 720.1
Physical reads: 4,149.0 3,520.9
Physical writes: 16.0 13.6
User calls: 1,544.7 1,310.9
Parses: 386.2 327.7
Hard parses: 0.1 0.1
W/A MB processed: 1.8 1.5
Logons: 0.0 0.0
Executes: 1,110.9 942.7
Rollbacks: 0.2 0.2
Transactions: 1.2
Instance Efficiency Percentages (Target 100%)
Buffer Nowait %: 99.99 Redo NoWait %: 100.00
Buffer Hit %: 75.62 In-memory Sort %: 100.00
Library Hit %: 99.99 Soft Parse %: 99.96
Execute to Parse %: 65.24 Latch Hit %: 99.95
Parse CPU to Parse Elapsd %: 91.15 % Non-Parse CPU: 99.10
Shared Pool Statistics
Begin End
Memory Usage %: 75.23 74.94
% SQL with executions>1: 67.02 67.85
% Memory for SQL w/exec>1: 71.13 72.64
Top 5 Timed Foreground Events
Event Waits Time(s) Avg wait (ms) % DB time Wait Class
db file parallel read 106,008 34,368 324 62.49 User I/O
DB CPU 13,558 24.65
db file sequential read 1,474,891 9,468 6 17.21 User I/O
log file sync 3,751 22 6 0.04 Commit
SQL*Net message to client 4,170,572 18 0 0.03 NetworkIts not possible to say anything just by looking at the events.You must understand that statspacks and AWR actualy aggergate the data and than show the results.There may be a very well possibility that some other areas also need to be looked at rather than just focussin on one event.
You have not mentioned any kind of other info about the wait event like their timings and all that.PLease provide that too.
And if I understood your question corretly,you said,
How to avoid these wait events?
What may be the cause?
I am afraid that its not possible to discuss each of these wait event here in complete details and also not about what to do when you see them.Please read teh Performance Tuning book which narrates these wait events and corresponding actions.
Please read and follow this link,
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm#i18202
Aman.... -
Hi All,
How to avoid the white lines below the selection-options text in the selection screen of the report?
I am seeing light while lines below each selection-options or parameters text
Thanks
aRshi,
don't use simple select-options / parameters
but
<b>selection-screen begin of line</b>
...select-options
... end of line
sample from RFKORD10
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-101.
SELECTION-SCREEN POSITION POS_LOW.
PARAMETERS VSTID LIKE RF140-VSTID.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS DVSTID LIKE RFPDO1-KORD10DV DEFAULT ' '.
SELECTION-SCREEN COMMENT 61(9) TEXT-102.
SELECTION-SCREEN END OF LINE.
A.
Message was edited by:
Andreas Mann -
How to avoid the message in the dashboard report
Hi,
I am developing Dashboard reports(graphs) using WAD. Query and WAD are working fine. I need to put a variable for Calendar Month or Year in the graph .I am populating the Variable with default value initially and I am getting the correct result . But if I change the Variable value second time, I am getting a message (type I(information) ) in the same screen which says that 'You cannot change variable ZCALYEAR_WT01 for charact. 0CALYEAR during query navigation' . And below is the detailed information about the error message.
The Can be changed in query navigation property has been set for variable ZCALYEAR_WT01, characteristic 0CALYEAR. However, the variable is used in the query in such a way, that the system is unable to apply this change-option.
This can, for example, occur under the following conditions:
Characteristic 0CALYEAR is filtered by additional restrictions (the restrictions must be joined using an OR-connection)
A second characteristic, which is restricted by a variable, is compounded to charcteristic 0CALYEAR.
Variable ZCALYEAR_WT01 is a hierarchy node variable, but the hierarchy has not been determined uniquely.
A variable can be changed during query navigation only if it is used exclusively in a drilldown-characteristic, and there are no further restrictions to the characteristic other than this variable. There must be no additional characteristics with variables compounded to the characteristic you are working with. For variables for hierarchy nodes, the hierarchy must be determined uniquely and agree with the set display hierarchy.
Also, if the characteristic value is moved, for example (ZCALYEAR_WT01 - 1), the variable is no longer able to be changed when navigating queries.
System Response
The entry ZCALYEAR_WT01 Can be changed during query navigation is not applied.
Procedure
I checked the query definition and it is not having any offset or any other restrictions for Calendar Year
It is used for finding the total quantity by country for the year .Hence Quantity keyfigure is added in the Keyfigures and Country is in the Rows and Calendar Year is restricted with Variable in the global filter .There are no other fields and no other restrictions .
I am still trying to figure out why the warning apprears in the DashBoard. Since this Dashboard report will be used by the Power users and this warning message will be annoying to them .Hence I need to find how to avoid this message.
Kindly do let me if anyone has faced this and solved earlier.
Thanks for your time.
Thanks & Regards,
RajaHi Nick,
Thanks for your suggestion and it worked for me I added the 'System message' web item and set the visibility to 'Hidden' .Now I am not getting any message. Thank you for both.
Thanks & Regards,
Raja -
Hi,
I used to have an iPhone 3GS, which I recently upgraded to iOS 5 and sold. This device doesn't have any of my personnal information inside anymore (several resets and reinstall iOS5 from an blank iTunes on a seperate computer) and doesn't have my chip inside anymore.
I am using a new smartphone (not Apple) now and when I text friends who have iPhone (with iOS 5 and iMessage), I receive some of the personnal responses on the old iPhone. It seems those messages are sent through iMessage...
How to avoid that? I sold this iPhone and I don't want the buyer to receive my personnal message + I don't want to miss them on my new phone!
Thanks for the help.
Franck.I would suggest you read the user guide. There IS no Facetime App for the iPhone.
http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
< Edited By Host >
Maybe you are looking for
-
ITunes 9.2 not Adding to Library content downloaded from eMusic or Amazon
I have content that I've downloaded from eMusic and Amazon through their respective downloaders. Both downloaders are set to add the content to my iTunes library, but after dwonload, nothing shows up in iTunes. Trying to add the content via File-Add
-
Discrepancy between Aging Report and JE
The invoice is at USD 22,871.20 and in local currency KES 1,975,745.98. The figure showing in the BP aging in local currency is KES 1,979,120.41 yet if I check through the JE, TB and GL the figure is different. An invoice has been raised in BP
-
I'm trying to update Firefox on my Macbook Pro, and it says I don't have sufficient priviledges, and I don't know how to fix that!
-
Modify the title and the label of buton close of the help window popup
Hello everybody. I am looking for a way to modify the title of window popup and the label of the close buton of the popup window help text. In my item template item, I am using the following in order to pop the window help : <a href="javascript:popup
-
Hello, I inserted my Flash movie/website into an html using dreamweaver and uploaded to the site's directory. The movie plays fine in Firefox but in IE it's a tiny version of itself. I uploaded the scripts to the directory as well, I'm not sure why