Top sessions from sql

hi
How can i get the top 5 or 2 users who consuming large physical and logical i/o s,like we getting the top sessions in OEM.I dont want to use OEM.Is it v$filestat and v$session?
with regards
ramya

You can use v$sesstat and v$session. Something like :
select * from (select
b.username,
b.terminal,
to_char(b.logon_time,'dd/mm/yyyy hh24:mi:ss'),
b.program,
a.value
from v$sesstat a, v$session b
where a.statistic# in (40, 41, 42) and
b.sid = a.siD and
b.username is not null and
b.username not like 'SYS%'
order by a.value desc)
where rownum < 6;In v$statname you can see all statistics, and eventually change statistic#.

Similar Messages

  • (oracle 10.2) Access to v$session from pl/sql code

    Hello,
    I wonder if anybody can help me with the following problem as I have read some previous posts on similar topics but could not come to a solution so far.
    The problem is simple: I need to select some columns form v$session from within a PL/SQL body in oracle 10.2.
    Now, the "Application Developer's Guide - Fundamentals" reads:
    "The owner of the procedure or package must be explicitly granted
    the necessary object privileges for all objects referenced within the
    body of the code."
    However, if I connect sys as sysdba and run "grant select on v$session to <proc owner>" I will get "ORA-02030: can only select from fixed tables/views".
    Any hint about this?
    Thank you in advance.

    There is nothing wrong with your instance, v$session is a public synonym for the "real" view v_$session. You cannot grant on a synonym, only on the underlying real object.
    HTH
    John

  • Top Session / SQL in OEM 10g

    friends,
    In oracle 10g enterprise manager, i can find top 10 sessions and sql information in graphical view. Can you provide me sql command for this this graphical view?
    Waiting for your quick answers.
    regards
    Irfan Ahmad

    If you want to find the exact sql, then trace the OEM page.
    If you want to write your own statement, then it depends on what you mean by "top 10 sessions". By CPU ? BY IO ? By runtime.
    You can check the AWR and Statspack code to see what statements they use, or you can find lots of examples using google.

  • How to delete last user session from backend SQL query?

    Sometimes user session gets closed between some work by any reason.
    When next time that user logs to P6, he gets some error or particular functionaly dosen't work for that user or system hangs.
    In that case if i decided to clear last session history of that user from database, how to write SQL query?
    I don't want to delete all user sessions from table USESSION and USESSAUD, i simply want to delete last user session of particular user (E.g XYZ).

    I am quoting this from MOS Doc Id "Why would multiple session records be present in the User Sessions screen in P6 Web, and why might some of them have different IP addresses? (Doc ID 1600172.1)"
    Multiple sessions show up for users since different sections of P6 Web have their own sessions associated with them. If a user is authorized to use multiple areas of the software they will have multiple sessions each time they log in. Additionally, if users are closing their browsers before logging out of P6 Web Access you might see some past sessions still appearing in the list. These will eventually be cleared out by background jobs, however you can also reset the sessions in the software by clicking the "Reset User" link (Administer > User Sessions > Manage User Sessions), or by choosing the "Reset All Users" link (Administer > User Sessions > Manage User Sessions) to do this for all past sessions.
    Multiple IP addresses for sessions can happen when a user logs in from different machines. For example, a person may login at their desk, but then go to a colleagues workstation to discuss a project, and log in from there. Doing so will leave them with multiple IP addresses in the session records.
    Hope this helps
    Regards,
    Sachin Gupta

  • Query based Report (Reports From SQL Query)

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    Can i increase a timeout of portal page, how i can do this?
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
    In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
    Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM

  • Need help in Report From SQL Query

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    I tried also increase the page time out in httpd.conf, but no use.
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    user602513 wrote:
    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    I tried also increase the page time out in httpd.conf, but no use.
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?Do you get any errors or warnings or it is just the slow speed which is the issue?
    There could be a variety of reasons for the delayed processing of this report. That includes parameter settings for that page, cache settings, network configurations, etc.
    - explore best optimization for your query;
    - evaluate portal for best performance configuration; you may follow this note (Doc ID: *438794.1* ) for ideas;
    - third: for that particular page carrying that report, you can use caching wisely. browser cache is neither decent for large files, nor practical. instead, explore the page cache settings that portal provides.
    - also look for various log files (application.log and apache logs) if you are getting any warnings reflecting on some kind of processing halt.
    - and last but not the least: if you happen to bring up a portal report with more than 10000 rows for display then think about the usage of the report. Evaluate whether that report is good/useful for anything?
    HTH
    AMN

  • About Top session in a DB

    Hi,all,
    I need to decide what is top session in a DB, to see how much it would consume resource in that server. When I use TOAD to do it, I find these are so many factors when I make dicision. such as "CPU used by","Physical write" ...
    That means "It is top session sort by CPU used by". So I want to know those essential factors, by which certain session would consume much resource.
    Do you have any advice? Are there any scripts on hand to do this job,except third-part tool like TOAD?
    Robin

    However when I want to work with the top sessions I use the Performance Manager ( This is part of OEM ). These are its advices and descriptions.
    Top SessionsSessions are displayed in descending order based upon the delta value of the statistic chosen as the sort statistic. This is a customizable chart that allows sorting and filtering of sessions based upon a number of user settable criterion.Typically the session that is performing the most I/O is the session that should be targetted for tuning. To identify the SQL statement the session is currently executing you can drill down to the Current SQL Chart. From this drilldown you can choose to tune the SQL statement directly.Complete detailed information about any session can be found by selecting the session and drilling down to the Session Details Chart. This chart allows you to view the current SQL statement as well as resource consumption and performance metrics at the same time.The list of all cursors the session has currently open is available through the Open Cursors For This Session Chart. This helps identify all the SQL statements the session is using. From this chart SQL statements can be selected for tuning further drilldown and analysis.This chart can be used to create a customized Top Sessions view. All of the available statistics and identifiers for sessions are shown in a large table by default. By using the Set Options button in the toolbar the chart can be customized to show only the items of interest and the sort criteria can be changed. Customized charts can then be saved, named and accessed directly by name. Specific advice for each of the data items shown on this chart is available below.This chart includes the following data items:
    Session NameDescription This data item represents either the Oracle username of the current session or, if the session is owned by an Oracle background process, the name of the background process. Data Source select NVL(s.username, b.name) from v$session s, v$bgprocess b User Action The session name is useful in determining which database users are consuming the most resources. If there is a need to prevent a particular session from consuming too much, one way to control resource usage is to create a resource profile. This profile can then be applied to the Oracle user specified in the session name. The profile provides hard limits on any resource that is explicitly added to it. Some of the resources that can be controlled with profiles are cpu usage, idle time, connect time, etc.
    OS UsernameDescription This data item represents the name of the operating system client user. That is the username reported at the time of the database connection time from the operating system. Data Source select osuser from v$session User Action The operating system username can be useful if more than one OS user shares a particular Oracle account (such as SYSTEM). If the session name is not unique, the OS username may provide the identity of the user for the session.
    and so on...
    Do you have OEM ?
    Joel Pérez

  • How to show information from sql to flash cs6 in textbox

    I am having trouble with the showing of result of the information from sql to flash cs6 textbox which is dynamic text.
    I am using php to transfer the data to flash.
    I will like to show me the information in order like
    Name      score
    Tom        20
    Jack       10
    I already try reqVar.name + " " + reqVar.score and it does not work.
    And there is also 6 data in the sql to be formated like the top.
      function loginFunction(evt:MouseEvent):void
      var variables:URLVariables;
      var req:URLRequest;
      var loader:URLLoader;
      if (usertxt.text == "")
      resTxt.text = "Please enter your username.";
      return;
      if (passtxt.text == "")
      resTxt.text = "Please enter your password.";
      return;
      variables = new URLVariables();
      variables.username = usertxt.text;
      variables.password = MD5.hash(passtxt.text);
      req = new URLRequest("http://localhost:8088/classP/checkLogin.php");
      req.data = variables;
      req.method = URLRequestMethod.POST;
                loader = new URLLoader();
         loader.addEventListener(Event.COMPLETE,handleRes);
      loader.load(req);
      function handleRes(evt:Event):void
      var loader:URLLoader;
      var reqVar:URLVariables;
      loader = URLLoader(evt.target);
      reqVar = new URLVariables(loader.data);
      if (reqVar.result == "PASS")
      gotoAndStop(10);
      var req:URLRequest;
      req = new URLRequest("http://localhost:8088/classP/getScores.php");
      req.method = URLRequestMethod.POST;
                loader = new URLLoader();
         loader.addEventListener(Event.COMPLETE,handleRes3);
      loader.load(req);
      else
      {resTxt.text = "Login Failed";}
      function handleRes3(evt:Event):void //to show the output message when it is correct in user and pass
      var loader:URLLoader;
      var reqVar:URLVariables;
      loader = URLLoader(evt.target);
      reqVar = new URLVariables(loader.data);
    displaytxt.text = reqVar.name + " " + reqVar.score;

    1.ckeck your syntax: the last two closing brackets are coming out of nowhere.
    2.use trace commands in your eventhandlers to show if you get any results and if not use them as a hint where the error lies.
    for example:
    reqVar = new URLVariables(loader.data);
    trace("reqVar:"+reqVar);

  • SSRS: Setting Header from Top/Footer from Bottom

    Hello there guys
    We're using RDLC-Files to create some word reports.
    In our previous version, where we used RDL-Files on SQL 2008 R2, the Margin-Properties (Header from Top / Footer from Bottom) didn't get set at all an was always 0.
    This behaviour was reported, but marked by Microsoft as 'By design'. Since I can't post a link, just google for
    "Word export sets margin-top, margin-bottom to 0mm".
    Interesting enought, on our new Version with RDLC, this properties are always set to 1.27cm, but ignore the Margin-Properties of the Report-Page at all.
    Since we'd like to port our reports from the old RDLs to the new RDLCs, it would be the easiest way, if we could kindahow set these two properties.
    But so far I didn't find a possiblity. Is there one, to tell the Word-Renderer what we'd like to set there?
    Thanks in advance
    Matthias Müller

    Hi Matthias,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Urgent: Finding sessions in SQL server 2000

    Hi,
    Can you help me how to find out sessions in SQL Server 2000.
    Also is there any way to see the outstanding sessions for a database?
    Thanks in advance,
    Vasu.

    You can do this graphically in Enterprise Manager, or you can use this script:
    SET NOCOUNT ON
    create table #ProcCheck(
     Status varchar(50) ,
     SPID int ,
     CPU int ,
     Pys_IO int ,
     WaitTime int ,
     BlockSPID int ,
     HostName varchar(36) ,
     ProgName varchar(100) ,
     NTUser varchar(50) ,
     LoginTime datetime ,
     LastBatch datetime ,
     OpenTrans int ,
     LastCmd varchar(4000))
    create table #ProcInfo(
     EventType varchar(100) ,
     Parameters int ,
     EventInfo varchar(7000)
    INSERT INTO #ProcCheck(Status, SPID, CPU, Pys_IO, WaitTime, BlockSPID, HostName, ProgName, NTUSer, LoginTime, LastBatch, OpenTrans)
    SELECT status, SPID, CPU, Physical_IO, WaitTime, Blocked, SUBSTRING(HostName, 1, 36), SUBSTRING(Program_Name, 1, 100), SUBSTRING(nt_username, 1, 50), Login_Time, Last_Batch, Open_Tran
    FROM master..sysprocesses
    where (blocked > 0
    or spid in (select blocked from master..sysprocesses (NOLOCK) where blocked > 0)
    or open_tran > 0)
    and SPID <> @@SPID
    declare @spid int ,
     @cmd varchar(7000)
    declare Procs cursor fast_forward for
    SELECT SPID FROM #ProcCheck
    OPEN Procs
    FETCH NEXT FROM Procs INTO @SPID
    WHILE @@FETCH_STATUS = 0
     BEGIN
     SET @cmd = 'DBCC INPUTBUFFER(' + CONVERT(varchar, @SPID) + ')'
     INSERT INTO #ProcInfo
     EXEC(@cmd)
     SELECT @cmd = EventInfo
     FROM #ProcInfo
     DELETE FROM #ProcInfo
     UPDATE #ProcCheck
     SET LastCmd = SUBSTRING(@cmd, 1, 500)
     WHERE SPID = @SPID
     FETCH NEXT FROM Procs INTO @SPID
     END
    CLOSE Procs
    DEALLOCATE Procs
    SELECT * FROM #ProcCheck 
    DROP TABLE #ProcCheck
    DROP TABLE #ProcInfo

  • File- Print not working from SQL Developer 1.2.1 Build MAIN-32.13

    File->Print not working from SQL Developer 1.2.1 Build MAIN-32.13.
    I downloaded sqldeveloper-1.2.1.3213.ZIP and extract to a local directory. From the extracted directory I ran ..\sqldeveloper\sqldeveloper.exe from Windows XP sp2. The program itself seems to run just fine but File-Print doesn't do anything. In Help-About, Java Platform is reported as 1.5.0_06 and Oracle IDE is 1.2.1.3213. I'm not sure where to look for what is causing the problem.
    Thanks

    I hadn't tried CTRL-P before but I did today. On the first attempt, I saw a small jump in the memory usage for sqldeveloper.exe as reported in Windows Task Manager. Otherwise, there was no change. A second CTRL-P in the same session produced a further bump but subsequent attempts in the same session produced no further change in CPU or Memory Usage.
    Using Task Manager to monitor this further, I tried File->Print again and saw that sqldeveloper would periodically climb to 1 or 2 percent CPU and consume a little more memory. After a minute or so, though, all activity stops again.
    I do not get a print dialog box from SQLDeveloper using either CTRL-P or File->Print

  • Migration from SQL Server to Oracle 8i

    Hi,
    what are the general issues to be considered when migrating a database from SQL server to Oracle 8i.
    Is it documented on the web/ or any publication
    Samit

    What we did was to create the schema using migration work bench and then transfer the data using data junction
    The main issues that you have to handle are
    1) Data type issue, here problem comes converting chars to varchars as chars are padded and may not work in indexes, so you have to trim the afterwards, and if you have any image type data types in Sqlserver, you can use either lobs or long raw, it again depends upon your application, if you uses lobs you may have to recode your application
    2) Sql statements, Oracle cannot understand Sqlserver sql statements, so you have to convert them all. Sqlserver allows two outerjoins to a table, Oracle does not, so you have to modify your functionality
    3) Connections to the database. if you are using ODBC then use Oracle ODBC drivers and the latest ones, otherwise you may encounter memory leaks.
    These are from the top of my head, if you have any specific problem I may be able to help.
    Good luck

  • Reg. Migrating data from SQL Server 2000 to Oracle

    Hi All,
    I need to migrate a same data from SQL Server 2000 to Oracle 9i.In sql server Export option is there, but the problem is some 30 tables have More than one LONG datatype column in a table. That's why oracle not allow to import.
    Could you guys find any tool for the same.
    Please do the needful.
    Thanks & Regards,
    Prathap

    hi dermot,
    it's very urgent now. Can you please give any solution for this.
    and also i tried the SQL developer tool. But i got an below error,
    Error starting at line 2 in command:
    CREATE USER dbo_testdatalatest IDENTIFIED BY dbo_testdatalatest DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
    Error at Command Line:2 Column:45
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 3 in command:
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW TO dbo_testdatalatest
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 4 in command:
    CREATE USER epm_testdatalatest IDENTIFIED BY epm_testdatalatest DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
    Error at Command Line:4 Column:45
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 5 in command:
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW TO epm_testdatalatest
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 6 in command:
    CREATE USER lportal_testdatalatest IDENTIFIED BY lportal_testdatalatest DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
    Error at Command Line:6 Column:49
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 7 in command:
    GRANT CREATE SESSION, RESOURCE, CREATE VIEW TO lportal_testdatalatest
    Error report:
    SQL Error: ORA-01031: insufficient privileges
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    Error starting at line 8 in command:
    connect dbo_testdatalatest/dbo_testdatalatest;
    Error report:
    Connection Failed
    Commit
    Regards,
    Prathap.R

  • Equivalent for TOP 1 of SQL Server used in subqueries

    Hi all,
    I am trying to migrate a sql query from SQL Server to Oracle 9i, which uses the SQL Server TOP keyword in correlated subqueries.
    How should I write it in Oracle?
    The query is more complicated, but in principle looks like:
    SELECT TAB1.t1_id, TAB2_t2_id,
    ISNULL((select top 1 val_num
    from values where values.val_id = TAB1.val_id ) ,0),
    TAB1.date,
         (select top 1 TAB3.t3_id from TAB3 where TAB3.name = TAB1.name)
    FROM TAB1, TAB2
    WHERE TAB1.org_id = TAB2.org_id
         AND TAB1.date > TO_DATE('2006-01-01', 'YYYY-MM-DD')
         TAB2.required IS NOT NULL
    If I would remove in each subquery the "top 1" and add "and rownum = 1", it will not work.
    Any suggestions?
    Thanks,
    Paul

    http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-044.html

  • Not a valid month, but works from sql developer

    Hi,
    so this sample works from SQL DEV. :
    insert into aspa2_magaddendum (contractid, addendum_number, from_date, to_date) values(2, 0, '03.05.2012', '24.05.2012');
    but not from code using ODP.NET
                string date1 = "03.05.2012";
                string date2 = "24.05.2012";
                OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=XE)));User Id=aspa2;Password=aspa2;");
                conn.Open();
                OracleCommand cmd = new OracleCommand();
                cmd.Connection = conn;
                cmd.Parameters.Add("date1", date1);
                cmd.Parameters.Add("date2", date2);
                cmd.CommandText = "insert into aspa2_magaddendum (contractid, addendum_number, from_date, to_date) values(2, 0, :date1, :date2)";
                cmd.ExecuteNonQuery();I get:
    ORA-1843: not a valid month message from exception
    Edited by: user2704811 on May 3, 2012 2:47 AM

    Looks like SQL DEV. session is a bit different from the one in code...
    From SQL DEV i get:
    select value from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    "DD.MM.RR"
    and from the code I get:
    cmd.CommandText = "select value from nls_session_parameters where parameter = 'NLS_DATE_FORMAT'";
    string format = cmd.ExecuteScalar().ToString();
    "DD-MON-RR"

