Result Cache Oracle 11gR2

Hi all,
Currently I have some problems with result cache, or maybe I don't understand this feature properly.
I'm trying to switch off the bypass mode, and I'm not able to do this:
SQL> select dbms_result_cache.status from dual;
STATUS
BYPASS
SQL> exec dbms_result_cache.bypass(FALSE);
PL/SQL procedure successfully completed.
SQL> select dbms_result_cache.status from dual;
STATUS
BYPASS
SQL> show parameter result
NAME TYPE VALUE
client_result_cache_lag big integer 3000
client_result_cache_size big integer 0
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
SQL> alter system set result_cache_max_size=2M scope=both;
System altered.
SQL> show parameter result
NAME TYPE VALUE
client_result_cache_lag big integer 3000
client_result_cache_size big integer 0
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
SQL> alter system set result_cache_max_size=2M scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1337632 bytes
Variable Size 465569504 bytes
Database Buffers 50331648 bytes
Redo Buffers 5869568 bytes
Database mounted.
Database opened.
SQL> show parameter result
NAME TYPE VALUE
client_result_cache_lag big integer 3000
client_result_cache_size big integer 1G
result_cache_max_result integer 5
result_cache_max_size big integer 0
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
SQL> select dbms_result_cache.status from dual;
STATUS
BYPASS
SQL> set serveroutput on;
SQL> exec dbms_result_cache.memory_report
R e s u l t C a c h e M e m o r y R e p o r t
[Parameters]
Block Size = 1K bytes
Maximum Cache Size = 0 bytes (0 blocks)
Maximum Result Size = 0 bytes (0 blocks)
[Memory]
Total Memory = 9440 bytes [0.004% of the Shared Pool]
... Fixed Memory = 9440 bytes [0.004% of the Shared Pool]
... Dynamic Memory = 0 bytes [0.000% of the Shared Pool]
PL/SQL procedure successfully completed.
SQL>
Is there something what I missed?
Thanks for any advices.
Regards,
Piotr

A little bit more theory:
The result cache resides in the Shared pool. Because the database was managing its memory automatically (parameter memory_target was set) and no one was working with this environment, the database didn't allocate yet enough space for shared pool to give some space for result cache. I had to set min value for shared pool to force the database to automatically allocate some space to shared pool during start up and never make shared pool smaller than specified value.
Hope that this explanation help other people :)
Regards,
Petrus

