oracle建立資料庫資料表空間 使用者 授權 匯入 匯出資料庫

來源:互聯網
上載者:User

標籤:

windows下可以使用嚮導一步一步建立資料庫,注意編碼。

windows串連到某一個資料庫執行個體(不然會預設到一個執行個體下面):
set ORACLE_SID=TEST

--登入開始建立資料表空間及可以操作的使用者
sqlplus / as sysdba;

--建立資料表空間
create tablespace db_test
datafile ‘D:\oracle\oradata\TEST\db_test.dbf‘
size 50m
autoextend on;

--查詢建立好的資料表空間
select default_tablespace, temporary_tablespace, d.username
from dba_users d

--刪除資料表空間
DROP TABLESPACE db_test INCLUDING CONTENTS AND DATAFILES;

--建立使用者,注意設定資料表空間範圍
CREATE USER test
IDENTIFIED BY test
DEFAULT TABLESPACE db_test;

select * from dba_users;

--授權
grant connect, resource,dba to test;


匯出匯入命令:
exp a/[email protected] FILE=d:\a.dmp OWNER=usera GRANTS=y ROWS=y COMPRESS=y log=D:\sample.log;
imp a/[email protected] file=d:\a.dmp fromuser=usera touser=userb ignore=y log=D:\sample.log;

oracle建立資料庫資料表空間 使用者 授權 匯入 匯出資料庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.