puschitz的网站很久打不开了,偶尔发现这篇, 值得收藏.
转自:
http://www.lizhilong.name/?cat=5

名人名作,据说按照这个装绝对没问题!就是长了点,不过打印出来作为工作手册也是不错的!
  Werner Puschitz
  
  Sr. AIX/Linux Systems Analyst and Administrator
  Home Page of Werner Puschitz
  
  Installing Oracle 9i on RedHat Linux 7.1, 7.2, 7.3, 8.0, 9, Red Hat Advanced Server 2.1, and on Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3)
  
  Oracle on Red Hat Linux Portal
  
  Here is a summary (HOWTO) of how I installed:
  Oracle 9iR2 (9.2.0) Database on Red Hat Advanced Server 3 (kernel 2.4.21-4.EL, glibc 2.3.2-95.3)
  Oracle 9iR2 (9.2.0) Database on Red Hat Advanced Server 2.1 (kernel 2.4.9-e.3, glibc 2.2.4-26)
  Oracle 9iR2 (9.2.0) Database on Red Hat 9 (kernel kernel-2.4.20-6, glibc 2.3.2-5)
  Oracle 9iR2 (9.2.0) Database on Red Hat 8.0 (kernel 2.4.18-18.8.0, glibc 2.2.93-5)
  Oracle 9iR2 (9.2.0) Database on Red Hat 7.3 (kernel 2.4.18-3, glibc 2.2.5-34)
  Oracle 9iR1 (9.0.1) Database on Red Hat 7.3 (kernel 2.4.18-3, glibc 2.2.5-34)
  Oracle 9iR1 (9.0.1) Database on Red Hat 7.2 (kernel 2.4.7-10, glibc 2.2.4-13)
  Oracle 9iR1 (9.0.1) Database on Red Hat 7.1 (kernel 2.4.2-2, glibc 2.2.2-10)
  
  Validation/Certification:
  
  For Validations/Certifications, check the following links:
  Oracle’s Certification Matrices
  Oracle Products on Red Hat Linux
  Red Hat Enterprise Linux Application List
  
  Errors and Problems:
  Some of the Oracle errors and problems covered here were only experienced in connection with 9i (9.0.1) and some only with 9iR2 (9.2.0). But since I cannot say for sure that a 9i (9.0.1) installation error will never show up during 9iR2 (9.2.0) installation, I simply kept all errors and problems listed together, see Oracle Installation Errors and Oracle Installation Problems, Important Tips and Hints.
  
  Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3)
  In order to install an Oracle9iR2 database on RH AS 3, the “Oracle9iR2 Patch Set 3 9.2.0.4.0″ patchset and some other patches must be applied. Some errors can only be fixed by applying the 9.2.0.4 patchset. For more information, see Running Oracle Installation on Red Hat Enterprise Linux Advanced Server 3.
  
  Red Hat 9:
  Red Hat 9 includes now the the Native POSIX Thread Library (NPTL) which is an improved implementation of POSIX threads for Linux. But using NPTL will cause several problems for Oracle applications. Note that Oracle9i has not been certified on Red Hat 9!
  So to fix this problem, you can set the environment variable LD_ASSUME_KERNEL to 2.4.1, which means that the old “Linuxthreads with floating stacks” implementation will be used. Otherwise the Oracle installer runInstaller will hang, the Database Configuration Assistant dbca won’t start etc.; see Oracle Installation Errors for more information. To see where this environment variable can be set, see Set Oracle Environments. For more information on LD_ASSUME_KERNEL, see Red Hat Linux 9 Release Notes.
  NOTE: Before you install Oracle9iR2, make sure that you first read the information about the error message “Error in invoking target install of make file /opt/oracle/product/9.2.0/network/lib/ins_oemagent.mk” in the Oracle Installation Errors section!
  
  Red Hat 8.0:
  The only problem I experienced with Oracle 9iR2 (9.2.0) on Red Hat 8.0 was:
  ”Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk”
  But this does not necessarily mean that you won’t see other problems described here. See Oracle Installation Errors for more information.
  
  This article covers the following subjects and steps:
  
  * Documentations
  * Downloading and Installing Red Hat Linux 7.1, 7.2, 7.3, 8.0, 9
  * Unpacking Downloaded Oracle9i Installation Files and Burning Oracle9i CDs
  * Setting Swap Space
  * Setting Shared Memory
  * Checking /tmp Space
  * Sizing Oracle Disk Space
  * The “binutils” Issue
  * Checking Development Packages (RPMs)
  * JDK
  * Creating Oracle User Accounts
  * Creating Oracle Directories
  * Setting Oracle Environments
  * Starting runInstaller
  * Running Oracle Installation on RH 7.1, 7.2, 7.3, 8.0, 9, and on RH AS 2.1
  * Running Oracle Installation on Red Hat Enterprise Linux Advanced Server 3
  * Startup and Shutdown of the Oracle 9i Database
  * Oracle Installation Problems, Tips and Hints
  * Oracle Installation Errors
  
  Documentations
  Oracle9i Database Documentation for Linux
  Tuning and Optimizing Red Hat Linux Advanced Server for Oracle9i Database
  Oracle9iR2 on Linux: Performance, Reliability and Manageability Enhancements on Red Hat Linux Advanced Server 2.1
  An Overview of Red Hat Advanced Server V2.1 Reliability, Availability, Scalability, and Manageability (RASM) Features
  
  Downloading and Installing Red Hat Linux 7.1, 7.2, 7.3, 8.0, 9
  To download Red Hat Linux 7.x, 8.0, 9, check the links at http://www.puschitz.com/RedhatDownload.html
  You can find the installation guides for installing Red Hat Linux under Red Hat Linux Manuals.
  
  NOTE: You cannot download Red Hat Linux Advanced Server 2.1, you can only download the source code. If you want to get the binary CDs, you will have to buy it at http://www.redhat.com/software/linux/advanced/.
  
  Installing Software Packages (RPMs)
  
  You don’t have to install all RPMs when you want to run an Oracle9i database on Red Hat Linux.
  
  For instance, if you install Red Hat Advanced Server, you are fine when you select the Installation Type “Advanced Server” and when you don’t select the Package Group “Software Development”. There are only a few other RPMs that are required for installing Oracle9i. These other RPMs are covered in this article.
  
  Or when you install Oracle9i on Red Hat Linux 7.x, 8.0, or 9, you are fine when you select the installation type “Server”.
  
  Unpacking Downloaded Oracle9i Installation Files and Burning Oracle9i CDs
  
  Download Oracle9i for Linux from the following web site:
  http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.html
  
  Uncompress and unpack downloaded files:
  
  For Oracle9i (9.2.0):
  
  One step procedure (uses less disk space and is faster):
  
  zcat lnx_920_disk1.cpio.gz | cpio -idmv
  zcat lnx_920_disk2.cpio.gz | cpio -idmv
  zcat lnx_920_disk3.cpio.gz | cpio -idmv
  Two step procedure:
  
  # Uncompress
  gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz Linux9i_Disk3.cpio.gz
  
  # Unpack the downloaded files:
  cpio -idmv < lnx_920_disk1.cpio
  cpio -idmv < lnx_920_disk2.cpio
  cpio -idmv < lnx_920_disk3.cpio
  
  For Oracle9i (9.0.1):
  
  One step procedure (uses less disk space and is faster):
  
  zcat Linux9i_Disk1.cpio.gz | cpio -idmv
  zcat Linux9i_Disk2.cpio.gz | cpio -idmv
  zcat Linux9i_Disk3.cpio.gz | cpio -idmv
  Two step procedure:
  
  # Uncompress
  gunzip Linux9i_Disk1.cpio.gz Linux9i_Disk2.cpio.gz Linux9i_Disk3.cpio.gz
  
  # Unpack the downloaded files:
  cpio -idmv < Linux9i_Disk1.cpio
  cpio -idmv < Linux9i_Disk2.cpio
  cpio -idmv < Linux9i_Disk3.cpio
  
  Now you should have 3 directories containing installation files:
  
  Disk1
  Disk2
  Disk3
  I executed the following commands when I burned the 3 CDs:
  mkisofs -r Disk1 | cdrecord -v –eject dev=0,0,0 speed=15 -
  mkisofs -r Disk2 | cdrecord -v –eject dev=0,0,0 speed=15 -
  mkisofs -r Disk3 | cdrecord -v –eject dev=0  vnc server配置
