Oracle可以远程连接但是本地sqlplus无法登陆

OS: SunOS 5.10
DB: 10205 单实例
症状: 实例明明已经open,且通过tnsname可以从客户端正常连接,但是本地采用sqlplus却无法登陆;
/ as sysdba显示登陆的是一个idle instance, 使用普通用户则直接报告memory not exist;
当使用sqlplus / as sysdba本地登陆并尝试mount时,则显示ORA-01102: cannot mount database in EXCLUSIVE mode;
该机器安装有11203和10205数据库若干,11203的均可以正常连接,但是10205都是显示此类错误
[oracle]/export/home/oracle> export ORACLE_HOME=/apps/oracle/product/102
[oracle]/export/home/oracle> export ORACLE_SID=prod
[oracle]/export/home/oracle> $ORACLE_HOME/bin/sqlplus / as sysdba
ld.so.1: sqlplus: fatal: relocation error: file /apps/oracle/product/102/lib/libnnz10.so: symbol nzdacvalue: referenced symbol not found
Killed
[oracle]/export/home/oracle> echo $LD_LIBRARY_PATH
/apps/oracle/product/11203/lib
[oracle]/export/home/oracle> echo $PATH
/apps/oracle/product/11203/bin:.:/usr/ccs/bin:/usr/sbin:/usr/bin:/bin:/usr/ucb:/usr/openwin/bin:/usr/local/bin:/opt/bin:/usr/dt/bin/:/usr/ccs/bin
[oracle]/export/home/oracle> export LD_LIBRARY_PATH=$ORACLE_HOME/lib
本地登陆
[oracle]/export/home/oracle> $ORACLE_HOME/bin/sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 31 04:11:27 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL>
[oracle]/export/home/oracle> sqlplus system/******
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 31 04:12:55 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
使用tnsname则可以正常登陆
[oracle]/export/home/oracle> sqlplus system/******@prod
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 31 04:12:29 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter db_name
NAME TYPE VALUE
db_name string prod
SQL> select status from v$instance;
STATUS
OPEN
使用truss跟踪
oracle]/export/home/oracle> truss -aefo tnsplus.log sqlplus system/******
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 31 04:24:26 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
Enter user-name: ^C
不知各位有何思路,麻烦解答一下
注:环境变量的设置是无误的;没发现上传文件的按钮,贴了原帖的链接,可以点进去下载一下truss的跟踪文件
Edited by: 956503 on 2012-9-2 上午7:41

1.通过进程确认下sid
ps -ef ora_你要的sid
2.建议不同版本的数据库变量,完整的写入到一个shell文件中
然后使用的时候source shell加载下
3.你这次的错误很想是sid不正确导致
[oracle@xifenfei ~]$ ps -ef|grep ora_
oracle 26818 1 0 04:36 ? 00:00:00 ora_pmon_XFF
oracle 26820 1 0 04:36 ? 00:00:00 ora_psp0_XFF
oracle 26822 1 0 04:36 ? 00:00:00 ora_mman_XFF
oracle 26824 1 0 04:36 ? 00:00:00 ora_dbw0_XFF
oracle 26826 1 0 04:36 ? 00:00:00 ora_lgwr_XFF
oracle 26828 1 0 04:36 ? 00:00:00 ora_ckpt_XFF
oracle 26830 1 7 04:36 ? 00:00:02 ora_smon_XFF
oracle 26832 1 0 04:36 ? 00:00:00 ora_reco_XFF
oracle 26834 1 1 04:36 ? 00:00:00 ora_cjq0_XFF
oracle 26836 1 5 04:36 ? 00:00:01 ora_mmon_XFF
oracle 26838 1 0 04:36 ? 00:00:00 ora_mmnl_XFF
oracle 26840 1 0 04:36 ? 00:00:00 ora_d000_XFF
oracle 26842 1 0 04:36 ? 00:00:00 ora_s000_XFF
oracle 26847 1 0 04:37 ? 00:00:00 ora_p000_XFF
oracle 26849 1 0 04:37 ? 00:00:00 ora_p001_XFF
oracle 26851 1 1 04:37 ? 00:00:00 ora_arc0_XFF
oracle 26853 1 0 04:37 ? 00:00:00 ora_arc1_XFF
oracle 26855 1 1 04:37 ? 00:00:00 ora_qmnc_XFF
oracle 26861 1 4 04:37 ? 00:00:00 ora_q000_XFF
oracle 26867 1 3 04:37 ? 00:00:00 ora_j000_XFF
oracle 26869 1 2 04:37 ? 00:00:00 ora_j001_XFF
oracle 26874 26778 0 04:37 pts/1 00:00:00 grep ora_
[oracle@xifenfei ~]$ export ORACLE_SID=xff
[oracle@xifenfei ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 30 04:37:45 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> exit
Disconnected
[oracle@xifenfei ~]$ sqlplus chf/xifenfei
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 30 04:37:52 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Enter user-name:

Similar Messages

  • Help needed in auto-increment in Oracle SQLPlus

    hi everybody
    I have a table in which the id column should be autoincrementing. Whenever i insert a row in the table, the id should be autoincremented. How to create the table in Oracle SQL Plus. I insert the row using JDBC connection. So how to insert the value for id in java program.
    Thanks in advance

    How to use Oracle SQLPlus has absolutely nothing to do with Java or JDBC; you should ask this question in a different forum, such as one of the Oracle database forums, here:
    http://forums.oracle.com/forums/category.jspa?categoryID=18

  • Oracle sqlplus default setting

    Hi,
    Is there any way to have a particular setting by defult in oracle sqlplus. I am giving you the example of the problem:-
    SQL> select 1234567891011111 from dual;
    1234567891011111
    1.2346E+15
    SQL> column a format 9999999999999999999999999
    SQL> select 1234567891011111 a from dual;
    A
    1234567891011111
    From the above queries by default when I'm executing the query then E is coming for large values. Now I've formatted the column and got the actual value. Now my question is, can I set this by default the specific value or always I'll have to do it explicitly from sqlplus prompt.
    Thanks & Regards,
    Sudipta

    You can add this entry to glogin.sql file which is executed when sqlplus is started
    column a format 9999999999999999999999999
    This file is located on $ORACLE_HOME/sqlplus/admin/
    Best Regards
    Krystian Zieja / mob

  • Turkish character support in Oracle sqlplus

    Hi,
    when i run a query in sqlplus with turkish character there is no result.
    But i know there is a data inside the database.
    query: "SELECT NAME FROM HDF_DM.BUSINESSPARTNER WHERE NAME LIKE 'AFŞ%';" "Ş" is the turkish character.
    Is it about with the linux or Oracle database settings?
    Thanks a lot.

    user7987260 wrote:
    Hi,
    when i run a query in sqlplus with turkish character there is no result.
    But i know there is a data inside the database.
    query: "SELECT NAME FROM HDF_DM.BUSINESSPARTNER WHERE NAME LIKE 'AFŞ%';" "Ş" is the turkish character.
    Is it about with the linux or Oracle database settings?
    Thanks a lot.It is likely a problem regarding OS settings on client

  • 很全的help.sql 安装Oracle的sqlplus帮助系统

    在linux系统下的时候,我们可以通过man命令,获得系统里对某个命令的usage的解释。
    在sqlplus里我们也可以通过help和?命令。
    sqlplus的帮助主题对应的是数据库里的一张表(system.help)。
    在$ORACLE_HOME/sqlplus/admin/help/目录下的helpus.sql包含了这个表的帮助主题
    不过oracle自带的help和?的解释太少了
    在网上找了很久终于找到一个很全的help.sql叻
    下载文中附件,用system登录,因为这个是建立在system的schema里的help表里的。
    直接执行脚本就可以了。比如我把这个sql保存到$ORACLE_HOME\sqlplus\admin\help里,
    大家在这里可以看到有
    helpbld.sql
    helpdrop.sql
    helpus.sql
    hlpbld.sql
    这四个文件,这就是oracle自带的help脚本。可以执行
    helpbld.sql来安装oracle默认的help, 这里会提示你输入两个参数,看了这个源文件。
    两个参数一个是当前路径,一个是helpus.sql, 还是用system来执行,执行完就安装了help,
    就可以使用我上面的那些方式。这个是默认会安装的。
    要安装我这个最新的help文件,只需要执行就可以了
    SQL>conn system/systempwd;
    SQL>@?/sqlplus/admin/help/helpbld.sql
    输入 1 的值: F:\developer\oracle\product\10.2.0\db_1\sqlplus\admin\help
    输入 2 的值: F:\developer\oracle\product\10.2.0\db_1\sqlplus\admin\help\help.sql
    这里就会执行了,执行是有一些和默认的有冲突,可以忽略这些错误。
    成功以后,我们执行一下
    SQL> select count(*) from system.help ;
    COUNT(*)
    5085
    呵呵呵一下多了好多条了哟
    SQL> help create database;
    引用:
    CREATE DATABASE
    Use this command to create a database, making it available for
    general use, with the following options:
    * to establish a maximum number of instances, data files, redo
    log files groups, or redo log file members
    * to specify names and sizes of data files and redo log files
    * to choose a mode of use for the redo log
    * to specify the national and database character sets
    Warning: This command prepares a database for initial use and erases
    any data currently in the specified files. Only use this command
    when you understand its ramifications.
    .......这里还要好多有关create table的帮助信息,我就不写了。
    有了这个帮助系统,要查一个命令的详解,正是太方便叻。
    help.sql文件【 下载 】

  • Error when changing password of NW J2ee's secure store and Oracle sqlplus

    Hi all,
    I am wondering on the following:
    Current setting:
    I have "old_password" for J2ee configtool's secure store.
    I have "old_password" for Oracle's sapsr2 user inside Sqlplus.
    When I change the password for all 3 place from "old_password" to "new_password", I am not able to connect to configtool. I am also not able to start the Portal service; with logfile error "invalid user/password"
    If I change the password back to "old_password", I can connect to configtool as well as start the service.
    Snote and forumers (google) mention that update configtool's secure store and "alter user sapsr3" for Oracle database is all I need to change password.
    Have I miss out some step in order to change the password for my Enterprise Portal?
    Thank you.
    Regards

    edit: never mind, found the meaning of SDM.
    but the command below, is it usable?
    For Windows OS:
    Open a command prompt and navigate to the folder <Drive>:\usr\sap\DP1\JC21\SDM\program
    Execute the below commands:
    sdm jstartup "mode=standalone"
    sdm changepassword "newpassword=<Enterthenewpassword>"
    sdm jstartup "mode=integrated"
    StartServer.bat
    Edited by: Sek Yao Ooi on Dec 7, 2009 9:21 AM

  • Oracle SQLPlus problem

    was working on xp until i installed my broadband modem...getting the following error..
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

    Go into your listener.ora and tnsnames.ora files and reconfigure the host to 127.0.0.1.
    Then restart the listener.

  • Oracle Fatal error when trying to connect through sqlplus

    Hi,
    I am getting the below error when trying to connect to instance through sqlplus
    Database version is :10.2.0.3
    Operating system= Solaris Operating System (SPARC 64-bit)
    OS version=5.10
    [lscbd07p2*BMC]-\ORACLE>sqlplus
    SQL*Plus: Release 10.1.0.4.0 - Production on Fri Nov 9 07:48:24 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter user-name: /as sysdba
    ld.so.1: oracle: fatal: relocation error: file /u01/app/oracle/product/db/10.1.0.4/lib/libjox10.so: symbol kststop_: referenced symbol not found
    ERROR:
    ORA-12547: TNS:lost contact
    Enter user-name:
    Could you all please give me suggestions in order to solve this problem.
    Thanks
    Mannu

    Have you recently patched/upgraded? This sounds like there might have been a problem relinking the executables / libraries, and/or a permissions problem. For example you may be referencing a 32 bit library with your 64 bit client.
    I believe I recently read a similar case - check Metalink for this symptom.
    HTH
    Regards Nigel

  • Please help: trying to install Oracle 8.1.6.0 on Mandrake 8.1

    Hi, I am trying to install Oracle8i that comes with "Oracle for Linux Starter Kit" on Mandrake 8.1. Could someone please give tips or pointer how i can accomplish this? The Universal Installer starts fine, but then a dialog pops up about compiling sqlplus. here is a piece from the log file:
    Calling action unixActions1.7.0.17.0 make
         installMakePath = /usr/bin/make
         installMakeFileName = /usr/oracle/sqlplus/lib/ins_sqlplus.mk
         installTarget = install
         undoMakeFileName =
         installArguments = ORACLE_HOME=/usr/oracle,
         logFile = /usr/oracle/install/make.log
         undoTarget =
    Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target install of makefile /usr/oracle/sqlplus/lib/ins_sqlplus.mk
    Exception Severity: 1
    Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target install of makefile /usr/oracle/sqlplus/lib/ins_sqlplus.mk
    Exception Severity: 1
    Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target install of makefile /usr/oracle/sqlplus/lib/ins_sqlplus.mk
    Exception Severity: 1
    Calling action unixActions1.7.0.17.0 make
         installMakePath = /usr/bin/make
         installMakeFileName = /usr/oracle/network/lib/ins_net_client.mk
         installTarget = install
         undoMakeFileName =
         installArguments = ORACLE_HOME=/usr/oracle,
         logFile = /usr/oracle/install/make.log
         undoTarget =
    Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target install of makefile /usr/oracle/network/lib/ins_net_client.mk
    Exception Severity: 1
    *** Cancel Dialog: ***
    User selected: Stop installation of all products.
    Error in invoking target install of makefile /usr/oracle/network/lib/ins_net_client.mk
    Unable to read /usr/oraInventory/oraInventory/Contents/OracleHomesList.ser. Some inventory information may be lost.
    Unable to read /usr/oraInventory/oraInventory/Contents/LibsList.ser. Some inventory information may be lost.

    I had the same problem with Oracle 9i on Mandrake 8.1. I am not sure if the same fix will work or not. See my 9i on 8.1 notes at:
    http://members.home.net/joseph.j.flynn/oracle.htm
    snip---
    You will get a link error after all of the copying and unpacking has been done somewhere in disk 3. Leave the error message up on the screen and go edit the $ORACLE_HOME/bin/genclntsh script. Blank out the LD_SELF_CONTAINED env var. Save and execute the script. Hit the retry button on the installer. The alternative approach to this involves downgrading the binutils but that seemed to get awfully messy to me. (thanks to a post from Helmut Seruega for this fix)

  • Oracle 10G New Feature........Part 1

    Dear all,
    from last couple of days i was very busy with my oracle 10g box,so i think this is right time to
    share some intresting feature on 10g and some internal stuff with all of you.
    Have a look :-
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Oracle 10g Memory and Storage Feature.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1.Automatic Memory Management.
    2.Online Segment Shrink
    3.Redolog Advisor, checkpointing
    4.Multiple Temporary tablespace.
    5.Automatic Workload Repository
    6.Active Session History
    7.Misc
    a)Rename Tablespace
    b)Bigfile tablespace
    c)flushing buffer cache
    8.ORACLE INTERNAL
    a)undocumented parameter (_log_blocks_during_backup)
    b)X$ view (x$messages view)
    c)Internal Structure of Controlfile
    1.Automatic memory management
    ================================
    This feature reduce the overhead of oracle DBA.previously mostly time we need to set diff oracle SGA parameter for
    better performance with the help of own experience,advice views and by monitoring the behaviour
    of oracle database.
    this was just time consuming activity.........
    Now this feature makes easy life for oracle DBA.
    Just set SGA_TARGET parameter and it automatically allocate memory to different SGA parameter.
    it focus on DB_CACHE_SIZE
    SHARED_POOL_SIZE
    LARGE_POOL
    JAVA_POOL
    and automatically set it as
    __db_cache_size
    __shared_pool_size
    __large_pool_size
    __java_pool_size
    check it in alert_log
    MMAN(memory manager) process is new in 10g and this is responsible for sga tuning task.
    it automatically increase and decrease the SGA parameters value as per the requirement.
    Benefit:- Maximum utlization of available SGA memory.
    2.Online Segment Shrink.
    ==========================
    hmmmmm again a new feature by oracle to reduce the downtime.Now oracle mainly focus on availablity
    thats why its always try to reduce the downtime by intrducing new feature.
    in previous version ,reducing High water mark of table was possible by
    Exp/imp
    or
    alter table move....cmd. but on these method tables was not available for normal use for long hrs if it has more data.
    but in 10g with just few command we can reduce the HWmark of table.
    this feature is available for ASSM tablespaces.
    1.alter table emp enable row movement.
    2.alter table emp shrink space.
    the second cmd have two phases
    first phase is to compact the segment and in this phase DML operations are allowed.
    second phase(shrink phase)oracle shrink the HWM of table, DML operation will be blocked at that time for short duration.
    So if want to shrink the HWM of table then we should use it with two diff command
    first compact the segment and then shrink it on non-peak hrs.
    alter table emp shrink space compact. (This cmd doesn't block the DML operation.)
    and alter table emp shrink space. (This cmd should be on non-peak hrs.)
    Benefit:- better full table scan.
    3.Redolog Advisor and checkpointing
    ================================================================
    now oracle will suggest the size of redo log file by V$INSTANCE_RECOVERY
    SELECT OPTIMAL_LOGFILE_SIZE
    FROM V$INSTANCE_RECOVERY
    this value is influence with the value of FAST_START_MTTR_TARGET .
    Checkpointing
    Automatic checkpointing will be enable after setting FAST_START_MTTR_TARGET to non-zero value.
    4.Multiple Temporary tablespace.
    ==================================
    Now we can manage multiple temp tablespace under one group.
    we can create a tablespace group implicitly when we include the TABLESPACE GROUP clause in the CREATE TEMPORARY TABLESPACE or ALTER TABLESPACE statement and the specified tablespace group does not currently exist.
    For example, if group1 is not exists,then the following statements create this groups with new tablespace
    CREATE TEMPORARY TABLESPACE temp1 TEMPFILE '/u02/oracle/data/temp01.dbf'
    SIZE 50M
    TABLESPACE GROUP group1;
    --Add Existing temp tablespace into group by
    alter tablespace temp2 tablespace group group1.
    --we can also assign the temp tablespace group on database level as default temp tablespace.
    ALTER DATABASE <db name> DEFAULT TEMPORARY TABLESPACE group1;
    benefit:- Better I/O
    One sql can use more then one temp tablespace
    5.AWR(Automatic Workload Repository):-
    ================================== AWR is built in Repository and Central point of Oracle 10g.Oracle self managing activities
    is fully dependent on AWR.by default after 1 hr, oracle capure all database uses information and store in AWR with the help of
    MMON process.we called it Memory monitor process.and all these information are kept upto 7 days(default) and after that it automatically purge.
    we can generate a AWR report by
    SQL> @?/rdbms/admin/awrrpt
    Just like statspack report but its a advance and diff version of statspack,it provide more information of Database as well as OS.
    it show report in Html and Text format.
    we can also take manually snapshot for AWR by
    BEGIN
    DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
    END;
    **The STATISTICS_LEVEL initialization parameter must be set to the TYPICAL or ALL to enable the Automatic Workload Repository.
    [oracle@RMSORA1 oracle]$ sqlplus / as sysdba
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Mar 17 10:37:22 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @?/rdbms/admin/awrrpt
    Current Instance
    ~~~~~~~~~~~~~~~~
    DB Id DB Name Inst Num Instance
    4174002554 RMSORA 1 rmsora
    Specify the Report Type
    ~~~~~~~~~~~~~~~~~~~~~~~
    Would you like an HTML report, or a plain text report?
    Enter 'html' for an HTML report, or 'text' for plain text
    Defaults to 'html'
    Enter value for report_type: text
    Type Specified: text
    Instances in this Workload Repository schema
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    DB Id Inst Num DB Name Instance Host
    * 4174002554 1 RMSORA rmsora RMSORA1
    Using 4174002554 for database Id
    Using 1 for instance number
    Specify the number of days of snapshots to choose from
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Entering the number of days (n) will result in the most recent
    (n) days of snapshots being listed. Pressing <return> without
    specifying a number lists all completed snapshots.
    Listing the last 3 days of Completed Snapshots
    Snap
    Instance DB Name Snap Id Snap Started Level
    rmsora RMSORA 16186 16 Mar 2006 17:33 1
    16187 16 Mar 2006 18:00 1
    16206 17 Mar 2006 03:30 1
    16207 17 Mar 2006 04:00 1
    16208 17 Mar 2006 04:30 1
    16209 17 Mar 2006 05:00 1
    16210 17 Mar 2006 05:31 1
    16211 17 Mar 2006 06:00 1
    16212 17 Mar 2006 06:30 1
    16213 17 Mar 2006 07:00 1
    16214 17 Mar 2006 07:30 1
    16215 17 Mar 2006 08:01 1
    16216 17 Mar 2006 08:30 1
    16217 17 Mar 2006 09:00 1
    Specify the Begin and End Snapshot Ids
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Enter value for begin_snap: 16216
    Begin Snapshot Id specified: 16216
    Enter value for end_snap: 16217
    End Snapshot Id specified: 16217
    Specify the Report Name
    ~~~~~~~~~~~~~~~~~~~~~~~
    The default report file name is awrrpt_1_16216_16217.txt. To use this name,
    press <return> to continue, otherwise enter an alternative.
    Benefit:- Now DBA have more free time to play games.....................:-)
    Advance version of statspack
    more DB and OS information with self managing capabilty
    New Automatic alert and database advisor with the help of AWR.
    6.Active Session History:-
    ==========================
    V$active_session_history is view that contain the recent session history.
    the memory for ASH is comes from SGA and it can't more then 5% of Shared pool.
    So we can get latest and active session report from v$active_session_history view and also get histortical data of
    of session from DBA_HIST_ACTIVE_SESS_HISTORY.
    v$active_session_history include some imp column like:-
    ~SQL identifier of SQL statement
    ~Object number, file number, and block number
    ~Wait event identifier and parameters
    ~Session identifier and session serial number
    ~Module and action name
    ~Client identifier of the session
    7.Misc:-
    ========
    Rename Tablespace:-
    =================
    in 10g,we can even rename a tablespace by
    alter tablespace <tb_name> rename to <tb_name_new>;
    This command will update the controlfile,data dictionary and datafile header,but dbf filename will be same.
    **we can't rename system and sysaux tablespace.
    Bigfile tablespace:-
    ====================
    Bigfile tablespace contain only one datafile.
    A bigfile tablespace with 8K blocks can contain a 32 terabyte datafile.
    Bigfile tablespaces are supported only for locally managed tablespaces with automatic segment-space management.
    we can take the advantage of bigfile tablespace when we are using ASM or other logical volume with RAID.
    without ASM or RAID ,it gives poor response.
    syntax:-
    CREATE BIGFILE TABLESPACE bigtbs
    Flushing Buffer Cache:-
    ======================
    This option is same as flushing the shared pool,but only available with 10g.
    but i don't know, whats the use of this command in prod database......
    anyway we can check and try it on test server for tuning n testing some query etc....
    SQL> alter system flush buffer_cache;
    System altered.
    ++++++++++++++++++
    8.Oracle Internal
    ++++++++++++++++++
    Here is some stuff that is not related with 10g but have some intresting things.
    a)undocumented parameter "_log_blocks_during_backup"
    ++++++++++++++++++++++++
    as we know that oracle has generate more redo logs during hotbackup mode because
    oracle has to maintain the a complete copy of block into redolog due to split block.
    we can also change this behaviour by setting this parameter to False.
    If Oracle block size equals the operating system block size.thus reducing the amount of redo generated
    during a hot backup.
    WITHOUT ORACLE SUPPORT DON'T SET IT ON PROD DATABASE.THIS DOCUMENT IS JUST FOR INFORMATIONAL PURPOSE.
    b)some X$ views (X$messages)
    ++++++++++++++++
    if you are intresting in oracle internal architecture then x$ view is right place for getting some intresting things.
    X$messages :-it show all the actions that a background process do.
    select * from x$messages;
    like:-
    lock memory at startup MMAN
    Memory Management MMAN
    Handle sga_target resize MMAN
    Reset advisory pool when advisory turned ON MMAN
    Complete deferred initialization of components MMAN
    lock memory timeout action MMAN
    tune undo retention MMNL
    MMNL Periodic MQL Selector MMNL
    ASH Sampler (KEWA) MMNL
    MMON SWRF Raw Metrics Capture MMNL
    reload failed KSPD callbacks MMON
    SGA memory tuning MMON
    background recovery area alert action MMON
    Flashback Marker MMON
    tablespace alert monitor MMON
    Open/close flashback thread RVWR
    RVWR IO's RVWR
    kfcl instance recovery SMON
    c)Internal Structure of Controlfile
    ++++++++++++++++++++++++++++++++++++
    The contents of the current controlfile can be dumped in text form.
    Dump Level Dump Contains
    1 only the file header
    2 just the file header, the database info record, and checkpoint progress records
    3 all record types, but just the earliest and latest records for circular reuse record types
    4 as above, but includes the 4 most recent records for circular reuse record types
    5+ as above, but the number of circular reuse records included doubles with each level
    the session must be connected AS SYSDBA
    alter session set events 'immediate trace name controlf level 5';
    This dump show lots of intresting information.
    it also show rman recordes if we used this controlfile in rman backup.
    Thanks
    Kuljeet Pal Singh

    You can find each doc in html and pdf format on the Documentation Library<br>
    You can too download all the documentation in html format to have all on your own computer here (445.8MB)<br>
    <br>
    Nicolas.

  • 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

  • Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto

    h2. Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto
    Version: B
    Author: Dude, 24. May 2011
    The following are step by step instructions how to install Oracle 11gR2 Express Edition (Beta) under Linux Ubuntu 11.04, 64-bit.
    Access to the Internet is required.
    The instructions cover the following additional topics:
    - Converting Red Hat based Oracle XE installer to Ubuntu.
    - Work-around for missing /sbin/chkconfig tool.
    - Install Oracle XE into a different directory or disk volume.
    - Relocate and configure the Oracle user and default login directory.
    - Uninstall, reconfigure and perform first database backup.
    - Notes and web links.
    - Troubleshooting
    h3. A) System Setup and Prerequisites
    h4. A.1. System Access
    You will need terminal command line, root and system console access to perform the setup tasks.
    To open a Terminal at the system console:
    Menu Applications > Accessories > TerminalThe following commands will enable remote ssh login with root access:
    sudo apt-get install openssh-server
    sudo passwd root
    Verify:
    ssh root@xe_server_host_nameh4. A.2. Software Prerequisites
    The following is required in order to install Oracle 11gR2 XE:
    sudo apt-get install alien libaio1 unixodbcThe following is not required, but it will fix backspace and arrow keys in case you prefer using the vi-editor:
    sudo apt-get install vimh4. A.3. System Swap space
    Minimum swap space required is 2 GB. You can increase swap space if necessary using a swap file:
    To analyze current swap space and memory configuration:
    sudo cat /proc/meminfo
    To install a 1 GB swapfile named swapfile in /, for example:
    sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
    (this may take a while)
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.orig
    sudo echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
    Verify:
    sudo swapon -a
    sudo swapon -sh4. A.4. Kernel Parameters
    Oracle 11g XE requires the following additional kernel parameters:
    sudo nano /etc/sysctl.d/60-oracle.conf
    (Enter the following)
    # Oracle 11g XE kernel parameters
    fs.file-max=6815744
    net.ipv4.ip_local_port_range=9000 65000
    kernel.sem=250 32000 100 128
    kernel.shmmax=536870912
    (Save the file)
    Note: kernel.shmmax = max possible value, e.g. size of physical RAM.
    Verify: sudo cat /etc/sysctl.d/60-oracle.conf
    Load new kernel parameters:
    sudo service procps start
    Verify:
    sudo sysctl -q fs.file-max
    -> fs.file-max = 6815744h4. A.5. Oracle Installation Directory
    The current Oracle Installation Guide uses the same directory like in previous versions: /usr/lib/oracle/xe/app/oracle/product/11.2.0/server. However, the current Beta installation uses Oracle Flexible Architecture (OFA) and installs into /u01/app/oracle/product/11.2.0/xe. Due to size limitations of Oracle XE it may not be necessary to store the installation to a specific directory or separate volume, but it is possible:
    Install Oracle XE to separate disk volume:
    From the system console menu: System > Administration > Disk Utility
    Select "ext3" filesystem for Oracle compatibility and specify a Volume label, e.g. Oracle.
    Notice the device name e.g. /dev/sdb
    Get the drive UUID:
    sudo blkid
    e.g. /dev/sdb: UUID="d19a2d8f-da43-4802-8bdb-0703c855e23a"
    Modify /etc/fstab to automatically mount the volume at system startup:
    sudo cp /etc/fstab /etc/fstab.original
    sudo nano /etc/fstab
    (Add the following, using determined UUID, for exmple)
    UUID=d19a2d8f-da43-4802-8bdb-0703c855e23a /u01 ext3 defaults,errors=remount-ro 0 1
    (Save the file)
    Create the mount-point, mount the new volume and set ownership and privileges:
    sudo mkdir /u01
    sudo mount -a
    sudo chown root:root /u01
    sudo chmod 755 /u01
    Verify:
    df -h
    or restart the systemYou can also install Oracle XE into a specific directory:
    Create a symbolic link to store the installation into an existing directory, for instance:
    sudo mkdir /home/oracle-xe
    sudo ln -s /home/oracle-xe /u01h3. C) Oracle 11g XE Download and Installation
    h4. C.1. Download and convert the Installer from Red Hat to Ubuntu
    Please see section E.3. to download the Oracle 11gR2 XE installer.
    Select the version listed for Linux x64.
    sudo unzip linux.x64_11gR2_OracleXE.zip
    sudo alien --to-deb --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
    (This may take a while)h4. C.2. Create a special chkconfig script
    The Red Hat based installer of Oracle XE 11gR2 beta relies on +/sbin/chkconfig+, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
    Create /sbin/chconfig:
    sudo nano /sbin/chkconfig
    (Cut and paste the following)
    #!/bin/bash
    # Oracle 11gR2 XE installer chkconfig hack for Debian by Dude
    file=/etc/init.d/oracle-xe
    if [[ ! `tail -n1 $file | grep INIT` ]]; then
       echo >> $file
       echo '### BEGIN INIT INFO' >> $file
       echo '# Provides:             OracleXE' >> $file
       echo '# Required-Start:       $remote_fs $syslog' >> $file
       echo '# Required-Stop:        $remote_fs $syslog' >> $file
       echo '# Default-Start:        2 3 4 5' >> $file
       echo '# Default-Stop:         0 1 6' >> $file
       echo '# Short-Description:    Oracle 11g Express Edition' >> $file
       echo '### END INIT INFO' >> $file
    fi
    update-rc.d oracle-xe defaults 80 01
    (Save the file)
    Set appropriate execute privileges:
    chmod 755 /sbin/chkconfig
    Note: You should remove the /sbin/chkconfig file after successful installation of Oracle XE.
    h4. C.3. Install and configure Oracle XE
    sudo dpkg --install ./oracle-xe_11.2.0-1.5_amd64.deb
    /etc/init.d/oracle-xe configure
    (This will take a while)
    Remove the /sbin/chkconfig script, which is no longer needed.
    sudo rm /sbin/chkconfigh4. C.4. Relocate and Configure the Oracle user login
    The Oracle XE installer specifies /u01/app/oracle as the login directory for the Oracle user. Although not really necessary, the following will relocate the Oracle user $HOME to a standard location and create standard /etc/skel login files:
    Exit all Oracle user sessions:
    sudo /etc/init.d/oracle-xe stop
    sudo kill -9 `ps -ef | grep oracle | grep -v grep | awk '{print $2}'`
    sudo userdel oracle
    sudo useradd -s /bin/bash -G dba -g dba -m oracle
    sudo passwd oracle
    Verify:
    sudo id oracle
    -> uid=1001(oracle) gid=1001(dba) groups=1001(dba)h4. C.5. Setup Oracle environment variables
    In order to use sqlplus and other tools, the Oracle account requires certain environment variables. The following will set these variables automatically at every interactive Oracle login:
    sudo echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> /home/oracle/.bashrch4. C.6. Oracle sudo root access
    It is not essential to allow the Oracle user to use sudo, but it is convenient:
    usermod -G admin oracle
    Verify:
    id oracle
    -> uid=1001(oracle) gid=1001(dba) groups=1001(dba),120(admin)
    sudo su -
    -> Enter Oracle account passwordh4. C.7. Oracle 11g XE Post-installation
    After you install Oracle Database XE, its graphical user interface is only available from the local server, but not remotely.
    The following will correct the problem if necessary:
    Login as user Oracle or use:
    su - oracle
    sqlplus / as sysdba
    At the SQL prompt, enter the following command:
    EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
    exith3. D) Unintstall, Reconfigure and Troubleshooting
    h4. D.1. Uninstall Oracle 11g XE
    The following will completely uninstall and remove Oracle 11g XE:
    Login as user root:
    sudo su -
    /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 removeh4. D.2. Reconfigure Oracle 11g XE
    Type the following in a terminal window:
    /etc/init.d/oracle-xe stop
    sudo rm /etc/default/oracle-xe
    /etc/init.d/oracle-xe configureh4. D.3. Enable Archivelog mode and perform a database backup
    Login as user Oracle:
    su - oracle
    sqlplus / as sysdba
    At the SQL prompt, enter the following commands:
    shutdown immediate
    startup mount
    alter database archivelog;
    alter database open;
    exit
    Login to system console of the Oracle user account:
    Select Applications > Oracle Database 11g Express Edition > Backup Databaseh3. E) Notes
    h4. E.1. Oracle 11g XE limitiations overview
    - It will consume, at most, processing resources equivalent to one CPU.
    - Only one installation of Oracle Database XE can be performed on a single computer.
    - The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
    - The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
    - HTTPS is not supported natively with the HTTP listener built into Oracle Database XE.
    h4. E.2. Documentation and Links
    Official documentation for Oracle 11gR2 XE can be found at:
    http://www.oracle.com/pls/xe112/homepage
    h4. E.3. Oracle 11g XE downloads
    The Installer is available from the Oracle Technology Network at:
    http://www.oracle.com/technology/products/database/xe
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    h4. E.4 APEX links and archives
    The APEX archives can be found at:
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/all-archives-099381.html
    The APEX download site is:
    http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
    h3. F) Troubleshooting
    ... in progress
    Regards and best of luck!
    Edited by: Dude on May 25, Version B: various corrections. chkconfig package (A.2.) not required.

    even though I am admin user.Admin user is a MS Windows term, that does not apply to Linux or Unix in the same fashion.
    The configuration script tells you "You must be root user to run the configure script. Login as root user and
    then run the configure script."
    This is most likely correct because your account is not root and does not have UID 0. What you can do is to login as root e.g. sudo su -, as the message suggest, or use "sudo /etc/init.d/oracle-xe configure", provided your account is defined in the /etc/sudoers file to perform root/admin actions.
    Btw, do not modify /etc/passwd and /etc/group to give you admin privileges or try to create a another root account under a different name. That's not the way it works and usually leads to nasty problems.

  • Can't mount oracle database on linux system

    This is same as previous posting just added
    e-mail and username info fo forum posting.
    I am not able to mount an Oracle database.
    I am new to Oracle and am working on an Oracle8i installation on an
    Intel Linux Suse 6.3 platform. I am using only one harddrive and am
    not using the 4 mount points as mentioned for efficiecy purposes in
    the Oracle documentation..I am using the installation cd from Oracle8i
    for Linux Starter Kit by Oracle Press. If anyone has this book they
    can refer to pages 41-44 for the examples I followed.
    As sysdba in sqplplus using the STARTUP command I can not Mount the
    database -step 2 of the 3 stage process (Start, Mount and Open the
    database) of opening an Oracle database.
    I show the errors I encountered when I did the first 2 of the 3 steps
    in the step-by-step mode (STARTUP NOMOUNT pfile=, ALTER DATABASE
    MOUNT) in the sqlplus session and alert log respectively with startup
    nomount and alter database mount for this sqlplus session.
    Additionally I show the init.ora file lines referring to control file
    which seem to be referred to by the sqlplus error messages and the
    alert.log file. Perhaps some can give me some advice as what I can try
    to fix this problem.
    At the end of this e-mail I added several questions I had in regard to the control
    files. Any help is appreciated.
    Well, here are the sqlplus session results and its alert.log file:
    Oracle sqlplus session usr/oracle as sysdba
    oracle@CHESTNUT:~ > sqlplus
    SQL*Plus: Release 8.1.6.0.0 - Production on Mon Mar 19 20:47:49 2001
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter user-name: usr/oracle as sysdba
    Connected to an idle instance.
    SQL> startup nomount pfile=/usr/oracle/dbs/init.ora ;
    ORACLE instance started.
    Total System Global Area 24989680 bytes
    Fixed Size 69616 bytes
    Variable Size 24637440 bytes
    Database Buffers 204800 bytes
    Redo Buffers 77824 bytes
    SQL> alter database mount ;
    alter database mount
    ERROR at line 1:
    ORA-00205: error in identifying controlfile, check alert log for more
    info
    SQL> shutdown immediate ;
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> exit
    Disconnected
    oracle@CHESTNUT:~ >
    alert.log file for above session
    Mon Mar 19 20:48:38 2001
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    LICENSE_MAX_USERS = 0
    Starting up ORACLE RDBMS Version: 8.1.6.1.0.
    System parameters with non-default values:
    processes = 50
    shared_pool_size = 3500000
    control_files = ora_control1, ora_control2
    db_block_buffers = 100
    log_buffer = 32768
    log_checkpoint_interval = 10000
    db_files = 80
    db_file_multiblock_read_count= 8
    global_names = TRUE
    db_name = DEFAULT
    parallel_max_servers = 5
    max_dump_file_size = 10240
    PMON started with pid=2
    Load Indicator not supported by OS !
    DBW0 started with pid=3
    LGWR started with pid=4
    CKPT started with pid=5
    SMON started with pid=6
    RECO started with pid=7
    Mon Mar 19 20:48:58 2001
    alter database mount
    Mon Mar 19 20:48:58 2001
    ORA-00202: controlfile: 'ora_control1'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Mon Mar 19 20:49:01 2001
    ORA-205 signalled during: alter database mount
    Mon Mar 19 20:49:12 2001
    Shutting down instance (immediate)
    License high water mark = 1
    Mon Mar 19 20:49:12 2001
    ALTER DATABASE CLOSE NORMAL
    ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL...
    archiving is disabled
    init.ora control files
    # define two control files by default
    control_files = (ora_control1, ora_control2)
    Here are my control file questions:
    I need to know several points:
    1) What are control files susposed to
    contain and how would I recognize them?
    I used the
    unix find /usr/oracle \*ctl* -print
    command to locate files with a ctl extension.
    This resulted in about a dozen such files in
    different directories as shown below:
    ./bin/lsnrctl
    ./bin/extractlib
    ./bin/agtctl
    ./bin/oidctl
    ./bin/lsnrctl0
    ./bin/agtctlO
    ./rdbms/demo/ulcase1.ctl
    ./rdbms/demo/ulcase10.ctl
    ./rdbms/demo/ulcase2.ctl
    ./rdbms/demo/ulcase3.ctl
    ./rdbms/demo/ulcase4.ctl
    ./rdbms/demo/ulcase5.ctl
    ./rdbms/demo/ulcase6.ctl
    ./rdbms/demo/ulcase7.ctl
    ./rdbms/demo/ulcase8.ctl
    ./rdbms/demo/ulcase9.ctl
    ./ldap/load/dn.ctl
    ./ldap/load/attr_store.ctl
    ./ord/ts/demo/tsquick/tsquick.ctl
    ./ord/ts/demo/usageutl/utildat.ctl
    ./ord/ts/demo/usage/stockdat.ctl
    ./ord/ts/demo/usage/stockinc.ctl
    ./ord/ts/demo/retrofit/sales.ctl
    ./ord/ts/demo/retrofit/sales2.ctl
    ./ord/ts/demo/applet/indexdemo.ctl
    ./javavm/admin/libjox8com_sun_jndi_ldap_ctl.so
    ./md/demo/examples/migctl.h
    ./md/demo/examples/migctl.c
    2) On page 100 in the book Oracle 8i A Beginners's
    by Oracle Press mention is made of a
    CREATE CONTROLFILE command that can under
    circumstances be used to re-create a control-file.
    but that is all that is said about it. Perhaps
    you might know something more about it.
    3) Would you recommend any good text for
    Oracle DBA's, especially for the problem of the sort
    that I am encountering?
    [email protected]
    null

    It's probably not supported on RHEL5/Centos5/etc., but...
    You can get the installer to function using the following steps:
    - extract the cal_linux_*.tar.gz, and cd into the OracleCalendar_inst directory
    In there is the actual installer, cal_linux.
    - the cal_linux is shell script wrapped around some binary blobs. The installer's
    problem is that Oracle is setting the LD_ASSUME_KERNEL=2.2.5 environment
    variable, which is a mistake on RHEL5. You need to make it not set that variable,
    but you need to do so in a way that the size of the shell script does not change at all,
    and none of the binary blobs are impacted.
    - the approach I took was
    mv cal_linux cal_linux.BAK
    sed -e 's/LD_ASSUME_KERNEL=2.2.5/LD_ASSUME_KERNEL= /g' < cal_linux.BAK > cal_linux
    chmod a+rx cal_linux
    cal_linux -i gui
    Note: you must have exactly 5 spaces in the substitution part of the sed command, because you're replacing 5 characters (2.2.5), and the size of the shell script must not change.
    If you do that, the installer should run (one warning from awk still) and you should be able to install the product.
    Tim

  • Can't mount database using Oracle 8i on linux

    I am not able to mount an Oracle database.
    I am new to Oracle and am working on an Oracle8i installation on an
    Intel Linux Suse 6.3 platform. I am using only one harddrive and am
    not using the 4 mount points as mentioned for efficiecy purposes in
    the Oracle documentation..I am using the installation cd from Oracle8i
    for Linux Starter Kit by Oracle Press. If anyone has this book they
    can refer to pages 41-44 for the examples I followed.
    As sysdba in sqplplus using the STARTUP command I can not Mount the
    database -step 2 of the 3 stage process (Start, Mount and Open the
    database) of opening an Oracle database.
    I show the errors I encountered when I did the first 2 of the 3 steps
    in the step-by-step mode (STARTUP NOMOUNT pfile=, ALTER DATABASE
    MOUNT) in the sqlplus session and alert log respectively with startup
    nomount and alter database mount for this sqlplus session.
    Additionally I show the init.ora file lines referring to control file
    which seem to be referred to by the sqlplus error messages and the
    alert.log file. Perhaps some can give me some advice as what I can try
    to fix this problem.
    At the end of this e-mail I added several questions I had in regard to the control
    files. Any help is appreciated.
    Well, here are the sqlplus session results and its alert.log file:
    Oracle sqlplus session usr/oracle as sysdba
    oracle@CHESTNUT:~ > sqlplus
    SQL*Plus: Release 8.1.6.0.0 - Production on Mon Mar 19 20:47:49 2001
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter user-name: usr/oracle as sysdba
    Connected to an idle instance.
    SQL> startup nomount pfile=/usr/oracle/dbs/init.ora ;
    ORACLE instance started.
    Total System Global Area 24989680 bytes
    Fixed Size 69616 bytes
    Variable Size 24637440 bytes
    Database Buffers 204800 bytes
    Redo Buffers 77824 bytes
    SQL> alter database mount ;
    alter database mount
    ERROR at line 1:
    ORA-00205: error in identifying controlfile, check alert log for more
    info
    SQL> shutdown immediate ;
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> exit
    Disconnected
    oracle@CHESTNUT:~ >
    alert.log file for above session
    Mon Mar 19 20:48:38 2001
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    LICENSE_MAX_USERS = 0
    Starting up ORACLE RDBMS Version: 8.1.6.1.0.
    System parameters with non-default values:
    processes = 50
    shared_pool_size = 3500000
    control_files = ora_control1, ora_control2
    db_block_buffers = 100
    log_buffer = 32768
    log_checkpoint_interval = 10000
    db_files = 80
    db_file_multiblock_read_count= 8
    global_names = TRUE
    db_name = DEFAULT
    parallel_max_servers = 5
    max_dump_file_size = 10240
    PMON started with pid=2
    Load Indicator not supported by OS !
    DBW0 started with pid=3
    LGWR started with pid=4
    CKPT started with pid=5
    SMON started with pid=6
    RECO started with pid=7
    Mon Mar 19 20:48:58 2001
    alter database mount
    Mon Mar 19 20:48:58 2001
    ORA-00202: controlfile: 'ora_control1'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Mon Mar 19 20:49:01 2001
    ORA-205 signalled during: alter database mount
    Mon Mar 19 20:49:12 2001
    Shutting down instance (immediate)
    License high water mark = 1
    Mon Mar 19 20:49:12 2001
    ALTER DATABASE CLOSE NORMAL
    ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL...
    archiving is disabled
    init.ora control files
    # define two control files by default
    control_files = (ora_control1, ora_control2)
    Here are my control file questions:
    I need to know several points:
    1) What are control files susposed to
    contain and how would I recognize them?
    I used the
    unix find /usr/oracle \*ctl* -print
    command to locate files with a ctl extension.
    This resulted in about a dozen such files in
    different directories as shown below:
    ./bin/lsnrctl
    ./bin/extractlib
    ./bin/agtctl
    ./bin/oidctl
    ./bin/lsnrctl0
    ./bin/agtctlO
    ./rdbms/demo/ulcase1.ctl
    ./rdbms/demo/ulcase10.ctl
    ./rdbms/demo/ulcase2.ctl
    ./rdbms/demo/ulcase3.ctl
    ./rdbms/demo/ulcase4.ctl
    ./rdbms/demo/ulcase5.ctl
    ./rdbms/demo/ulcase6.ctl
    ./rdbms/demo/ulcase7.ctl
    ./rdbms/demo/ulcase8.ctl
    ./rdbms/demo/ulcase9.ctl
    ./ldap/load/dn.ctl
    ./ldap/load/attr_store.ctl
    ./ord/ts/demo/tsquick/tsquick.ctl
    ./ord/ts/demo/usageutl/utildat.ctl
    ./ord/ts/demo/usage/stockdat.ctl
    ./ord/ts/demo/usage/stockinc.ctl
    ./ord/ts/demo/retrofit/sales.ctl
    ./ord/ts/demo/retrofit/sales2.ctl
    ./ord/ts/demo/applet/indexdemo.ctl
    ./javavm/admin/libjox8com_sun_jndi_ldap_ctl.so
    ./md/demo/examples/migctl.h
    ./md/demo/examples/migctl.c
    2) On page 100 in the book Oracle 8i A Beginners's
    by Oracle Press mention is made of a
    CREATE CONTROLFILE command that can under
    circumstances be used to re-create a control-file.
    but that is all that is said about it. Perhaps
    you might know something more about it.
    3) Would you recommend any good text for
    Oracle DBA's, especially for the problem of the sort
    that I am encountering?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ():
    I am not able to mount an Oracle database.<HR></BLOCKQUOTE>
    Hi ()
    My problem is accessing the database with sqlplus system/manager @oralin, on page 55 of the Linux starter kit. Do you notice the space here, between system/manager.. and.. @oralin. I think it needs to be there.
    Is your database named Chestnut?
    And for Startup, why are you using init.ora? the book mentions initoralin.ora on page 43.
    Your configurations are different than recommended in the book. I'm not sure if any of this helps, but maybe you can help me. When I try sqlplus system/manager @oralin, the response is: can't connect to oralin.sql.
    According to the book, I need to use @oralin at the end of the command in order to see if I have properly configured the server for MTS, a multithreaded server.
    Any ideas? I hope I can help further.
    gilles56

  • Oracle Instance shows connected,Yet am ORA-01012: not logged on

    Hi experts,
    Please help in log in to my database, which unfortunately was happening an hour before, but now it is not working
    In between I only did a change in some permission stuff for my base directory, but later brought it back to original permissions.
    Still it is haunting me..
    I have set up my SID/HOME/PATH perfectly, tried to check processes at OS level, they are less, still nothing is happening though database is up and running.
    I can see it at OS level and through ALert log..
    ==================
    oracle@dap-csw-ora01 /home/oracle > ps -ef|grep pmon
    oracle 3145946 1 0 18 feb - 0:44 asm_pmon_+ASM1
    oracle 7995430 1 0 18 feb - 0:50 ora_pmon_adobe_2
    oracle 13828212 11141232 0 14:59:09 pts/0 0:00 grep pmon
    oracle 7471386 1 0 18 feb - 0:57 ora_pmon_fxss_1
    oracle@dap-csw-ora01 /home/oracle > sqlplus
    SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 21 14:59:12 2013
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    Enter user-name: /as sysdba
    Connected.
    SQL> show user
    USER is "SYS"
    SQL> select instance_name,status from v$Instance;
    select instance_name,status from v$Instance
    ERROR at line 1:
    ORA-01012: not logged on
    Process ID: 0
    Session ID: 0 Serial number: 0

    CKPT wrote:
    Now I understood,..it is not a problem with permission something else is making this mess..though unknown..
    I bounced one of the database after taking permission from apps team, Now it works perfect...no issue whatsoever..
    But I want to know the reason..I dont want to face it any more...Whenever oracle installs[OUI], It knows well what the permissions to be assigned and what needed.
    You should not disturb them, What are the users, groups, executable, read, write permissions earlier and after changes and now?
    And i interestingly wanted to know why you wanted to test such things on production. Its like playing with fire so be cautious or else it costs a lot :)Basha,
    I don't think that there was any other way for the OP to solve the error. Either he could wait (which doesn't help normally in this error) or had to bounce the db, which he did. Also, with permission he meant, telling to the App team and than going for a bounce. I can't a mentioning of changing permissions anywhere .
    Aman....

Maybe you are looking for

  • Centering and displaying 100% in browser won't work.

    I believe I followed the instructions that were posted previously and I did some reading about centering a page and displaying the page at 100% but I can't seem to make them work correctly. I might have a conflict or something can you help. I designe

  • Any way to suppress screen output for Datapump??

    I've got a call to expdp in a win batch file, I'd prefer (if possible) to have the screen just show a user-friendly 'Exporting..' message and it write the job output to the log. I've tried redirect (>) but it doesn't appear to work. any ideas? thx in

  • Java certification question

    I have learning material for two modules: (a) Sun Java 2 Developer SCJD CX-310-252A/CX-310-027, and (b) Java 2 5.0 Programmer Certification 310-055. I know that these kind of exams were organized by the Sun Microsystems, Inc., which was bought by Ora

  • Page cannot be displayed error while accessing links on DAS page

    Hi, I have installed SSO server along with DAS on a single m/c. While installing i gave OID instance hostname and password. After installation when i access the DAS homepage and click on Login or Myprofile url is is throwing Page cannot be displayed

  • HT4972 cannot update ipad on windows 7 done everything it just will not connect to update server

    the itunes update  server could not be contacted .Please check your internet connection or try again later . this is as far as i get and my pc is on internet