Help on blocking within tempdb

On one of our 2008 R2 SP2 sql server we are experiencing blocking in tempdb. The blocked requests are Intellisense and Data Collection queries. We have found some stored procedures
that create but do not drop temp tables, their connection starts when application begins and ends when application is terminated. We are having these stored procedures changed. Just wondering if anyone else has experienced this.
Server has 16 Processors, 65 gb and tempdb has 4 data files of equal size.

Hi,
did u took a look at most waits in your system..you can use this query, since u have found out query you surely tune it but also look after wait stats for clear picture
please look at below blog
http://database-wiki.com/2011/04/26/blocking-caused-by-tempdb-contention/
WITH [Waits] AS
(SELECT
[wait_type],
[wait_time_ms] / 1000.0 AS [WaitS],
([wait_time_ms] - [signal_wait_time_ms]) / 1000.0 AS [ResourceS],
[signal_wait_time_ms] / 1000.0 AS [SignalS],
[waiting_tasks_count] AS [WaitCount],
100.0 * [wait_time_ms] / SUM ([wait_time_ms]) OVER() AS [Percentage],
ROW_NUMBER() OVER(ORDER BY [wait_time_ms] DESC) AS [RowNum]
FROM sys.dm_os_wait_stats
WHERE [wait_type] NOT IN (
N'CLR_SEMAPHORE', N'LAZYWRITER_SLEEP',
N'RESOURCE_QUEUE', N'SQLTRACE_BUFFER_FLUSH',
N'SLEEP_TASK', N'SLEEP_SYSTEMTASK',
N'WAITFOR', N'HADR_FILESTREAM_IOMGR_IOCOMPLETION',
N'CHECKPOINT_QUEUE', N'REQUEST_FOR_DEADLOCK_SEARCH',
N'XE_TIMER_EVENT', N'XE_DISPATCHER_JOIN',
N'LOGMGR_QUEUE', N'FT_IFTS_SCHEDULER_IDLE_WAIT',
N'BROKER_TASK_STOP', N'CLR_MANUAL_EVENT',
N'CLR_AUTO_EVENT', N'DISPATCHER_QUEUE_SEMAPHORE',
N'TRACEWRITE', N'XE_DISPATCHER_WAIT',
N'BROKER_TO_FLUSH', N'BROKER_EVENTHANDLER',
N'FT_IFTSHC_MUTEX', N'SQLTRACE_INCREMENTAL_FLUSH_SLEEP',
N'DIRTY_PAGE_POLL', N'SP_SERVER_DIAGNOSTICS_SLEEP')
SELECT
[W1].[wait_type] AS [WaitType],
CAST ([W1].[WaitS] AS DECIMAL(14, 2)) AS [Wait_S],
CAST ([W1].[ResourceS] AS DECIMAL(14, 2)) AS [Resource_S],
CAST ([W1].[SignalS] AS DECIMAL(14, 2)) AS [Signal_S],
[W1].[WaitCount] AS [WaitCount],
CAST ([W1].[Percentage] AS DECIMAL(4, 2)) AS [Percentage],
CAST (([W1].[WaitS] / [W1].[WaitCount]) AS DECIMAL (14, 4)) AS [AvgWait_S],
CAST (([W1].[ResourceS] / [W1].[WaitCount]) AS DECIMAL (14, 4)) AS [AvgRes_S],
CAST (([W1].[SignalS] / [W1].[WaitCount]) AS DECIMAL (14, 4)) AS [AvgSig_S]
FROM [Waits] AS [W1]
INNER JOIN [Waits] AS [W2]
ON [W2].[RowNum] <= [W1].[RowNum]
GROUP BY [W1].[RowNum], [W1].[wait_type], [W1].[WaitS],
[W1].[ResourceS], [W1].[SignalS], [W1].[WaitCount], [W1].[Percentage]
HAVING SUM ([W2].[Percentage]) - [W1].[Percentage] < 95; -- percentage threshold
GO
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

Similar Messages

  • Querying a multi-record block within my form

    I have a form where I perform validations of items entered on my main block. I compare the item value entered to an expected value and if they are different then an exception record must be created in a separate, multi-record block within my application. One record on my main block may end up with multiple different exception records in the multi-record block. As a result, part of my validation must include determining whether the user has already created an exception record for the item that I'm validating in the multi-record block.
    Is there a way for me to query and uncomitted, multi-record block in my form? Help would be greatly appreciated!

    Andreas' method is good.
    Only several changes:
      LOOP... EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
    (Use NEW, not TRUE)
    And just before the Raise Form_Trigger_Failure, I would Go_Item to either the item in error, or to a new line in the exceptions block. And also issue an error message.
    ....By the way...
    If your exceptions block has more rows than will fit on the screen, then your search loop function will may cause the rows to jump up or down when the user tries to commit. There is a way to reset the view after the function completes its search -- you just need to store the value of the block's Top_Record property before the First_Record command, and then Go_Record(Top_Rec_value); after the function completes its loop.
    Also, there is a way to prompt the user to enter the exception record when you first validate the item in a when-validate-item trigger. But the user might ignore the prompt, so you still need to re-check everything from the key-commit process. To use the WVI prompting, in the WVI trigger you check if an exception is required. If it is, store the item name in a package variable, then start a non-repeating timer. When the timer expires, save the :System.cursor_item value (so you can go_item back to it after calling the function), and then call the function to check for the exception for the item named in the package variable. If not found, prompt the user. If found, go_item back to the cursor_item_value.

  • Anonymous PL/SQL block within a select statement

    I read somewhere that it was possible to build an anonymous pl/sql block within a sql statement. Something along the lines of:
    select
    begin
    i = 0;
    return i;
    end;
    from dual;
    However, for the life of me, I can't find documentation on this. Could someone please point me to the right place, assuming I'm not just imagining it.
    Thanks.

    Did you mean, executing a pl/sql block generated from an sql.
    declare
    cmd varchar2(100);
    begin
    select 'declare i pls_integer := 0; begin i:=1; end;' into cmd from dual;
    execute immediate cmd;
    end;
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Dynamic blocks within the WebUI. Is this possible?.

    CRM 7.
    We currently have about 14 user specific blocks within the Online Factsheet. We also have the same in the PDF Factsheet.
    Some of these blocks show data in Metric (Kg, Cm's etc) but there has been a request to show data in Imperial format (Lb's and Inches etc), which is still used in the U.S.
    Using the WebUI and within an Account there's an option under the 'More' tab to display either an Online factsheet or a PDF Factsheet. Does anyone know how I can control the entries in this pull-down tab?.
    With regards to the Factsheet itself, I have two options open to me. The first to create another Factsheet which has the fields and column headings defined in the view config, or use the same factsheet/component/views and dynamically change the column headings and fields, which sounds harder.
    The PDF Factsheet is easy to deal with as it's just a Smartform, so I can copy it  and change it specifically for the Imperial format.
    Has anyone done anything like this before, and perhaps give me the benefit of their wisdom?.
    Best wishes
    Jason

    Thanks for the details.
    I debugged the process and can see this line is providing the text on the tab. However, the method is making a low-level call to get the details from some message class/table, but I can't identify what this message class/table is.
    But it looks like it's the sotr_edit transaction, as you mentioned, that controls this. I'm not that familiar with this OTR process though and the transaction is not that intuitive. I assume that I just need to somehow add new entry, with my own Z package.
    Many thanks for the advice though, I knew nothing about that transaction. I also have to create another Online factsheet as well, and it looks like I can control it this way as well.
    I had already modified table CRMV_PRN_CONTROL via sm30 and had changed the values for the Fom name and class/interface from CRM_ACC_ACCOUNT_OVERVIEW_PRN to ZCRM_ACC_ACCOUNT_OVERVIEW_PRN for the form name and from CL_UIU_PRN_ACCOUNT to ZCL_UIU_PRN_ACCOUNT for the class/interface against all the roles.
    However, I know want to add another form name and class/interface as I have TWO user PDF Factsheets to use, depending on which item the user chooses from the Tab.
    Any idea how I can control this?.
    Best regards
    Jason

  • HT5654 Where is the Help button located within Itunes on a windows computer?

    Where is the Help button located within Itunes on a windows computer?

    It's in the top right corner of the app, like where you would see it in other apps.
    You should able able to find the info your looking for here too.

  • Synchronized blocks within servlet doPost and/or doPost

    Hey,
    Does anyone know if there are any potential problems with using a synchronized block within a servlet doGet or doPost method? The blocks are local (I'm not synchronizing the whole doGet or doPost method) and synchronized on the servlet using the "this" keyword.
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    synchronized(this)
    try
    /** critical section **/
    } catch (Exception e) {System.out.println("error " + e);}
    Does anyone know any reason that this shouldn't be done?
    thanks,
    Bryan

    Thanks to both respondants.
    The synchronized block is needed in this case to fix an existing problem. The fix could also be made by restructuring the application a bit, but I hesitate to do so in this case.
    I'm aware that it's best to avoid doing any thread operations in Servlets and was wondering whether this extended to synchronized blocks as well. Thanks again.
    Without introducing too much uneccessary detail, it's sufficient to say that the problem occurs when two users are simultaneously in the block at the same time.
    Thanks again,
    Bryan

  • Noob Needs Help w/ Blocked Outgoing Calls

    I'm very unfamiliar with this technology, however, I've been put in charge of it.  We're using Cisco Unified CM Administration v6.1 and currently we're unable to make calls out to any 900 or 330 prefixes and I can't figure out why.  We've called our telephone service provider and they were able to call from their lines, so they are suggesting it is something on our end.
    The only thing I can think of is the CM, however, I'm not sure where to even begin looking.  I did a little research on Google and started checking the Route Filter, however, I wasn't sure if that is where I need to be. (I thought for a minute that it must be true if it was on the internet :-) )
    Anyway, my question is, can anyone shed some light on where I might find some settings that would be blocking us from calling out to these numbers.  Area codes 330 and 900 are honestly cell phone numbers and we can't 7 digit dial or even 10 digit dial these numbers.
    Thanks in advance for your time and I really appreciate everyone for their help.
    Brian Carter

    1. He means what is your protocol i.e. SIP, H.323, etc.  If you go to device ---> Trunks and search for everything you should be able to find the gateway your CUCM is pointing to.
    2.  There needs to be some sort of route pattern pointing to your gateway or no calls would complete.  Call Routing --> Rout/Hunt ---> Route Patterns and do a blanket search. 
    3.  Your gateway config which is your router, CUBE, or whatever you may be using.  Issue a "Show Run" and post the contents here.
    4.  'Debug ccsip mess' is the command from your gateway that you can use if you are utilizing SIP trunking.  This will provide information such as INVITE, TRYING, ACK, RINGING, etc. with much more information telling us what is going on.  All of this needs to be posted here for us to be able to help you.  Understand this is a very difficult situation since you are extremely limited in knowledge on the systems.
    Please rate all useful posts!

  • Help: PReqs blocked by requestor not removed from approvers Inbox.

    Hi Everyone,
    We have implemented a Release Strategy with classification for PR Approval. Currently the client is complaining that PReqs that have been put into blocked status by the requestor are still appearing in the approvers WF Inbox. Is there a way to remove such PRs from the approvers inbox?
    Any help is appreciated.
    Thanks,
    Satish.

    Hi Ronen ,
    I Applied the SAP Note :1676067 - Automatic replacement of work items.
    Created Table , domain and DataElements also for Manual entries Also .
    While maintaining the Dialog Maintainence entries maintained are Asynchronous , 0 , 0 .
    And scheduled the job.
    But still it is not changing the status from Inprocess to Ready for workitems .
    Can you suggest what else is supposed to be checked or maintained .
    Thanks in Advance.

  • Help with buttons within buttons

    I am trying to get stop and play buttons for the background
    music of my site to work within an animated rollover state of a
    separate button. When I put the stop and play buttons into the
    rollover animation they effect the hit state of the button they are
    inside, how do I get around this? If you look at
    www.thepixelplaypen.com/site you will see the menu bar at the
    bottom. If you click on the references button (the 3d thought
    bubble) i have directed it to how I want the page to look and work
    when the music bar is 'rolled over'.

    I've look at the site but am not sure what you mean. 1st I
    don't know what the music bar is. Are you talking about the menu
    bar when it's blank and minimized? Because when I go over that it
    jumps from expanding to its full form to back to its minimized
    state over and over.
    I think what you need is something a little more involved
    than the over/out states buttons give you.
    I would say a two state movie clip with a variable that flags
    on and off for the menu. Have the "toggle" turn off when moved out
    from the menu, but not when over the music switch. For example, a 2
    second delay that tests for the toggle being off, and the music
    button turns it on on over...
    Hope that helps...

  • Need help with paint() within applet

    Hi,
    I am having some problems in using the paint() method within an applet.
    I need to use drawString() in the paint() method.
    However, I discovered that when i used drawString() in paint() method.
    It clears the background which has other GUI components wipe out.
    Pls help, thanx
    Sample code:
    public class watever extends javax.swing.JApplet {
    //initialize some components and variables
    public void init() {
    //adding of components to contentPane
    public void paint(Graphics g) {
    g.drawString("The variable is " + sum, 80, 80);
    }

    super.paint(g) the paint method draws the components to, so if you override it and then never tell it to draw the components they don't get drawn.

  • Getting a mapping error to propogate from loop block within I.P.

    OK I kinda asked the question as a sub topic under a different heading SXMB_MONI_BPE -> Message Payload not visible in container but didnt really get an answer I'm happy with, so here goes as a main topic!
    The short description:
    I have a mapping step that must reside in a loop block, any mapping errors I want propogated back up to the main container so that they error and appear in the trace within SXMB_MONI in the same visibly obvious way as a mapping step that is not inside a block does.
    The long description:
    I have an Integration Process which splits a source message, then maps the individual messages produced within a forEach block. Unfortunately when there is a mapping error within the block, it does not propogate any meaningful information back to the message trace. Instead it just fails in smq2 with permanent error in inbound bpe processing.
    When I search in SXMB_MONI_BPE there are no process steps returned, as though the  IP was never called by the BPE.
    When I put the whole thing inside a block with an exception path that has an alert step, I do get process steps returned in sxmb_moni_bpe. When I examine the list with technical details I cannot see any "payload" under the table of messages that has been split out, therefor I cannot debug the mappings of individual messages I am looping on.  I have LOGGING, LOGGING_PROPOGATION and LOGGING_SYNC set to 1, and TRACE_LEVEL set to 3 for my IE.
    I have 2 scenarios/requirements:
    1) I put the uncaught mapping exception in the loop blook, and the error is propogated back up and the smq2 error is subsequently not produced (like it would behave if the mapping step was not inside any blocks).
    2) I catch exceptions and raise an alert and then the logging is enhanced sufficiently to enable the individual messages the loop block is looping on to be viewed within the container in sxmb_moni_bpe->list with technical details. 
    The only place I can see the error is in the defaultTrace log file, which is obviously not a suitable method for productive use.  Any solution needs to be usable in day-to-day administration of a production system, even though this is a dev issue at present!
    Thanks,
    James.

    James
    I have used this for throwing smart exceptions in SXMB_MONI
    http://agportal.goldeye.info/index.php?option=com_content&task=view&id=30&Itemid=40
    Not sure if it would work in this instance...
    Barry @ Axon!

  • Vendor F4 Help Filter Blocked Accounts

    Hello ppl,
    My problem is, one of our clients has several wrong wendor accounts which are blocked but they also have correct duplicates. When F4 help is used prog lists at least two entries with similar values. Is there a way to distinct those  two, other than manually modifying vend. masters or making alterations in the program's code ???
    Regards,
    EK

    Dear Erdem,
      Acc. to me there is no standard way to stop the appearance of duplicate / blocked parties in F4 Option.
    what you cna do in in master changes add some prefix to the name. like *** or "Duplicate" etc. so that if users take F4 option than and try to find the name with first name*, it will not appear in list.
    Plus to stop furthur postings you need to block them by XK05, and FK05 to stop any posing in FI module.
    NOTE: you can take help of ABAPER to stop display of blocked vendors in F4 List, if donot want to od it manually.
    hope this can solve you issue.
    assign point if helpful.
    Cheers
    Ashokkumar

  • Need help with division within a query

    Hello all~
    I am trying to divide these two columns to get a % of case numbers involving an accident. Im pretty sure you need to use decode to avoid the divide by 0 error but not sure how to implement this within my query. When i run this query below, it gives me the result of "1", which is not correct. Can someone help me please?
    Oracle Version 10g
    ACCIDENT is a datatype VARCHAR
    CASE_NUMBER is a datatype VARCHAR
    select to_char(count(ACCIDENT),'999,999,999') as "ACCIDENT",
    to_char(COUNT(CASE_NUMBER),'999,999,999')as "CASE NUMBER",
    round(ratio_to_report(count(accident))
    OVER()*100,2)as "%"
    from      "PURSUIT"
    WHERE ACCIDENT = 'Y'
    AND
    (:P1_BEG_DATE IS NULL AND :P1_END_DATE IS NULL
    OR
    pursuit_date BETWEEN to_date(:p1_beg_date,'MM/DD/YYYY') and to_date
    (:p1_end_date,'MM/DD/YYYY'))
    AND(:P1_TROOP=pursuit.officer_troop OR :p1_troop IS NULL) 
    AND(:P1_RADIO=pursuit.officer_radio OR :p1_radio IS NULL)
    group by case_numberThanks
    Deanna

    Are you sure that the ANDs and ORs in your WHERE clause will take precedence properly?
    Also, if you always select only cases where there has been an accident, what percentage would you like to display? Surely in this case the percentage of cases involving in accident in cases where there was an accident.. is 100%?
    as a simpler example
    SELECT
      accident,
      ROUND(RATIO_TO_REPORT(count(*)) OVER() * 100)
    FROM
      pursuit
    GROUP BY
      accidentHere's a trick to neaten up those IS NULLs:
    SELECT
      accident,
      ROUND(RATIO_TO_REPORT(count(*)) OVER() * 100)
    FROM
      pursuit
    WHERE
      pursuit_date >= COALESCE(:p1_beg_date, pursuit_date) AND
      pursuit_date <= COALESCE(:p1_end_date, pursuit_date) AND
      officer_troop LIKE :p1_troop AND
      offcier_radio LIKE :p1_radio
    GROUP BY
      accidentTo wildcard a date, simply pass NULL in; the coalesce will replace the null with the pursuit_date from the record (thus the >= and <= becomes true)
    To wildcard the troop or the radio, simply pass a '%' symbol as the value of the parameter. If the front end code is already set up to pass nulls, use the COALESCE trick above

  • Need help with select within select - daterange

    I use Crystal Reports v12.3.0.601 - I am a beginner.
    Problem:
    TABLE: ACCOUNTBILLFEE
    Columns are   
    FOLDERRSN
    STAMPDATE
    BILLNUMBER
    PAYMENTAMOUNT
    There are over 500,000 rows/ records...
    And I need to report the FOLDERRSN which has at least one {ACCOUNTBILLFEE.STAMPDATE} in DateTime
    (2014, 05, 01, 00, 00, 01) to DateTime (2014, 05, 31, 23, 59, 59)
    Out-put required is:
    FOLDERSN | STAMPDATE | BILLNUMBER   | PAYMENTAMOUNT
    Group by FOLDERRSN
    1010234               May01,2014                 1111                      25000
                                  May25, 2014                1112                       5000
                                  Jan 05, 2013                  998                          500
    1034567                May5, 2014                11325                       5000
    1033999                May15, 2014               6752                       15000
                                  Dec5 , 2011                1132                       25000
    Please help -
    The critical part for me, is to display  payments not within the date range in 'select expert' statement.
    Currenlty my report reflects only payments for FOLDERRSN, where {ACCOUNTBILLFEE.STAMPDATE} in DateTime
    (2014, 05, 01, 00, 00, 01) to DateTime (2014, 05, 31, 23, 59, 59) and not other payments outside the date range specified.
    Thank you for your time.

    Hi Abilash,
    This worked !!!
    My brother helped me with it here....ofcourse you have intiated the intial idea.
    It worked when i used the following SQL at 'Add Command'
    Select * from DATABASE_NAME.ACCOUNTBILLFEE A
    Where A.FOLDERSN = any ( select B.FOLDERSN from DATABASE_NAME.ACCOUNTBILLFEE B
    where B.STAMPDATE >= TO_DATE('20140501', 'YYYYMMDD')
    AND  B.STAMPDATE <= TO_DATE('20140531', 'YYYYMMDD'))
    Excellent support - Thank you so much for your immediate attention and response.
    I know, how hard it is to understand someones requirement and suggest solutions.
    You are the best and most helpful I have ever come across in my life.
    Thank you for your kind heart and extending help to me.
    Regs,
    Sridhar Lam

  • PL/SQL declaration blocks within procedure

    Greetings,
    I have a few PL/SQL scripts that I would like to deploy to the database as stored procedures, but I am having a bit of trouble. The scripts themselves are all over 400 lines and contain multiple declaration blocks, some with multiple cursors in each block. I believe the problems I am encountering revolve directly around these declarations blocks and cursors, which are mandatory for these scripts. Here is a sample of the errors I am receiving:
    SQL> SHOW ERRORS
    Errors for PROCEDURE *:
    LINE/COL ERROR
    56/20 PL/SQL: SQL Statement ignored
    57/25 PL/SQL: ORA-00942: table or view does not exist
    66/20 PL/SQL: SQL Statement ignored
    71/70 PL/SQL: ORA-00942: table or view does not exist
    127/11 PL/SQL: SQL Statement ignored
    128/16 PL/SQL: ORA-00942: table or view does not exist
    144/16 PL/SQL: Statement ignored
    144/21 PLS-00364: loop index variable * use is invalid
    156/16 PL/SQL: Statement ignored
    157/36 PLS-00364: loop index variable * use is invalid
    189/16 PL/SQL: Statement ignored
    189/20 PLS-00364: loop index variable * use is invalid
    211/16 PL/SQL: Statement ignored
    231/24 PLS-00364: loop index variable * use is invalid
    268/25 PL/SQL: SQL Statement ignored
    272/48 PLS-00364: loop index variable * use is invalid
    272/48 PL/SQL: ORA-00904: *.*: invalid identifier
    292/21 PL/SQL: Statement ignored
    292/26 PLS-00201: identifier *.* must be declared
    345/46 PLS-00201: identifier * must be declared
    SQL>
    Unfortunately, I cannot paste any of the script itself, nor can I be more descriptive with the error log. That being said, it would be extremely helpful to me to receive any input whatsoever from the community, as even something only vaguely related may push me in the right direction. Mainly, I need to figure out if these errors are generated due to the reasons I suspect.
    I must note that these scripts execute correctly and perform their necessary tasks when either pasted into the editor or when executed directly from their respective .sql files.
    Thank you for the help.
    -JNT

    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  v_variable1 varchar2(10);
      3  v_variable2 varchar2(10);
      4  v_variable3 varchar2(10);
      5  begin
      6  select alpha into v_variable1 from x;
      7  For i in 1..i+2 loop
      8  null;
      9  end loop;
    10  v_variable4 := v_variable3;
    11* end;
    SQL> /
    select alpha into v_variable1 from x;
    ERROR at line 6:
    ORA-06550: line 6, column 36:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 6, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 7, column 13:
    PLS-00364: loop index variable 'I' use is invalid
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 1:
    PLS-00201: identifier 'V_VARIABLE4' must be declared
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignored
    The table 'x' does not exist or I do not have access to it.
    I cannot specify the loop interval as indicated.
    I cannot assign a value to a variable that does not exist.
      1  declare
      2  v_variable1 varchar2(10);
      3  v_variable2 varchar2(10);
      4  v_variable3 varchar2(10);
      5  v_variable4 varchar2(10);
      6  begin
      7  select alpha into v_variable1 from dual;
      8  For i in 1..2 loop
      9  null;
    10  end loop;
    11  v_variable4 := v_variable3;
    12* end;
    SQL> /
    select alpha into v_variable1 from dual;
    ERROR at line 7:
    ORA-06550: line 7, column 8:
    PL/SQL: ORA-00904: "ALPHA": invalid identifier
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored
    There is no column by name 'alpha' in table 'dual'.
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  v_variable1 varchar2(10);
      3  v_variable2 varchar2(10);
      4  v_variable3 varchar2(10);
      5  v_variable4 varchar2(10);
      6  begin
      7  select dummy into v_variable1 from dual;
      8  For i in 1..2 loop
      9  null;
    10  end loop;
    11  v_variable4 := v_variable3;
    12* end;
    SQL> /
    PL/SQL procedure successfully completed.
    Here is the corrected script.  I hope it helps.

Maybe you are looking for