1。使用root用户启动系统的vncserver服务;
#service vncserver start
2。然后切换到登陆用户下面,我这里假设要使用oracle系统帐户进行远程登陆
#su – oracle
3。使用oracle用户输入以下命令:
$vncserver
如果是第一次运行,则系统会出现提示信息,提示你输入密码,这是通过终端进行登陆时需要输入的;
另外,还有一个数字信息,这个也是需要在终端登陆时输入的,即冒号后面跟着的一个数字,如:1  ,:2等等,需要记住;
4。在windows客户端使用vncviewer,输入如下:xxx.xxx.xxx.xxx:1 或者xxx.xxx.xxx.xxx:2等,后面的数字需要和服务器端的对应才行;xxx是你服务器的ip地址了;
[linux as 5] 软件要求
其他所需程序包的版本(或更高版本):
        gcc-2.96-124
        make-3.79
        binutils-2.11
        openmotif-2.1.30-11
        glibc-2.2.4-31
要查看系统上安装了这些程序包的哪些版本,运行以下命令:
rpm -q gcc make binutils openmotif glibc setarchp4198954_21_linux.zip 在运行 runInstaller 之前打.
rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm     (p4198954_21_linux.zip)
 (不打PATH也可以)
安装 libaio-0.3.102-1.i386.rpm 和libaio-devel0.3.102-1.i386.rpm
  在Red Hat Enterprise Linux 介质的第三张 CD
  以 root 用户身份运行以下命令:
