电脑技术学习

在Solaris 10 ZFS上安装Oracle 9i

dn001

  GROUP 3 ('/dev/zvol/rdsk/ora_pool/redo3_01_400m') SIZE 400M;

  spool off

  exit;

  oracle> cat $ORACLE_BASE/admin/ora9/scripts/CreateDBFiles.sql

  connect SYS/change_on_install as SYSDBA

  set echo on

  spool /opt/oracle/product/9.2/assistants/dbca/logs/CreateDBFiles.log

  CREATE TABLESPACE "INDX" LOGGING DATAFILE '/dev/zvol/rdsk/ora_pool/index01_4000m' SIZE 4000M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

  CREATE TABLESPACE "TOOLS" LOGGING DATAFILE '/dev/zvol/rdsk/ora_pool/tools_1000m' SIZE 1000M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

  CREATE TABLESPACE "USERS" LOGGING DATAFILE '/dev/zvol/rdsk/ora_pool/users01_4000m' SIZE 4000M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

  spool off

  exit;

  oracle> cat $ORACLE_BASE/admin/ora9/scripts/postDBCreation.sql

  connect SYS/change_on_install as SYSDBA

  set echo on

  spool /opt/oracle/product/9.2/assistants/dbca/logs/postDBCreation.log

  @/opt/oracle/product/9.2/rdbms/admin/utlrp.sql;

  shutdown ;

  connect SYS/change_on_install as SYSDBA

  set echo on

  spool /opt/oracle/product/9.2/assistants/dbca/logs/postDBCreation.log

  create spfile='/dev/zvol/rdsk/ora_pool/spfile_30m' FROM pfile='/opt/oracle/admin/ora9/scripts/init.ora';

  startup ;

  step6. 启动数据库.

  oracle> cat /opt/oracle/product/9.2/dbs/initora9.ora

  spfile='/dev/zvol/rdsk/ora_pool/spfile_30m'

  oracle> echo "ora9:/opt/oracle/product/9.2:Y" >> /var/opt/oracle/oratab

  oracle> sqlplus "/as sysdba"

  sql> startup pfile='/opt/oracle/admin/ora9/scripts/init.ora

  sql> create spfile='/dev/zvol/rdsk/ora_pool/spfile_30m' FROM pfile='/opt/oracle/admin/ora9/scripts/init.ora';

  sql> shutdown immediate;

  sql> startup pfile='/opt/oracle/product/9.2/dbs/initora9.ora'

  sql> show parameters spfile;

   NAME    TYPE    VALUE

   --------  -----   ---------

   spfile    string  /dev/zvol/rdsk/ora_pool/spfile_30m

  SQL> select name from v$datafile;

  NAME

  --------------------------------------------------

  /dev/zvol/rdsk/ora_pool/system_800m

  /dev/zvol/rdsk/ora_pool/undotbs1_01_4000m

  /dev/zvol/rdsk/ora_pool/index01_4000m

  /dev/zvol/rdsk/ora_pool/tools_1000m

  /dev/zvol/rdsk/ora_pool/users01_4000m

  出处:http://blog.sina.com.cn/s/blog_45d51ebc010008uj.html

标签: