Oracle菜鳥之如何建立和刪除資料表空間,oracle菜鳥建立

來源:互聯網
上載者:User

Oracle菜鳥之如何建立和刪除資料表空間,oracle菜鳥建立

1、建立暫存資料表空間建立資料表空間時,dbf檔案一般存放在datafile檔案的存放目錄下(一般是在執行個體名命名的檔案夾下面)可以通過 select * from v$datafile;查看所有資料檔案的存放位置create temporary tablespace 資料表空間名 tempfile '/data/oradata/CHUANSHU/datafile/tmp_檔案名稱.dbf'size 50M autoextend on next 1M maxsize 1024Mextent management local;2、建立正式資料表空間create tablespace 資料表空間名 logging datafile '/data/oradata/CHUANSHU/datafile/檔案名稱.dbf' size 124M autoextend on next 1M maxsize 10240Mextent management local ;3、建立資料庫使用者create user username identified by passworddefault tablespace 資料表空間名temporary tablespace 暫存資料表空間名;4、給新建立的資料庫使用者授權grant dba to username;grant connect to username;grant resource to username with admin option;grant unlimited tablespace to inspur_rmw with admin option;//grant dba to username with admin option;可以完成該功能5、刪除資料表空間drop tablespace tabaspacename including contents and datafiles;//同時刪除資料表空間和資料檔案



怎徹底刪除oracle建立的使用者與資料表空間

如果刪除使用者使用drop即可,如果要刪除資料表空間的同時,刪除對應的檔案可以這樣drop tablespace ocscdrbak including contents;drop tablespace tablespace_name including contents and datafiles;
windows 要先offline。
 
怎刪掉oracle中已建立的使用者 與 資料表空間

刪除使用者可以用drop user 使用者名稱 cascade; cascade是選擇性參數,加了這個參數的在刪除使用者時,同時刪除這個使用者下的所有schema。
刪除資料表空間用drop tablespace 資料表空間名;
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.