rpm -ivh /mnt/cdrom/RedHat/RPMS/ libaio-0.3.102-1.i386.rpm
创建数据库安装的准备工作:
1,创建user/group;
groupadd dba
groupadd oinstall
useradd oracle -g oinstall -G dba
passwd oracle
如果nobody用户不存在(id nobody命令查看),则创建:
useradd nobody2,建立oracle安装文件夹(sample);
mkdir -p /opt/oracle/10.2.0.1 /opt/oracle/oradata /opt/oracle/archivelog
chown -R oracle.oinstall  /opt/oracle
chmod 755 -R /opt/oracle2, 配置环境变量;
要使用 Oracle 产品,应该或必须设置几个环境变量。
如果您在同一服务器上安装了多个 Oracle 产品或数据库,则 ORACLE_HOME、ORACLE_SID 和 PATH 变量可能会更改。
ORACLE_BASE 变量不应更改,并可以在需要时在您的登录配置文件中设置它。Oracle 提供了一个称作 oraenv 的实用程序来设置其他变量。
对于数据库服务器,建议设置以下环境变量:
使用root用户:
 
vi /home/oracle/.bash_profile
以下是配置文件的内容
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/10.2.0.1
ORACLE_SID=ge01
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH    
TNS_ADMIN=$ORACLE_HOME/network/admin
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
LANG=AMERICAN_AMERICA.ZHS16GBK
export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID  TNS_ADMIN NLS_LANG LANG
    4, 设置系统参数;
 Oracle 数据库 10g 需要以下所示的内核参数设置。
 一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824,
如上;如物理内存是 1G,则可以设置最大共享内存为 512 * 1024 * 1024 = 536870912;以此类推。在redhat上最大共享内存不建议超过
  4*1024*1024*1024-1=4294967295切换到root用户:
