.bash_profile and sqlplus_profile

vmware中设置共享磁盘,需要满足两个条件:

    1、硬盘的高级属性中必须设置成1:0,如果增加第二块共享硬盘,也设成1:0,系统就会报错,所以设置成1:1(这种方式本人还没试过,不过在oracle双机的文章中看到过这样的设置方法)
  
    2、需要在vmware的配置属性文件(如rhel3.vmx)中加入两条属性
      scsi[n].sharedBus = "virtual" 

scsi1:0.shared = "true"

 disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"

    系统启动的时候会锁定磁盘,所以当启动linux1后共享磁盘被锁定了,linux2就起不来了,因此需要加入disk.locking = "false"  。
   
     一般来说,如果是scsi1:0,则n为1,也就是scsi1.sharedBus = "virtual"  ,表示所有的bus都共享,vmare推荐这种做法。

    如果说是不是所有的bus都共享的话,可以将上述scsi1.sharedBus = "virtual"改成scsi1:1.shared = "true" 。

export ORACLE_BASE=/home/oracle/base
export ORACLE_HOME=/home/oracle/ora10g
export ORA_CRS_HOME=/home/oracle/crs
export ORACLE_SID=rac1
export PATH=$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:$ORA_CRS_HOME/bin:$PATH
export ORACLE_TERM=xterm
export TNS=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export TEMP=/tmp
export TMPDIR=/tmp
export DISPLAY=10.148.53.57:0.0

echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=262144" >> /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max=65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf
echo "options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180" >>/etc/modprobe.conf
cat >> /etc/security/limits.conf <oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login <session required /lib/security/pam_limits.so
EOF
cat >> /etc/profile <if [ \$USER = "oracle" ]; then
 if [ \$SHELL = "/bin/ksh" ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
 umask 022
fi
EOF
cat >> /etc/csh.login <if ( \$USER == "oracle" ) then
 limit maxproc 16384
 limit descriptors 65536
endif
EOF

--
-- Copyright (c) 1988, 2004, Oracle Corporation.  All Rights Reserved.
--
-- NAME
--   glogin.sql
--
-- DESCRIPTION
--   SQL*Plus global login "site profile" file
--
--   Add any SQL*Plus commands here that are to be executed when a
--   user starts SQL*Plus, or uses the SQL*Plus CONNECT command
--
-- USAGE
--   This script. is automatically run
--

-- Used by Trusted Oracle
COLUMN ROWLABEL FORMAT A15

-- Used for the SHOW ERRORS command
COLUMN LINE/COL FORMAT A8
COLUMN ERROR    FORMAT A65  WORD_WRAPPED

-- Used for the SHOW SGA command
COLUMN name_col_plus_show_sga FORMAT a24
COLUMN units_col_plus_show_sga FORMAT a15
-- Defaults for SHOW PARAMETERS
COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE

-- Defaults for SHOW RECYCLEBIN
COLUMN origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
COLUMN objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
COLUMN droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'

-- Defaults for SET AUTOTRACE EXPLAIN report
-- These column definitions are only used when SQL*Plus
-- is connected to Oracle 9.2 or earlier.
COLUMN id_plus_exp FORMAT 990 HEADING i
COLUMN parent_id_plus_exp FORMAT 990 HEADING p
COLUMN plan_plus_exp FORMAT a60
COLUMN object_node_plus_exp FORMAT a8
COLUMN other_tag_plus_exp FORMAT a29
COLUMN other_plus_exp FORMAT a44
host stty erase ^?
--host stty erase ^H
COLUMN name FORMAT a33
COLUMN member FORMAT a30
COLUMN object_name FORMAT a20
COLUMN type FORMAT a15
COLUMN file_name FORMAT a35
COLUMN table_name FORMAT a30
COLUMN owner FORMAT a10
COLUMN USERNAME FORMAT A8
COLUMN grantee FORMAT A13
COLUMN grantor FORMAT A10
COLUMN privilege FORMAT A28
COLUMN tablespace_name FORMAT a15
COLUMN temporary_tablespace FORMAT a20
COLUMN default_tablespace FORMAT a10
COLUMN tablespace FORMAT a15
COLUMN COMMENTS FORMAT a43
COLUMN PARAMETER FORMAT a30
COLUMN SEGMENT_NAME FORMAT a35
COLUMN VALUE FORMAT a6
COLUMN AUDITID FORMAT a10
COLUMN USERHOST FORMAT a9
COLUMN USERID FORMAT a6
COLUMN OBJ$NAME FORMAT a10
COLUMN OBJ_NAME FORMAT a10
COLUMN PASSWORD FORMAT a18
COLUMN MACHINE FORMAT a7
COLUMN PROGRAM FORMAT a25
COLUMN DESCRIPTION FORMAT a50
COLUMN DB_LINK  FORMAT a30
COLUMN TABLE_OWNER  FORMAT a10
COLUMN USER_NAME  FORMAT a10
COLUMN HOST_NAME  FORMAT a10
COLUMN PATH  FORMAT a10
COLUMN VALUE FORMAT 999,999,999.99
COLUMN UDID  FORMAT a10
COLUMN INTERVAL  FORMAT a25
COLUMN PRIV_USER FORMAT a15
COLUMN LOG_USER  FORMAT a15
COLUMN LABEL  FORMAT a10
COLUMN PRODUCT  FORMAT a10
COLUMN FAILGROUP  FORMAT a11
COLUMN INSTANCE_NAME  FORMAT a15
COLUMN SOFTWARE_VERSION  FORMAT a16
COLUMN COMPATIBLE_VERSION  FORMAT a18
COLUMN PLATFORM_NAME  FORMAT a20
COLUMN FS_FAILOVER_OBSERVER_HOST  FORMAT a28
COLUMN WHERE_IN_CODE  FORMAT a20
COLUMN PARENT_NAME  FORMAT a20
COLUMN WHAT  FORMAT a30
COLUMN MISC_ENV  FORMAT a15
COLUMN INST_NAME FORMAT a15
SET   PAGESIZE   60
SET   SERVEROUTPUT ON
SET   LINESIZE   123
SET   timing     on
--SET   COLSEP      |
--SET   underline  "*"
SET   sqlprompt "_user _privilege> "
alter session set recyclebin=on;
CLE   SCR
-- Default for XQUERY
COLUMN result_plus_xquery HEADING 'Result Sequence'

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14876437/viewspace-582285/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14876437/viewspace-582285/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值