Maybe you are looking for

  • Javascript not working in Firefox on Mac OS 10.9.2

    I am trying to learn Javascript from a tutorial. I'm using Text edit to create a simple .html file that calls a .js file using the script command. The .html file opens normally in the default browser and can print a message to a simple page. It looks

  • Help needed - creating site in dreamweaver with swfs

    Hi I am attempting to make a website in dreamweaver, with animated swf files for the banner and buttons. My problem is with the sizes. I want to get all of the buttons next to each other, with little or no gaps. I've tried making a table and putting

  • Where the process start in implementin APO - DP project?

    Hi Experts, Can anyone explain me in detail how and where the project start? According to my knowledge, Decisions will be as follows: 1. Forecast model i.e., whether causal or univariate. 2. Life Cycle Planning (Phase In/Out) 3. Promotion Planning 4.

  • Obiee solaris installation for 10.1.3.4.1

    hi.. we are going to install obiee 10.1.3.4.1 in a solaris environment... i just want to know before running the ./setup.sh , any specific scripts or solaris specific package should be run or not...

  • Build specification Destination Does Not Preserve Hierarchy

    I have a destination configured in my build specification (application) so that I can include required LabVIEW and non-LabVIEW files in my builds.  This destination is configured as a directory with "Preserve disk hierarchy" checked.  Under "Source F