su root
 修改vi /etc/sysctl.conf, 添加:
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144修改后运行”/sbin/sysctl -p”命令使得内核改变立即生效;
B) 设置oracle对文件的要求:
编辑文件:vi /etc/security/limits.conf 加入以下语句:
oracle           soft    nproc           2047
oracle           hard    nproc           16384
oracle           soft    nofile          1024
oracle           hard    nofile          65536编辑文件:vi /etc/pam.d/login 加入以下语句(可能应该加在最后一条规则之前):session    required     /lib/security/pam_limits.so设置oraInst.loc文件:
[root@enterprice64 ~]#vi /etc/oraInst.loc
inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall
[root@enterprice64 ~]#chown oracle.oinstall /etc/oraInst.loc
确保/etc/oraInst.loc中包含上面的信息,且Oracle包含访问权限。5.解压缩Oracle10G的安装文件 :
 使用Oracle用户登陆:
su – oracle
在/home/oracle 上传和解压缩10201_database_linux32.zip:
unzip 10201_database_linux32

6.开始安装oracle
L i n u x 命令行环境下安装(也可以在图形界面下安装)使用Oracle用户登陆:
su – oracle
根据希望安装的数据库版本类型选择Silent安装模式的response_file文件的类似,比如:enterprise.rsp、standard.rsp还是custom.rsp。
这里选择enterpise.rsp类型,安装盘中的database/response目录下对应的response文件拷贝出来,根据文件里面的提示对输入值进行修改。
比如这个例子中对如下的参数进行设置:
UNIX_GROUP_NAME=”oinstall”
FROM_LOCATION=”/home/oracle/database/stage/products.xml”
ORACLE_BASE=”/opt/oracle”
ORACLE_HOME=”/opt/oracle/10.2.0.1″
ORACLE_HOME_NAME=”OraDbHome1″
SHOW_INSTALL_PROGRESS_PAGE= true
SHOW_END_OF_INSTALL_MSGS= true
COMPONENT_LANGUAGES=
s_nameForDBAGrp= “dba”
s_nameForOPERGrp=”dba”
INSTALL_TYPE=”EE”
n_configurationOption=3
RESTART_SYSTEM=false
RESTART_REMOTE_SYSTEM=false注意,所有的字符串需要放在双引号中,注意大小写。数字和布尔变量直接写就可以。
由于这里没有选择建立数据库而只安装软件,因此没有设置数据库相关的配置参数。[oracle@enterprice64 data]$ chmod 700 enterprise.rsp
面可以开始SILENT安装了:
注意,响应文件需要使用绝对路径。
cd /home/oracle/database
[oracle@enterprice64 database]$ ./runInstaller -silent -responseFile /home/oracle/enterprise.rsp用root执行如下脚本:
/opt/oracle/10.2.0.1/oraInventory/orainstRoot.sh
/opt/oracle/10.2.0.1/root.sh
不过这里Oracle存在一个bug,在root.sh脚本中,自动将OUI_SILENT参数设置为TRUE,而后的检查中,
如果发现这个值为TRUE,那么这个脚本运行会自动退出了。这里需要手工将其修改为false,
最后使用root执行一下$ORACLE_HOME/root.sh脚本就可以了。根据提示按 Enter 就可以了。
这样就在字符下成功安装了。通过SILENT模式安装数据库之后,下面继续使用SILENT模式进行数据库的建立,
仍然是拷贝安装目录下的/home/oracle/database/response/dbca.rsp到安装目录,并进行编译,
根据数据库建立方式的不同编辑不同的数据库库选项。
比如在本次安装过程中设置了下列参数:
RESPONSEFILE_VERSION = “10.0.0″
OPERATION_TYPE = “createDatabase”
GDBNAME = “ge01″
SID = “ge01″
TEMPLATENAME = “New_Database.dbt”
SYSPASSWORD = “georacle”
SYSTEMPASSWORD = “georacle”
DATAFILEDESTINATION =”/opt/oracle/oradata/”
RECOVERYAREADESTINATION=”/opt/oracle/flash_recovery_area”
STORAGETYPE=FS
CHARACTERSET = “ZHS16GBK”
MEMORYPERCENTAGE = “40″
SCRIPTDESTINATION =”/opt/oracle/admin/ora10g/scripts”
EMCONFIGURATION=”LOCAL”
SYSMANPASSWORD = “georacle”
DBSNMPPASSWORD = “georacle”其中最后1项不是必须的,这个的目的是在建立数据库的同时生成脚本。
下面就可以开始SILENT模式的数据库创建了:
[oracle@enterprice64 database]$ dbca -silent -responseFile /home/oracle/dbca.rsp
用root执行如下脚本:
/opt/oracle/10.2.0.1/oraInventory/orainstRoot.sh最后可以利用netca来SILENT方式设置网络部分,同样的方法设置netca.rsp:
RESPONSEFILE_VERSION=”11.1″
CREATE_TYPE= “CUSTOM”
SHOW_GUI=false
LOG_FILE=”"/opt/oracle/10.2.0.1/network/tools/log/netca.log”"
INSTALLED_COMPONENTS=
INSTALL_TYPE=”"typical”"
LISTENER_NUMBER=1
LISTENER_NAMES=
LISTENER_PROTOCOLS=
LISTENER_START=”"LISTENER”"
NAMING_METHODS=
设置的参数包括上面的部分,然后就可以使用netca启动silent配置:
[oracle@enterprice64 database]$ netca /silent /responsefile  /home/oracle/netca.rsp—————————————————————-静默卸载Oracle数据库ge01
dbca -silent -deleteDatabase -sourceDB    <source database sid> [-sysDBAUserName     <user name  with SYSDBA privileges> -sysDBAPassword <password for sysDBAUserName user name>]
例如:dbca -silent -deleteDatabase -sourceDB ge01 -sysDBAUserName sys -sysDBAPassword georacle静默卸载Oracle数据库软件
 
