linux里创建表空间和用户名,linux下oracle的启动和创建表空间用户
1.進(jìn)入到sqlplus啟動(dòng)實(shí)例
[oracle@redhat ~]$ su - oracle???????????????????????????????? --“切換到oracle用戶”
Password:
[oracle@redhat ~]$ lsnrctl start?????????????????????????????? --“打開監(jiān)聽”
[oracle@redhat ~]$ sqlplus /nolog??????????????????????????????? --“進(jìn)入到sqlplus”
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 14 19:06:45 2009
Copyright (c) 1982, 2005, Oracle.? All rights reserved.
SQL> conn /as sysdba????????????????????????????????????????????? --“連接到sysdba”
Connected to an idle instance.
SQL> startup???????????????????????????????????????????????????? --“啟動(dòng)數(shù)據(jù)庫實(shí)例”
SQL> shutdown immediate????????????????????????????????????????? --“關(guān)閉數(shù)據(jù)庫實(shí)例”
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
[oracle@redhat ~]$ lsnrctl stop???????????????????????????????? --“關(guān)閉監(jiān)聽”
新建用戶的具體過程
1.創(chuàng)建用戶表空間
命令格式如下:
create tablespace 表空間名 datafile '數(shù)據(jù)文件名' size 表空間大小;
例如:創(chuàng)建名為test_tablespace的表空間,則輸入以下命令:
create tabalespace test_tablespace datafile 'C:\oracle\product\10.2.0\oradata\orcl\test_data.dbf' size 500M;
2.創(chuàng)建用戶名
命令格式如下:
create user 用戶名 identified by 用戶密碼 default tablespace 表空間名;
例如:創(chuàng)建用戶test,則輸入以下命令:
create user test identified by 1234 default tablespace test_tablespace;
回車后,會(huì)提示“用戶創(chuàng)建成功”,該用戶默認(rèn)使用的表空間為test_tablespace。
3.為新建的用戶授權(quán),允許連接、訪問數(shù)據(jù)庫等。在命令行中輸入以下命令:
grant connect,resource,dba to test;
回車后,會(huì)提示“授權(quán)成功”。
總結(jié)
以上是生活随笔為你收集整理的linux里创建表空间和用户名,linux下oracle的启动和创建表空间用户的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux安装多路径报错,linux多路
- 下一篇: 雷神电脑怎么设置启动顺序 雷神电脑启动顺