linux里创建表空间和用户名,linux下oracle的启动和创建表空间用户
1.進入到sqlplus啟動實例
[oracle@redhat ~]$ su - oracle???????????????????????????????? --“切換到oracle用戶”
Password:
[oracle@redhat ~]$ lsnrctl start?????????????????????????????? --“打開監聽”
[oracle@redhat ~]$ sqlplus /nolog??????????????????????????????? --“進入到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???????????????????????????????????????????????????? --“啟動數據庫實例”
SQL> shutdown immediate????????????????????????????????????????? --“關閉數據庫實例”
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
[oracle@redhat ~]$ lsnrctl stop???????????????????????????????? --“關閉監聽”
新建用戶的具體過程
1.創建用戶表空間
命令格式如下:
create tablespace 表空間名 datafile '數據文件名' size 表空間大小;
例如:創建名為test_tablespace的表空間,則輸入以下命令:
create tabalespace test_tablespace datafile 'C:\oracle\product\10.2.0\oradata\orcl\test_data.dbf' size 500M;
2.創建用戶名
命令格式如下:
create user 用戶名 identified by 用戶密碼 default tablespace 表空間名;
例如:創建用戶test,則輸入以下命令:
create user test identified by 1234 default tablespace test_tablespace;
回車后,會提示“用戶創建成功”,該用戶默認使用的表空間為test_tablespace。
3.為新建的用戶授權,允許連接、訪問數據庫等。在命令行中輸入以下命令:
grant connect,resource,dba to test;
回車后,會提示“授權成功”。
總結
以上是生活随笔為你收集整理的linux里创建表空间和用户名,linux下oracle的启动和创建表空间用户的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux安装多路径报错,linux多路
- 下一篇: linux自动挂起什么意思,Linux中