执行以下命令静默卸载Oracle数据库软件
$./runInstaller -silent -deinstall -removeallfiles -removeAllPatches “REMOVE_HOMES=” -responseFile ~/enterprise.rsp—————————————————————————————(一)图形界面开始安装:
1.以oracle用户登录X-WINDOWS系统,进行Oracle的安装(远程安装需打开XDM):[ linux 5}
export DISPLAY=
cd /opt/database (或者你解压缩安装程序包的目录)
./runInstaller 或者./runInstaller   -ignoreSysPrereqs
过一会儿就会出现Oracle的X安装界面注意:
1、选择advance install
2、数据库home设置为/opt/oracle/10.2.0.1
3、数据库全局名称设置为ge01
4、数据库字符集选Simplified Chinese ZHS16GBK2.其他用默认设置!
注意:安装过程中会提示以root用户登陆执行一些脚本 ,执行后再按“ok”按钮继续安装。
3、登陆并启动数据库的操作。
su - oracle
[oracle@oracle oracle]$ lsnrctl start
[oracle@oracle oracle]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.0 – Production on Sat Mar 12 22:58:53 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> startup; 启动数据库
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.SQL> shutdown immediate ;关闭数据库 (OR “dbshut” command)
Database closed.
Database dismounted.
ORACLE instance shut down.4, dbstart脚本修改
数据库创建完成后,修改vi /etc/oratab,把ge01:/opt/oracle/10.2.0.1:N那一行最后的N改成Y,
修改vi /opt/oracle/10.2.0.1/bin/dbstart中ORACLE_HOME_LISTNER=/opt/oracle/10.2.0.1
然后执行dbstart启动数据库数据库可能无法启动,报告Can’t find init file …的错误,需要复制一个初始化文件:
cp /opt/oracle/admin/ge01/pfile/init.ora.* /opt/oracle/10.2.0.1/dbs/initge01.ora
重新执行dbstart就可以了。可以执行dbshut 停止ORACLEvi /etc/rc.local 加入下面一行 起动ORACLE ON system boot
su – oracle -c “lsnrctl start”
su – oracle -c “dbstart” 5. 为了root方便管理,可以写一个启动脚本
vi /etc/init.d/ora10g
 
