oracle資料匯入

來源:互聯網
上載者:User

標籤:分享圖片   tab   user   解決   word   png   oracl   自己   name   

1.刪除原有資料庫的內容

drop user username cascade;

我的資料庫名為test,所以sql語句為:

drop user test cascade;

2.建立資料表空間:

語句為: create tablespace localtest datafile ‘F:\Oracle\localtest.dbf‘ size 2048M autoextend on;

其中localtest 為建立資料表空間名稱,datafile 為資料表空間的路徑 size為初始大小,autoextend 為自動擴充。

ps:執行後發現報錯

根據星號位置發現 單詞寫錯了!

在來一次:

 

 3.建立自己的使用者:

CREATE USER utest (使用者名稱) 
IDENTIFIED BY upassword(密碼)
DEFAULT TABLESPACE test(上面建立的資料表空間) 
TEMPORARY TABLESPACE temp;(暫存資料表空間就寫temp即可)

執行

 

4.授權:

5.匯入dmp 檔案

注意:要從sql 環境退出,

輸入exit 退出;

執行語句:

imp yzy/**** @localhost:1521\orcl file=d:\0309.dmp full=y log =y;

有報錯了!

原因是tnsnames.ora裡的host 不是localhost ,這裡你可以改為localhost,也可使用檔案裡的

解決

重寫語句:

imp yzy/**** @DESKTOP-K74S92Q:1521\orcl file=d:\0309.dmp full=y log =y;

好了,正在導表呢,但是從日誌上來看有一些錯誤,我們可以忽略錯誤,只需加上ignore=y,就可以了

 

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.