WEB开发网
开发学院数据库Oracle Oracle手动创建数据库 阅读

Oracle手动创建数据库

 2012-05-16 17:11:25 来源:WEB开发网   
核心提示:$mkdir -p /u01/app/oracle/admin/orcl/udump$mkdir -p /u01/app/oracle/admin/orcl/cdump$mkdir -p /u01/app/oracle/flash_recovery_area$mkdir -p /u01/app/oracle/arch$
$mkdir -p /u01/app/oracle/admin/orcl/udump
$mkdir -p /u01/app/oracle/admin/orcl/cdump
$mkdir -p /u01/app/oracle/flash_recovery_area
$mkdir -p /u01/app/oracle/arch
$mkdir -p /u01/app/oracle/oradata/orcl
 
#sqlplus "/ as sysdba"
#startup nomount pfile=/soft/initorcl.ora
 
创建表空间:
CONNECT SYS/password AS SYSDBA
-- create a user tablespace to be assigned as the default tablespace for users
CREATE TABLESPACE users LOGGING
     DATAFILE '/u01/app/oracle/oradata/orcl/users01.dbf'
     SIZE 25M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
     EXTENT MANAGEMENT LOCAL;
-- create a tablespace for indexes, separate from user tablespace
CREATE TABLESPACE indx LOGGING
     DATAFILE '/u01/app/oracle/oradata/orcl/indx01.dbf'
     SIZE 25M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
     EXTENT MANAGEMENT LOCAL;
 
alter database default tablespace users;
         
运行脚本:
CONNECT SYS/password AS SYSDBA
@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql
@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql
EXIT
脚本描述:
CATALOG.SQL Creates the views of the data dictionary tables, the dynamic performance views, and public synonyms for many of the views. Grants PUBLIC access to the synonyms.
CATPROC.SQL Runs all scripts required for or used with PL/SQL.
查看数据库启动状态:
select status from v$instance;
结果:open
说明手动创建数据库成功。

上一页  1 2 3 

Tags:Oracle 手动 创建

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接