#!/bin/bash
#
# chkconfig: 2345 91 19
# description: starts the oracle listener and instance status() {
    pid=`ps -ef | grep ora_pmon | grep -v grep | awk ‘{print $8}’`
    if [ "X$pid" = "X" ]
    then
        echo “oracle10g is not running.”
        exit 1
    else
        echo “oracle10g is running.”
        exit 0
    fi
}case “$1″ in
    start)
        #startup the listener and instance
        echo -n “oracle begin to startup: ”
        su – oracle -c “lsnrctl start”
        su – oracle -c dbstart
        echo “oracle10g started”
        ;;
    stop)
        # stop listener, apache and database
        echo -n “oracle begin to shutdown:”
        su – oracle -c “lsnrctl stop”
        su – oracle -c dbshut
        echo “oracle10g shutdowned”
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    ‘status’)
        status
        ;;
     *)
        echo “Usage: ora10g [start|stop|reload|restart]”
        exit 1
esac
exit 0 存为ora10g后,然后
chmod a+x /etc/init.d/ora10g
即可在以后以root身份运行/etc/rc.d/init.d/ora10g start |stop 来管oracle的启动和停止了。
如果要将这个脚本加入到系统中使其可开机运行,那么要运行以下命令:
chkconfig –level 35 ora10g on
 
