[oracle@db dbs]$ echo "startup nomount" | sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 9 16:58:36 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance. SQL> ORACLE instance started.
Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 671089544 bytes Database Buffers 390070272 bytes Redo Buffers 5517312 bytes SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
4. 创建数据库
从官方文档中粘贴建库语句,修改制作建库脚本
[oracle@db dbs]$ cat createdb.sql CREATE DATABASE BOOBOO USER SYS IDENTIFIED BY oracle USER SYSTEM IDENTIFIED BY oracle LOGFILE GROUP 1 ('/alidata/app/oracle/oradata/BOOBOO/redo01a.log','/alidata/app/oracle/oradata/BOOBOO/redo01b.log') SIZE 100M BLOCKSIZE 512, GROUP 2 ('/alidata/app/oracle/oradata/BOOBOO/redo02a.log','/alidata/app/oracle/oradata/BOOBOO/redo02b.log') SIZE 100M BLOCKSIZE 512, GROUP 3 ('/alidata/app/oracle/oradata/BOOBOO/redo03a.log','/alidata/app/oracle/oradata/BOOBOO/redo03b.log') SIZE 100M BLOCKSIZE 512 MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/alidata/app/oracle/oradata/BOOBOO/system01.dbf' SIZE 325M REUSE SYSAUX DATAFILE '/alidata/app/oracle/oradata/BOOBOO/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE users DATAFILE '/alidata/app/oracle/oradata/BOOBOO/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/alidata/app/oracle/oradata/BOOBOO/temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs1 DATAFILE '/alidata/app/oracle/oradata/BOOBOO/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
数据库中执行建库脚本:
SQL> @createdb.sql Database created.
5. 执行生成数据字典信息的脚本并执行
[oracle@db dbs]$ vim 1.sql @?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql conn system/oracle @?/sqlplus/admin/pupbld.sql