How to subsequently change ERROR_ON_OVERLAP_TIME parameter in PL/SQL?

Hi All!
I have a problem considering the ERROR_ON_OVERLAP_TIME session parameter.
I would like to change it from the inside of a PL/SQL block.
It simply works this way:
DECLARE
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET ERROR_ON_OVERLAP_TIME=TRUE';
END;
And that is fine. Try to run the following code subsequently:
set serveroutput on
DECLARE
l_date DATE;
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET ERROR_ON_OVERLAP_TIME=FALSE';
dbms_output.put_line('01 '||sysdate);
l_date:=CAST(from_tz(CAST(TO_DATE('2010.10.31. 02:00:00', 'YYYY.MM.DD. HH24:MI:SS') AS TIMESTAMP), 'Europe/Budapest') AT TIME ZONE 'UTC' AS DATE);
dbms_output.put_line('02 '||sysdate);
EXECUTE IMMEDIATE 'ALTER SESSION SET ERROR_ON_OVERLAP_TIME=TRUE';
dbms_output.put_line('03 '||sysdate);
END;
Once it raises an error as the parameter was set to true, the next time it does not.
This is probably because PL/SQL is not as structured as it is supposed to be.
My guess is that l_date is calculated first, and after it is done, the pl/sql engine starts to evaluate and execute other things such as alter sessions.
So anyone could help me how to solve this problem? I tried several things to overcome this problem (functions, exception branches, etc), but none of them worked.
Any help would be much appriciated. Thanks in advance,
bernyo

The problem still exists. Please take a look at the following example:
Run:
ALTER SESSION SET ERROR_ON_OVERLAP_TIME=FALSE;
At this point the parameter is set to false.Run the followin PL/SQL block:
DECLARE
l_date DATE;
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET ERROR_ON_OVERLAP_TIME=TRUE';
dbms_output.put_line('01 '||sysdate);
l_date:=CAST(from_tz(CAST(TO_DATE('2010.10.31. 02:00:00', 'YYYY.MM.DD. HH24:MI:SS') AS TIMESTAMP), 'Europe/Budapest') AT TIME ZONE 'UTC' AS DATE);
dbms_output.put_line('02 '||sysdate);
EXECUTE IMMEDIATE 'ALTER SESSION SET ERROR_ON_OVERLAP_TIME=FALSE';
dbms_output.put_line('03 '||sysdate);
END;
It does not raise an exception! Why? It should, because the parameter is supposed to be changed by the time the l_date value is assigned, but it is not.
So how should I handle this? It seems to me that this is quite a buggy feature.
Just to see my point check out the following script:
ALTER SESSION SET ERROR_ON_OVERLAP_TIME=TRUE;
SELECT CAST(from_tz(CAST(TO_DATE('2010.10.31. 02:00:00', 'YYYY.MM.DD. HH24:MI:SS') AS TIMESTAMP), 'Europe/Budapest') AT TIME ZONE 'UTC' AS DATE) FROM DUAL;
It raises an exception, as should the PL/SQL block.
Any help is much appriciated.
Thanks,
bernyo

