创建数据库Oracle
我是甲骨文新手。我对在 ORA 中创建数据库有多么复杂感到有点好笑。看来我必须遵循以下所有步骤才能创建数据库。有没有更简单的方法(没有IDE)?
FROM (http://www.dba-oracle.com/oracle_create_database.htm):
极其简单的手动 Oracle 数据库创建脚本
- 设置 ORACLE_SID
导出 ORACLE_SID=test
导出 ORACLE_HOME=/path/to/oracle/home
- 创建最小的 init.ora
$ORACLE_HOME/dbs/init.ora
control_files = (/path/to/control1.ctl,/path/to/control2.ctl,/path/to/control3.ctl) 撤消管理=自动 undo_表空间 = UNDOTBS1 数据库名称=测试 db_block_size = 8192 sga_max_size = 1073741824 #一个演出 sga_target = 1073741824 #one gig
- 创建密码文件
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd.ora password=oracle items=5
- 启动实例
sqlplus / as sysdbastartup
nomount
- 创建数据库
create database test 日志文件组1('/path/to/redo1.log')大小100M, 第2组('/path/to/redo2.log')大小100M, 第3组('/path/to/redo3.log')大小100M 字符集 WE8ISO8859P1 国家字符集utf8 数据文件“/path/to/system.dbf”大小 500M 自动扩展下一个 10M maxsize 无限制扩展管理本地 sysaux 数据文件 '/path/to/sysaux.dbf' 大小 100M 自动扩展下一个 10M maxsize 无限制 撤消表空间undotbs1数据文件'/path/to/undotbs1.dbf'大小100M 默认临时表空间 temp tempfile '/path/to/temp01.dbf' 大小 100M;
注意:您还可以在这里执行一些其他操作,例如“ARCHIVELOG”“SET TIME_ZONE ="和“USER SYS IDENTIFIED BY password”和“USER SYSTEM IDENTIFIED BY password”
- 运行目录和catproc
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
- 更改密码
更改用户 sys 所标识的任何内容;
改变通过任何方式识别的用户系统;
I'm new to oracle. And I'm kind of amused how complicated is to create a database in ORA. It seems that I have to follow all the steps bellow just to create a database. Is there an easier way (without an IDE)?
FROM (http://www.dba-oracle.com/oracle_create_database.htm):
EXTREMELY minimal manual Oracle database creation script
- Set your ORACLE_SID
export ORACLE_SID=test
export ORACLE_HOME=/path/to/oracle/home
- Create a minimal init.ora
$ORACLE_HOME/dbs/init.ora
control_files = (/path/to/control1.ctl,/path/to/control2.ctl,/path/to/control3.ctl)
undo_management = AUTO
undo_tablespace = UNDOTBS1
db_name = test
db_block_size = 8192
sga_max_size = 1073741824 #one gig
sga_target = 1073741824 #one gig
- Create a password file
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd.ora password=oracle entries=5
- Start the instance
sqlplus / as sysdba
startup nomount
- Create the database
create database test
logfile group 1 ('/path/to/redo1.log') size 100M,
group 2 ('/path/to/redo2.log') size 100M,
group 3 ('/path/to/redo3.log') size 100M
character set WE8ISO8859P1
national character set utf8
datafile '/path/to/system.dbf' size 500M autoextend on next 10M maxsize unlimited extent management local
sysaux datafile '/path/to/sysaux.dbf' size 100M autoextend on next 10M maxsize unlimited
undo tablespace undotbs1 datafile '/path/to/undotbs1.dbf' size 100M
default temporary tablespace temp tempfile '/path/to/temp01.dbf' size 100M;
Note: there's some other things you can do here, like "ARCHIVELOG" "SET TIME_ZONE =" and "USER SYS IDENTIFIED BY password" and "USER SYSTEM IDENTIFIED BY password"
- Run catalog and catproc
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
- Change passwords
alter user sys identified by whatever;
alter user system identified by whatever;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论