Latch Contention issues
Hi,
We recently upgraded the oracle version from 9.07 to 9.08. Since the upgrade out application has been performing poorly. We spoke to the Oracle DBAs and they identified this to be a latch contention problem. They changed the cursor sharing from exact to similar. They even increased the buffer cache size. But we continue to have performance issues with the database.
Had anyone come across latch contention issues and how was it resolved? Is there is a bug in 9.08 version? Do we think of downgrading it back to 9.07?
Please suggest.
Hi,
shared pool housekeeping is not as simple as you imagine it to be. It's not like at any given moment of time there is only one "correct" child cursor, the rest being subject to purging, it's much more complex, and the exact housekeeping algorithms are not accessible to us users. Plus, you only have several child curors; I once had over a hundred and raised a SR to that effect -- the customer support represebtatuve said that cursor sharing mechanisms in Oracle aren't perfect and unless one has thousands of child cursors one shouldn't be worried.
Best regards,
Nikolay
Similar Messages
-
Hi,
Apologies for double posting!
I had posted this query to the SQL and PL/SQL forum last week.
Result cache latch contention: http://forums.oracle.com/forums/thread.jspa?threadID=1553667&tstart=0*
Posting it here again as I am trying to better understand the RC Latch behavior before using it in our production system.
Thanks!
Edited by: kedruwsky on Oct 10, 2010 9:32 PMsb92075 wrote:
Latches exist to manage potential contention.
What else do you not understand?
Since latches exist, they will used used regardless if you understand or not.That was profound!
Did you check the results of the 3 test cases that were executed to check how the RC Latch was used?
Results of the test cases show how many times the latch was acquired (per invocation and throughout the iterations).
I want to understand the why behind the results?
i.e. 2 latch GETS per request and acquire/release of the latch when there is a change in the request signature.
Also, result of test case 3 does not fit with the observations of test case 1 & 2.
Concurrent executions of the test cases have shown degraded performance.
Thus, I am not ready to implement this feature until I understand how it works and if there are any ways to reduce the contention. -
Thread Contention Issue , Help !
public class vipThread implements Runnable
private static volatile boolean lockMe=false;
public synchronized static boolean getLock ()
return lockMe;
public synchronized static void setLock (boolean lock)
lockMe = lock;
public void run ()
synchronized(this)
if(!this.getLock ()) {
this.setLock(true);
ret = vipRequestProcessor.getNewRequests ();
this.setLock(false);
getNewRequests is not a synchronized method. Do i need to have it synchronized ? i do have a thread contention issue here. Couple of threds pickup the same request fromt he database.
Help appreciated
thanks
praspublic class vipThread implements Runnable
private static volatile boolean lockMe=false;
public synchronized static boolean getLock ()
return lockMe;
public synchronized static void setLock (boolean
an lock)
lockMe = lock;
public void run ()
synchronized(this)
if(!this.getLock ()) {
this.setLock(true);
ret = vipRequestProcessor.getNewRequests ();
this.setLock(false);
getNewRequests is not a synchronized method. Do i need
to have it synchronized ? i do have a thread
contention issue here. Couple of threds pickup the
same request fromt he database.
Help appreciated
thanks
prasIf the "getNewRequests() method is only called from your vipThread, then you don't have thread contention problem. -
Reducing shared pool latch contention
I see a lot of shared pool latch contention on my 11gR2 database because there are over 100 identical schemas that run identical SQL. This causes lots of child cursors to be created. Scheduled jobs kick off hourly for every schema at the same time and that produces contention for shared pool latches for the same parent cursor.
I want to reduce that contention. Here's my question...
If I make the SQL text unique by either
(a) changing the object referenbes from "TableName" to "SchemaName.TableName", or
(b) adding a comment to the SQL that includes the SchemaName
...will that cause a separate cursor to be created in the shared pool?
I know in older versions even a change in a comment would cause Oracle to treat it as a separate statement. Is that still true in 11gR2?
FWIW cursor_sharing is set to EXACT.Chuck1958 wrote:
If I make the SQL text unique by either
(a) changing the object referenbes from "TableName" to "SchemaName.TableName", or
(b) adding a comment to the SQL that includes the SchemaName
...will that cause a separate cursor to be created in the shared pool?
I know in older versions even a change in a comment would cause Oracle to treat it as a separate statement. Is that still true in 11gR2?
Yes:
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL> select * /* schema1 */ from t where x=0;
no rows selected
SQL> select * /* schema2 */ from t where x=0;
no rows selected
SQL> select sql_id, child_number, sql_text
2 from v$sql
3 where sql_text like '%/* schema%';
SQL_ID CHILD_NUMBER SQL_TEXT
4d03bxnvbw4ac 0 select * /* schema2 */ from t where x=0
76xtkkpvfqx1h 0 select * /* schema1 */ from t where x=0
b3zjvv0cfbhrx 0 select sql_id, child_number, sql_text fr
om v$sql where sql_text like '%/* schema
%' -
http://clerccenter.gallaudet.edu/temp/various-flash-tests/flash-fix-test.html
hi - go to the above. i followed the instructions and info
from other postings and am able to get an HTML page generated by
Flash to take care of that IE browser active content problem.
http://clerccenter.gallaudet.edu/temp/various-flash-tests/fix-embedded.html
then go to the above link. this is the SWF file placed onto a
blank HTML page with Dreamweaver. Obviously, the active content fix
does not work now. so my question is how do i get this to work when
i want to place flash content on my page through using DW?
I read somewhere that i may need to link up the JS file. can
someone help me with that? PS - i'm not good with writing JS code.
thanks.Deaf Mike,
> I read somewhere that i may need to link up the JS file.
can
> someone help me with that? PS - i'm not good with
writing
> JS code.
The IE Active Content issue is a pretty popular one lately,
as you can
imagine. The easiest, most convenient solution I know of is
to use a tiny
JavaScript application called FlashObject. -- Scratch that. I
just learned
that the developer felt compelled by Adobe to change the name
of his free
product to SWFObject. (Sigh.) Okay, so it's SWFObject, then.
And a
beautiful piece of code it is. Give it a shot, Mike. Very
easy to use.
But if you have questions, write back.
http://blog.deconcept.com/swfobject/
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
I ran a query and was monitoring it. I found high values for db_sequential_reads and later high values for latch free. I was monitoring using V$SESSION_WAIT. how confirm if there was any latch contention. Initial investigation pushing me to understand that there should be something wrong with a table and associated index. It may be a case of 'hot blocks' which are getting repeatedly touched by the query. The suggested fix is adding more FREELISTS. But the question is my tbale properties show an empty entry against FREELISTS for the table/indexes and I am on 9.2.0.7.Do the suggestions suit my case and are my interpretions correct?
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=114 Card=1 Bytes=186
1 0 SORT (GROUP BY) (Cost=93 Card=1 Bytes=186)
2 1 FILTER
3 2 NESTED LOOPS (Cost=89 Card=1 Bytes=186)
4 3 HASH JOIN (Cost=88 Card=1 Bytes=162)
5 4 MERGE JOIN (CARTESIAN) (Cost=73 Card=1 Bytes=135)
6 5 MERGE JOIN (CARTESIAN) (Cost=35 Card=1 Bytes=122
7 6 TABLE ACCESS (BY INDEX ROWID) OF 'PSNVSBOOKREQ
UST' (Cost=3 Card=1 Bytes=46)
8 7 NESTED LOOPS (Cost=34 Card=1 Bytes=103)
9 8 HASH JOIN (Cost=31 Card=1 Bytes=57)
10 9 TABLE ACCESS (FULL) OF 'PS_YYXX_GL_ME_TB
L' (Cost=14 Card=1 Bytes=23)
11 9 VIEW OF 'PS_CSXX_XLATTABLE' (Cost=17 Car
d=2 Bytes=68)
12 11 SORT (UNIQUE) (Cost=17 Card=2 Bytes=13
3)
13 12 UNION-ALL
14 13 FILTER
15 14 TABLE ACCESS (BY INDEX ROWID) OF
'PSXLATITEM' (Cost=2 Card=1 Bytes=51)
16 15 INDEX (RANGE SCAN) OF 'PSAPSXL
ATITEM' (NON-UNIQUE) (Cost=1 Card=21)
17 14 SORT (AGGREGATE)
18 17 FILTER
19 18 INDEX (RANGE SCAN) OF 'PS_PS
XLATITEM' (UNIQUE) (Cost=2 Card=1 Bytes=26)
20 13 FILTER
21 20 NESTED LOOPS (Cost=3 Card=1 Byte
s=82)
22 21 TABLE ACCESS (BY INDEX ROWID)
OF 'PSXLATITEMLANG' (Cost=2 Card=1 Bytes=54)
23 22 INDEX (RANGE SCAN) OF 'PS_PS
XLATITEMLANG' (UNIQUE) (Cost=2 Card=1)
24 21 TABLE ACCESS (BY INDEX ROWID)
OF 'PSXLATITEM' (Cost=1 Card=1 Bytes=28)
25 24 INDEX (UNIQUE SCAN) OF 'PS_P
SXLATITEM' (UNIQUE)
26 20 SORT (AGGREGATE)
27 26 FILTER
28 27 INDEX (RANGE SCAN) OF 'PS_PS
XLATITEM' (UNIQUE) (Cost=2 Card=1 Bytes=26)
29 8 INLIST ITERATOR
30 29 INDEX (RANGE SCAN) OF 'PS_PSNVSBOOKREQUS
T' (UNIQUE) (Cost=5 Card=43)
31 6 BUFFER (SORT) (Cost=32 Card=1 Bytes=19)
32 31 TABLE ACCESS (BY INDEX ROWID) OF 'PS_YYXX_BC
TRL_TBL' (Cost=1 Card=1 Bytes=19)
33 32 INDEX (RANGE SCAN) OF 'PS0YYXX_BCTRL_TBL'
(NON-UNIQUE) (Cost=1 Card=4)
34 5 BUFFER (SORT) (Cost=72 Card=564 Bytes=7332)
35 34 TABLE ACCESS (FULL) OF 'PS_SET_CNTRL_GROUP' (C
ost=38 Card=564 Bytes=7332)
36 4 TABLE ACCESS (FULL) OF 'PS_NVS_SCOPE_FIELD' (Cost=
14 Card=3606 Bytes=97362)
37 3 TABLE ACCESS (BY INDEX ROWID) OF 'PS_NVS_REPORT' (Co
st=1 Card=1 Bytes=24)
38 37 INDEX (UNIQUE SCAN) OF 'PS_NVS_REPORT' (UNIQUE)
39 2 SORT (AGGREGATE)
40 39 VIEW OF 'PS_YYXX_XLATTABLE' (Cost=17 Card=2 Bytes=54
41 40 SORT (UNIQUE) (Cost=17 Card=2 Bytes=133)
42 41 UNION-ALL
43 42 FILTER
44 43 FILTER
45 44 TABLE ACCESS (BY INDEX ROWID) OF 'PSXLATIT
EM' (Cost=2 Card=1 Bytes=51)
46 45 INDEX (RANGE SCAN) OF 'PS_PSXLATITEM' (U
NIQUE) (Cost=2 Card=1)
47 43 SORT (AGGREGATE)
48 47 FILTER
49 48 INDEX (RANGE SCAN) OF 'PS_PSXLATITEM' (U
NIQUE) (Cost=2 Card=1 Bytes=26)
50 42 FILTER
51 50 NESTED LOOPS (Cost=3 Card=1 Bytes=82)
52 51 TABLE ACCESS (BY INDEX ROWID) OF 'PSXLATIT
EMLANG' (Cost=2 Card=1 Bytes=54)
53 52 INDEX (RANGE SCAN) OF 'PS_PSXLATITEMLANG
' (UNIQUE) (Cost=2 Card=1)
54 51 TABLE ACCESS (BY INDEX ROWID) OF 'PSXLATIT
EM' (Cost=1 Card=1 Bytes=28)
55 54 INDEX (UNIQUE SCAN) OF 'PS_PSXLATITEM' (
UNIQUE)
56 50 SORT (AGGREGATE)
57 56 FILTER
58 57 INDEX (RANGE SCAN) OF 'PS_PSXLATITEM' (U
NIQUE) (Cost=2 Card=1 Bytes=26)
59 2 SORT (AGGREGATE)
60 59 TABLE ACCESS (BY INDEX ROWID) OF 'PS_YYXX_GL_ME_TBL'
(Cost=4 Card=1 Bytes=29)
61 60 INDEX (RANGE SCAN) OF 'PS_YYXX_GL_ME_TBL' (UNIQUE)
(Cost=2 Card=5)
[\pre]
Message was edited by:
Elvis
Message was edited by:
Elvis -
Latch contention in Oracle 10.2.0.4
Hello All,
There is one script which takes 8 hours to complete on one of our Oracle 10.2.0.3 databases.
The TKPROF Output shows the below Wait events:
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file scattered read 28965 0.00 0.00
db file sequential read 1394318 0.00 0.00
SQL*Net message to client 4467645 0.00 0.00
SQL*Net message from client 4467645 0.00 0.00
latch: shared pool 2847 29.05 864.44
latch: library cache 1221 5.78 389.93
latch: row cache objects 126 0.58 2.39
latch: cache buffers chains 2765 0.02 0.16
log file sync 3 0.00 0.00
latch free 63 1.06 1.71
latch: object queue header operation 5 0.00 0.01
SQL*Net break/reset to client 1156 0.00 0.00
read by other session 21609 0.99 3.99
latch: library cache lock 1 0.01 0.01How can we reduce the "latch: shared pool" and "latch: library cache" wait/contentions?
The script in question runs 95 SELECT Statements, 3 UPDATE Statements and 1 INSERT Statement.
For more information, please let me know. Thanks.
Suddhasatwa.
Edited by: user13021719 on Mar 16, 2012 12:27 AMThanks for the above note.
yes the numbers are correct: there are 95 SELECT statements only in the program as well as in the TRACE file.
From the output of TKPROF I can see these 2 SELECT Statements taking maximum of these wait events:
TKPROF: Release 10.2.0.4.0 - Production on Fri Mar 16 01:25:38 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: hr84tax_ora_3391.trc
Sort options: exeela fchela prsela
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT PAYCALL2.PAY_BEGIN_DT, PAYCALL2.PAY_END_DT, PAYCALL2.CHECK_DT,
PSPCL1.COMPANY, PSPCL1.PAYGROUP, PSPCL1.PAY_END_DT, PSPCL1.PAGE_NUM,
PSPCL1.LINE_NUM, PSPCL1.OFF_CYCLE, PSPCL1.SEPCHK, PSPCL1.EMPLID,
PSPCL1.CHECK_DT, PSPCL1.PAYCHECK_OPTION, PSPCL1.PAYCHECK_STATUS
FROM
PS_PAY_CHECK PSPCL1, PS_PAY_CALENDAR PAYCALL2, PS_PAY_CAL_BAL_ID BALL1
WHERE PAYCALL2.COMPANY = BALL1.COMPANY AND PAYCALL2.PAYGROUP =
BALL1.PAYGROUP AND PAYCALL2.PAY_END_DT = BALL1.PAY_END_DT AND
BALL1.BALANCE_ID = :1 AND PAYCALL2.CHECK_DT >= :2 AND
PAYCALL2.CHECK_DT <= :3 AND PSPCL1.COMPANY = :4 AND PSPCL1.EMPLID
= :5 AND PSPCL1.COMPANY = PAYCALL2.COMPANY AND PSPCL1.PAYGROUP
= PAYCALL2.PAYGROUP AND PSPCL1.PAY_END_DT = PAYCALL2.PAY_END_DT AND
PSPCL1.PAYCHECK_STATUS IN ('F','R','A') ORDER BY PAYCALL2.CHECK_DT
call count cpu elapsed disk query current rows
Parse 11087 0.00 0.60 0 0 0 0
Execute 15222 0.00 17.59 11 22 0 0
Fetch 30444 0.00 16726.93 976663 8991463 0 23572
total 56753 0.00 16745.12 976674 8991485 0 23572
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 28
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
latch: shared pool 60 1.34 10.00
latch: library cache 22 0.34 0.86
SQL*Net message to client 41531 0.00 0.00
SQL*Net message from client 41531 0.00 0.00
db file sequential read 976663 0.00 0.00
latch: cache buffers chains 2 0.00 0.00
latch: object queue header operation 2 0.00 0.00
SELECT JB.OFFICER_CD, JB.EMPL_CLASS, JB.JOBCODE, JB.PAYGROUP,
JB.BUSINESS_UNIT, JB.STD_HOURS, JB.STD_HRS_FREQUENCY, JB.COMPRATE,
JB.EMPL_STATUS, JB.TAX_LOCATION_CD, JB.LOCATION, JB.EMPL_TYPE, JB.HOURLY_RT,
JB.EFFDT, JB.EFFSEQ, JB.EMPL_RCD, JB.DEPTID, JB.SETID_JOBCODE, JB.ESTABID,
JB.SAL_ADMIN_PLAN, JB.FICA_STATUS_EE, JB.SETID_LOCATION
from
PS_JOB JB Where JB.EMPLID = :1 AND JB.COMPANY = :2 AND JB.EFFDT =
(SELECT MAX(JB1.EFFDT) FROM PS_JOB JB1 WHERE JB1.EMPLID = JB.EMPLID
AND JB1.COMPANY = JB.COMPANY AND JB1.EFFDT <= :3) AND JB.EFFSEQ = (SELECT
MAX(JB2.EFFSEQ) FROM PS_JOB JB2 WHERE JB2.EMPLID = JB.EMPLID AND
JB2.COMPANY = JB.COMPANY AND JB2.EFFDT = JB.EFFDT) ORDER by JB.EFFDT,
JB.EFFSEQ
call count cpu elapsed disk query current rows
Parse 14305 0.00 1.62 0 0 0 0
Execute 25852 0.00 62.80 0 44 0 0
Fetch 51704 0.00 2429.58 167169 1036420 0 25888
total 91861 0.00 2494.01 167169 1036464 0 25888
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 28
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
latch: shared pool 242 9.08 66.46
latch: library cache 108 5.78 61.32
latch: row cache objects 23 0.06 0.20
SQL*Net message to client 66009 0.00 0.00
SQL*Net message from client 66009 0.00 0.00
db file sequential read 167169 0.00 0.00
latch free 1 0.04 0.04
read by other session 1 0.00 0.00
********************************************************************************The OEM tuning advisor does not recommend any tuning options for these.
Please advice.
For more information, please let me know.
Thanks
Suddhasatwa
Edited by: user13021719 on Mar 16, 2012 12:27 AM -
Flash Player 10.3 content issues
I'm having issues with flash videos and content being positioned in the upper left corner of the screen. And then the content flickers when you move the mouse. I've noticed there are some web sites with flash video where there is no problem, but on a lot of sites I use, I encounter this problem. I have an HP laptop with Windows 7 Service Pack 1 64 bit, and Internet Explorer 9. I did not have any problems until I downloaded and installed flash player 10.3. I've tried uninstalling and reinstalling several times to no avail. It's obvious from my observation that this a problem with the program and Adobe needs to fix it ASAP.
Hi. I have same problem.
This problem occured on following platform.
Windows 7 Ultimate x64 Edition Japanese Service Pack 1
Ineternet Explorer 9 x86
Flash Player 10,3,181,14
On Flash Player 10.2.159.1 and below, this problem doesn't occur.
Following platform, this problem doesn't occur.
Windows Vista Ultimate x86 Edition Japanese Service Pack 2
Ineternet Explorer 9 x86
Flash Player 10,3,181,14
I hope it is immediately solved by this problem. -
Hi ,
I am an XML publisher newbie. I looked around in the forums and couldn't find an answer to this. I am using XML Publisher 5.6.2. I created an RTF template and created the Table of contents section using Microsoft word. When I use this template to generate a rtf document, I am able to see the table of contents. But, the page number always shows up as 0. when I click on the link, it takes me to the correct location in the generated doc. But, there is no way to update the page numbers. Can somebody help?
Thanks!Hi Vetsrini,
I tried exactly what you said. I put <?company?> as heading2 in a for loop. Once I added it , I updated the TOC (entire table). When the output is generated, I can see "Company1", "Company2" etc in my TOC. They are getting dynamically generated. But, the Page number still shows up as zero. When I click on them, it would take me to the correct location. But, the page number would show up as zero. I tried this from XML Desktop publisher (using preview). I also tried to generate it through a Java program by calling the APIs. The output is still the same. I have one more issue and I am not sure whether it is related to this or not. I am not able to display the page number in the generated output. I have defined it in the footer in my template. But, the output doesn't show the page number.
Thanks. -
Table of Contents Issue/Question
Hi everyone, I hope I can put my question accurately into words.
I'm working on a 450 page product catalog in Indesign CS5 for the mac. The catalog has 7 main sections, in which there are numerous smaller sections. I need to create a table of contents for these smaller sections, however, my issue is this; my table of contents is based on the product names which I've applied a paragraph style to, but, also included on the same line that the product name is, are several small icons. I used the library function to put these icons into place. I put my curser where I wanted the icons to be, went to the library, right clicked on the icon I wanted, and selected place item. I found this to be the easiest way since there were approximately 1500 products in the catalog. So, my issue is, now that I'm creating a mini-table of contents for these numerous sections, the icons are included in my table of contents, which I don't want. I can manually go in and delete each icon, but I'm thinking there has to be a faster way. I thought of possibly a grep style but can't figure out how to make that work.
Any help would be appreciated! It's going to take a while to delete each one of those. I hope I've described this accurately; please feel free to ask any questions if it's not clear.
Thanks so much!
AnnetteOh my gosh, that did it! Thank you sooooo much!
I couldn't figure out how to choose just those characters because I hadn't designated them as anchored objects; that was throwing me, but I guess Indesign saw them as such.
Thanks again, you've saved me hours of work!
Sincerely,
Annette -
Hi Experts,
I've got a question with regard to the content of mails. After opening the Manager IC role, we open the email workbench. From that location emails get send to specific agents. However, sometimes the content of the mail can be seen in the workbench, but seems to be totally empty after opening the same mail in the inbox after logging in as an employee?
Is anyone familiar with this issue?
With kind regards,
PaulHowever, to my understanding, there should be some
way, some parameters or method call.No. As you have found, ISO-8859-1 and ISO-8859-2 do not contain the ® character, and it is not in ASCII either. Many of the people who receive your e-mails will not be able to display this character, then. You should be able to encode it in UTF-8 (you didn't say why that didn't work) but that still doesn't mean the recipient's mail client can handle it. That's why I recommended (R) as a replacement. -
Sort Order of BIN Location Content Issue
SBO Version 9.0 PL08 HF1
We have an issue with trying to create a stock transfer document from within the 'BIN LOCATION CONTENT' screen. We have selected the option to 'Clear Stock'.
We have sorted the list by Item code and then selected the items we want to include.
We then clicked Stock Transfer > Clear Stock, which then generates a list of items which are either NOT in the order we sorted them by or we not even select on the opening screen.
One thing we have noticed from the system message bar at the bottom is that it has the following message in it:
"One or more selected warehouses or bin locations cannot be cleared or replenished."
This is proving very frustrating so any assistance would be greatly received!
Thanks,
SarahHi,
Please check SAP note:
1978411 - wrong items in stock transfer created from bin location
content list
Thanks & Regards,
Nagarajan -
SharePoint Provider Hosted App: mixed content issue
We have a provider hosted app that needs the SharePoint javascript and CSS files, so in our MVC view we added the following code:
<script src="@Request.QueryString["SPHostUrl"]/_layouts/15/SP.RequestExecutor.js" type="text/javascript"></script><script src="@Request.QueryString["SPHostUrl"]/_layouts/15/sp.js" type="text/javascript"></script>
The provider hosted app runs in HTTPS, our SharePoint environment in HTTP.
The app wants to get those SharePoint javascript and CSS files, but blocked because you try to access files from HTTPS to HTTP.
Example of the error in IE:
SEC7111: HTTPS security is compromised by http://ap/project/blabla/_layouts/15/sp.ui.controls.js
Example of an error in Chrome:
[blocked] The page at 'https://ap:2281/Appname/?SPHostUrl=…' was loaded over HTTPS, but ran insecure content from 'http://ap/project/blabla/_layouts/15/sp.ui.controls.js': this content should also be loaded over HTTPS.
How can we solve this issue without setting our SharePoint environment also to HTTPS?Hi,
We can use the following method to solve this issue.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StyleConsumer.aspx.cs" Inherits="StylesheetAppWeb.StyleConsumer" %>
<!DOCTYPE html>
<html>
<head>
<title>App using stylesheet</title>
</head>
<body>
<!-- The main page title -->
<h1 class="ms-core-pageTitle">Stylesheet app</h1>
<!-- Some subtitle -->
<h1 class="ms-accentText">For people</h1>
<!-- Subtitle comments -->
<h2 class="ms-accentText">who care about the style in their apps</h2>
<p></p>
<div>
<h2 class="ms-webpart-titleText">Get started with style in your app... </h2>
<a class="ms-commandLink" href="#">some command</a>
<br />
This sample shows you how to use some of the classes defined in the SharePoint website's style sheet.
</div>
<!-- Script to load SharePoint resources
and load the blank.html page in
the invisible iframe
-->
<script type="text/javascript">
"use strict";
var appweburl;
(function () {
var ctag;
// Get the URI decoded app web URL.
appweburl =
decodeURIComponent(
getQueryStringParameter("SPAppWebUrl")
// Get the ctag from the SPClientTag token.
ctag =
decodeURIComponent(
getQueryStringParameter("SPClientTag")
// The resource files are in a URL in the form:
// web_url/_layouts/15/Resource.ashx
var scriptbase = appweburl + "/_layouts/15/";
// Dynamically create the invisible iframe.
var blankiframe;
var blankurl;
var body;
blankurl = appweburl + "/Pages/blank.html";
blankiframe = document.createElement("iframe");
blankiframe.setAttribute("src", blankurl);
blankiframe.setAttribute("style", "display: none");
body = document.getElementsByTagName("body");
body[0].appendChild(blankiframe);
// Dynamically create the link element.
var dclink;
var head;
dclink = document.createElement("link");
dclink.setAttribute("rel", "stylesheet");
dclink.setAttribute("href", scriptbase + "defaultcss.ashx?ctag=" + ctag);
head = document.getElementsByTagName("head");
head[0].appendChild(dclink);
// Function to retrieve a query string value.
// For production purposes you may want to use
// a library to handle the query string.
function getQueryStringParameter(paramToRetrieve) {
var params;
var strParams;
params = document.URL.split("?")[1].split("&");
strParams = "";
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split("=");
if (singleParam[0] == paramToRetrieve)
return singleParam[1];
</script>
</body>
</html>
More information is here:
http://msdn.microsoft.com/en-us/library/office/fp179898(v=office.15).aspx
Other materials:
http://sharepoint.stackexchange.com/questions/58731/how-do-i-inherit-the-css-theme-color-in-my-sharepoint-2013-app
http://social.msdn.microsoft.com/Forums/en-US/7d1028fe-e8c6-4d48-8e69-30eef3757522/auto-hosted-app-client-webpart-server-side-code-is-not-working?forum=appsforsharepoint
Best Regards
Dennis Guo
TechNet Community Support -
BI Content Issue: Unable to see few objects..
Dear Friends,
I have following 2 issues.. can any one help me with your experience?
1) For few reasons i would like to activate 0OB* infoobjects. I am unable to find them in my "business content" - any idea where can i get them?
2) I understand that one of my datasource is migrated to 7 and then reverted back to 3.5. For this datasource, I went into Business content to activate a transfer rule.. I am unable to find it.. any reason?
Thank you for your time.
Regards,
HariHello Hari
1. Can you pleaqse check if you are having correct BI content version which contains these objects. Also you can confirm this by searching for these objects in metadata repository -business content objects
2. For your datasource- check if this is activated and replicated on source system side. Also check if you have selected he correct source system in business content installation screen (yellow box with X marked on that)
Regards
Pradip -
Adobe Acrobat 8 Standard v8.2.5 Disappearing Content Issue
We are seeing a very strange behavior in PDFs generated converting a web page using using Adobe Standard 8. It appears that the PDF was generated properly, but as soon as we start scrolling or switching windows, the content of the PDF disappears. The behavior is observed on Windows XP, SP3 machines but we are unable to reproduce the issue. It just happens... Any advise would be much appreciated.
This issue has been resolved. I had to uninstall the 8.3.0 from the machines and then patch the machines again with Adobe Acrobat v8.2.6 before patching the systems again with v8.3.0.
Since Adobe Acrobat quaterly patches are not cumulative, you have to install the patches in order.....8.25 --> 8.2.6 -->8.3.0.
Thanks,
Tee
Maybe you are looking for
-
Satellite P100-192: crackling sound coming from speaker when using MSN
Hello, i have just bought this p100-192 laptop. The speakers seem to muffle ( especially whenever there is an incoming message in MSN ) Does anyone know why and a solution to it ????
-
Scheduling Process chain in end of month & starting of month
Hey Experts, I want to schedule my process chain in different days that is last 2 days of every month & first 3 days of every month... Can any one explain me step by step process how to do it. can you guys help out as soon as early...... Thanks, sur
-
Cant save photo from email IPad 2 iOS 8.1.1
Suddenly there is no option to "save to camera roll" when you long press a photo in an email. What to do?
-
Can't Sync phone with iTunes after 5.0.1 update
Recently updated my 4 to 5.0.1. Now phone won't Sync in itunes. Keeps opening a "Restore". No updates,no music nothing but "restore". Can someone help? Thanks.
-
Can't accept new apple condition changes on my iPad Air
Can't accept new apple condition changes on my iPad Air running 7 1 2 plz help answer me ******** <E-mail Edited by Host>