oracle資料庫建立後要做的事情

2022-02-06 08:47:04 字數 1001 閱讀 2003

在sql plus工具中(oracle自帶)用conn /as sysdba登入資料庫。

一:先新建使用者 

create

user test01 identified by test02(test01為使用者名稱,test02為使用者密碼)

二:賦予資料庫操作的基本許可權

grant connect,resource,dba to test01;
三:建立表空間

根據相應的要求,建立相應的表空間。

create

tablespace edutables datafile '

' size 32000m autoextend on

next 500m maxsize unlimited;

edutables 為表空間名稱
更為詳細的,我一般是用上面的。

create

tablespace edutables datafile

'size 4596m autoextend on next 500m maxsize unlimited

logging

online

extent management local autoallocate

blocksize 8k

segment space management auto

flashback on;

edutables 為表空間名稱
四:建立完表空間,就是導資料庫的時候了,完整的資料庫備份匯出,然後使用批處理檔案,執行即可。

匯入匯出可以找這篇部落格:

至此,資料恢復完畢

另外遇到的問題就是以後匯入的資料庫全備份,sequence的問題的值比資料表的一些id要小,是不是sequence不會一起匯入呢?

oracle建立資料庫後建立自己的使用者

第1步 登入 以sys sys超級使用者登入pl sql 第2步 建立臨時表空間 create temporary tablespace user temp tempfile e oracle product 10.2.0 oradata wu user temp.dbf size 50m auto...

oracle建立資料庫後建立自己的使用者

oracle建立 資料庫後建立自己的使用者 sql 第1步 登入 以sys sys超級使用者登入pl sql 第2步 建立臨時表空間 create temporary tablespace user temp tempfile e oracle product 10.2.0 oradata wu u...

oracle 建立資料庫

檢驗是否存在 存在的話刪除 drop tablespace tbs epet 建立表空間 create tablespace tbs epet datafile c epet space.dbf size 5m 建立使用者 create user epet identified by epet de...