Similar Messages

  • Query result caching on oracle 9 and 10 vs indexing

    I am trying to improve performance on oracle 9i and 10g.
    We use some queries that take up to 30 minutes to execute.
    I heard that there are some products to cache query results.
    Would this have any advantage over using indexes or materialized views?
    Does anyone know any products that I can use to cache the results of this queries on disk?
    Personally I think that by using the query result caching I would reduce the cpu time needed to process the query.
    Is this true?

    Your message post pushes all the wrong buttons starting with the fact that 9i and 10g are marketing labels not version numbers.
    You don't tune queries by spending money and throwing resources at them. You tune them by identifying the problem queries, running explain plans, visualizing their output using DBMS_XPLAN, and addressing the root cause.
    If you want help post full version numbers, the SQL statements, and the DBMS_XPLAN outputs.

  • Oracle 11g result cache and TimesTen

    Oracle 11g has introduced the concept of result cache whereby the result set of frequently executed queries are stored in cache and used later when other users request the same query. This is different from caching the data blocks and exceuting the query over and over again.
    Tom Kyte calls this just-in-time materialized view whereby the results are dynamically evaluated without DBA intervention
    http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
    My point is that in view of utilities like result_cache and possible use of Solid State Disks in Oracle to speed up physical I/O etc is there any need for a product like TimesTen? It sounds to me that it may just asdd another layer of complexity?

    Oracle result cache ia a useful tool but it is distinctly different from TimesTen. My understanding of Oracle's result cache is caching results set for seldom changing data like look up tables (currencies ID/code), reference data that does not change often (list of counter parties) etc. It would be pointless for caching result set where the underlying data changes frequently.
    There is also another argument for SQL result cache in that if you are hitting high on your use of CPUs and you have enough of memory then you can cache some of the results set thus saving on your CPU cycles.
    Considering the arguments about hard wired RDBMS and Solid State Disks (SSD), we can talk about it all day but having SSD does not eliminate the optimiser consideration for physical I/O. A table scan is a table scan whether data resides on SCSI or SSD disk. SSD will be faster but we are still performing physical IOs.
    With regard to TimesTen, the product positioning is different. TimesTen is closer to middletier than Oracle. It is designed to work closely to application layer whereas Oracle has much wider purpose. For real time response and moderate volumes there is no way one can substitue TimesTen with any hard wired RDBMS. The request for result cache has been around for sometime. In areas like program trading and market data where the underlying data changes rapidly, TimesTen will come very handy as the data is real time/transient and the calculations have to be done almost realtime, with least complications from the execution engine. I fail to see how one can deploy result cache in this scenario. Because of the underlying change of data, Oracle will be forced to calculate the queries almost everytime and the result cache will be just wasted.
    Hope this helps,
    Mich

  • Oracle 11g/R2 Query Result Cache - Incremental Update

    Hi,
    In Oracle 11g/R2, I created replica of HR.Employees table & executed the following statement (+Although using SUM() function is non-logical in this case, but just testifying the result+)
    STEP - 1
    SELECT      /+ RESULT_CACHE */ employee_id, first_name, last_name, SUM(salary)*
    FROM           HR.Employees_copy
    WHERE      department_id = 20
    GROUP BY      employee_id, first_name, last_name;
    EMPLOYEE_ID      FIRST_NAME LAST_NAME     SUM(SALARY)
    202           Pat           Fay          6000
    201           Michael           Hartstein     13000
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 3837552314
    | Id | Operation           | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT      | | 2 | 130 | 4 (25)| 00:00:01 |
    | 1 | RESULT CACHE      | 3acbj133x8qkq8f8m7zm0br3mu | | | | |
    | 2 | HASH GROUP BY      | | 2 | 130 | 4 (25)| 00:00:01 |
    |* 3 | TABLE ACCESS FULL     | EMPLOYEES_COPY | 2 | 130 | 3 (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------     Statistics
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    *690* bytes sent via SQL*Net to client
    416 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    2 rows processed
    STEP - 2
    INSERT INTO HR.employees_copy
    VALUES(200, 'Dummy', 'User','[email protected]',NULL, sysdate, 'MANAGER',5000, NULL,NULL,20);
    STEP - 3
    SELECT      /*+ RESULT_CACHE */ employee_id, first_name, last_name, SUM(salary)
    FROM           HR.Employees_copy
    WHERE      department_id = 20
    GROUP BY      employee_id, first_name, last_name;
    EMPLOYEE_ID      FIRST_NAME LAST_NAME SUM(SALARY)
    202      Pat      Fay      6000
    201      Michael      Hartstein      13000
    200      Dummy User      5000
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 3837552314
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT |          | 3 | 195 | 4 (25)| 00:00:01 |
    | 1 | RESULT CACHE | 3acbj133x8qkq8f8m7zm0br3mu | | | | |
    | 2 | HASH GROUP BY | | 3 | 195 | 4 (25)| 00:00:01 |
    |* 3 | TABLE ACCESS FULL| EMPLOYEES_COPY | 3 | 195 | 3 (0)| 00:00:01 |
         Statistics
    0 recursive calls
    0 db block gets
    4 consistent gets
    0 physical reads
    0 redo size
    *714* bytes sent via SQL*Net to client
    416 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    3 rows processed
    In the execution plan of STEP-3, against ID-1 the operation RESULT CACHE is shown which shows the result has been retrieved directly from Result cache. Does this mean that Oracle Server has Incrementally Retrieved the resultset?
    Because, before the execution of STEP-2, the cache contained only 2 records. Then 1 record was inserted but after STEP-3, a total of 3 records was returned from cache. Does this mean that newly inserted row is retrieved from database and merged to the cached result of STEP-1?
    If Oracle server has incrementally retrieved and merged newly inserted record, what mechanism is being used by the Oracle to do so?
    Regards,
    Wasif
    Edited by: 965300 on Oct 15, 2012 12:25 AM

    965300 wrote:
    Hi,
    In Oracle 11g/R2, I created replica of HR.Employees table & executed the following statement (+Although using SUM() function is non-logical in this case, but just testifying the result+)
    STEP - 1
    SELECT      /+ RESULT_CACHE */ employee_id, first_name, last_name, SUM(salary)*
    FROM           HR.Employees_copy
    WHERE      department_id = 20
    GROUP BY      employee_id, first_name, last_name;
    EMPLOYEE_ID      FIRST_NAME LAST_NAME     SUM(SALARY)
    202           Pat           Fay          6000
    201           Michael           Hartstein     13000
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 3837552314
    | Id | Operation           | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT      | | 2 | 130 | 4 (25)| 00:00:01 |
    | 1 | RESULT CACHE      | 3acbj133x8qkq8f8m7zm0br3mu | | | | |
    | 2 | HASH GROUP BY      | | 2 | 130 | 4 (25)| 00:00:01 |
    |* 3 | TABLE ACCESS FULL     | EMPLOYEES_COPY | 2 | 130 | 3 (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------     Statistics
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    *690* bytes sent via SQL*Net to client
    416 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    2 rows processed
    STEP - 2
    INSERT INTO HR.employees_copy
    VALUES(200, 'Dummy', 'User','[email protected]',NULL, sysdate, 'MANAGER',5000, NULL,NULL,20);
    STEP - 3
    SELECT      /*+ RESULT_CACHE */ employee_id, first_name, last_name, SUM(salary)
    FROM           HR.Employees_copy
    WHERE      department_id = 20
    GROUP BY      employee_id, first_name, last_name;
    EMPLOYEE_ID      FIRST_NAME LAST_NAME SUM(SALARY)
    202      Pat      Fay      6000
    201      Michael      Hartstein      13000
    200      Dummy User      5000
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 3837552314
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT |          | 3 | 195 | 4 (25)| 00:00:01 |
    | 1 | RESULT CACHE | 3acbj133x8qkq8f8m7zm0br3mu | | | | |
    | 2 | HASH GROUP BY | | 3 | 195 | 4 (25)| 00:00:01 |
    |* 3 | TABLE ACCESS FULL| EMPLOYEES_COPY | 3 | 195 | 3 (0)| 00:00:01 |
         Statistics
    0 recursive calls
    0 db block gets
    4 consistent gets
    0 physical reads
    0 redo size
    *714* bytes sent via SQL*Net to client
    416 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    3 rows processed
    In the execution plan of STEP-3, against ID-1 the operation RESULT CACHE is shown which shows the result has been retrieved directly from Result cache. Does this mean that Oracle Server has Incrementally Retrieved the resultset?
    Because, before the execution of STEP-2, the cache contained only 2 records. Then 1 record was inserted but after STEP-3, a total of 3 records was returned from cache. Does this mean that newly inserted row is retrieved from database and merged to the cached result of STEP-1?
    If Oracle server has incrementally retrieved and merged newly inserted record, what mechanism is being used by the Oracle to do so?
    Regards,
    Wasif
    Edited by: 965300 on Oct 15, 2012 12:25 AMNo, the RESULT CACHE operation doesn't necessarily mean that the results are retrieved from there. It could be being
    written to there.
    Look at the number of consistent gets: it's zero in the first step (I assume you had already run this query before) and I would
    conclude that the data is being read from the result cache.
    In the third step there are 4 consistent gets. I would conclude that the data is being written to the result cache, a fourth step repeating
    the SQL should show zero consistent gets and that would be the results being read.

  • Function result Cache in oracle 11G

    Hi,
    i am reading the following article and trying to reproduce same set of statements to learn about function result cache.
    http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
    Details about my output:
    SQL> create or replace
    function not_cached
    ( p_owner in varchar2 )
    return number
    as
    l_cnt number;
    begin
    select count(*)
    into l_cnt
    from t
    where owner = p_owner;
    sys.dbms_lock.sleep(1);
    return l_cnt;
    end;
    Function created.
    Elapsed: 00:00:00.13
    SQL> create or replace
    function cached
    ( p_owner in varchar2 )
    return number
    result_cache
    relies_on(T)
    as
    l_cnt number;
    begin
    select count(*)
    into l_cnt
    from t
    where owner = p_owner;
    dbms_lock.sleep(1);
    return l_cnt;
    end;
    Function created.
    Elapsed: 00:00:00.08
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.06
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.01
    SQL> SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> set serveroutput on
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.01
    I am supposed to get the results quickly for "cached" call. However, i still dont see any change in the response time. May i know what i am missing here?
    Thank you
    Giridhar

    Try to play with
    RESULT_CACHE_MAX_SIZE
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams206.htm#REFRN10272
    RESULT_CACHE_MAX_RESULT
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams205.htm#REFRN10298

  • Result Cache in oracle 11g release 2.0.2.0

    All,
    Few months back I was trying Result Cache feature of 11g release 2.0.1.0. That time oracle mentioned that they have 3 modes to use this feature by setting result_cache_mode paramter to AUTO, FORCE or MANUAL. With AUTO mode (result_cache_mode=AUTO) you can identify queries that may benefit from result cache. I would like to know whcih views or function I should see where it captures this information.
    In 11.2.0.1.0 documentation it was referencing some views (I totally don't remember those views names) and said those will be available in 11.2.0.2.0.
    Is anyone know about this?
    Thanks in advance.

    user2486753 wrote:
    Though oracle doc doesn't say about AUTO it is still accepts that value and caches the result of the SQL query if you add /*+ result cache */ hint to the SQL.
    I know that they did mentioned in 112010 some where that it will help users to find which SQL's are good candidates for caching by running the application for a while. I just couldn't fine it.If we are adding AUTO and still passing the hint, its the same behavior as like MANUAL. I am not sure that I have seen the value anywhere and neither its there in the docs too.
    HTH
    Aman....

  • Oracle result cache and functions

    Hi All,
    I am on 11.2 in Linux.
    I want to use Oracle's result cache to cache results of (user defined) functions, which we use in SELECT commands.
    My question is, does result caching work for deterministic and non-deterministic functions ?
    Just curious, how Oracle keeps track of changes being made which affect a function's return value?
    Thoughts please.
    Thanks in advance

    I want to ... cache results of (user defined) functions, which we use in SELECT commands.You have four choices:
    1. Subquery caching - (wrap function call in SELECT) useful for repeated function calls in a single SELECT
    2. Marking function as DETERMINISTIC - inconsistent results across versions, deterministic best reserved for function-based indexes only
    3. Result Cache
    4. Move function logic out of function and inline to the main SQL statement.
    The biggest downside of any function call that is inline to SQL is that it bypasses the read consistency mechanism, actually that's probably the second biggest downside. The biggest downside is normally that their misuse kills performance.
    If your function itself contains SQL then you should seriously reconsider whether you should be using a function.
    does result caching work for deterministic and non-deterministic functions ?Result cache knows nothing about determinism so yes it should be applied regardless.
    Oracle keeps track of changes being made which affect a function's return value?See v$result_cache_dependency.
    The mechanism is very blunt, there is no fine-grained tracking of data changes that may affect your result.
    It's as simple as function F1 relies on table T1. If the data in table T1 changes, invalidate the results in the result cache for F1.

  • Does OCI client result cache and oracle UCP work together?

    I'm using Oracle 11.2.1.0. I've set up FCF and enabled OCI result cache on server side, so on client side, I'm using UCP for failover.
    this is my datasource configuration:
    <Resource name="jdbc/MyPool"
    auth="Container"
    factory="oracle.ucp.jdbc.PoolDataSourceImpl"
    type="oracle.ucp.jdbc.PoolDataSource"
    connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
    url="jdbc:oracle:oci:@dbhost:1521/myDb"
    user="db_user"
    password="db_password"
    fastConnectionFailoverEnabled="true"
    onsConfiguration=""
    connectionPoolName="dbPool"
    initialPoolSize="5"
    minPoolSize="5"
    maxPoolSize="25"
    connectionWaitTimeout="10000"
    inactiveConnectionTimeout="120000"
    abandonConnectionTimeout="60"
    validateConnectionOnBorrow="true"
    sqlForValidateConnection="select user from dual"
    maxStatements="30"/>
    I've enabled OCI client result cache.
    I use /*+ result_cache */ in my query to take advantage of the result cache.
    so I execute the following scenario:
    i) select /*+ result_cache */ value from myTable where id=1; (this returns a result.)
    ii) update myTable to set a different value for id=1 record;
    iii) run select query again; (this should return a different result. oci result cache gets updated when table changes.)
    if I take out
    "sqlForValidateConnection" and/or "validateConnectionOnBorrow" (i.e. disable sql validation on borrow), the 2nd query after table update doesn't show the latest result. it's still showing the old query result.
    is this a bug? that UCP validation on borrow has an impact on OCI result cache function? this doesn't happen if using dbcp java connection pooling with OCI result cache.

    it turns out I ran the test against an oracle server that doesnt have FCF configured, nor ONS.
    once i switched to a correct oracle cluster, my test passed.

  • Oracle 11g Result Cache

    Hi,
    I have read that there is SGA component called Result Cache. According to documentation:
    The result cache buffers query results. If a query is run that
    already has results in the result cache, the database returns
    results from the result cache instead of rerunning the query. This
    speeds up the execution of frequently run queries.
    What happens when data in tables which are called by the query change. I think the old data still will be in cache and I always get the old data.
    Peter D.

    Hi Peter
    What happens when data in tables which are called by
    the query change. I think the old data still will be in
    cache and I always get the old data.The server result cache can return old data only for distributed queries (i.e. queries also retrieving data from other databases).
    All local queries return the correct data. To do so, the cache entries are invalidated as required.
    HTH
    Chris Antognini
    Author of Troubleshooting Oracle Performance, Apress 2008 (http://top.antognini.ch)

  • Possible result cache problem 11GR1;;Plz Help me :)

    Hello,
    I just finished installing Oracle 11g Enterprise Edition on my laptop,under windows XP 32 Bit,
    Just run to test the result cache ,It seems the result cache does not work for me ;
    Please see the demonstration below and help me to undertsand:
    (I am the only person connected to the database and I only have one session conneted )
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    Connected as SYS
    SQL> set timi on
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Executed in 0.031 seconds
    SQL> ----result cache demonstration
    SQL> ----clear the server result cache
    SQL> exec dbms_result_cache.Flush
    PL/SQL procedure successfully completed
    Executed in 0 seconds
    SQL> ---run a query to load the server result cache
    SQL>
    SQL> SELECT /*+ result_cache */
      2   H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID, COUNT(*)
      3    FROM HR.DEPARTMENTS H
      4   GROUP BY H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID
      5  ;
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
               10 Administration                        200          1
               30 Purchasing                            114          1
               50 Shipping                              121          1
               60 IT                                    103          1
               70 Public Relations                      204          1
              200 Operations                                         1
              210 IT Support                                         1
              230 IT Helpdesk                                        1
               90 Executive                             100          1
              100 Finance                               108          1
              140 Control And Credit                                 1
              150 Shareholder Services                               1
              160 Benefits                                           1
              220 NOC                                                1
              250 Retail Sales                                       1
              130 Corporate Tax                                      1
              110 Accounting                            205          1
              270 Payroll                                            1
               40 Human Resources                       203          1
              170 Manufacturing                                      1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              260 Recruiting                                         1
               20 Marketing                             201          1
              120 Treasury                                           1
               80 Sales                                 145          1
              180 Construction                                       1
              190 Contracting                                        1
              240 Government Sales                                   1
    27 rows selected
    Executed in 0.282 seconds
    SQL> --*-response time is 0.282 seconds*
    SQL> ---Show the result information from v$result_cache_objects : is the result cache is valid ?
    SQL> --- The space used also?
    SQL>
    SQL> SELECT ID,
      2         NAME,
      3         TYPE,
      4         STATUS,
      5         BLOCK_COUNT,
      6         ROW_COUNT * ROW_SIZE_AVG AS SPACE_FOR_ROWS,
      7         SPACE_OVERHEAD
      8    FROM V$RESULT_CACHE_OBJECTS V
      9  ;
            ID NAME                                                                             TYPE       STATUS    BLOCK_COUNT SPACE_FOR_ROWS SPACE_OVERHEAD
             0 HR.DEPARTMENTS                                                                   Dependency Published           1              0              0
             1 SELECT /*+ result_cache */                                                       Result     Published           1            675            320
                H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID, COUNT(*)                                                                     
                 FROM HR.DEPARTMENTS H                                                                                                         
                GROUP BY H.DEPAR                                                                                                               
    Executed in 0.141 seconds
    SQL> ---we run again our query
    SQL>
    SQL> SELECT /*+ result_cache */
      2   H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID, COUNT(*)
      3    FROM HR.DEPARTMENTS H
      4   GROUP BY H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID
      5  ;
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
               10 Administration                        200          1
               30 Purchasing                            114          1
               50 Shipping                              121          1
               60 IT                                    103          1
               70 Public Relations                      204          1
              200 Operations                                         1
              210 IT Support                                         1
              230 IT Helpdesk                                        1
               90 Executive                             100          1
              100 Finance                               108          1
              140 Control And Credit                                 1
              150 Shareholder Services                               1
              160 Benefits                                           1
              220 NOC                                                1
              250 Retail Sales                                       1
              130 Corporate Tax                                      1
              110 Accounting                            205          1
              270 Payroll                                            1
               40 Human Resources                       203          1
              170 Manufacturing                                      1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              260 Recruiting                                         1
               20 Marketing                             201          1
              120 Treasury                                           1
               80 Sales                                 145          1
              180 Construction                                       1
              190 Contracting                                        1
              240 Government Sales                                   1
    27 rows selected
    *Executed in 0.297 seconds*
    SQL> Why the first is faster than the second?
    thanks a lot,
    Edited by: Ora-Wiss on Apr 3, 2010 2:17 PM

    I have been using 11g from quite some time now in my sessions and already have started sessions over 11gr2 as well and I can't recall that I ever faced this thing. And I just did show the same to you on my personal system as well. But nevermind, here is one more run with the database being restarted and the same code being run.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Elapsed: 00:00:00.00
    SQL> startup force
    ORACLE instance started.
    Total System Global Area  171573248 bytes
    Fixed Size                  1331936 bytes
    Variable Size             125832480 bytes
    Database Buffers           37748736 bytes
    Redo Buffers                6660096 bytes
    Database mounted.
    Database opened.
    SQL> exec dbms_result_cache.Flush;
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.06
    SQL> SELECT /*+ result_cache */   H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID, COUNT(*)  FROM HR.DEPARTMENTS H GROUP BY H.DEP
    ARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID;
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
               10 Administration                        200          1
               30 Purchasing                            114          1
               50 Shipping                              121          1
               60 IT                                    103          1
               70 Public Relations                      204          1
              200 Operations                                         1
              210 IT Support                                         1
              230 IT Helpdesk                                        1
               90 Executive                             100          1
              100 Finance                               108          1
              140 Control And Credit                                 1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              150 Shareholder Services                               1
              160 Benefits                                           1
              220 NOC                                                1
              250 Retail Sales                                       1
              130 Corporate Tax                                      1
              110 Accounting                            205          1
              270 Payroll                                            1
               40 Human Resources                       203          1
              170 Manufacturing                                      1
              260 Recruiting                                         1
               20 Marketing                             201          1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              120 Treasury                                           1
               80 Sales                                 145          1
              180 Construction                                       1
              190 Contracting                                        1
              240 Government Sales                                   1
    27 rows selected.
    Elapsed: 00:00:00.15
    SQL> SELECT /*+ result_cache */   H.DEPARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID, COUNT(*)  FROM HR.DEPARTMENTS H GROUP BY H.DEP
    ARTMENT_ID, H.DEPARTMENT_NAME, H.MANAGER_ID;
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
               10 Administration                        200          1
               30 Purchasing                            114          1
               50 Shipping                              121          1
               60 IT                                    103          1
               70 Public Relations                      204          1
              200 Operations                                         1
              210 IT Support                                         1
              230 IT Helpdesk                                        1
               90 Executive                             100          1
              100 Finance                               108          1
              140 Control And Credit                                 1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              150 Shareholder Services                               1
              160 Benefits                                           1
              220 NOC                                                1
              250 Retail Sales                                       1
              130 Corporate Tax                                      1
              110 Accounting                            205          1
              270 Payroll                                            1
               40 Human Resources                       203          1
              170 Manufacturing                                      1
              260 Recruiting                                         1
               20 Marketing                             201          1
    DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID   COUNT(*)
              120 Treasury                                           1
               80 Sales                                 145          1
              180 Construction                                       1
              190 Contracting                                        1
              240 Government Sales                                   1
    27 rows selected.
    Elapsed: 00:00:00.01
    SQL>As you can see, I can't reproduce.
    HTH
    Aman....

  • New features present in oracle 11gr2.

    Hi all,
    I would like to know the new features present in oracle 11gR2. Any pointers would be helpful.
    Example: list aggregate features is not there in 11gR1... etc.
    Thanks and Regards
    Nagaraja Akkivalli.

    SQL New Features:
    Performance improvements
    1.Alter table to add columns with default value.
    2.Invisible Indexes
    3.Redefinition improvements
    4.SQL Result cache
    New Language features
    1.New data types: SIMPLE_INTEGER, SIMPLE_FLOAT, SIMPLE_DOUBLE
    2.Regular Expressions:regexp_count
    3.Read Only Table
    4.Virtual Columns
    5.Partitioning:Interval Partitioning,System Partitioning,Reference Partitioning,Virtual Column-Based Partitioning
    6.IGNORE_ROW_ON_DUPKEY_INDEX hint
    7.Analytic functions – NTH_VALUE ,LISTAGG
    8.SecureFiles
    9.Pivot query
    PL/SQL New Features:
    1.Real Native Compilation
    2.DML triggers are faster
    3.Compound triggers
    4.Fine grained dependency Intra unit inlining
    5.PL/SQL result cache
    6.OCI Result Set Caching
    New Language features:
    1.Disabled Trigger
    2.FOLLOWS keyword in Trigger
    3.PLW-006009 warning
    4.Continue statement
    5.Enhancements in Dynamic SQL

  • If we use result_cache_mode=force in oracle 11gr2 database then we don't ..

    If we use result_cache_mode=force in oracle 11gr2 database then we don't need QSEl (third party software).
    is the result cache feature is work same as qsel.
    I am not able to find anything regarding it..please help...
    http://www.qsel4oracle.com/FramePage_files/FramePageData.htm

    I don't know anything about QSEL, but can guess that it is some sort of caching solution sitting on Oracle.
    Ideally, RESULT_CACHE_MODE should not be set to FORCE, as it will try to cache each and every SQL (and its results for different bind values).
    But, if you have reasonably big SGA and within that SGA, if you have reasonably big result cache and you do RESULT_CACHE_MODE=FORCE, then you might not need third party caching solution.
    Key question is, how big is reasonably big? that depends on size of data you are dealing with.
    Good thing about result caching is, it works for user defined functions as well.
    Also, you can enable result caching in certain sessions and disable it in certain session.

  • Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto

    h1. Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    Author: Dude
    Version: D
    Last modified: 14-Jan-2012
    You are welcome to add comments, but please do not discuss your installation issues in this thread.  If you have a question about the instructions, please add a simple note to the link of your own thread. The instructions are the result of my own research and development. If you would like to use any of the information for your own blog or website, please include a link to this reference to include future changes.
    Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    h2. Purpose
    This document outlines instructions how to install Oracle XE under Ubuntu 11.10.
    Ubuntu or Debian based Linux is not on the list of supported operation systems according to the Oracle documentation at http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm. You may want to consider virtualization software like Oracle Virtualbox and install Oracle Enterprise Linux as a free and professional alternative to installing XE under Ubuntu. You can also download pre-build virtual machines that include Oracle XE. You can browse http://otn.oracle.com/community/developer-vm for more information.
    h2. Topics
    h4. 1) Install Linux Ubuntu
    h4. 2) Remote Terminal
    h4. 3) Install Additional Software
    h4. 4) Managing Swap Space
    h4. 5) Modify Kernel Parameters
    h4. 6) Oracle Home Directory
    ...a) Resize the Root Partition
    ...b) Setup External Storage
    h4. 7) ORA-00845: MEMORY_TARGET
    h4. 8) Installing Oracle 11gR2 Express Edition
    h4. 9) Post-Installation
    h4. 10) Tips and Troubleshooting
    ...a) Port 1521 appears to be in use by another application
    ...b) cannot touch `/var/lock/subsys/listener': No such file or directory
    ...c) ORA-00845: MEMORY_TARGET
    ...d) Apex ADMIN password
    ...e) SYS and SYSTEM password
    ...f) Uninstall Oracle 11g XE
    ...g) Reconfigure Oracle 11g XE
    ...h) Gnome Classic desktop
    ...i) Unix vi cursor keys
    ...j) Backup Database
    h4. 11) History
    h4. 12) References
    h2. 1) Install Linux Ubuntu
    The following assumes you have installed Ubuntu 11.10 Desktop Edition for AMD 64-bit, or upgraded from a previous version. Keep in mind that Oracle 11gR2 Express Edition is only available for 64-bit architecture. It is not necessarily a requirement, but I would not bother to install Oracle 11gR2 XE on a system with less than 2 GB of RAM installed. You can download Ubuntu for free at: http://www.ubuntu.com/download/ubuntu and install it using the default settings provided.
    You can apply the latest OS patch-sets by clicking the power button icon in the upper right hand corner of the screen and selecting "Updates available..."
    h2. 2) Remote Terminal
    You will need command line access to perform the installation tasks. Select the top "Dash Home" button of the Unity toolbar and enter the word "terminal", or use CTRL-ALT-t. If you prefer to open a remote terminal session use SSH. Ubuntu does not come with a secure shell login by default. To install it, use the following command:
    sudo apt-get install openssh-serverYou cannot login as root unless you set a root password using the "sudo passwd root" command. However, you can get root user access using the "sudo" command, which requires only to re-enter the password of your personal account. Access to "sudo" is controlled by the /etc/sudoers file.
    The best way to establish a remote command line session as root is to login with your personal account, e.g.: ssh [email protected], and then type "sudo su -" to become root, or use "sudo <command>" to execute individual commands. If your account does not have "sudo" access you can login as root using "su - root", but will need to know the root password.
    h2. 3) Install Additional Software
    Oracle 11g Express Edition requires additional software that is not installed by default:
    sudo apt-get install alien libaio1 unixodbch2. 4) Managing Swap Space
    Oracle demands that the minimum swap space for Oracle Database XE is 2 GB (2095100 KB) or twice the size of RAM, whichever is lesser. Enter the following shell command to verify your swap space:
    cat /proc/meminfo | grep -i swap
    SwapCached:            0 kB
    SwapTotal:       2095100 kB
    SwapFree:        2095100 kBYou can increase available swap space by using a swap file as long as disk space permits. The advantage of a swap file versus a swap partition is flexible space management because you can add or delete swap space on demand as necessary. The following will create and enable an additional 1 GB swap file at system startup, located in the /home directory:
    Login as root:
    sudo su -Enter the following commands:
    dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
    mkswap /home/swapfile
    swapon /home/swapfile
    swapon -aCreate a backup of the original "fstab" file and add the new swap file:
    cp /etc/fstab /etc/fstab.backup_`date +%N`
    echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstabExit from root and verify the new swap space:
    exit
    swapon -s
    Filename                    Type          Size     Used     Priority
    /dev/sda5                               partition     2095100     0     -1
    /home/swapfile                          file          1048572     0     -2Swap space is not a substitute for installed RAM. Swap space is a safeguard that allows the system to move idle processes to disk before the OOM killer will begin to terminate processes in order to free up enough real memory to keep the system operational. The general rule for sizing the swap space depends on the size of installed RAM. If your system has less then 4 GB of RAM the swap space should usually be at least twice this size. If you have more than 8 GB of RAM installed you may consider to use an equal size as swap space. The more RAM you have installed, the less likely you are going to run into memory starvation, and the less likely you are going to need swap space, unless you have a bad process.
    h2. 5) Modify Kernel Parameters
    Oracle 11gR2 Express Edition requires the following Kernel parameters. Enter the commands exactly as shown:
    Login as root:
    sudo su -Cut & paste the following directly into a command shell (not a text editor):
    cat > /etc/sysctl.d/60-oracle.conf <<-EOF
    # Oracle 11g XE kernel parameters
    fs.file-max=6815744
    net.ipv4.ip_local_port_range=9000 65500
    kernel.sem=250 32000 100 128
    # kernel.shmmax=429496729
    kernel.shmmax=107374183
    EOFLoad and verify the new kernel parameters:
    service procps start
    sudo sysctl -q fs.file-max
    sudo sysctl -q kernel.shmmax
    sudo sysctl -q net.ipv4.ip_local_port_range
    sudo sysctl -q kernel.sem The SHMMAX kernel parameter defines the upper memory limit of a process. It is a safeguard to stop a bad process from using all memory and causing RAM starvation. The Linux default is 32 MB. The official Oracle XE installation documentation suggests a value of 4 GB -1 bytes (429496729). Since Oracle 11g XE has a 1 GB memory limit, a smaller footprint will be a better safeguard for the complete system. Setting the SHMMAX parameter to 107374183 will be sufficient.
    h2. 6) Oracle Home Directory
    At the time of this writing, Enterprise Linux 6 is not supported for Oracle database yet. It is therefore not possible to confirm Oracle ext4 filesystem compatibility, which is default in Ubuntu 11. According to various information, ext4 may cause a performance problem for Oracle 11g database. The following will show you how to add a ext3 partition to your existing setup.
    h3. 6.a) Resize the Root Partition
    Provided you have sufficient free disk space, you should be able to resize the root partition to create an extra ext3 filesystem. Considering the 11 GB user datafile limit of the Express Edition, 18 GB should be more than enough.
    You can use the free Gparted Live CD to shrink your startup volume. Gparted downloads are available at http://sourceforge.net/projects/gparted/files/gparted-live-stable. When burning the CD, pay attention to burn the raw .iso image and not the possibly "mounted" image. If you are using a virtual machine like Oracle Virtualbox, you can mount the .iso image directly. There are going to be a few prompts when the system starts from the CD, but you can press Return to accept the defaults.
    When the Gparted window appears:
    - Select your ext4 root partition, usually /dev/sda1
    - Select the "Resize/Move" button from the toolbar.
    - Enter 18000 into the "Free space following" field and press the Return key.
      Be careful not not change the start of the partition!
    - Click the "Resize/Move" of the dialog and then then the "Apply" toolbar button.
      The process may take several minutes - do not abandon it!
    - Select the new unallocated free space of ~ 18 GB and push the "New" button.
    - Set the file system to "ext3" and label it "oraclexe" and click the "Add" button.
      Be sure to label it oraclexe, otherwise the follow-up instructions will fail.
    - Finally select "Apply from the toolbar to apply the changes.
    - Quit "Gparted", select "Exit" from the desktop and choose "Reboot" to restart the system.
    {code}
    After the system has restarted, open a terminal command shell.
    Login as root:
    {code}
    sudo su -
    {code}
    Backup "fstab" and add the UUID of the partition. The "tr" command remove the quotes:
    {code}
    cp /etc/fstab /etc/fstab_`date +%N`
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    uuid=`echo $uuid | tr -d '\042'`
    echo $uuid
    echo "$uuid  /u01  ext3  errors=remount-ro 0 1" >> /etc/fstab
    {code}
    The UUID is a unique number and should look similar to:
    {code}
    UUID=d1db753e-b5dd-4a4c-a61e-259c69867b58
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    df -h /u01
    {code}
    h3. 6.b) Setup External Storage
    If you prefer to setup an external drive to install Oracle XE, beware that it can be a fatal mistake to make an entry in /etc/fstab to automount your external storage device.  An unavailable device in /etc/fstab will prevent a system startup and prompt for appropriate actions at the console.
    The following is an example of how to prepare an external storage device to be used for Oracle 11g, including a script to automatically mount an external drive at system startup without the disadvantages of /etc/fstab. The script will also take into consideration that a device name might shift if you attach additional devices.
    To find out which USB devices are connected:
    {code}
    sudo parted -l
    {code}
    Look for the device that matches your USB storage. For example: /dev/sdb1
    {code}
    Model: USB 2.0 Flash Disk (scsi)
    Disk /dev/sdb: 2064MB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Number  Start   End     Size    File system  Name     Flags
    1      20.5kB  1929MB  1929MB  hfs+         mystick
    {code}
    Initialize the device using ext3 filesystem - this will erase all data. The "-c" option will check for bad blocks (read-only), "-L" is the volume label:
    {code}
    sudo umount /dev/sdb1
    sudo mkfs.ext3 -c -L oraclexe /dev/sdb1
    {code}
    Install the pmount distribution package:
    {code}
    sudo apt-get install pmount
    {code}
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-mount <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-mount
    VOL_UUID=alphanumeric
    VOL_LABEL=oraclexe
    VOL_SYMLINK=/u01
    mount=/usr/bin/pmount
    uuid2dev() {
       VOL_DEVICE="\`blkid | grep \$VOL_UUID | awk '{print \$1}'\`"
       VOL_DEVICE="\`echo \$VOL_DEVICE | tr -d ':'\`"
       echo \$VOL_DEVICE
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-mount"
        uuid2dev
        \$mount \$VOL_DEVICE \$VOL_LABEL
        if [ -d /media/\$VOL_LABEL ]; then
           echo "Mount \$VOL_DEVICE success"
           ln -sf /media/\$VOL_LABEL \$VOL_SYMLINK
        else
           echo "Error mouting \$VOL_DEVICE"
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-mount"
        uuid2dev
        /bin/umount \$VOL_DEVICE 2>/dev/null
        if [ "\`/usr/bin/pmount | /bin/grep \$VOL_DEVICE\`" ]; then
           echo "Error unmounting \$VOL_DEVICE"
        else
           rm -f \$VOL_SYMLINK
        fi
        echo "Usage: /etc/init.d/oracle-u01 {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-mount
    # Required-Start:    \$remote_fs \$syslog
    # Required-Stop:     \$remote_fs \$syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start daemon at boot time
    # Description:       Mount hotplug-usb drive and create symlink
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-mount init script:
    {code}
    chmod 755 /etc/init.d/oracle-mount
    update-rc.d oracle-mount defaults 01 99
    {code}
    Get the UUID of the volume "oraclexe" and update the VOL_UUID in the init script accordingly:
    {code}
    uuid=`blkid | grep oraclexe | awk '{print $3}'`
    echo $uuid
    sed -i "s/^VOL_UUID=.*/VOL_$uuid/g" /etc/init.d/oracle-mount
    {code}
    The UUID of your device will be a unique number, but should be similar to:
    {code}
    UUID="3f5e9963-b328-49f3-b3e8-a3561ae34106"
    {code}
    Logout of root and test the init script:
    {code}
    exit
    sudo /etc/init.d/oracle-mount stop
    ls /u01
    sudo /etc/init.d/oracle-mount start
    ls /u01
    {code}
    Your output should look like:
    {code}
    Stopping script /etc/init.d/oracle-mount
    /dev/sdb1
    ls: cannot access /u01: No such file or directory
    Starting script /etc/init.d/oracle-mount
    /dev/sdb1
    Mount /dev/sdb1 success
    lost+found
    {code}
    h2. 7) ORA-00845: MEMORY_TARGET
    Oracle 11gR2 XE under Ubuntu 11.10 will result in "ORA-00845: MEMORY_TARGET not support on this system" either at Oracle database startup or during the initial installation. Ubuntu 11.10 uses a new version of the "systemd" system and session manager and has migrated away from /dev/shm and other common directories in favor of /run.
    There are several ways how to address the problem. You can either enable /dev/shm shared memory, or change the default memory management of Oracle 11g from AMM (Automatic Memory Management) to ASMM (Automatic Shared Memory Management) as it was in used the previous 10g version. Since AMM is one of the new features of 11g, the following will show you how to make to make AMM work.
    Login as root:
    {code}
    sudo su -
    {code}
    Cut & paste the following into the command prompt (not a text editor):
    {code}
    cat > /etc/init.d/oracle-shm <<-EOF
    #! /bin/sh
    # /etc/init.d/oracle-shm
    case "\$1" in
      start)
        echo "Starting script /etc/init.d/oracle-shm"
        # Run only once at system startup
        if [ -e /dev/shm/.oracle-shm ]; then
          echo "/dev/shm is already mounted, nothing to do"
        else
          rm -f /dev/shm
          mkdir /dev/shm
          mount -B /run/shm /dev/shm
          touch /dev/shm/.oracle-shm
        fi
      stop)
        echo "Stopping script /etc/init.d/oracle-shm"
        echo "Nothing to do"
        echo "Usage: /etc/init.d/oracle-shm {start|stop}"
        exit 1
    esac
    ### BEGIN INIT INFO
    # Provides:          oracle-shm
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Bind /run/shm to /dev/shm at system startup.
    # Description:       Fix to allow Oracle 11g use AMM.
    ### END INIT INFO
    EOF
    {code}
    Install the oracle-shm init script:
    {code}
    chmod 755 /etc/init.d/oracle-shm
    update-rc.d oracle-shm defaults 01 99
    {code}
    Restart the system:
    {code}
    reboot
    {code}
    Verify the success:
    {code}
    sudo cat /etc/mtab | grep shm
    {code}
    {code}
    none /run/shm tmpfs rw,nosuid,nodev 0 0
    /run/shm /dev/shm none rw,bind 0 0
    {code}
    The upper limit of shared memory under Linux is set to 50 % of the installed RAM by default. If your system has less than 2 GB of RAM installed, there is still a chance to run into ORA-00845 error if your shared memory is used by other software.
    The verify available shared memory, type the following commands:
    {code}
    sudo df -h /run/shm
    {code}
    h2. 8) Installing Oracle 11gR2 Express Edition
    The final release version of Oracle 11gR2 Express Edition can be downloaded for free at http://otn.oracle.com/database/express-edition/downloads. The software should automatically downloaded into the "Downloads" folder of your home directory.
    Enter the following commands to unpack the installer:
    {code}
    cd ~/Downloads
    unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    rm oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    {code}
    The Debian Linux based package management of Ubuntu is not compatible with the Red Hat package manager. The Oracle installer needs to be converted using the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm
    (This may take a few minutes)
    rm oracle-xe-11.2.0-1.0.x86_64.rpm
    {code}
    The following needs to be set for compatibility:
    {code}
    sudo ln -s /usr/bin/awk /bin/awk
    sudo mkdir /var/lock/subsys
    {code}
    Ubuntu uses different tools to manage services and system startup scripts. The "chkconfig" tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the "chkconfig" tool.
    Login as root:
    {code}
    sudo su -
    {code}
    Copy & paste the following *directly* into the command prompt to create a file:
    {code}
    cat > /sbin/chkconfig <<-EOF
    #!/bin/bash
    # Oracle 11gR2 XE installer chkconfig hack for Debian based Linux (by dude)
    # Only run once.
    echo "Simulating /sbin/chkconfig..."
    if [[ ! \`tail -n1 /etc/init.d/oracle-xe | grep INIT\` ]]; then
    cat >> /etc/init.d/oracle-xe <<-EOM
    ### BEGIN INIT INFO
    # Provides:                  OracleXE
    # Required-Start:        \\\$remote_fs \\\$syslog
    # Required-Stop:        \\\$remote_fs \\\$syslog
    # Default-Start:            2 3 4 5
    # Default-Stop:            0 1 6
    # Short-Description:   Oracle 11g Express Edition
    ### END INIT INFO
    EOM
    fi
    update-rc.d oracle-xe defaults 80 01
    EOF
    {code}
    Exit root:
    {code}
    exit
    {code}
    Set execute privileges:
    {code}
    sudo chmod 755 /sbin/chkconfig
    {code}
    Install Oracle 11gR2 Express Edition entering the following commands:
    {code}
    cd ~/Downloads/Disk1
    sudo dpkg --install ./oracle-xe_11.2.0-2_amd64.deb
    (This may take a couple of minutes)
    {code}
    Run the configuration script to create (clone) the database and follow the screen. Accept the default answers, including "y" to startup the database automatically, or modify as required.
    {code}
    sudo /etc/init.d/oracle-xe configure
    (This can take a few minutes - the installation completed successfully.)
    {code}
    To verify success, the procedure should end showing:
    {code}
    Starting Oracle Net Listener...Done
    Configuring database...Done
    Starting Oracle Database 11g Express Edition instance...Done
    Installation completed successfully.
    {code}
    Set a password for the Oracle account:
    {code}
    sudo passwd oracle
    {code}
    h2. 9) Post-Installation
    In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Copy the default account skeleton files and add the Oracle env script to .profile:
    {code}
    cp /etc/skel/.bash_logout ./
    cp /etc/skel/.bashrc ./
    cp /etc/skel/.profile ./
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and execute the following:
    {code}
    sqlplus / as sysdba
    SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    exit
    {code}
    See http://download.oracle.com/docs/cd/E17781_01/admin.112/e18585/toc.htm for more information.
    h3. a) Unity desktop configurations
    The Oracle XE menu under the previous Gnome Classic desktop shows several useful scripts to backup the database, start and stop the database, etc. Under the Unity based desktop this menu is not available. You can either switch to the Gnome Classic desktop as outlined in chapter 2, or perform the following steps to modify and copy the scripts as outlined below. The start and stop database scripts will also be modified to perform a progress feedback.
    Login as user root:
    {code}
    sudo su -
    {code}
    Convert desktop files:
    {code}
    cd /usr/share/applications
    sed -i 's/Categories.*/Categories=Database;Office;Development;/g' oraclexe*
    sed -i 's/MultipleArgs/X-MultipleArgs/g' oraclexe*
    sed -i 's/MimeType.*/MimeType=application\/x-database/g' oraclexe*
    sed -i 's/.png//g' oraclexe*
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-startdb.desktop
    sed -i 's/Terminal=false/Terminal=true/g' oraclexe-stopdb.desktop
    {code}
    Exit root:
    {code}
    exit
    {code}
    Login as user Oracle:
    {code}
    su - oracle
    {code}
    Modify database start and stop scripts:
    {code}
    cd /u01/app/oracle/product/11.2.0/xe/config/scripts
    cp startdb.sh start.sh_orig
    cp stopdb.sh stopdb.sh_orig
    sed -i 's/>.*//g' startdb.sh
    sed -i 's/>.*//g' stopdb.sh
    {code}
    You will need SYSDBA privileges and set Oracle environment variables in order to use your regular user account.
    Login to your regular user account:
    {code}
    su - dude
    {code}
    Enter the folowing command:
    {code}
    sudo usermod -a -G dba dude
    {code}
    Then update your profile to automatically set the necessary Oracle environment variables:
    {code}
    echo "" >>./.profile
    echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile
    {code}
    Update your Desktop folder to contain useful Oracle XE scripts:
    {code}
    cp /usr/share/applications/oraclexe* ~/Desktop
    chmod 750 ~/Desktop/oraclexe*
    {code}
    To verify success re-login and try "sqlplus":
    {code}
    su - oracle
    sqlplus / as sysdba
    {code}
    h2. 10) Tips and Troubleshooting
    h3. 10. a) Port 1521 appears to be in use by another application
    Error: Port 1521 appears to be in use by another application. Specify a different port.This error happens after a previously unsuccessful configuration attempt using /etc/init.d/oracle-xe configure script. The script was able to start the Listener process, but most likely failed to continue  to clone the database, e.g. ORA-00845. The following should correct the problem:
    Determine the oracle listener process that is already running:
    {code}
    $ ps -ef | grep oracle
    {code}
    Your output should be similar to:
    {code}
    oracle   19789     1  0 19:46 ?        00:00:00 /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr
    {code}
    Then kill the process, using the appropriate process id, for instance:
    {code}
    $ sudo kill -9 19789
    {code}
    h3. 10.b) cannot touch `/var/lock/subsys/listener': No such file or directory
    Starting Oracle Net Listener...touch: cannot touch `/var/lock/subsys/listener': No such file or directoryThis error occurs when you run /etc/init.d/oracle-xe configure, but failed the preinstallation step to create the /var//lock/subsys directory as outlined in chapter 8.
    h3. 10.c) ORA-00845: MEMORY_TARGET
    ORA-00845: MEMORY_TARGET not supported on this system See chapter 7 to enable /dev/shm and verify free space available in /run/shm
    h3. 10.d) Apex ADMIN password
    According to the Oracle documentation, the password for the INTERNAL and ADMIN Oracle Application Express user accounts is initially the same as the SYS and SYSTEM administrative user accounts. Well, I tried several times without success. To reset the Apex Admin password:
    Login as user oracle:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    {code}
    At the SQL prompt, type the following to be prompted to change the password:
    {code}
    SQL> @?/apex/apxxepwd.sql
    exit
    {code}
    When done, open your browser and go to http://127.0.0.1:8080/apex
    Workspace: Internal
    Username: ADMIN
    Password: password you set with apxxepwd.sql
    I will prompt you to reset the password:
    old password: password you set with apxxepwd.sql
    new password: final_password
    You can also login as the Apex Admin using http://127.0.0.1:8080/apex/apex_admin
    h3. 10.e) SYS and SYSTEM password
    Use the following commands to reset the SYS and SYSTEM passwords if necessary:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following at the SQL prompt:
    {code}
    sqlplus / as sysdba
    SQL> alter user sys identified by "password" account unlock;
    SQL> alter user system identified by "password" account unlock;
    SQL> exit
    {code}
    h3. 10.f) Uninstall Oracle 11g XE
    The following will completely uninstall and remove Oracle 11g XE:
    Open a terminal seesion and login as user root:
    {code}
    sudo su -
    {code}
    Enter the following:
    {code}
    /etc/init.d/oracle-xe stop
    dpkg --purge oracle-xe
    rm -r /u01/app
    rm /etc/default/oracle-xe
    update-rc.d -f oracle-xe remove
    update-rc.d -f oracle-mount remove
    update-rc.d -f oracle-shm remove
    {code}
    h3. 10.g) Reconfigure Oracle 11g XE
    Type the following commands in a terminal window:
    {code}
    sudo /etc/init.d/oracle-xe stop
    sudo rm /etc/default/oracle-xe
    sudo /etc/init.d/oracle-xe configure
    {code}
    h3. 10.h) Gnome Classic desktop
    Ubuntu 11 moved from the Gnome Classic desktop to Unity and removed the "Ubuntu Classic" login option. Unity was designed to make more efficient use of space given a limited screen size and touch screens. If you prefer to use the Gnome Classic desktop, enter the following into a terminal window:
    {code}
    sudo apt-get install gnome-panel
    {code}
    To log into the Gnome Classic desktop, select the "Gearwheel" at the login screen and select "Gnome Classic".
    h3. 10.i) Unix vi cursor keys
    The instructions in this tutorial do not require the use of any text editor. However, if you would like use the backspace and cursor keys in the "vi-editor", the following needs to be installed:
    {code}
    sudo apt-get install vim
    {code}
    h3. 10.j) Backup Database
    In order to perform an online database backup using the supplied "Backup Database" script, the database needs to run in Archive-Log mode. This can be setup using the following commands:
    Login as the Oracle user:
    {code}
    su - oracle
    {code}
    Login as SYSDBA and type the following:
    {code}
    sqlplus / as sysdba
    SQL> shutdown immediate
    SQL> startup mount
    SQL> alter database archivelog;
    SQL> alter database open;
    SQL> exit
    {code}
    h2. 11) History
    Version: A, 24-Oct-2011
    - first release
    Version: B, 25-Oct-2011
    - reduced instructions.
    - corrected errors in 6a and 8.
    - new strategy addressing ORA-00845 error.
    - rework of chapter 10.
    Version: C, 30-Nov-2011
    - corrected typo in 6a
    - new procedures in 9a.
    - added progress feedback to database scripts.
    Version D, 14-Jan-2012
    - corrected presentation errors.
    - reorganized instructions.
    h3. 12) References
    http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm
    http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run
    http://lwn.net/Articles/436012/
    https://forums.oracle.com/forums/thread.jspa?threadID=2300750&tstart=0
    Kind regards and best of luck!
    Dude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Excellent Blog. Thank You
    Small clarification on Step **6) Oracle Home Directory, ...a) Resize the Root Partition**
    Ubuntu 11.10 has Gparted available as a Ubuntu software download, DONT use that while trying the above step, instead download the ISO file from http://sourceforge.net/projects/gparted/files/gparted-live-stable/ gparted-live-0.12.0-5.iso (124.6 MB)
    Burn that ISO file on a Blank DVD, reboot the Ubuntu , during startup select Boot from DVD Option if not already selected. this will take to Boot Menu Options of Gparted Live then select the first menu option, and this allows to do further action such as Re-sizing .
    and once you have chosen and executed step a) . do NOT run step b) also that is "Setup External Storage"
    I hope this minor clarification can avoid some confusion
    Regards
    Madhusudhan Rao
    Edited by: MadhusudhanRao on Mar 24, 2012 11:30 PM

  • Question regarding shared_pool sizes in Oracle 11gR2

    Hi! I administer an Oracle 11gR2 database that runs on IBM hardware, OS AIX 6.1. The LPAR has 44 Gb of available memory and 8 dual-core processors assigned.
    Normally, everything runs fine and we have no problems. Today the database started rejecting connections suddenly. The issue lasted for about 14 minutes and then cleared itself. When checking the alert log, it indicated an out of memory problem with the shared_pool, ORA-4031 error.
    I am utilizing the automatic memory management feature of 11g, and memory_max_target is set to 14 Gb. I am going to increase memory_max_target to 18 Gb as part of my solution, but will that also then increase the size of the shared_pool in the SGA? Is it best to let the database manage the size of the shared_pool, or can (and should) I set it to a minimum size?
    Any help, or links to documentation or MOS notes, is greatly appreciated. Thank you!
    Mark

    Before suggesting you change your memory managment in use I would want more information such as how long have your been running the system this way?  How long had the system been running since its last startup?
    If you have access to the AWR then what does the AWR report for the problem period show?  Any unusual activity?  Were any new features or major processing added to the application recently.
    When you look at the memory management views how frequently does Oracle move granules from PGA to SGA, from the buffer cache to the shared pool and so on.
    The following support note may help with trying to investigate what issues you face in relation to ORA-04031 providing the issue re-occurs.
    Oracle document# 1088239.1 Master Note for Diagnosing ORA-4031
    HTH -- Mark D Powell --

  • Installing Oracle 11gR2 on RHE5

    Hello all,
    First of, this is my first post and I am definetly a newbie when it comes to Oracle and Linux, so bear with me.
    I am trying to install the Oracle 11gR2 32-bits database on Red Hat Enterprise 5.5 64-bits. I tried to look up information on google about this and found I needed to install certain packages for this to be possible. So I went ahead and installed the following list of packages, doing the following procedure:
    mount /dev/cdrom /mnt; cd /mnt/Server
    rpm -ivh kernel-headers-2.6.18-194.el5.x86_64.rpm
    rpm -ivh glibc-headers-2.5-49.x86_64.rpm
    rpm -ivh glibc-devel-2.5-49.x86_64.rpm
    rpm -ivh libstdc++-devel-4.1.2-48.el5.x86_64.rpm
    rpm -ivh compat-db-4.2.52-5.1.x86_64.rpm
    rpm -ivh libgomp-4.4.0-6.el5.x86_64.rpm
    rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm
    rpm -ivh gcc-c++-4.1.2-48.el5.x86_64.rpm
    rpm -ivh sysstat-7.0.2-3.el5.x86_64.rpm
    rpm -ivh unixODBC-2.2.11-7.1.x86_64.rpm
    rpm -ivh unixODBC-devel-2.2.11-7.1.x86_64.rpm
    rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
    rpm -ivh libstdc++-devel-4.1.2-48.el5.i386.rpm
    rpm -ivh unixODBC-2.2.11-7.1.i386.rpm
    rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm
    rpm -ivh libaio-devel-0.3.106-5.x86_64.rpm
    rpm -ivh elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm
    rpm -ivh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm
    rpm -ivh compat-gcc-34-3.4.6-4.x86_64.rpm
    rpm -ivh compat-gcc-34-c++-3.4.6-4.x86_64.rpm
    rpm -ivh gdb-7.0.1-23.el5.x86_64.rpm
    rpm -ivh libtermcap-devel-2.0.8-46.1.x86_64.rpm
    rpm -ivh readline-devel-5.1-3.el5.x86_64.rpm
    rpm -ivh glibc-devel-2.5-49.i386.rpm
    rpm -ivh libaio-devel-0.3.106-5.i386.rpm
    cd /; umount /mnt; eject
    I then proceeded to extract both linux_11gR2_database_1of2.zip and linux_11gR2_database_2of2.zip and did the pertinent cut/paste to the database folder. I went ahead and excuted the runInstaller.sh in the Terminal. I am logged in a regular user account, not root. As I ran the installer, I wanted to modify the installation destination to /oracle but it wouldnt let me. So I opened a new Terminal, logged in as root using su command, made my way to / and did mkdir /oracle. Then, I did cd oracle and had to create another folder for the installer to proceed, so I did mkdir /oracle/oraDirectory. The installer went fine until the pre reqs, but I ran the fix script the installer brings. I worked like charm and proceeded to start the installation.
    At that point, it gave me following message:
    Error in invoking target '' of makefile... It did two times, here is the log for the error.
    Exception Name: MakefileException
    Exception String: Error in invoking target 'nmo' of makefile '/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/oraInventory/logs/installActions2012-04-21_09-16-00AM.log' for details.
    Exception Severity: 1
    INFO: Calling Action unixActions10.2.0.3.0 make
         registerOnly = false
         installMakePath = /usr/bin/make
         installMakeFileName = /oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk
         installTarget = ctx_on
         undoMakeFileName =
         installArguments = ORACLE_HOME=/oracle/product/11.2.0/dbhome_1
         logFile = /oracle/product/11.2.0/dbhome_1/install/make.log
         undoTarget =
         progMsg = Linking Text Option
    Exception String: Error in invoking target 'agent nmhs' of makefile '/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/oraInventory/logs/installActions2012-04-21_09-16-00AM.log' for details.
    Exception Severity: 1
    INFO: Calling Action unixActions10.2.0.3.0 make
         registerOnly = false
         installMakePath = /usr/bin/make
         installMakeFileName = /oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk
         installTarget = all_no_orcl
         undoMakeFileName =
         installArguments = ORACLE_HOME=/oracle/product/11.2.0/dbhome_1
         logFile = /oracle/product/11.2.0/dbhome_1/install/make.log
         undoTarget =
         progMsg = Linking RDBMS Executables
    Exception String: Error in invoking target 'nmb' of makefile '/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/oraInventory/logs/installActions2012-04-21_09-16-00AM.log' for details.
    Exception Severity: 1
    INFO: Calling Action unixActions10.2.0.3.0 make
         registerOnly = false
         installMakePath = /usr/bin/make
         installMakeFileName = /oracle/product/11.2.0/dbhome_1/sqlplus/lib/ins_sqlplus.mk
         installTarget = install
         undoMakeFileName =
         installArguments = ORACLE_HOME=/oracle/product/11.2.0/dbhome_1
         logFile = /oracle/product/11.2.0/dbhome_1/install/make.log
         undoTarget =
         progMsg = Linking SQLPLUS Executables
    I hit continous to all three of these and the installation kept going fine, until the Oracle Net Configuration failed (INS-20802). This I cound find in the log file:
    INFO: Started Plugin named: Oracle Net Configuration Assistant
    INFO: Found associated job
    INFO: Starting 'Oracle Net Configuration Assistant'
    INFO: Starting 'Oracle Net Configuration Assistant'
    INFO: Parsing command line arguments:
    INFO: Parameter "orahome" = /oracle/product/11.2.0/dbhome_1
    INFO: Parameter "orahnam" = OraDb11g_home1
    INFO: Parameter "instype" = typical
    INFO: Parameter "inscomp" = client,oraclenet,javavm,server,ano
    INFO: Parameter "insprtcl" = tcp
    INFO: Parameter "cfg" = local
    INFO: Parameter "authadp" = NO_VALUE
    INFO: Parameter "responsefile" = /oracle/product/11.2.0/dbhome_1/network/install/netca_typ.rsp
    INFO: Parameter "silent" = true
    INFO: Done parsing command line arguments.
    INFO: Oracle Net Services Configuration:
    INFO: #
    INFO: # An unexpected error has been detected by HotSpot Virtual Machine:
    INFO: #
    INFO: # SIGSEGV (0xb) at pc=0xe45d936e, pid=10531, tid=4160395472
    INFO: #
    INFO: # Java VM: Java HotSpot(TM) Client VM (1.5.0_17-b02 mixed mode)
    INFO: # Problematic frame:
    INFO: # C [libnnz11.so+0x3c36e]
    INFO: #
    INFO: # An error report file with more information is saved as hs_err_pid10531.log
    INFO: #
    INFO: # If you would like to submit a bug report, please visit:
    INFO: # http://java.sun.com/webapps/bugreport/crash.jsp
    INFO: #
    WARNING: /oracle/product/11.2.0/dbhome_1/bin/netca: line 178: 10531 Aborted $JRE $JRE_OPTIONS -classpath $CLASSPATH oracle.net.ca.NetCA $*
    WARNING:
    INFO:
    INFO: Completed Plugin named: Oracle Net Configuration Assistant
    INFO: Oracle Net Configuration Assistant failed.
    INFO: Oracle Net Configuration Assistant failed.
    I clicked OK and then the Database Configuration failed also. Afterwards, the installer said to run two scripts, which I did, no problems there. And the installer finished with succeeded in everything but the two services.
    And that's where I stand right now, thanking in advance to you guys for any useful help. I need to get Oracle running on Linux, and be able to create and connect and mantain a database.
    Thanks again!

    929260 wrote:
    Thanks for your reply. As a complete newbie, my first question to you is if you mean to log in as the user in which I installed Oracle? Or do I need to log as user oracle? If this is the case, how do I do this?
    If you meant as the user in which I installed Oracle, here is the result for the first two commands, because the lsnrctl start and splplus commands were not found (bash: lsnrctl: command not found)
    [surecomp@localhost ~]$ id
    uid=500(surecomp) gid=500(surecomp) groups=500(surecomp)
    [surecomp@localhost ~]$ env | sort
    COLORTERM=gnome-terminal
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ekbw59v5Uf,guid=2cdc6ce1b819b25f1641af004f92d7fa
    DESKTOP_SESSION=default
    DESKTOP_STARTUP_ID=
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    GDMSESSION=default
    GDM_XSERVER_LOCATION=local
    GNOME_DESKTOP_SESSION_ID=Default
    GNOME_KEYRING_SOCKET=/tmp/keyring-1MepyQ/socket
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/surecomp/.gtkrc-1.2-gnome2
    HISTSIZE=1000
    HOME=/home/surecomp
    HOSTNAME=localhost.localdomain
    INPUTRC=/etc/inputrc
    LANG=en_US.UTF-8
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=surecomp
    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
    MAIL=/var/spool/mail/surecomp
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/surecomp/bin
    PWD=/home/surecomp
    SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/4106
    SHELL=/bin/bash
    SHLVL=2
    SSH_AGENT_PID=4142
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_AUTH_SOCK=/tmp/ssh-JLJXAd4106/agent.4106
    TERM=xterm
    USERNAME=surecomp
    USER=surecomp
    _=/usr/bin/env
    WINDOWID=26214481
    XAUTHORITY=/tmp/.gdmMB38CW
    XMODIFIERS=@im=none
    [surecomp@localhost ~]$ lsnrctl start
    bash: lsnrctl: command not found
    [surecomp@localhost ~]$ sqlplus
    bash: sqlplus: command not found
    Thank youYou need to READ & Follow Installation Guide
    http://www.oracle.com/pls/db112/portal.portal_db?selected=11&frame=

Maybe you are looking for

  • 2 tier model or 3 tier model

    Which one is better for BC4J JClient application ? using 2 tier model or 3 tier model ? Thx, Ricky H.P.

  • Running Two Systems with a Single PSU?

    Interesting setup by MSI in Computex Taipei 2006. http://sg.hardwarezone.com/articles/view.php?id=1928&cid=19&pg=1

  • Upgraded to FCPX 10.1.3 - it loads libraries then crashes

    Hello, (first time on this forum) I upgraded to FCPX 10.1.3 with no issues. Libraries loaded and all was well. I drag and dropped a video on the timeline and FCPX stalled, then crashed. Now, when I attempt to open it up it loads the libraries, sits f

  • Events getting lost during bubble

    I have spent one too many hours fooling around with this. This is just a simple test, but I have an mxml component named Test.mxml that is dispatching an event. I also have a FrontController.as that is listening for events. When an event is dispatche

  • Poor WiFi performance on new Mac Mini ?

    My new mac mini purchased a few days ago (late 2009) was exhibiting abysmal WiFi performance on 802.11n 5Ghz. I was barely getting 1Mbyte/sec through it, despite good signal strength (-50db), and my iMac which is feet away on -58db is giving almost 1