分享更有价值
被信任是一种快乐

oracle如何手动建库

文章页正文上

这篇文章将免费主机域名为大家详细讲解有关oracle如何手动建库,小编觉免费主机域名得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
1、– 查看服务器 ORA 环境变量情况
[oracle@orastb ~]$ env|grep ORA
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
2、– 创建参数文件
[oracle@orastb ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@orastb dbs]$ ls
afiedt.buf hc_testdb.dat lkTESTDB2 spfiletestdb1.ora
hc_boncstb.dat inittestdb1.ora orapwboncstb spfiletestdb2.ora
hc_OMS.dat inittestdb2.ora orapwtestdb1
hc_testdb1.dat lkBONCSTB orapwtestdb2
hc_testdb2.dat lkTESTDB1 spfileboncstb.ora
[oracle@orastb dbs]$ touch initqixindb.ora
[oracle@orastb dbs]$ cat initqixindb.ora
memory_target=17179870000
*.db_name=’QIXINDB’
*.processes = 300
*.audit_file_dest=’/u01/app/oracle/admin/qixindb/adump’
*.audit_trail =’db’
*.db_block_size=8192
*.db_domain=”
*.db_recovery_file_dest=’/u01/app/oracle/flash_recovery_area’
*.db_recovery_file_dest_size=10G
*.diagnostic_dest=’/u01/app/oracle’
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)’
*.open_cursors=300
*.remote_login_passwordfile=’EXCLUSIVE’
*.undo_tablespace=’undotbs01′
# You may want to ensure that control files are created on separate physical
# devices
*.control_files=’/oradata/qixindb/control01.ctl’,’/oradata/flash_recovery_area_qixindb/qixindb/control02.ctl’
*.compatible =’11.2.0′
3、– 创建参数文件及建库所需目录
[oracle@orastb dbs]$ mkdir -p /u01/app/oracle/admin/qixindb/adump
[oracle@orastb dbs]$ mkdir -p /u01/app/oracle/flash_recovery_area
[oracle@orastb dbs]$ mkdir -p /oradata/qixindb/
[oracle@orastb dbs]$ mkdir -p /oradata/flash_recovery_area_qixindb/qixindb/
[oracle@orastb dbs]$ mkdir -p /oradata/qixindb/redolog/
4、 — 登录,启动数据库到nomount , 执行手工建库脚本
[oracle@orastb ~]$ sqlplus / as sysdba
Connected to an idle instance.
(11G)SYS@qixindb> startup nomount;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
(11G)SYS@qixindb> show parameter memory_
NAME TYPE VALUE
———————————— ———– ——————————
hi_shared_memory_address integer 0
memory_max_target big integer 16448M
memory_target big integer 16448M
shared_memory_address integer 0
(11G)SYS@qixindb>
CREATE DATABASE qixindb
USER SYS IDENTIFIED BY BOnc#oracle123
USER SYSTEM IDENTIFIED BY BOnc#oracle123
LOGFILE GROUP 1 (‘/oradata/qixindb/redolog/redo01a.log’,’/oradata/qixindb/redolog/redo01b.log’) SIZE 1G BLOCKSIZE 512,
GROUP 2 (‘/oradata/qixindb/redolog/redo02a.log’,’/oradata/qixindb/redolog/redo02b.log’) SIZE 1G BLOCKSIZE 512,
GROUP 3 (‘/oradata/qixindb/redolog/redo03a.log’,’/oradata/qixindb/redolog/redo03b.log’) SIZE 1G BLOCKSIZE 512,
GROUP 4 (‘/oradata/qixindb/redolog/redo04a.log’,’/oradata/qixindb/redolog/redo04b.log’) SIZE 1G BLOCKSIZE 512,
GROUP 5 (‘/oradata/qixindb/redolog/redo05a.log’,’/oradata/qixindb/redolog/redo05b.log’) SIZE 1G BLOCKSIZE 512,
GROUP 6 (‘/oradata/qixindb/redolog/redo06a.log’,’/oradata/qixindb/redolog/redo06b.log’) SIZE 1G BLOCKSIZE 512
MAXLOGFILES 15
MAXLOGMEMBERS 3
MAXLOGHISTORY 1
MAXDATAFILES 300
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE ‘/oradata/qixindb/system01.dbf’ SIZE 8G REUSE
SYSAUX DATAFILE ‘/oradata/qixindb/sysaux01.dbf’ SIZE 8G REUSE
DEFAULT TABLESPACE users
DATAFILE ‘/oradata/qixindb/users01.dbf’
SIZE 500M REUSE AUTOEXTEND OFF
DEFAULT TEMPORARY TABLESPACE tempts01
TEMPFILE ‘/oradata/qixindb/temp01.dbf’
SIZE 30G REUSE
UNDO TABLESPACE undotbs01
DATAFILE ‘/oradata/qixindb/undotbs01.dbf’
SIZE 30G REUSE AUTOEXTEND OFF;
Database created.
(11G)SYS@qixindb> select open_mode from v$database;
OPEN_MODE
——————–
READ WRITE
(11G)SYS@qixindb> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
(11G)SYS@qixindb> startup;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
Database mounted.
Database opened.
[oracle@orastb dbs]$ orapwd file=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwqixindb password=BOnc#oracle123
[oracle@orastb dbs]$ ll orapwqixindb
-rw-r—–. 1 oracle oinstall 1536 Aug 30 16:09 orapwqixindb
(11G)SYS@qixindb> show parameter pfile
NAME TYPE VALUE
———————————— ———– ——————————
spfile string
(11G)SYS@qixindb> create spfile from pfile;
File created.
(11G)SYS@qixindb> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
(11G)SYS@qixindb> startup;
ORACLE instance started.
Total System Global Area 1.7170E+10 bytes
Fixed Size 2260128 bytes
Variable Size 9261024096 bytes
Database Buffers 7851737088 bytes
Redo Buffers 54951936 bytes
Database mounted.
Database opened.
— 建库完成后,跑三个脚本
— sys用户登录
In SQL*Plus, connect to your Oracle Database instance with the SYSDBA administrative privilege:
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
— system用户登录
In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:
@?/sqlplus/admin/pupbld.sql关于“oracle如何手动建库”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

相关推荐: 怎么理解oracle复合索引

这篇文章主要讲解了“怎么理解oracle复合索引”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么理解oracle复合索引”吧!首先,在大多数情况下,复合索引比单字段索引好.以税务系统的SB_ZSXX(申报类_…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册