Installing Oracle Database 9.2.0.8 on RHEL 4.8
Installing Oracle Database 9.2.0.8 on RHEL 4.8 Operating System: RHEL4.8-x86_64-AS Database Software: amd64_db_9204_Disk{1..3}.cpio.gz Database Patches: p4547809_92080_Linux-x86-64.zip Requirements rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \gcc glibc-kernheaders glibc-headers glibc-devel compat-gcc-32 compat-gcc-32-c++ \libstdc++-devel glibc-devel libaio Install packages. mkdir /mnt/rhisomount /dev/cdrom /mnt/rhisocd /mnt/rhiso/RedHat/RPMS/rpm -ivh gcc-3.4.6-11.x86_64.rpmrpm...
Oracle database preinstall 11g rpm
Oracle database preinstall 11g rpm Installing the Oracle Preinstallation RPM [root@rac-1 ~]# yum -y install oracle-rdbms-server-11gR2-preinstall.x86_64[root@rac-1 ~]# cat /var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.logAdding group oinstall with gid 54321Adding group dbaAdding user oracle with user id 54321, initial login group oinstall, supplementary group dba and home directory /home/oracleChanging ownership of /home/oracle to oracle:oinstallPlease set password for ora...
Oracle database preinstall 19c rpm
Oracle database preinstall 19c rpm Installing the Oracle Preinstallation RPM Use Oracle Preinstallation RPM to simplify operating system configuration in preparation for Oracle software installations. When installed, the Oracle Preinstallation RPM does the following: Automatically downloads and installs any additional RPM packages needed forinstalling Oracle Grid Infrastructure and Oracle Database, and resolves anydependencies Creates an oracle user, and creates the oraInventory (oinsta...
RMAN Backup on Windows
RMAN Backup on Windows Full backup REM 需要修改的变量值开始set ORACLE_SID=xpxyyset BACKUP_PATH=E:\RMANset SYS_PASSWD=oracleREM 修改变量结束REM 在服务器上保留3个备份的脚本if exist %BACKUP_PATH%\*.BAK003 del /F /Q %BACKUP_PATH%\*.BAK003if exist %BACKUP_PATH%\*.BAK002 rename %BACKUP_PATH%\*.BAK002 *.BAK003if exist %BACKUP_PATH%\*.BAK001 rename %BACKUP_PATH%\*.BAK001 *.BAK002REM 在服务器上保留2个备份的脚本REM if exist %BACKUP_PATH%\*.BAK002 del /F /Q %BACKUP_PATH%\*.BAK002REM if exist %BACKUP_PATH%\*.BAK001 rename %BACKUP_PATH%\*...
RMAN Backup on Linux
RMAN Backup on Linux Create a backup directory. mkdir -p /rmanbackup/rmanlogmkdir -p /rmanbackup/dbbakmkdir -p /rmanbackup/scriptsmkdir -p /rmanbackup/weekmkdir -p /rmanbackup/daychown -R oracle:oinstall /rmanbackupchmod -R 755 /rmanbackup Create a full backup script: /rmanbackup/scripts/rmanbackup.sh #/bin/env bashexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_OWNER=oracleexport ORACLE_SID=orcl1export ORACLE_UNQNAME=orclexport PATH=$OR...
RMAN Restore on Linux
RMAN Restore on Linux Restore Spfile ~]$ rman target / nocatalogRMAN> startup nomountRMAN> restore spfile from '/backup/spfile_01uuf10m_1_1.bak';RMAN> shutdown abort Restore Controlfile (Option) Modify the controlfile path: SQL> startup nomountSQL> alter system set control_files = '/home/oracle/orcl/control01.ctl','/home/oracle/orcl/control02.ctl' scope=spfile;SQL> shutdown abort Restore controlfile. ~]$ rman target / nocatalogRMAN> startup nomountRMAN> set dbid <...
RMAN Database Duplication
RMAN Database Duplication Creating a Password File for the Auxiliary Instance, When you create a standby database by using RMAN duplication, password files are always copied. Add Net Services for primary and standby databases in the tnsnames.ora file. Adding Static Service to Listener in the listener.ora file. Create an Initialization Parameter File for the Auxiliary Instance. Start the auxiliary instance in NOMOUNT mode. Duplication database. rman target sys/oracle@Matrix auxiliary sys/or...
Using RMAN to Delete Oracle Database Archive Logs
Using RMAN to Delete Oracle Database Archive Logs Login as oracle, create the script del_arch.sh as below: ~]$ cat > /home/oracle/script/del_arch.sh << "END"#!/bin/env bashif [[ -z $1 ]]; then exit 1fi. ~/.bash_profileORACLE_SID=$1$ORACLE_HOME/bin/rman log=/tmp/del_arch_$1_`date +%Y%m%d`.log <<EOFconnect target /run { crosscheck archivelog all; delete noprompt expired archivelog all; delete noprompt archivelog all completed before 'sysdate - 1';}quitEOFfind /tmp/ -...
Oracle Database High CPU Usage
Oracle Database High CPU Usage 数据库运行慢,登录操作系统发现 CPU 使用率比平常要高 查看当前会话运行的 SQL Text 和 PLAN SQL> select sql_id, count(1) from gv$session where type='USER' and status = 'ACTIVE' group by sql_id;SQL_ID COUNT(1)------------- ----------arz2wrgd05c5z 1SQL> select addr,spid from v$process where spid='3268';SQL> select sid,sql_id from v$session where paddr='0000000090CCF600';SQL> select sql_text from v$sql where sql_id='arz2wrgd05c5z';SQL>select sql_id from v$session wher...
Oracle Database Performance Optimization
Oracle Database Performance Optimization what oracle waiting for ??? select * from (select count(*), event, sql_id, program, inst_id from gv$active_session_history where sample_time > sysdate-5/1440 group by event, sql_id, program, inst_id order by 1 desc)where rownum <= 20; query execution plan select plan_table_output from table(dbms_xplan.display_cursor('&sql_id')); --已知SQL_Id的情况下explain plan for (SQL_TEXT); select * from table(dbms_xplan.display);set autotrace on explai...














