SQL Timeouts and Blocking Locks

SQL Timeouts and Blocking Locks
Just wanted to check in and see if anyone here has feedback on application settings, ColdFusion settings, JBOSS settings or other settings that could help to limit or remove SQL Timeouts and blocking locks on SID's.
We're using MS SQL 2000 with JBOSS and IIS5.
We've been seeing the following error in our logs that starts blocking locks in SQL:
java.sql.SQLException: [newScale] [SQLServer JDBC Drive] [SQLServer] Lock request time out period exceeded.
Once this happens, we're hosed until we remove the blocking SID in SQL.  These are the connections to the application.
Any feedback would be great.  Thanks!

Hi
This is your exact solution:
Select a.username, a.sid, a.serial#, b.id1, c.sql_text
From v$session a, v$lock b, v$sqltext c
Where b.id1 in( Select distinct e.id1
from v$session d , v$lock e
where d.lockwait = e.kaddr ) and
a.sid = b.sid and
c.hash_value = a.sql_hash_value and
b.request =0;
Thanks
Sarju
Oracle DBA
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by I'm clueless:
Can someone give me the SQL statement to
show if there are any blocking database locks and if so - which user is locking the Database?
Thanks in Advance<HR></BLOCKQUOTE>
null

Similar Messages

  • Dead lock and Blocking Lock

    I would like to understand what is major difference between Dead Locks and Blocking Locks in Oracle. If someone could explain or point me to good web Link I would really appreciate
    Thanks.

    Tony's advise is very good.
    In simple terms a blocking lock is a lock being held by one session that is preventing another session from performing an DML operation on the same data until the holding session commits or rollbacks.
    A deadlock is a situation where two or more sessions lock data in such a manner as each session is waiting on a resource held by another session so that none of the session can complete their unit of work. That is session A locks row 1 then session B locks row 2 followed by session A attempts to lock row 2 while session B now attemps to lock row 1. Neither session A or B will ever be able to complete thier transaction releasing the locks and allowing waiting sessions to process since each session is waiting on a resource that the other session has while holding a resource the other session needs. In other words a deadlock. Oracle detects deadlocks and kills one of the sessions freeing resources.
    HTH -- Mark D Powell --

  • SQL Developer and Blocking View of Other Users' Objects

    I am using SQL Developer in a classroom environment. My student users can “see” Other Users objects. They cannot modify, but none the less can see the structure and data.
    I only want the users to be able to see their own objects. Is there a privilege that needs to be revoked? (In using SQL Plus command line, this was not a problem.)
    Thanks.
    -Karen

    Karen,
    From sysdba account (sys/system). Run following and verify for that particular user grant is revoked. May be exit from sql developer and log back in or refresh view.
    YOu can also potenially revoke all the privs from all non admin uses i.e.r even connect/resource roles and grant them back.
    revoke select any table from yourschemaname;
    revoke connect from schemaname;
    revoke create session from  schemaname;
    revoke resource from schemaname;
    Then just grant privs as need basis
    grant connect to schemanme;
    grant resource to schemaname;
    grant create session to schemaname;
    ..Regards
    Edited by: OrionNet on Jan 23, 2009 2:01 PM

  • SQL to show blocking locks

    Can someone give me the SQL statement to
    show if there are any blocking database locks and if so - which user is locking the Database?
    Thanks in Advance

    Hi
    This is your exact solution:
    Select a.username, a.sid, a.serial#, b.id1, c.sql_text
    From v$session a, v$lock b, v$sqltext c
    Where b.id1 in( Select distinct e.id1
    from v$session d , v$lock e
    where d.lockwait = e.kaddr ) and
    a.sid = b.sid and
    c.hash_value = a.sql_hash_value and
    b.request =0;
    Thanks
    Sarju
    Oracle DBA
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by I'm clueless:
    Can someone give me the SQL statement to
    show if there are any blocking database locks and if so - which user is locking the Database?
    Thanks in Advance<HR></BLOCKQUOTE>
    null

  • V$system_event, timeouts and row lock contention

    Hello everyone,
    What is the meaning of the total_timeouts column in the v$system_event view if it is related to the event "enq: TX - row lock contention"?
    How can we have a timeout since "query timeout" is a non existent concept on Oracle?
    Maybe I am wrong.
    Regards.
    Carl

    Hello everyone,
    What is the meaning of the total_timeouts column in
    the v$system_event view if it is related to the event
    "enq: TX - row lock contention"?
    How can we have a timeout since "query timeout" is a
    non existent concept on Oracle?
    Maybe I am wrong.
    Regards.
    CarlThe value for timeouts, in this case, indicates the number of times one of the sessions had to wait a full 3 second time slice while waiting for a second session to either commit or roll back, in anticipation of a potential primary key violation. If the second session commits, the first session will receive an error indicating a primary key violation.
    Test setup:
    In session 2:
    CREATE TABLE T1 (C1 VARCHAR2(20) PRIMARY KEY);
    INSERT INTO T1 VALUES ('ORACLE');
    In session 1:
    INSERT INTO T1 VALUES ('ORACLE');
    After executing tha above, allow 60 seconds to elapse after the insert in session 1, and then check the delta values in either V$SYSTEM_EVENT or V$SESSION_EVENT:
    20 waits on ENQ: TX - ROW LOCK CONTENTION, 19 timeouts, 59.99 seconds, with an average wait of 2.9995 seconds.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Pavilion Dv5-1009el - Black screen and blink caps lock and block scorr

    Hi,
    I just replaced the motherboard of my pavilion that reported an error as object. The purchased motherboard is new and hp original.
    After having changed, I turn on the pc and work fine, i see the hp logo and enter to bios, after I turned off the pc without starting windows.
    I inserted the battery and powered on the pc and returns to the old error, the LED of caps lock and block Lock blinks...
    So I tried to update the bios from USB using winkey + B. The computer emits two beeps but does not read from any USB port and the LEDs go out for a while and then blink again.
    What can I do?
    Greetings,
    Enzo.

    Hi @shmurray,
    Welcome to the HP Support Forums!
    I understand you are getting a blink pattern on the Caps lock LED, when you turn on the notebook. I am happy to help you with this.
    I am including the page on the error codes for your reference: Blank Screen LED Error Codes
    From that document the pattern you are getting indicates a memory problem. You said that you have tested the memory. What exactly did you try?
    The document suggests reseating the RAM or trying a new set of RAM and then restarting the notebook. If you are still getting a memory problem after trying both of those things, ie a 3 blink code again, then it would likely suggest that there is a problem with the motherboard itself, either with the memory slot or one of the controllers related to memory.
    In that case I would suggest contacting the technical phone support number at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region.
    http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    If however reseating the memory or replacing it leads to a different error code or message please let me know, Although in that case the following may be helpful if you still have a blank screen.
    Troubleshooting Black Screen Displays with No Error Messages During Startup or Boot
    Here are some other sources I found that may be helpful to you.
    Resolving Problems with Notebook Displays (Windows 7 and Windows 8)
    I hope that this is helpful to you.
    Regards,
    Malygris1
    I work on behalf of HP
    Please click Accept as Solution if you feel my post solved your issue, it will help others find the solution.
    Click Kudos Thumbs Up on the right to say “Thanks” for helping!

  • VISA viWrite() hangs and instrument locks up

    Config:
    NI USB-GPIB-HS on Win 7 SP1.  
    VISA32.dll  
    talking to an HP8164A
    Issue:
    Unpredictable timeouts and then lock up on a viWrite() call.  I had a large program that was stopping after various calls to viWrite() so I made a simple program that simply does the follwoing over and over again (NI I/O Trace shown):
    viWrite (GPIB0::20 (0x020653F0), "*IDN?..", 7, 7)
    viRead (GPIB0::20 (0x020653F0), "HEWLETT-PACKARD,HP816...", 20480, 48)
    This will work for an unpredicatable number of times a then timeout on the viWrite() call with fewer than the 7 bytes returned.  Once it times out the instrument locks up and I can't get it to respond to further viWrites() (i.e. times out with 0 bytes returned).  The only way I can get the instrument back to operation is to restart it, which is very painful and basically makes the application unusable.
    Does anyone know how to troubleshoot this problem?  Is there something I need to do after the viWrite() timeout to make the instrument responsive again?  I could handle the error condition in my code if I could get the instrument to respond again.

    Just by looking at your second answer, this seems like a problem with the instrument itself…
    Specifically for timeouts, the following links might be worth taking a look:
    Default Timeout for VISA Read and Write Vis
    http://digital.ni.com/public.nsf/allkb/E4F90AD24DEC9CC786256F4300605C02
    Timeout Errors
    http://www.ni.com/support/labview/visa/verr2.htm
    Why Do I Receive Timeout Error -1073807339 on VISA Read or Write?
    http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0

  • Using OleDbDataAdapter Update with InsertCommands and getting blocking locks on Oracle table

    The following code snippet shows the use of OleDbDataAdapter with InsertCommands.  This code is producing many inserts on the Oracle table and is now suffering from contention... all on the same table.  How does the OleDbDataAdapter produce
    inserts from a dataset... what characteristics do these inserts inherent in terms of batch behavior... or do they naturally contend for the same resource. 
    oc.Open();
    for (int i = 0; i < xImageId.Count; i++)
    // Create the oracle adapter using a SQL which will not return any actual rows just the structure
    OleDbDataAdapter da =
       new OleDbDataAdapter("SELECT BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, " +
       "DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE FROM sysadm.PS_RI_INV_PDF_MERG WHERE 1 = 2", oc);
    // Create a data set
    DataSet ds = new DataSet("documents");
    da.Fill(ds, "documents");
    // Loop through invoices and write to oracle
    string[] sInvoices = invoiceNumber.Split(',');
    foreach (string sInvoice in sInvoices)
        // Create a data set row
        DataRow dr = ds.Tables["documents"].NewRow();
        ... map the data
        // Populate the dataset
        ds.Tables["documents"].Rows.Add(dr);
    // Create the insert command
    string insertCommandText =
        "INSERT /*+ append */ INTO PS_table " +
        "(SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, " +
        "EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) " +
        "VALUES (INV.nextval, :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME,  " +
        ":BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)";
    // Add the insert command to the data adapter
    da.InsertCommand = new OleDbCommand(insertCommandText);
    da.InsertCommand.Connection = oc;
    // Add the params to the insert
    da.InsertCommand.Parameters.Add(":BUSINESS_UNIT", OleDbType.VarChar, 5, "BUSINESS_UNIT");
    da.InsertCommand.Parameters.Add(":INVOICE", OleDbType.VarChar, 22, "INVOICE");
    da.InsertCommand.Parameters.Add(":ASSIGNMENT_ID", OleDbType.VarChar, 15, "ASSIGNMENT_ID");
    da.InsertCommand.Parameters.Add(":END_DT", OleDbType.Date, 0, "END_DT");
    da.InsertCommand.Parameters.Add(":RI_TIMECARD_ID", OleDbType.VarChar, 10, "RI_TIMECARD_ID");
    da.InsertCommand.Parameters.Add(":IMAGE_ID", OleDbType.VarChar, 8, "IMAGE_ID");
    da.InsertCommand.Parameters.Add(":FILENAME", OleDbType.VarChar, 80, "FILENAME");
    da.InsertCommand.Parameters.Add(":BARCODE_LABEL_ID", OleDbType.VarChar, 18, "BARCODE_LABEL_ID");
    da.InsertCommand.Parameters.Add(":DIRECT_INVOICING", OleDbType.VarChar, 1, "DIRECT_INVOICING");
    da.InsertCommand.Parameters.Add(":EXCLUDE_FLG", OleDbType.VarChar, 1, "EXCLUDE_FLG");
    da.InsertCommand.Parameters.Add(":DTTM_CREATED", OleDbType.Date, 0, "DTTM_CREATED");
    da.InsertCommand.Parameters.Add(":DTTM_MODIFIED", OleDbType.Date, 0, "DTTM_MODIFIED");
    da.InsertCommand.Parameters.Add(":IMAGE_DATA", OleDbType.Binary, System.Convert.ToInt32(filedata.Length), "IMAGE_DATA");
    da.InsertCommand.Parameters.Add(":PROCESS_INSTANCE", OleDbType.VarChar, 10, "PROCESS_INSTANCE");
    // Update the table
    da.Update(ds, "documents");

    Here is what Oracle is showing as blocking locks and the SQL that has been identified with each of the SIDS.  Not sure why there is contention.  There are no triggers or joined tables in this piece of code.
    Here is the SQL all of the SIDs below are running:
    INSERT INTO sysadm.PS_RI_INV_PDF_MERG (SEQ_NBR, BUSINESS_UNIT, INVOICE, ASSIGNMENT_ID, END_DT, RI_TIMECARD_ID, IMAGE_ID, FILENAME, BARCODE_LABEL_ID, DIRECT_INVOICING, EXCLUDE_FLG, DTTM_CREATED, DTTM_MODIFIED, IMAGE_DATA, PROCESS_INSTANCE) VALUES (SYSADM.INV_PDF_MERG.nextval,
    :BUSINESS_UNIT, :INVOICE, :ASSIGNMENT_ID, :END_DT, :RI_TIMECARD_ID, :IMAGE_ID, :FILENAME, :BARCODE_LABEL_ID, :DIRECT_INVOICING, :EXCLUDE_FLG, :DTTM_CREATED, :DTTM_MODIFIED, :IMAGE_DATA, :PROCESS_INSTANCE)
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1150 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1156 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX3
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 6 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 1726 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX2
    SID 1452 (BTSUSER,BIZTPRDI,BTSNTSvc64.exe) in instance FSLX1 is blocking SID 2016 (BTSUSER,biztprdi,BTSNTSvc64.exe) in instance FSLX2

  • CKPT locks the system objects and blocks other sessions

    CKPT locks the system objects and blocks other sessions
    Oracle Version 10.2.0.4
    OS : HP UX 11.31 Itanium
    SQL> select * from v$lock where block=1;
    ADDR KADDR SID TY ID1 ID2 LMODE
    REQUEST CTIME BLOCK
    C0000009FCC2B348 C0000009FCC2B368 1100 RO 65559 1 2
    0 3877 1
    SQL> select program from v$session where sid=1100;
    PROGRAM
    oracle@ctqanhr1 (CKPT)
    As a workaround we flush the buffer cache with the below command
    SQL> alter system flush buffer_cache;
    however the issue reoccurs after some times.
    Edited by: 965132 on Dec 2, 2012 9:59 PM

    other reference:
    CKPT Questions
    The temporary workaround is to set "_db_fast_obj_truncate"=FALSE in that particular case.
    Regards,
    sgc
    Edited by: Samuel G. Cristobal on 03-dic-2012 8:48

  • WRT54G2 and WRT54G locks-up (freezes) when blocking web sites using Access Restrictions

    I am convinced that a few Linksys routers such as WRT54G2 and WRT54G have a major issue when blocking web sites using Access Restrictions (Internet Access Policy). After a few hours of internet access by 15 wired users the Linksys locks-up and blocks all internet web access. The only solution is to restart the power on the router.
    We are currently using a Linksys WRT54G2 v1 (firmware 1.0.04). We upgraded the WRT54G2 v1 firmware to the latest 1.0.04 version which did not resolve the issue.  NOTE: We were previosuly using a a Linksys WRT54G v1.1 (firmware 4.21.1) until the power supply blew a week after we started blocking web sites using Access Restrictions (Internet Access Policy).  
    Basically, we have a T1 internet connection and a hub connected to the Linksys router. We are trying to block several web sites such as facebook, myspace, etc. for 15 wired users. We do not use wireless connections.
    This is the 2nd time it happened with 2 different models.
    Please help ASAP.
    Thank you,
    Lance
    (Mod note: Edited post. Some parts off topic.. Thanks!)

    Also,  you have already upgrade/re-flash the firmware of your Linksys Router you need to reset and reconfigure your router from scratch. Press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • How to get the lock and block occured for the full day

    Hi,
         How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?

    Hi,
         How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?
    Why would you like to collect information about locks and let me tell you, you cannot collect information about ALL locks which were taken and even thinking about it is pointless.
    Coming to blocking if you have heavy system with huge concurrency there is bound to be blocking which is necessary and good for RDBMS but if the blocking remains for long time then this is a issue.
    There is DMV sys.dm_tran_locks which tell you what all locks are being taken. You can see various examples mentioned in DMV online documentation and can schedule the query to run every 5
    mins and insert its record in table which you can refer at end of the day.
    This task would be made very easy if you have Monitoring tool which gives you information in your mail every time blocking occurs I have Spotlight in my environment.
    If you are looking for doc for troubleshooting blocking  below is one you can refer
    http://support.microsoft.com/kb/224453
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Urgent : proc_MatchSchedSubscriptions blocking SQL process (and so SharePoint 2007). Event log is managed by this procedure and contains millions of entries

    Hello,
    We have an intranet platform with 8000 users on SharePoint 2007.
    We currently have issues every day around 9am or 8:30am : The intranet is not responding (white page loading during minutes) until we kill a process in SQL that is blocking every other process.
    The process that is blocking other calls a procedure called : "proc_MatchSchedSubscriptions"
    This procedure manage 3 tables :
    SchedSubscriptions
    EventLog
    EventSubsMatches
    We notice that the Table EventLog has 1.3M entries after 4 days (this table is cleaned every weeks right ?).
    This is a really an issue because if we don't kill the process, the intranet won't work at all. We have to do that almost every morning.
    Thanks you by advance,
    Jeff ANGAMA. Sharepoint Consultant Blog :
    Jeff Sharepoint Note Blog
    Twitter : Follow me on Twitter

    Assuming that you are on the latest SharePoint patch level, I would recommend opening a ticket with Microsoft. Any edits to the SQL databases will result in your environment being in an unsupported state.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Microsoft sql client deadlocked on lock resources with another process

    Hi
    I wrote a forecasting report for a customer which creates an excel spreadsheet with the information
    Depending on how they run the report it can take between 5 to 15 minutes to run
    We have just upgraded the customer to SAP 8.8 PL10 and Microsoft SQL Server 2008 and they seem to be getting an error -
    Microsoft sql client deadlocked on lock resources with another process .......
    The error seems intermittent, they may get the error once and the next time they run it, it is fine.
    I have never seen this error before and they never had it before on SAP 2005
    Can anyone suggest anything please?
    Thanks
    Regards Andy

    Hi Andy,
    I was having the same problem. I'm gonna tell you what i did.
    My query usually takes from 10 to 15 minutes to show results. That long time also block all transaction in the database.
    I was reading about some techniques to improve queries performance. Some of the tips are:
    1. Review indexes in the table you are querying
    2. Use Views
    3. Avoid cursors
    4. Archive old data
    5. Use the correct transaction isolation level
    The last one, was the tip that helped me to avoid the block in the database.
    By default the isolation level in SQL Server is Read Commited, that explains why the database block some transactions. For example, if you have a query that take data from JDT1 table and it takes several minutes to show the results, other transactions that try to write in the same table should be blocked if they arrive at the same time of the first query.
    To solve this, you can make your query in a transaction with Snapshot isolation level. It means that your select query will take a snapshot of the data without blocking any other transaction.
    Here is an example how you can make it. The difference is that you may use ADO.NET connection replacing DI API Connection:
    oConnection = OK1.Generic.Helpers.setConnection(server, password, userID, db); // You have to set anyway your sqlconnection
                        if (oConnection.State == ConnectionState.Open)
                            oCommand = new SqlCommand();
                            oCommand.Connection = oConnection;
                            oCommand.CommandTimeout = System.Convert.ToInt32(timeOut);
                            oCommand.CommandText = "ALTER DATABASE " + db + " SET ALLOW_SNAPSHOT_ISOLATION ON";
                            oCommand.ExecuteNonQuery();
                            sqlTran1 = oConnection.BeginTransaction(IsolationLevel.Snapshot);
                            oCommand.CommandText = query;
                            oCommand.Transaction = sqlTran1;
                            oCommand.ExecuteNonQuery();
                            sqlTran1.Commit();
                            oCommand.CommandText = "ALTER DATABASE " + db + " SET ALLOW_SNAPSHOT_ISOLATION OFF";
                            oCommand.ExecuteNonQuery();
                            if (oConnection.State == ConnectionState.Open)
                                oConnection.Close();
    In this example I write the data to show in the report in other table, then the report takes the data from that table.
    I hope it will be helpful for you.
    Regards,
    Juan Camilo

  • Max Degree of Parallelism, Timeouts and Deadlocks

    We have been trying to track down some timeout issues with our SQL Server. Our SQL Server runs a AccPac Account System, an Internal Intranet site and some SharePoint Content DBs.  
    We know that some of the queries are complex and take some time, though the timeouts seem to happen randomly and not always on the same pages/queries.   IIS and the SQL timeouts are set to 60 and 120 seconds. 
    Looking at some of the SQL Server settings, I noticed that MAXDOP was set to 1. Before doing extensive research on it and looking through the BOL, another DBA and I changed it to 0. 
    Server is a Hyper-V VM with:
    Processors:4
    NUMA nodes:2
    Sockets: 2
    Interesting thing happened. Our Timeouts seem to have disappeared. Going from several a day, we are now at 1 every few days. Though now the issue we are having is that our Deadlocks have gone through the roof. Going from one or two every few days, we are
    up to 8+ a day!
    We have been changing our Select statements to include WITH (NOLOCK) so they do not compete with the UPDATE statements they usually fall victim to. The Deadlocks and timeouts do not seem to be related to any of the SharePoint Content DBs. All of the deadlocks
    are with our Intranet Site and When it communicates with the AccPac DB, or the Internet Site on its own.
    Any Suggestions on where I should be focusing my energy on benchmarking and tuning the server?
    Thank you,
      Scott<-

    Thank you all for your replies.
    The server had 30GB of RAM and then we bumped it up to 40GB at the same time we changed the MAXDOP to 0.
    It was set to 1 because if it isn't MS won't support your SharePoint installation. This is from the Setup Guide for SharePoint on SQL Server, MAXDOP = 1 is a must in their book for official support. It always forces serial plans, because to be honest
    the sharepoint queries are extremely terrible.
    I understand this, though I would guess that the install of SharePoint didn’t actually do the MAXDOP =1 setting during the install? We basically have two Sharepoint sites on the server. One has about 10 users and the other has maybe 20 users. The Sites are
    not used very much either. So I didn't think there would be too much impact. 
    Though now the issue we are having is that our Deadlocks have gone through the roof.
    You probably didn't get this before (though they probably still happened) because the executions were forced serially and you dodged many-a-bullet because of this artificial speed bump. Deadlocks are application based, pure and simple.
    The accounting system we are running is something we typically do not alter the DB Contents directly, we are only peering into the database to present information to the user. We looked at READ_COMMITTED_SNAPSHOT, though since that is a DB setting on not
    on individual queries, we do not want to alter the Accounting DB as we could not know the potential ramifications of what that would cause.
    A Typical Deadlock will occur when the Accounting system is creating or modifying an order’s master record so no one else can modify it, though instead of row lock, it locks the table. This is something that is out of our control. When we do a select against
    the same table from the Intranet site, we get a deadlock unless we use the WITH (NOLOCK). The data that we get is not Super Critical. The only potential issue that might happen is that in an uncommitted Transaction form the Accounting system, it could be adding
    multiple rows to an order and when we SELECT the data, we might miss a line Item or two.
    We have been changing our Select statements to include WITH (NOLOCK) so they do not compete with the UPDATE statements they usually fall victim to.
    This really isn't going to get very far to be honest. Are you deadlocking on the same rows? It seems to be the order of operations taken by either the queries or the logic used in them. Without deadlock information there really is nothing to diagnose, but
    that definitely sounds like the same resource being used in multiple places when it probably doesn't need to be.
    This is one of the typical deadlocks that we get. Intranet Site is getting Totals for Orders while the accounting system is in the process of setting its internal record Lock on an Order. 
    <EVENT_INSTANCE>
    <EventType>DEADLOCK_GRAPH</EventType>
    <PostTime>2014-05-12T15:26:09.447</PostTime>
    <SPID>23</SPID>
    <TextData>
    <deadlock-list>
    <deadlock victim="process2f848b048">
    <process-list>
    <process id="process2f848b048" taskpriority="0" logused="0" waitresource="OBJECT: 12:644249400:0 " waittime="1295" ownerId="247639995" transactionname="SELECT" lasttranstarted="2014-05-12T15:26:08.150" XDES="0x69d1d3620" lockMode="IS" schedulerid="2" kpid="2856" status="suspended" spid="184" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2014-05-12T15:26:08.150" lastbatchcompleted="2014-05-12T15:26:08.150" lastattention="2014-05-12T14:50:52.280" clientapp=".Net SqlClient Data Provider" hostname="VSVR-WWW-INT12" hostpid="15060" loginname="SFA" isolationlevel="read committed (2)" xactid="247639995" currentdb="7" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056">
    <executionStack>
    <frame procname="SFA.dbo.SAGE_SO_order_total_no_history_credit" line="20" stmtstart="1190" stmtend="5542" sqlhandle="0x030007004c642a7a7c17d000e9a100000100000000000000">
    SELECT SUM(t.price * t.qtyord) AS On_Order_Total
    FROM PRODATA01..somast m
    INNER JOIN PRODATA01..sotran t ON m.sono = t.sono
    INNER JOIN SFA..item i ON i.our_part_number COLLATE DATABASE_DEFAULT = t.item COLLATE DATABASE_DEFAULT
    INNER JOIN SFA..supplier s ON s.supplier_key = i.supplier_key
    INNER JOIN SFA..customer c ON c.abbreviation COLLATE DATABASE_DEFAULT = m.custno COLLATE DATABASE_DEFAULT
    INNER JOIN SFA..sales_order_ownership soo ON soo.so_id_col = m.id_col
    LEFT JOIN PRODATA01..potran p ON p.id_col = t.po_id_col
    LEFT JOIN SFA..alloc_inv a ON a.sono COLLATE DATABASE_DEFAULT = t.sono COLLATE DATABASE_DEFAULT AND a.tranlineno = t.tranlineno
    WHERE c.is_visible = 1 AND m.sostat NOT IN ('V','X') AND m.sotype IN ('C','','O')
    AND t.sostat NOT IN ('V','X') AND t.sotype IN ('C','','O')
    --AND t.rqdate BETWEEN @start_ordate AND @end_ordate
    AND UPPER(LEFT(t.item,4)) &lt;&gt; 'SHIP' AND t.item NOT LIKE '[_]%'
    AND ((SUBSTRING(m.ornum,2,1) = 'A' AND p.expdate &lt;= @end_ordate) OR (t.rqdate &lt;= @en </frame>
    </executionStack>
    <inputbuf>
    Proc [Database Id = 7 Object Id = 2049598540] </inputbuf>
    </process>
    <process id="process51df0c2c8" taskpriority="0" logused="28364" waitresource="OBJECT: 12:1369823992:0 " waittime="1032" ownerId="247639856" transactionname="user_transaction" lasttranstarted="2014-05-12T15:26:07.940" XDES="0xf8b5b620" lockMode="X" schedulerid="1" kpid="7640" status="suspended" spid="292" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-05-12T15:26:08.410" lastbatchcompleted="2014-05-12T15:26:08.410" clientapp="Sage Pro ERP version 7.5" hostname="VSVR-DESKTOP" hostpid="15892" loginname="AISSCH" isolationlevel="read uncommitted (1)" xactid="247639856" currentdb="12" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="22" sqlhandle="0x02000000304ac5350b86da8b9422b389413bf23015ac25d0">
    UPDATE PRODATA01..SOTRAN WITH (TABLOCK HOLDLOCK) SET lckuser = lckuser WHERE id_col = @P1 </frame>
    <frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">
    unknown </frame>
    </executionStack>
    <inputbuf>
    (@P1 float)UPDATE PRODATA01..SOTRAN WITH (TABLOCK HOLDLOCK) SET lckuser = lckuser WHERE id_col = @P1 </inputbuf>
    </process>
    </process-list>
    <resource-list>
    <objectlock lockPartition="0" objid="644249400" subresource="FULL" dbid="12" objectname="PRODATA01.dbo.somast" id="lock18b5e3900" mode="X" associatedObjectId="644249400">
    <owner-list>
    <owner id="process51df0c2c8" mode="X" />
    </owner-list>
    <waiter-list>
    <waiter id="process2f848b048" mode="IS" requestType="wait" />
    </waiter-list>
    </objectlock>
    <objectlock lockPartition="0" objid="1369823992" subresource="FULL" dbid="12" objectname="PRODATA01.dbo.sotran" id="lock2ce1c4680" mode="SIX" associatedObjectId="1369823992">
    <owner-list>
    <owner id="process2f848b048" mode="IS" />
    </owner-list>
    <waiter-list>
    <waiter id="process51df0c2c8" mode="X" requestType="convert" />
    </waiter-list>
    </objectlock>
    </resource-list>
    </deadlock>
    </deadlock-list>
    </TextData>
    <TransactionID />
    <LoginName>sa</LoginName>
    <StartTime>2014-05-12T15:26:09.447</StartTime>
    <ServerName>VSVR-SQL</ServerName>
    <LoginSid>AQ==</LoginSid>
    <EventSequence>2335848</EventSequence>
    <IsSystem>1</IsSystem>
    <SessionLoginName />
    </EVENT_INSTANCE>
    I'd (in parallel) look at why parallel plans are being chosen. Not that parallel plans are a bad thing, but is the cost of the execution so high that parallelism is chosen all of the time?
    How can I determine the cost of different statements? The Current Cost threshold value is 5.
    The last place I would set my effort is on the Dev team. Internal Intranet queries should not take 60 to 120 seconds. That's just asking for issues that you already have. If some larger functionality with that is needed, do it on the back end as
    aggregation over a certain time period and use that new static data. Recompute as needed. This is especially true if your deadlocks are happening on these resources (chances are, it is).
    We are working with the long queries.  Trying to Break them up.  We thought about backend processing of the data so its available for the user when they need it, but some of the pages that take time are not accessed that often, so if we gathered
    the data every 10 minutes in the background it would be called way many more times in a day than would be called on demand. 
    Thank you all again!

  • Monitoring blocking Locks

    Hi
    This question relates to monitoring blocking locks on a 9.2.0.5 2 node RAC
    Origionally I have been monitoring bocking locks with every 5 mins using the following query:
    "select * from dba_blockers"
    I have recently implemented monitoring via grid control this is running an out of the box metric every 5 mins, the sql behind it is as follows:
    "SELECT blocking_sid, num_blocked
    FROM ( SELECT blocking_sid, SUM(num_blocked) num_blocked
    FROM ( SELECT l.id1, l.id2,
    MAX(DECODE(l.block, 1, i.instance_name||'-'||l.sid,
    2, i.instance_name||'-'||l.sid, 0 )) blocking_sid,
    SUM(DECODE(l.request, 0, 0, 1 )) num_blocked
    FROM gv$lock l, gv$instance i
    WHERE ( l.block!= 0 OR l.request > 0 ) AND
    l.inst_id = i.inst_id
    GROUP BY l.id1, l.id2)
    GROUP BY blocking_sid
    ORDER BY num_blocked DESC)
    WHERE num_blocked != 0 "
    Now.. At one point today the alert using "select * from dba_blockers" fired where as the out of the box metric from gird control did not fire.... alert duration was around 5 - 10 mins
    At first i simply assumed that this could have been a brief lock and due to both 5 min intervals being out of sync, the lock had shown and cleared before the grid control interval run.
    now im a little more curious.
    Is there any significan difference in what these 2 different SQL's will alert on, I was under the impression that DBA_BLOCKERS was simply querying a number of joined views, and Oracle had decided to use V$lock for their out of the box metric as it was more efficient.
    Any comments welcome
    Thanks

    Just to prove that the SQL is correct I have constrcuted a demo for you...
    SQL> create table t (a char(1));
    Table created.
    SQL> insert into t values ('z');
    1 row created.
    SQL> commit;
    in session 1 ---->
    select * from t where a='z' for update;
    ==================================================================
    in session 2 ---->
    update t set a='x' where a='z';
    (session simply hangs)
    ==================================================================
    in session 3 ------>
    SQL> select * from dba_blockers;
    HOLDING_SESSION
    48
    SQL>
    SQL> SELECT blocking_sid, num_blocked
    FROM ( SELECT blocking_sid, SUM(num_blocked) num_blocked
    FROM ( SELECT l.id1, l.id2, MAX(DECODE(l.block, 1, i.instance_name||'-'||l.sid,
    2, i.instance_name||'-'||l.sid, 0 )) blocking_sid,
    SUM(DECODE(l.request, 0, 0, 1 )) num_blocked
    FROM gv$lock l, gv$instance i
    WHERE ( l.block!= 0 OR l.request > 0 ) AND
    l.inst_id = i.inst_id
    GROUP BY l.id1, l.id2)
    GROUP BY blocking_sid
    ORDER BY num_blocked DESC)
    WHERE num_blocked != 0;
    2 3 4 5 6 7 8 9 10 11 12
    BLOCKING_SID NUM_BLOCKED
    RAC1-48 1
    So back to the origional question,
    I am using both these queries from different monitors on my prod syystem, both running on 5 minute intervals, " select * from dba_blockers" fired where as the above query - querying gv$lock did not fire.
    Origionaly i assumed that the blocking lock may have simply lasted 3t0 seconds, and due the 5 minute monitor intervals of each metric not being in sync, ... "select * from dba_blockers" may have picked up the lock, then the query selecting from gv$lock ran 2 mins later by which time the lock had disapeared.
    -Can anyone suggest any other reasons other than this why one monitor (select * from dba_blockers) picked up the lock and the other (gv$lock) didnt?
    Thanks

Maybe you are looking for

  • Withholding tax calculation

    Hi SAP expert While configuring exteneded witholding tax how to make sure that tax is deducted only properly at the time of advance payment and invoice ,i.e, how to avoid double deduction of tax both at the time of  advance payment and invoice. suppo

  • DVD playback: screen goes black in full-screen mode

    Hi. Having problems with DVD playback on 1 Ghz Powerbook G4 12 ". When trying to view in full-screen (or even sometimes in maximum) mode, screen simply goes black. Sound still works, but no visuals. As soon as I revert back to Normal size, visuals pl

  • OEM 11g DB control problem in google chrome

    I'm unable to see anything in the performance tab of the OEM, it is saying "missing plugin", I'm using Google chrome .....

  • CS3 PP and HDV recording/capture

    Good evening and thank you for the assistance as my school ventures into the world of HD!  I really appreciate the insight on this forum and am grateful for your responses! EQUIPMENT DETAIL I do not have the computer specs in front of me but they are

  • How oracle seeded paper layout output should convert in excel?

    Hi, The seeded Oracle Report All Inventory Values Report output is in paper layot. Could anyone tell how this report output should be taken in excel? Is it possible to convert paper layout output to excel? If so then pls tell the steps how to do that