Similar Messages

  • Can you please tell me how can i change the parameter of Applet using Aspec

    Respect Members
    Can we apply Aspectwerkz on Applet? In our project we have to
    change the method parameters before its execution(Around Advice) , can we do this in applet using Aspectwerkz?
    Can you please tell me how can i change the parameter of Applet using Aspectwerkz or AspectJ ?
    I did it by for Java Application using the AspectJ And Aspectwerkz But not able to do for Applet.
    For Applet I Am setting the parameter in JAVA plug in for Aspectwerkz e.g. -Xdebug -Xrunaspectwerkz -Xbootclasspath & path for xml file in which pointcut is defined.
    If you any Friend working on it or any author who might be helpfull for me please Forward this mail to him/her
    THANKs in Advance
    [email protected]

    hello rodale, what you're seeing is probably a side effect of firefox not being able to save certain preferences into its profile folder.
    go to ''firefox > help > troubleshooting information'', click on ''profile folder/show folder'' and close all firefox windows afterwards. a windows explorer window should open up - in there delete the file named '''user.js'''.
    in case this didn't solve the issue yet please also refer to [[How to fix preferences that won't save]].

  • How do I change an IP address of SQL Server which is locally hosted and is not on cluster?

    Hi All,
    How do I change an IP address of SQL Server which is locally hosted and is not on cluster?
    I am asking about IP for SQL Server, is there a way we can assign a different IP to SQL Server other than the server's(host) IP address? like the same what we do in a clustered env.
    aa

    Full explanation can seen here:
    SQL Server: Configure Listening IP, Port, and Named pipe
    http://ariely.info/Blog/tabid/83/EntryId/151/SQL-Server-Configure-Listening-IP-Port-and-Named-pipe.aspx
    [Personal Site] [Blog] [Facebook]

  • How to get changes of a custom PL/SQL package updated in ISG?

    Hi All,
    I need some help on how to change a custom PL/SQL package in ISG integration repository:
    I already uploaded my custom PL/SQL package to the integration repositoy some time ago. Now I have made some changes to PL/SQL record/table types defined in the package (added some fields and removed some others). These changed record/table types are used by a procedure I already uploaded to the integration repository. When regenerating the WSDL for my PL/SQL package in integration repository I get an error that the wrapper for respective procedure can't be found. When checking up the SQL types that were automatically generated (by JPublisher) for corresponding PL/SQL types, these generated SQL types are invalid...
    So it seems that in one case JPublisher generated an empty SQL type (with no attributes). In another case JPublisher generated the SQL type with old attribute list, so it didn't adopt the changes of corresponding PL/SQL type in the package...
    Can anybody tell me how to get the changes of a cusotm PL/SQL package updated in ISG? Or is there any possibility to first remove a whole PL/SQL package from the ISG integration repository (and getting rid of all old automatically generated SQL types), so that I can newly upload my PL/SQL package afterwards?
    Thanks
    Konrad
    Edited by: Konrad on 24.10.2011 10:51

    Thanks Daniel, for your reply...
    (-> for info: I'm a colleague of Konrad...)
    Yes, we used a higher version number - and the upload of iLDT file works fine...
    But, the problem occured when generating the WSDL...
    However, I think we have found an approach of how to get the changes of a custom PL/SQL package updated correctly in ISG:
    1. Save a copy of PL/SQL package and then delete it in the database
    2. Regenerate the WSDL for PL/SQL package in ISG (seems that all atutomatically generated JPub wrappers and SQL types are also deleted)
    3. Restart all processes
    4. Create the changed version of PL/SQL package in the database again
    5. upload of iLDT
    6. Regenerate the WSDL for PL/SQL package in ISG
    Best Regards
    Carolin

  • How do I Pass a parameter to a SQL Component Task where the source SQL statement is also a variable

    Hi,
    I have been tasked with making a complex package more generic.
    To achieve this I need to pass a parameter to a SQL Component Task where the source SQL statement is also a variable.
    So to help articulate my question further I have create a package and database as follows; -
    USE [KWPlay]
    GO
    /****** Object: Table [dbo].[tblTest] Script Date: 05/14/2014 17:08:02 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[tblTest](
    [ID] [bigint] IDENTITY(1,1) NOT NULL,
    [Description] [nvarchar](50) NULL,
    CONSTRAINT [PK_tblTest] PRIMARY KEY CLUSTERED
    [ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    I populated this table with a single record.
    I unit tested the SQL within SSMS as follows;
    SELECT * FROM dbo.tblTest
    Result; -
    ID           
    Description
    1             
    Happy
    DECLARE @myParam NVARCHAR(100)
    SET @myParam = 'Sad'
    UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
    SELECT * FROM dbo.tblTest
    Result; -
    ID   
    Description
    1    
    Sad
    Within the package I created two variables as follows; -
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = @myParam FROM dbo.tblTest WHERE ID = 1
    Name: strStatus
    Scope: Package
    Data Type: String
    Value: Happy
    I then created a single ‘Execute SQL Task’ component within the control flow as follows; -
    However when I run the above package I get the following error; -
    SSIS package "Package.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = @myParam FR..." failed with the following error:
    "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. 
    The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the
    errors.
    SSIS package "Package.dtsx" finished: Failure.
    I also tried; - 
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
    However I received the error; - 
    SSIS package "Package.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "UPDATE dbo.tblTest SET [Description] = ? FROM dbo...." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with
    the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
    the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    SSIS package "Package.dtsx" finished: Failure.
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Tried; - 
    Name: strSQL
    Scope: Package
    Data Type: String
    Value: UPDATE dbo.tblTest SET [Description] = ? FROM dbo.tblTest WHERE ID = 1
    and; - 
    Result; - 
    SSIS package "Package.dtsx" starting.
    SSIS package "Package.dtsx" finished: Success.
    Therefore the answer was to put the parameter number rather than the parameter name under the parameter mapping tab-> parameter name column. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

  • How to view changes using SVN plugin for SQL developer

    Hi,
    We recently moved to SVN. I have checked out the PL/SQL code from the SVN server to my local C Drive. But after I have made changes to couple of PL/SQL files, I am not able to figure out how to see my changes and compare with the checked out version (for example, like we have CVS diff option). I searched through the options but could not find any suitable option.
    Can someone point or help how to do this ?
    I want to check my changes before committing to the main trunk
    Thanks,
    Ravi

    In your window where you edit queries, right above the window, below the tab, next to a tab that says "SQL Worksheet" there is a tab that says "History"; click that, see diff(s).  See here: http://duncandavies.files.wordpress.com/2009/02/sqldeveloperhistorytab.jpg?w=460&h=257

  • How can I change DIR_TRANS parameter

    Hello,
    I have recently installed Trial ABAP NW7 version. I need to import several transports and need to configure TMS. I can not figure how to change value for DIR_TRANS parameter. When I go to AL11, it does not allow me to change it.
    Thanks,
    Alex

    Dear Alex,
    Your Question.How to change value for DIR_TRANS parameter?
    Answer: Goto Tcode rz10>select instant profile>select radio button extended maintenance--> and  then you can change it.Do read the documents for this parameter from rz11 before changing it in rz10.
    NOTE: Dont forget to  take the backup of your profile folder from :\usr\sap\Sid\SYS/Profiles.Sometimes changing parameter causes adverse effect.In that case we have to again load these backed-up profile to get to the previous value.Also remember the version number(check from rz10)
    Regards,
    Ashutosh

  • SQL REPORTING 2008, 2012 - WHEN I CHANGE A PARAMETER WE HAVE ALWAYS A SCREEN REFRESH (POSTBACK)

    hi,
    my name is Pedro Mesquita, from Portugal Europe.
    i have this problem with my client and it seems it is common to all other projects : i have a report with parameters depending on each other (but curiously this happens also with reports without depending parameters and the order for which thay are created
    counts!) and when the user changes one parameter the screen (sql reporting front-end) does a postback and refreshs! is this by design by microsoft ?! the client wants to keep the previous rendered report to help him build the new one.
    how can i avoid this?
    microsoft help please?
    best regards
    Pedro Mesquita

    Oh Microsoft.....
    This means that we must build our front-end to control this "feature"....
    AJAX would solve this....
    Thank you.
    Best Regards,
    Pedro
    Pedro Mesquita

  • How can I change a JCo Server retry interval?

    Hi all,
    I have a question regarding the interval of connection retry.
    If my JCo server has a exception, because SAP Server is down, I get following error: Server startup failed. Will try next startup in 1 second.
    Then in 2 seconds, 4 seconds ..... 1024 seconds.
    How can I change this parameter, so the server should try every 60 seconds?
    Any ideas?
    Thanks in advance.

    Ok, I found a solution:
    JCo.Server has a parameter: jco.server.max_startup_delay

  • How can I change the parameters in form

    Hi there,
    I´m creating a WD application with add and change data.
    The change form it´s ok and works fine, but I want to use the same form to add data too...
    But the change from has some element "read only", how can I change the parameter in this form and clean the other elements?
    Thanx a lot

    hi minoru.....
    consider you are having an input field....
    create an attribute of type string in the context.
    bind it to the read only property of the input field.
    now pass the value x to the input field, to make it read only  or pass '' to make it read write.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_read_only LIKE ls_context-read_only.
    * get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    *********read_only is the attribute name bound to the read only *********property of the input field.
    * get single attribute
      lo_el_context->set_attribute(
          name =  `READ_ONLY`
          value = '' ). *** you can pass x to make it read only
    ***** to clear the values
    lo_el_context->set_attribute(
          name =  `INPUT_MATNR` * this clears my input field.
          value = '' ).
    ---regards,
       alex b justin

  • How to pass a parameter into a sql expression?

    How to pass a report parameter into a sql expression?

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • How do you change the number of processes in XE

    Processes are set to 40 in XE, how do i change this?

    SYS@XE SQL> alter system set processes=<new value> scope=spfile;and restart the DB.

  • How to change timeout parameter value in Oracle 10g R2

    Anyone knows how to change timeout parameter value in Oracle 10g Database R2?

    Waheed Azhar wrote:
    actually i am getting ORA-01013 exception which directly relates to the timeout value but i think it's hidden parameter...What makes you think it's a hidden parameter?
    A search of MetaLink for that error turns up a number of hits, most of which a very situational specific. Exactly what are you doing when you get this error? Are you connecting over an ODBC connection? Are you getting it on a connection request? At db shutdown? During a long-running query?

  • How do i change the enable_row_shipping parameter in oracle11g?

    Here is my Oracle version..
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning and Real Application Testing options
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    SQL>
    I do want to change the below parameter value from TRUE to FASE. How do i change this value? since this is hidden parameter.
    enablerow_shipping
    Regards

    alter system set "_enable_row_shipping"=false;maybe with scope=spfile, test it.
    why you would set it?

  • How to change USE_INDIRECT_BUFFERS parameter

    Hi,
    on 10g R2 :
    how to change USE_INDIRECT_BUFFERS parameter :
    SQL> alter system set USE_INDIRECT_BUFFERS=TRUE scope=spfile;
    alter system set USE_INDIRECT_BUFFERS=TRUE scope=spfile
    ERROR at line 1:
    ORA-02065: illegal option for ALTER SYSTEMThank you.

    1. Create pfile from Spfile
    2. Edit your pfile, put the line USE_INDIRECT_DATA_BUFFERS=TRUE there
    3. Create spfile from pfile

Maybe you are looking for

  • BPM Alert in SolMan

    Hello All, Just want to ask how to stop the BPM alert in SOlMan from sending to a specific email. Where can I check the configuration? What steps to do? Thanks and regards, Eco

  • Help with analitic function

    version 9.2 Here is a sample WITH temp AS      (SELECT 10 ID, TRUNC (SYSDATE - 1) dt, 101 ord_id         FROM DUAL       UNION       SELECT 11 ID, TRUNC (SYSDATE - 1) dt, 101 ord_id         FROM DUAL       UNION       SELECT 11 ID, TRUNC (SYSDATE) dt

  • New to Java Please, I want to understand..

    Hi, Here is what I am trying to do. I have a *.csv file that I want to put into an arraylist and the see the results on the screen. I get the code to compile but I don't understand the run-time error that is generated. Below is the code I am using pl

  • Tables In API

    HI Friends, i am searching for the application/ script which will help me to find out the table that is being manipulated by API. eg. Suppose 'HXT_TIME_COLLECTION' is an API from HRMS TIme and labor, i need such functionality which will help me to gi

  • Is there any video calling app (skype/viber etc.) available in the marketplace yet?

    I want a app like skype, viber, whatsapp or something else in firefox OS. Is there any app like them right now?