Alter session is not wofking

Hi All,
I have created process to alter session so I control the currency format, any way the process is working fine on the home page, but when visit another page or return to the home page the session value (currency format )will go back to previous setting ($). How can I keep this session consistent and fixed across my website?
Also when I change the order by for any report the currency format will be shown in older setting ($), I’m using PPR reports.
PS, when moving between pages the session state is same doesn't change. Also i have tried both application process and page process on new session and on page load.
Thanks,
Fadi.

Sorry to bother you with what should be a very stupid question.
I have tried to use the advice given to set the currency for my APEX application.
I used the VPD call in the security attributes tab for my application:
begin
execute immediate 'alter session set nls_territory=''FRANCE''';
execute immediate 'alter session set nls_currency=''€''';
end;
When applying the changes, the euro symbol (€) is set to a reverse question mark (¿)
I can think of a character set problem but no other clue.
Thanks in advance for any interest in my question,
Daniel

Similar Messages

  • 2248ORA - 02248: invalid option for ALTER SESSION

    Hi,
    I have an application running for years (written in ORACLIP) without any change.
    The application runs fine against Oracle 8 and 9, and now I am trying to run against Oracle 11gR2.
    The Oracle11gR2 installation looks fine, I can sucessfully connect to instance using SQLPLUS SYSTEM/MANAGER.
    But my old oraclip application, (that are working fine in Oracle 8 and 9), fails to connect to the Oracle11gR2 instance with the error: 2248ORA - 02248: invalid option for ALTER SESSION.
    The error occurs in a ORACLIP function (I believe that this function try to execute the ALTER SESSION), but I have not access to the source code.
    I want to know if something have changed in Oracle 11gR2 about ALTER SESSION sintax or behaviour.
    If not, any idea about some missing or wrong configuration in the Oracle 11gR2 that cause this problem?
    How can I get ( to capture / to trace) the exactly ALTER SESSION that fails?
    There is a way to make ORACLE 11gR2 to ignore this error and continuing without return a error? Maybe the "ALTER SESSION" is not important to the program.
    There is a way to make ORACLE 11gR2 works like an ORACLE 9 or 10 (in order to verify if this problems is about the version or some wrong configuration).
    I will apreciate any idea or help.
    Thanks in advance,
    Luigggye

    880676 wrote:
    I have an application running for years (written in ORACLIP) without any change.From what I could find, Oraclip refers to a set of dev tools/libraries that has not been updated in over ten years. One version seem to have required 8.0.x Client (oci and sql net libs).
    The application runs fine against Oracle 8 and 9, and now I am trying to run against Oracle 11gR2.If this app "runs fine", why do you want or need to try that?
    The error occurs in a ORACLIP function (I believe that this function try to execute the ALTER SESSION), but I have not access to the source code.There's no support from vendor?
    I want to know if something have changed in Oracle 11gR2 about ALTER SESSION sintax or behaviour.Let's say Oraclip was designed with Oracle7 and SQL*Net v2 in mind. Yes, I think it is fairly easy to think that something has changed since then...
    How can I get ( to capture / to trace) the exactly ALTER SESSION that fails?Trace the session. Either client/oracle net side or SQL Trace (lookup dbms_monitor and session tracing).

  • Alter session set NLS_DATE_FORMAT and to_date not working

    Hey folks,
    for the sake of simplicity let's assume i want to get the current system time from the table dual in a certain format, e.g. 'YY.MM.DD'.
    Currently the query
    select sysdate from dual;
    yields:
    07-JAN-08
    The desired output should look like this:
    08.01.07
    So, according to the manual, i tried the following:
    alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    No effect, date is still displayed as
    07-JAN-08
    Even the following query:
    select TO_DATE (sysdate, 'yy.mm.dd') from dual;
    yields
    07-JAN-08
    What am i doing wrong here?
    Additional information:
    -> DB is Oracle 9
    -> I am using the Oracle SQL Developer under Ubuntu Gutsy
    -> No, i did not forget to commit my commands....:-)
    Any ideas?

    select TO_CHAR (sysdate, 'yy.mm.dd') from dual;However the alter session command should work:
    SQL*Plus: Release 9.2.0.2.0 - Production on Mon Jan 7 14:32:26 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    08.01.07
    SQL> Note: There is nothing to commit here. Only selects, no DML.
    Message was edited by:
    Sven W.

  • Oracle Alter Session not working in CF9

    Hello,
    I'm trying to understand differences between CF5 and CF9 when I retrieve numbers and dates from an Oracle Database.
    The code I ran on CF5 and CF9 servers :
    <cfoutput>
    <cftransaction>
    <cfquery datasource="intranet">
    alter session SET NLS_TERRITORY =  FRANCE
    </cfquery>
    <cfquery name="qry" datasource="intranet">
    select
         TO_NUMBER(12345/10) as nbr,
         sysdate as dt,
         TO_CHAR(1234.56,'L99G999D99') as cur
    from dual
    </cfquery>
    </cftransaction>
    #qry.nbr#<br>
    #qry.dt#<br>
    #qry.cur#
    </cfoutput>
    I've got those outputs :
    Result in CF5
    Result in CF9
    1234,5
    01/12/09
    ¿1.234,56
    1234.5
    2009-12-01 19:16:04.0
    ¿1.234,56
    The first two rows in CF5 display data in French format. That's not the same for CF9, the data are in American format.
    Then I changed the NLS_TERRITORY parameter
    alter session SET NLS_TERRITORY =  AMERICA
    Result in CF5
    Result in CF9
    1234.5
    01-DEC-09
    $1,234.56
    1234.5
    2009-12-01 19:20:39.0
    $1,234.56
    The two first row haven't changed in CF9, it seems that the "alter session" has no effect on number and date format in query results. Is that a bug or am I misunderstanding something ?
    Regards,
    Maxime

    Thank you for your reply.
    I tried what you've suggested on the CF9 server.
    The results are :
    NLS_TERRITORY =
    1) oracle JDBC database
    2) oracle JDBC thin client
    3) oracle JDBC-ODBC bridge
    AMERICA
    1234.5
    2009-12-02 13:24:30.0
    $1,234.56
    1234.5
    {ts '2009-12-02 00:00:00'}
    $1,234.56
    1234.5
    2009-12-02 13:24:30.0
    $1,234.56
    FRANCE
    1234.5
    2009-12-02 13:29:53.0
    ¿1.234,56
    1234.5
    {ts '2009-12-02 00:00:00'}
    ¿1.234,56
    1234.5
    2009-12-02 13:29:53.0
    ¿1.234,56
    The behavior is pretty much the same in the three differents ways to call the database. The only difference is on the date display using the Oracle JDBC thin client, which is another format from those I've already got.
    Regards,
    Maxime

  • Ability to perform ALTER SESSION SET SQL TRACE but not all alter clauses

    I see that in order to run the ALTER SESSION SET SQL TRACE command, the user should be explicitly granted alter session privilege as the CREATE SESSION privilege alone is not enough. Is there a way to grant the ability to perform ALTER SESSION SET SQL TRACE but not the other clauses such as GUARD, PARALLEL & RESUMABLE?.
    Thanks
    Sathya

    If you are using Oracle 10g and above, you can use DBMS_SESSION.session_trace_enable procedure,
    it doesn't require alter session system privilege.
    Simple example:
    SQL> connect test/test@//192.168.1.2:1521/xe
    Connected.
    SQL> alter session set tracefile_identifier='my_id';
    Session altered.
    SQL> alter session set sql_trace = true
      2  ;
    alter session set sql_trace = true
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL> execute dbms_session.session_trace_enable;
    PL/SQL procedure successfully completed.
    SQL> select * from user_sys_privs;
    USERNAME                 PRIVILEGE                    ADM
    TEST                      CREATE PROCEDURE                NO
    TEST                      CREATE TABLE                    NO
    TEST                      CREATE SEQUENCE                    NO
    TEST                      CREATE TRIGGER                    NO
    TEST                      SELECT ANY DICTIONARY               NO
    TEST                      CREATE SYNONYM                    NO
    TEST                      UNLIMITED TABLESPACE               NO
    7 rows selected.
    SQL> execute dbms_session.session_trace_disable;
    PL/SQL procedure successfully completed.
    SQL> disconnect
    Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Productionand here is result from tkprof:
    TKPROF: Release 10.2.0.1.0 - Production on So Paź 23 00:53:07 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: xe_ora_176_my_id.trc
    ( ---- cut ---- )
    select *
    from
    user_sys_privs
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.08       0.08          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.01       0.01          0         15          0           7
    total        4      0.09       0.09          0         15          0           7
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 61 
    Rows     Row Source Operation
          7  HASH GROUP BY (cr=15 pr=0 pw=0 time=11494 us)
          7   CONCATENATION  (cr=15 pr=0 pw=0 time=4913 us)
          0    MERGE JOIN CARTESIAN (cr=4 pr=0 pw=0 time=1169 us)
          0     NESTED LOOPS  (cr=4 pr=0 pw=0 time=793 us)
          0      TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=592 us)
          0      INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=0 pr=0 pw=0 time=0 us)(object id 312)
          0     BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
          0      TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
          7    NESTED LOOPS  (cr=11 pr=0 pw=0 time=3429 us)
          9     HASH JOIN  (cr=9 pr=0 pw=0 time=2705 us)
          9      TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=512 us)
         63      TABLE ACCESS FULL USER$ (cr=5 pr=0 pw=0 time=914 us)
          7     INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=2 pr=0 pw=0 time=510 us)(object id 312)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2       20.64         20.65
    BEGIN dbms_session.session_trace_disable; END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.01       0.00          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 61 

  • Using ALTER SESSION inside a stored procedure.... not a good idea?

    Hi,
    I have two stored procedures, both of which are used to query a database to find a particular book, based on ISBN. One sproc searches our main product catalogue and the other searches our suppliers feed catalogues. The stored procedures are called from a C# application via a search tool and the user is able to search on either our catalogue or our suppliers. The appropriate procedure is called based on the users choices.
    However, the following behaviour is observed
    I search for an ISBN (is a varchar2 field, as isbn's may contain an X if the checksum digit equates to 10) on a feed, so uses the FEED SPROC. The book is found and returned to the app in about 0.5 seconds. I can repeat this as often as i like on different books etc. always works fine.
    I then do the same search but against our own catalogue, so uses our CATALOGUE SPROC. Again the book is found quickly, and the search can be repeated with the same results.
    If i then go back and run our FEED SPROC then the search time increases to about 3 minutes !
    Both the feed and our catalogue is in the same database, although different schema's the connections will be pooled through our app server.
    I can repliacte this every single time. I think i have narrowed doen the cause of this behaviour to a few lines of code in our CATALOGUE SPROC:
    -- store values
    select value into v_vch_NLS_COMP from nls_session_parameters nsp where nsp.parameter = 'NLS_COMP';
    select value into v_vch_NLS_SORT from nls_session_parameters nsp where nsp.parameter = 'NLS_SORT';
    -- Ensure case insensitivity throughout
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_COMP = LINGUISTIC';
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT = BINARY_CI';
    do other stuff
    -- restore session variables
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_COMP = ' || v_vch_NLS_COMP;
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT = ' || v_vch_NLS_SORT;
    If i remove this code then all is well, so i am assuming that using ALTER SESSION inside a stored procedure is the cause of the problem as it would be changing the execution plan of the FEEDS SPROC in some manner? Any ideas? I know i can just rewrite the sproc to avoid using this coding, but wanted to understand if i am doing something wrong by using ALTER SESSION in this manner?
    Any pointers would be appreciated.
    John Thompson
    Software Architect,
    play.com
    Edited by: user7186902 on 27-May-2009 03:51

    Hello (and welcome),
    It may be a case of having to create a linguistic index to facilitate the queries once you set these session level parameters, i.e..,
    CREATE INDEX idx_01 ON tab ((NLSSORT(col1, 'NLS_SORT=BINARY_CI'))It would appear that the setting of those parameters is invalidating index searching on the current indexes.

  • "alter session set sql_trace true"  in my pakage is not working

    Hi
    I have a package with some procedures..in one of my procedure which is executed in the first step i run the :
    execute immediate 'alter session set sql_trace true';
    this command is executed in debug mode and generate trace file(GOOD) but in running mode i haven't trcce file.
    what is wrong in my code ?

    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_2013.htm#SQLRF00901 says parameter_name = parameter_value
    Regards
    Etbin

  • How to tell if a user is issuing 'alter session statements'

    When I run 'alter session' from sqlplus in my schema, this does not get parsed and go to v$sql or show up in v$open_cursor. I have a user that is running queries from informatica. He says he is passing alter session statements through informatica, I want to see if they actually get there. The person is not real versed in oracle and I don't know informatica.
    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed).
    anyway to tell from a data dictionary view or something like that if these were issued by a given session? The queries run for a few minutes, so I have a bit before his session disconnects to query the data. I can't get him to change his code to stay connected. Is there a view that shows parameter changes for a given session?
    oracle: 10.2.0.5
    4 alter session commands are:
    Alter session set sort_area_size=999999999;
    Alter session set hash_area_size=999999999;
    Alter session set db_file_multiblock_read_count = 128;
    alter session enable parallel dml;
    Edited by: Guess2 on Jul 17, 2012 12:49 PM

    i cant turn on trace cause he connects and disconnects and this would run immediately, I am not in a position to turn on system level tracing, add a trigger, or turn on auditing (not allowed). If Informatica connects to Oracle via network, capturing TCP/IP traffic and mining in it may be your last resort.
    you can get session's PDML status from
    select pdml_status from v$session;
    i cant turn on trace cause he connects and disconnects and this would run immediatelythis contradicts to your following statement
    The queries run for a few minutes, so I have a bit before his session disconnects to query the data.
    I can't get him to change his code to stay connected. Informatica should have debug. Ask him if he can go step by step.
    Edited by: user11181920 on Jul 17, 2012 5:53 PM

  • RMAN-10006: error running SQL statement: alter session set remote_dependenc

    Backups are failing with following error
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-12001: could not open channel default
    RMAN-10008: could not create channel context
    RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
    RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
    Not able to change to signature
    SQL> alter session set remote_dependencies_mode=signature;
    ERROR:
    ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
    be from among MANUAL, AUTO
    I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
    Parameter type
    String
    Syntax
    REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
    Default value
    TIMESTAMP
    Parameter class
    Dynamic: ALTER SESSION, ALTER SYSTEM
    =======================================
    I believe it could be because of following bug
    "A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
    Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
    I appreciate your effort in fixing this issue.
    Edited by: user10610722 on Nov 25, 2008 4:37 PM

    Hi:
    It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe).

  • Execute immediate 'alter session set current_schema = ' failed in PL/SQL

    Hi
    I am trying to run
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    in a pl/sql block but it is failing.Can anyone update me on this.
    CREATE OR REPLACE PROCEDURE test3
    IS
    A_COUNT NUMBER(15);
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = TEST ' ;
    SELECT COUNT(*) INTO A_COUNT FROM (
    select id from solutions );
    END;
    /

    The user who owns the procedure needs to be granted direct select rights on table test.solutions (not via a role). Still will not help. Look what OP is trying to do. In a stored procedure owned by some user (other than TEST) OP is trying to reference user TEST owned table solution without prefixing it with owner. Something like:
    SQL> create table u1.test_tbl(x number);
    Table created.
    SQL> select * from test_tbl;
    select * from test_tbl
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> alter session set current_schema = U1;
    Session altered.
    SQL> select * from test_tbl;
    no rows selected
    SQL> However, OP tries to do it in a SP using dynamic SQL to change current schema to test. Such change will occur when SP will be executed, not when is it compiled. At compile time we are still under SP owner's schema and therefore select from solutions implies table solutions owned by SP owner, not by TEST. The only way to make SP compile and work OK is to select from solutions also dynamically:
    SQL> select sys_context('userenv','current_schema') from dual
      2  /
    SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
    SCOTT
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  BEGIN
      5  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      6  SELECT COUNT(*) INTO A_COUNT FROM (
      7  select x from test_tbl );
      8  END;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE TEST3:
    LINE/COL ERROR
    6/1      PL/SQL: SQL Statement ignored
    7/15     PL/SQL: ORA-00942: table or view does not exist
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test3
      2  IS
      3  A_COUNT NUMBER(15);
      4  c sys_refcursor;
      5  BEGIN
      6  EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = U1' ;
      7  OPEN C FOR 'SELECT COUNT(*) FROM (select x from test_tbl )';
      8  FETCH c INTO A_COUNT;
      9  dbms_output.put_line(a_count);
    10  CLOSE c;
    11  END;
    12  /
    Procedure created.
    SQL> insert into u1.test_tbl select rownum from emp;
    14 rows created.
    SQL> exec test3
    14
    PL/SQL procedure successfully completed.
    SQL> Obviously, as you noted SP owner must have directly granted select on test3.solutions.
    SY.

  • Confuse on alter session

    Hi,
    I was trying to enable the sql_trace or the events for me to start the tracing utility. I got this following output:
    rrkr@ORA10G> alter session set timed_statistics=true;
    Session altered.
    rrkr@ORA10G> alter session set events '10046 trace name context forever, level 12';
    ERROR:
    ORA-01031: insufficient privileges
    rrkr@ORA10G> alter session set sql_trace=true;
    alter session set sql_trace=true
    ERROR at line 1:
    ORA-01031: insufficient privileges
    -- at another session
    rrkr_dba@ORA10G> grant alter session to rrkr;
    Grant succeeded.
    --- back to the first session
    rrkr@ORA10G> alter session set sql_trace=true;
    Session altered.
    rrkr@ORA10G>As you can see I got to execute the timed_statistics, but not the sql_trace. How did that happen if I really dont have the alter session priviledge? Thank you.
    Regards,
    Rhani

    It seems Oracle first checks whether it has to change anything.
    It doesn't need to change anything, the statements succeeds, without having checked whether the session has privilege to change the session.
    In other cases, you had to change something, privileges were checked, and you got an error.
    Privilege checking should occur first.
    The internal algorithm is fundamentally flawed.
    Sybrand Bakker
    Senior Oracle DBA

  • Insufficient privileges when creating MV with alter session set current_sch

    I am getting Insufficient privileges when creating MV with alter session set current_schema=Application schema name. User running the alter session is DBA user. If run as SYSDBA, MV is created successfully. DB Version is 10.2.0.3
    I observed similiar issue with regular View also in 9.2.0.6 also.
    Any advice is greatly appreciated.
    Thanks,
    Siva

    Sounds like your management needs a stern lecture on the concept of change management. <g>
    I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
    A. Is more in line with good change management practices.
    B. Works.

  • ORA-02248: invalid option for ALTER SESSION when logging in from client

    Hi,
    I am a junior dba and I was hoping if someone could help me out with a problem I am having. I recently installed on oracle 10g client on my windows machine. I am trying to remote connect to my database on a unix box but I am getting the below error when trying to connect from the client.
    ERROR:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02248: invalid option for ALTER SESSION
    I've done some digging around on this and I think it might be something to do with the NLS_LANG setting maybe. I'm not sure though and to be honest I'm a bit lost on this.
    Any help would be greatly appreciated. Cheers.
    Rgs,
    Rob

    Please see below
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

  • ALTER SESSION in sql script produces strange results

    Why would "alter session set NLS_DATE_FORMAT" interfere with the operation of a sql script?
    First, the script without the ALTER SESSION:
    SQL> !cat doit1.sql
    --alter session set NLS_DATE_FORMAT = "DD-MON-YYYY"
    set pagesize 99
    set trimspool on
    col BIRTH_MONTH for a11
    break on BIRTH_MONTH skip 1
    spo doit.txt
    prompt My Membership
    set feedback off heading off
    select 'As of ' || sysdate from dual;
    set heading on
    select count(*) from dual;
    spool offAnd its execution:
    SQL> @doit1
    My Membership
    As of 14-JAN-10
      COUNT(*)
    1All's well with the world. Now let's throw in the ALTER SESSION:
    SQL> !cat doit2.sql
    alter session set NLS_DATE_FORMAT = "DD-MON-YYYY"
    set pagesize 99
    set trimspool on
    col BIRTH_MONTH for a11
    break on BIRTH_MONTH skip 1
    spo doit.txt
    prompt My Membership
    set feedback off heading off
    select 'As of ' || sysdate from dual;
    set heading on
    select count(*) from dual;
    spool offAnd its execution
    SQL> @doit2
    set pagesize 99
    ERROR at line 2:
    ORA-00922: missing or invalid option
      COUNT(*)
    1
    not spooling currently
    SQL> Doesn't like the SET commands (I've played around with serveral, it doesn't like any of them) and ignores the opening SPOOL command
    I first noticed this with a 10.2.0.1 client (windows) connected to a 10.2.0.4 database (HP-UX). Confirmed on my laptop VM lab, 10.2.0.4 under OEL5, client and db on same VM.

    Chris Poole wrote:
    You're just missing the trailing ';' at the end of the alter session line. Add this, it all works.DOH! (in my best Homer Simpson imitation!)

  • Error ORA-02248 invalid option for ALTER SESSION

    Hi All,
    I'm using windows vista.I have installed oracle database 11g.Now, SQL Developer is working fine in this.I gave the sid as orcl and gave my username and password in sqldeveloper and it works.
    But the host string is not working in forms and sql plus.How do i know which host string i should give??I came to know that the tnsnames.ora which is present in the oracle home directory should be copied to forms directory also.I did that too but still forms,reprorts and sql plus are not working.I get two errors namely ORA-02248 invalid option for ALTER SESSION and TNS could not resolve service name .Pls suggest how to proceed.Thanks in advance....
    Regards,
    Gowtham

    Unfortunately you forgot to mention forms/reports version. Currently only one Developer Suite version is certified on Vista running 11g,don't ignore software/hardware requirements.
    It's 10.1.2.0.2 and that package requires additionally patch 6153263.
    Werner

Maybe you are looking for

  • How to get SelectOneChoice value from a af:Table

    JDeveloper v11.1.2.4.0 - JSF Greetings, im having a problem getting a column value that is a select one choice object. This is not a common problem since i actually did different thing than others so please follow my problem description and if you ha

  • Reading and writing from a file

    I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever

  • Problem with Free on Board -FOB- cost

    Dear Experts, I am dealing with a huge problem I am tryng to get a cost from the rows on a Purchase Delivery Note but the price that is posted there isn't the correct one I had tried to put a new user field but It seems that SBO doesn't give me the c

  • Problem with handoff in iWork

    Hi to everyone! I´ve installed iOS 8 on my iPhone 5s, iPad Air and iPod Touch, I try to test handoff features and works fine  with the most of apps (safari, notes , calendar...) except iWork apps... when I open a document with pages I can´t continue

  • Get the user group in a JSP portlet

    Hi, I'm developping a JSP portlet and i'd like to know how to get the group of the user ? (the JSP will display URL links only if a user belongs to a specific group). I've seen the objet ProviderUser but it doesn't have methods wich give the user gro