6, 关于数据库删除重新安装的问题:
1 . 去除 /usr/local/bin 目录 下的 coraenv dbhome oraenv
2 . 去除 /etc/oratab , /etc/oracle
3 . 去掉安装 目录 /opt/oracle 目录下的 product admin oradata oralnventor 目录 。
# userdel -r oracle
# groupdel dba oinstall
rm -rf /tmp/ora*
rm -rf /opt/oracle/*
rm -rf /opt/ORCLfmap
rm -f /etc/ora*
rm -f /usr/local/bin/oraenv
rm -f /usr/local/bin/coraenv
rm -f /usr/local/bin/dbhome
7.修改Oracle10g数据库字符集
SQL> connect sys/oracle as sysdba
SQL> startup mount
SQL> alter session set sql_trace=true;Session altered.SQL> alter system enable restricted session;System altered.SQL> alter system set job_queue_processes=0;System altered.SQL> alter system set aq_tm_processes=0;System altered.SQL> alter database open;Database altered.SQL> set linesize 120;
SQL> alter database character set zhs16gbk;
alter database character set zhs16gbk
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character setSQL> ALTER DATABASE character set INTERNAL_USE zhs16gbk; # 使用INTERNAL_USE可以跳过超集的检查,ALTER DATABASE character set INTERNAL_USE Database altered.SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP
SQL> select name,value$ from props$ where name like ‘%NLS%’;NLS_CHARACTERSET
ZHS16GBK8. oracle database异机备份脚本
su – oracle
mkdir /home/oracle/dbbackup(1)vi /home/oracle/dbbackup/bachupdb.sh
#!/bin/bash
#As oracle user, chmod 744 /home/oracle/dbbackup/DBbackuprecover.sh
#crontab -e 35 1 * * * /home/oracle/dbbackup/DBbackuprecover.sh >/dev/null 2>&1
#@tip: modify local database’s home directory
#@tip <ip> is remote database ip addressexport ORACLE_HOME=/opt/oracle/10.2.0.1
export PATH=$ORACLE_HOME/bin:$PATH:
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
export LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_SID=ge01dmpfile=gedb_`date +%F`.dmp
logfile=gedb_`date +%F`.log
restoredblog=restoredb_`date +%F`.log
WORK_DIR=~/dbbackupcd $WORK_DIR
exp USERID=gedb/gegedb@<ip>/ge01 file=$dmpfile log=$logfile  owner=gedb
if [ 0 -eq "$?" ]
     then
         sqlplus / as sysdba @user.sql
         imp USERID=gedb/gegedb file=$dmpfile log=./$restoredblog fromuser=gedb  touser=gedb
         find  ./*.dmp -type f -mtime +7 -exec rm {} ;
         find  ./*.log -type f -mtime +30 -exec rm {} ;
         exit 0
      else
         echo “backup error,quit!” > $logfile
         exit 1
fi
 
#@tip ip地址修改为要备份的oracle的主机地址
exp USERID=gedb/gedb@10.248.1.5/ge01 file=$dmpfile log=$logfile  owner=gedb direct=y  (2)更改脚本权限:
     chown oracle.oinstall backupdb.sh
     chmod 744 backupdb.sh  
   
 
 (3)以oracle user role
    crontab -e
    35 2 * * * /home/oracle/dbbackup/backupdb.sh 9. restore oracle backup
(1) 先创建gedb用户和授权:
  su – oracle
  sqlplus / as sysdba @createUser.sql
(2)imp USERID=gedb/gegedb file=110.dmp fromuser=gedb touser=gedb
  如果要第二次IMP操作要先删除用户gedb,再新建用户gedb,这样imp才不会出错.
  DROP USER gedb CASCADE;
  CREATE USER gedb  IDENTIFIED BY gegedb;
  GRANT UNLIMITED TABLESPACE TO gedb;
  GRANT CONNECT TO gedb;
  GRANT RESOURCE TO gedb;
  GRANT DBA TO gedb;
 
10. oracle优化 SQL> alter system set “_kgl_large_heap_warning_threshold”=8388608 scope=spfile ; (ONLY FOR 10.2.0.1.0 )
SQL> shutdown immediate
SQL> startup

11.BUG FIX(1)10g EM乱码之快速解决
[oracle@danaly ~]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat font.properties.zh_CN.Redhat2.1
font.properties.zh_CN.Sun font.properties.zh_CN_UTF8.Sun [oracle@danaly lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/
[oracle@danaly lib]$ ls font*zh_CN*
font.properties.zh_CN.Redhat font.properties.zh_CN.Redhat2.1
font.properties.zh_CN.Sun font.properties.zh_CN_UTF8.Sun 我们只要用合适的中文字符集文件替换缺省文件即可,我选择使用font.properties.zh_CN.Redhat来替换缺省字体定义文件: [oracle@danaly lib]$ cp font.properties.zh_CN.Redhat font.properties 替换之后需要清理一下Cache,重启EM即可. Cache路径通常位于: $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/p_w_picpaths/cache/zhs 清除所有gif文件即可.然后重新启动EM(2)10201上一个严重的BUG
环境 10201,AIX53
但据ORACLE解释,在任何操作系统版本都有此问题。现象:监听器启动后,隔一段时间(长短不定),就会出现无法
连接: 若是用10201版本的SQLPLUS,则会出现 NO LISTENER。
9207 版本的SQLPLUS,则会出现:没反应,HANG住。原因:10201 版本上的一个BUG:4518443。其会自动创建一个子
监听器,当出现此情况时,监听器将会挂起。
/opt/oracle/product/10g/network/log/listener.log有如下语句:
WARNING: Subscription for node down event still pending检查是否真因为此BUG造成此现象:
$ ps -ef | grep tnslsnr
ora10g 8909 1 0 Sep 15 ? 902:44 /u05/10GHOME/DBHOME/bin/tnslsnr sales -inherit
ora10g 22685 8909 0 14:19:23 ? 0:00 /u05/10GHOME/DBHOME/bin/tnslsnr sales –inherit
正常情况只有一个监听器,而此BUG则会出现两个监听器。解决方法:
打补丁4518443
或者在listener.ora 文件里加入:
SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF
其中,<listener_name> 是数据库的监听器的名称。如:
默认情况下,监听器名为:LISTENER 。则语句就是:
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
同时:
cd $ORACLE_HOME/opmn/conf
mv ons.config ons.config.orig
重启监听程序:
lsnrctl stop
lncrctl start

转载于:https://blog.51cto.com/salomi/695351

在所有linux版本安装oracle9i相关推荐

  1. Linux 下安装 Oracle9i

    Linux 下安装 Oracle9i 数据库版本:Oracle9i R2 (9.2.0.1.0) 1. 创建用户与组: ------------------------- 切换为 Root 用户并执行 ...

  2. SPSS linux版本安装提示“JRE Libraries are missing or not compatible“ 报错的问题解决

    最近安装spss26 linux版本的时候报错,提示如下: Preparing to install... Extracting the JRE from the installer archive. ...

  3. linux系统安装文网卫士,360主机卫士 Linux 版本 安装

    主机卫士 Linux 版本 用户使用手册 1.软件安装 1.1 必要环境 1)curl (通过 yum 戒者 apt-get 安装) 服务器版操作系统默认已经安装了 curl,如果没有请自行安装 ce ...

  4. star ccm linux版本安装教程,StarCCM+ V5.02.009安装指南(PC Linux 32).doc

    StarCCMV5.02.009安装指南(PCLinux32) STAR-CCM+ V5.02.009 安装 2010年月日 目 录 第一章 安装指南1 第二章 启动License8 第一章 安装 [ ...

  5. 【linux】飞书linux版本安装

    (1)官网下载地址:飞书音视频电话会议APP软件下载-考勤打卡软件下载-飞书APP官网 选中linux版本下载.(2)下载完成后,使用sudo dpkg -i 安装.(自己的是ubuntu系统)(3) ...

  6. ansys2020R1软件Workbench linux版本安装教程 超详细安装教程

    目录 一.前言 二.workbench安装 三.运行workbench 四.运行ansys 五.桌面启动方式 1.编写一个启动程序的脚本 2.编写桌面快捷方式 一.前言 本文主要介绍ansys2020 ...

  7. websphere linux版本,安装IBM Websphere on linux

    安装IBM Websphere on linux 一.Linux WAS准备环境: 1.下载安装文件,当前版本是7.0,文件名为was.cd.7009.trial.base.opt.linux.ia3 ...

  8. Comsol5.6软件linux版本安装教程 超详细安装教程

    目录 一.前言 二.comsol安装 三.启动comsol 一.前言 本文主要介绍了Comsol5.6在linux系统下的安装,本文选用的是Centos8系统,详情如下所示,供大家参考. 二.coms ...

  9. ArcGIS Notebook Server 10.9.1 Linux版本安装示例

    博客主页:https://tomcat.blog.csdn.net 博主昵称:农民工老王 主要领域:Java.Linux.K8S 期待大家的关注

最新文章

  1. 23日晚西湖大学鞠峰报告:环境微生物宏基因组学
  2. java去除不为null,JAVA代码中去掉 “!=null”
  3. Qt Creator使用自定义字体
  4. python(5)- 基础数据类型
  5. mysql导入sqlserver数据库表
  6. 【每日一题】7月20日题目精讲—着色方案
  7. c语言用命令行编译运行程序_使用C程序执行系统命令
  8. zsh 使用通配符功能
  9. 停止使用C#异步流保存到磁盘
  10. 如何用 JavaScript 下载文件
  11. 网络克隆自动修改计算机名ip,GHOST网克专用IP及计算机名自动修改器
  12. Python: sys.path.append()用法
  13. 【值得收藏】如此心机的老婆,不难教出一个优秀的女儿。谁娶了都是福。
  14. fckeditor文档库
  15. av_dump_format函数使用说明
  16. QCon-oCPX多目标多场景联合建模在OPPO的实践
  17. 【Python】字符串是如何比较大小的?
  18. 神码ai人工智能写作机器人_机器学习与医学:人工智能在医疗保健中的陷阱
  19. 屏幕亮度自动调节的实现
  20. 坯子库无法一键安装插件没用_坯子插件库:安装与使用

热门文章

  1. matlab虚拟现实之建立simulink虚拟现实工具箱的使用
  2. html+fadein动画,使用Animate.css制作超炫的CSS3动画
  3. 3D数学之快速傅立叶变换(Fast Fourier Transform-FFT)
  4. [Java]toString的用法
  5. android design support library最新版,总结一下现在关于Design Support Library的几个博客...
  6. oracle 表空间 归档,oracle数据库表空间及归档
  7. 干货!全网最全一套目标检测、卷积神经网络和OpenCV学习资料(教程/PPT/代码)...
  8. android 美团滑动停止,cc美团 滑动删除(SwipeListView)
  9. 怎么查看raid0或者raid5_海康监控磁盘阵列怎么配置?一文了解清楚
  10. qt qtableview mysql_Qt数据库编程中QTableView使用方法