日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

创建表空间和用户

發布時間:2025/5/22 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 创建表空间和用户 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

oracle創建用戶時需要指定使用的數據表空間和臨時表空間,所以創建用戶前需要先創建數據表空間和臨時表空間,有時也可以使用已存在的表空間。

1、創建臨時表空間

create temporary tablespace tem_test tempfile 'E:\APP\BOBOMEILIN\ORADATA\ORCL\TEM_TEST01.DBF' size 50m autoextend on next 20m maxsize 1024m;
2、創建數據表空間

create tablespace test datafile 'E:\APP\BOBOMEILIN\ORADATA\ORCL\TEST01.DBF' size 50m autoextend on next 50 maxsize 1024m;

3、創建用戶名、密碼

create user meilin
?????? identified by meilin
?????? default tablespace test
?????? temporary tablespace tem_test;

4、給用戶授予權限

grant connect,resource,dba to meilin;????? ?

其他關于表空間的操作

1、刪除表空間及數據

drop tablespace 表空間名 including contents and datafiles;

2、查詢表空間

  • 數據表空間存儲位置:select * from dba_data_files
  • 臨時表空間存儲位置:select * from dba_temp_files
  • 所有數據及臨時表空間:select * from dba_tablespaces

3、更改表空間大小

  • 更改物理存儲數據文件的大小:alter database datafile '物理存儲路徑' resize 大小,

  如:alter database datafile 'E:\APP\BOBOMEILIN\ORADATA\ORCL\TEST01.DBF' resize 200M

  • 增加物理存儲數據文件:alter tablespace test add datafile '物理存儲路徑' size 大小 autoextend on next 大小 maxsize 大小,

  如:alter tablespace test add datafile 'E:\APP\BOBOMEILIN\ORADATA\ORCL\TEST02.DBF' size 100M autoextend on next 20m maxsize 500m

4、查看用戶

  • 當前用戶可以看到的用戶:select * from all_users
  • 庫中所有的用戶:select * from dba_users
  • 當前用戶:select * from user_users

?

轉載于:https://www.cnblogs.com/coffeebar/p/5268268.html

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的创建表空间和用户的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。