在RedHat5上手动创建数据库

企鹅博客
19511
文章
0
评论
2020年3月17日00:27:14 评论 10 views 2006字阅读6分41秒

我们这道在Linux上我们可以通过dbca创建数据库,但是我们也能以命令行的模式创建数据库,下面我们说说他的方法

1,首先查看以下我们要创建的数据库名

[[email protected] ~]$ echo $ORACLE_SID
orcl
如果没有设置可以作如下设置
export ORACLE_SID=orcl

2,首先创建一个实例参数文件(pfile)这里命名为pfileorcl.ora
#vim $ORACLE_HOME/dbs/pfileorcl.ora在里面输入下面内容
db_name=orcl
db_domain=example.com
db_files=1000
processes=600
statistics_level=typical
db_block_size=8192
audit_trail=none
background_dump_dest='/u01/app/admin/orcl/bdump'
core_dump_dest='/u01/app/admin/orcl/adump'
control_files=('/u02/oradata/orcl/control01.ctl',
'/u02/oradata/orcl/control02.ctl','/u02/oradata/orcl/control03.ctl')
sga_target=400M
pga_aggregate_target=400M
db_file_multiblock_read_count=16
log_archive_format='log%t_%s_%r.arc'
optimizer_mode=all_rows
remote_login_passwordfile=none
undo_management=auto
undo_retention=7200

3,创建必要的目录
# mkdir -pv /u01/app/admin/orcl/{adump,bdump,dbump}
mkdir: created directory `/u01/app/admin'
mkdir: created directory `/u01/app/admin/orcl'
mkdir: created directory `/u01/app/admin/orcl/adump'
mkdir: created directory `/u01/app/admin/orcl/bdump'
mkdir: created directory `/u01/app/admin/orcl/dbump'
更改它们的权限
# chmod 775 -Rv /u01/app/admin/
mode of `/u01/app/admin/' changed to 0775 (rwxrwxr-x)
mode of `/u01/app/admin/orcl' changed to 0775 (rwxrwxr-x)
mode of `/u01/app/admin/orcl/adump' changed to 0775 (rwxrwxr-x)
mode of `/u01/app/admin/orcl/bdump' changed to 0775 (rwxrwxr-x)
mode of `/u01/app/admin/orcl/dbump' changed to 0775 (rwxrwxr-x)
更改他们的所属主组
# chown oracle:oinstall -Rv /u01/app/admin/
changed ownership of `/u01/app/admin/orcl/adump' to oracle:oinstall
changed ownership of `/u01/app/admin/orcl/bdump' to oracle:oinstall
changed ownership of `/u01/app/admin/orcl/dbump' to oracle:oinstall
changed ownership of `/u01/app/admin/orcl' to oracle:oinstall
changed ownership of `/u01/app/admin/' to oracle:oinstall
# mkdir /u02/oradata/orcl
# mkdir /u02/oradata/orcl/arch -pv
mkdir: created directory `/u02/oradata/orcl'
# chmod 775 -Rv /u02/oradata/orcl/
mode of `/u02/oradata/orcl/' changed to 0775 (rwxrwxr-x)
mode of `/u02/oradata/orcl/arch' changed to 0775 (rwxrwxr-x)
# chown oracle:oinstall -Rv /u02/oradata/orcl/
changed ownership of `/u02/oradata/orcl/' to oracle:oinstall

继续阅读
  • 版权声明: 发表于 2020年3月17日00:27:14
  • 转载注明:https://www.qieseo.com/148394.html
MySQL中的explain解释命令详解 Linux-数据库

MySQL中的explain解释命令详解

MySQL中的explain命令显示了mysql如何使用索引来处理select语句以及连接表。explain显示的信息可以帮助选择更好的索引和写出更优化的查询语句。 1.EXPLAIN的使用方法:在s...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: