科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网服务器频道虚拟化/云计算通过VMWARE虚拟机搭建Oracle 10g R2 R

通过VMWARE虚拟机搭建Oracle 10g R2 R

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

本文讲解了通过VMWARE虚拟机搭建Oracle 10g R2 R的过程。

来源:IT认证考试 2010年9月24日

关键字:

  • 评论
  • 分享微博
  • 分享邮件

在本页阅读全文(共9页)

 [oracle@rac01 ~]$ dbca

  On the “Welcome” screen, select the “Oracle Real Application Clusters database” option and click the “Next” button.

  Select the “Custom Database” option and click the “Next” button.

  Global Database Name: pcard

  SID prefix: pcard

  Password: nhy67ujm

  Select ASM as storage management.

  Use Oracle-Managed Files: +DATADG

  Flash Recovery Area: +FLASHDG

  SIZE: 512MB

  Enable Archiving: Edit Archive Mode Para: PCARD_%t_%r_%S.arc

  Archive Log Destinations: +FLASHDG/PCARD/arch

  It is necessary to create directory at first (+FLASHDG/PCARD/arch) to avoid some errors during the database starting procedure.

  SGA: 300MB

  PGA: 100MB

  Character Set: JA16SJISTILDE

  National Character Set: AL16UTF16

  Click All Init Parameters:

  Edit the control files: +REDODG/{db_name}/control01.ctl,+FLASHDG/{db_name}/control02.ctl, and then check it.

  Change the parameter file location:

  SQL》 create pfile=’/oracle/product/10.2.0/db_1/dbs/backup.ora’ from spfile;

  SQL》 create spfile=’+FLASHDG/pcard/spfilepcard.ora’ from pfile=’/oracle/product/10.2.0/db_1/dbs/backup.ora’;

  SQL》 host vi /oracle/product/10.2.0/db_1/dbs/initpcard1.ora

  SPFILE=’+FLASHDG/pcard/spfilepcard.ora’, save and exit

  SQL》 shutdown immediate

  Remove the original spfile in ASM.

  ASMCMD》 pwd

  +/DATADG/pcard

  ASMCMD》 rm spfilepcard.ora

  SQL》 startup pfile=’/oracle/product/10.2.0/db_1/dbs/initpcard1.ora’

  SQL》 show parameter spfile

  NAME TYPE VALUE

  ———————————— ———– ——————————

  spfile string +FLASHDG/pcard/spfilepcard.ora

  Check the Status of the RAC

  There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.

  $ srvctl config database -d pcard

  $ srvctl status database -d pcard

  Instance pcard1 is running on node rac01

  Configure RAC database do not start automatically when OS starts

  $ srvctl modify database -d RACB -y MANUAL

  srvctl modify database -d 《dbname》 -y AUTOMATIC|MANUAL

  The V$ACTIVE_INSTANCES view can also display the current status of the instances.

  $ sqlplus / as sysdba

  SQL》 SELECT * FROM v$active_instances;

  INST_NUMBER INST_NAME

  ———– —————

  1 rac01:pcard1

  Finally, the GV$ allow you to display global information for the whole RAC.

  SQL》 SELECT inst_id, username, sid, serial# FROM gv$session WHERE username IS NOT NULL;

  INST_ID USERNAME SID SERIAL#

  ———- —————————— ———- ———-

  1 SYS 128 2

  1 SYS 129 2

  1 SYS 130 1

  1 SYS 132 4078

  1 SYS 133 6

  Create RMAN Catalog

  Prepare the RMAN catalog DB creation script at first. Upload it to /oracle/admin/RMANUAT/scripts/

  [oracle@rac01 ~]$ 。/RMANUAT.sh

  Input the password of SYS and SYSTEM: rman

  Configure RMAN DB auto startup when Linux starts:

  login as root, add this entry in the /etc/oratab:

  RMANUAT:/oracle/product/10.2.0/db_1:N

  [oracle@rac01]$ su – oracle

  [oracle@rac01 scripts]$vi $ORACLE_HOME/bin/dbstart

  Find ORACLE_HOME_LISTNER, and edit like this:

  ORACLE_HOME_LISTNER=$ORACLE_HOME

  [oracle@rac01 scripts]$vi $ORACLE_HOME/bin/dbshut

  Find ORACLE_HOME_LISTNER, and edit like this:

  ORACLE_HOME_LISTNER=$ORACLE_HOME

  [oracle@rac01 scripts]$su

  [ root @rac01]$ cd /etc/rc.d/init.d/ [ root @rac01 init.d]$ vi rmandb #!/bin/bash

  # chkconfig 345 99 10 # description: Startup Script for Oracle Databases export ORACLE_SID=RMANUAT export ORACLE_BASE= /oracle export ORACLE_HOME=/oracle/product/10.2.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin case “$1″ in start) su oracle -c $ORACLE_HOME/bin/dbstart touch /var/lock/oracle echo “OK” ;; stop) echo -n “Shutdown Oracle: ” su oracle -c $ORACLE_HOME/bin/dbshut rm -f /var/lock/oracle echo “OK” ;; *) echo “Usage: ‘basename $0′ start|stop” exit 1 esac exit 0

  [ root @rac01 init.d]$ chkconfig -add rmandb

  [ root @rac01 init.d]$ chkconfig -list rmandb

  Register the pcard database to rman catalog:

  [oracle@rac01 scripts]$ export ORACLE_SID=RMANUAT

  [oracle@rac01 scripts]$ sqlplus / as sysdba;

  SQL》 CREATE USER RMANUSR IDENTIFIED BY rman DEFAULT TABLESPACE RMANUATUSR_DAT;

  SQL》 GRANT connect,resource,recovery_catalog_owner TO RMANUSR;

  [oracle@rac01 scripts]$ rman catalog rmanusr/rman

  RMAN》 create catalog tablespace RMANUATUSR_DAT;

  RMAN》 connect target sys/nhy67ujm@pcard1;

  RMAN》 register database;

  RMAN》 report schema;

  List of Permanent Datafiles

  ===========================

  File Size(MB) Tablespace RB segs Datafile Name

  —- ——– ——————– ——- ————————

  1 480 SYSTEM YES +DATADG/pcard/datafile/system.259.663797429

  2 200 UNDOTBS1 YES +DATADG/pcard/datafile/undotbs1.260.663797479

  3 260 SYSAUX NO +DATADG/pcard/datafile/sysaux.261.663797495

  4 5 USERS NO +DATADG/pcard/datafile/users.263.663797539

  List of Temporary Files

  =======================

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章