Ⅰ oracle中怎樣導入資料庫文件
可用圖形界面或者命令導入:
圖形界面需要藉助第三方工具plsql,方法如下:
1、登錄到要導入的資料庫及用戶。
2、依次點擊「工具」——「導入表」。
imp被導入用戶名/密碼@實例名file=文件名.dmplog=日誌.dmpfromuser=導出用戶touser=導入用戶
輸入後按回車鍵,等待導入完成即可。
說明:第三點中中文部分,請根據實際情況填寫。
Ⅱ oracle 數據導入
把test1.bmp文件拷貝到test2資料庫的電腦上
imp 用戶名/密碼 file=test1.bmp log=test.log fromuser= .... touser =....
Ⅲ 如何將oracle資料庫導出導入資料庫
先確保你要導入的資料庫sid中有和你導出數據時所用的用戶和密碼.如果沒有請看
2),
1)進入命令控制台,
輸入:
imp
username/password@sid
file=/pathurl
full=y
其中username為用戶名,password為密碼,pathurl導出數據所在路徑,
如:
impr
scott/tiger@orcl
file=d:\data.dmp
需要注意的是,你要導入的表的表空間所屬的用戶和密碼必須和你要導入到的表空間所屬的用戶和密碼相同,就是你導出數據時用的哪個用戶,導入時也用哪個用戶,
2)
如果沒有這個用戶,創建用戶命令如下:
以sysdba
進入sqlplus,
create
user
identified
by
password;
grant
dba
to
user;
Ⅳ Oracle的導入導出命令是什麼
用exp、imp試試
導出全庫>>>>>>
導入:導入之前需創造一個空庫(可以和前一個庫名不一樣)、一個一樣的用戶
cmd>>
imp username/password@資料庫名稱 file=文件路徑 full=Y
導出:
exp username/password@資料庫名稱 file=文件路徑(生成的文件)
我導出的時候文件直接設成.sql,蠻好
導出部分表>>>>
打開cmd
導出表,確定監聽是否開啟,資料庫服務是否開啟
exp scott/tiger@orcl file=F:sign.sql tables=表名,表名 grants=y
導入表,確定新資料庫服務是否開啟
imp scott/tiger@資料庫名 file=F:sign.sql fromuser=scott ignore=y commit=y grants=y
Ⅳ oracle資料庫導入導出命令
你的例子來說,system/manager
為登錄的用戶名及密碼
file從該參數指定的文件導數據至DB,log保存導入期間的執行的信息
full全部導入,ignore=Y代表導入過程中碰到錯誤忽略
imp
help=y就可以看到所有的幫助了
Ⅵ Oracle怎麼導入數據
我給你一些資料庫常用的導入導出命令吧:
該命令在「開始菜單>>運行>>CMD」中執行
一、數據導出(exp.exe)
1、將資料庫orcl完全導出,用戶名system,密碼accp,導出到d:\chu.dmp文件中
exp system/accp@orcl file=d:\chu.dmp full=y
2、將資料庫orcl中scott用戶的對象導出
exp scott/accp@orcl file=d:\chu.dmp owner=(scott)
3、將資料庫orcl中的scott用戶的表emp、dept導出
exp scott/accp@orcl file= d:\chu.dmp tables=(emp,dept)
4、將資料庫orcl中的表空間testSpace導出
exp system/accp@orcl file=d:\chu.dmp tablespaces=(testSpace)
二、數據導入(imp.exe)
1、將d:\chu.dmp 中的數據導入 orcl資料庫中。
imp system/accp@orcl file=d:\chu.dmp full=y
2、如果導入時,數據表已經存在,將報錯,對該表不會進行導入;加上ignore=y即可,表示忽略現有表,在現有表上追加記錄。
imp scott/accp@orcl file=d:\chu.dmp full=y ignore=y
3、將d:\chu.dmp中的表emp導入
imp scott/accp@orcl file=d:\chu.dmp tables=(emp)
Ⅶ ORACLE DMP導入資料庫命令
1. 獲取幫助
imp help=y
2. 導入一個完整資料庫
imp system/manager file=bible_db log=dible_db full=y ignore=y
3. 導入一個或一組指定用戶所屬的全部表、索引和其他對象
imp system/manager file=seapark log=seapark fromuser=seapark
imp system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)
4. 將一個用戶所屬的數據導入另一個用戶
imp system/manager file=tank log=tank fromuser=seapark touser=seapark_
imp system/manager file=tank log=tank fromuser=(seapark,amy) touser=(seapark1, amy1)
5. 導入一個表
imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)
6. 從多個文件導入
imp system/manager file=(paycheck_1,paycheck_2,paycheck_3,paycheck_4)
log=paycheck, filesize=1G full=y
7. 使用參數文件
imp system/manager parfile=bible_tables.par
bible_tables.par參數文件:
#Import the sample tables used for the Oracle8i Database Administrator's
Bible. fromuser=seapark touser=seapark_ file=seapark log=seapark_import
8. 增量導入
imp system./manager inctype= RECTORE FULL=Y FILE=A
Ⅷ oracle怎樣導入資料庫
方法一:利用PL/SQL Developer工具導出:
菜單欄---->Tools---->Export Tables,如下圖,設置相關參數即可:
方法二:利用cmd的操作命令導出,詳情如下:
1:G:\Oracle\proct\10.1.0\Client_1\NETWORK\ADMIN目錄下有個tnsname.ora文件,內容如下:
復制代碼 代碼如下:
CMSTAR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.13.200)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = cmstar)
)
)
其中:CMSTAR為資料庫名,HOST為IP地址,所以可以仿效上面的例子手動添加數據錄連接。
2:用cmd進入命令行
輸入:tnsping cmstar
就是測試172.18.13.200是否連接成功
3:導入與導出,如下:
數據導出:
1 將資料庫TEST完全導出,用戶名system 密碼manager 導出到D:\chu.dmp中
exp system/manager@TEST file=d:\chu.dmp full=y
2將資料庫中system用戶與sys用戶的表導出
expsystem/manager@TESTfile=d:\chu.dmpowner=(system,sys)
3將資料庫中的表table1、table2導出
expsystem/manager@TESTfile=d:\chu.dmptables=(table1,table2)
4將資料庫中的表table1中的欄位filed1以"00"打頭的數據導出
expsystem/manager@TESTfile=d:\chu.dmptables=(table1)query=\"wherefiled1like'00%'\"
上面是常用的導出,對於壓縮我不太在意,用winzip把dmp文件可以很好的壓縮。
不過在上面命令後面加上compress=y就可以了
數據的導入
1將D:\chu.dmp中的數據導入TEST資料庫中。
impsystem/manager@TESTfile=d:\chu.dmp
上面可能有點問題,因為有的表已經存在,然後它就報錯,對該表就不進行導入。
在後面加上ignore=y就可以了。
2將d:\chu.dmp中的表table1導入
impsystem/manager@TESTfile=d:\chu.dmptables=(table1)
注意事項:導出dmp數據時需要有導出表的許可權的用戶,否則不能導出。
PL/SQL Developer是Oracle資料庫中用於導入或導出資料庫的主要工具,本文主要介紹了利用PL/SQL Developer導入和導出資料庫的過程,並對導入或導出時的一些注意事項進行了說明,接下來我們就一一介紹。
導出步驟:
1 tools ->export user object 選擇選項,導出.sql文件。
2 tools ->export tables-> Oracle Export 選擇選項導出.dmp文件。
導入步驟:
註:導入之前最好把以前的表刪除,當然導入另外資料庫除外。
1 tools->import tables->SQL Inserts 導入.sql文件。
2 tools->import talbes->Oracle Import然後再導入dmp文件。
一些說明:
Tools->Export User Objects導出的是建表語句(包括存儲結構)。
Tools->Export Tables裡麵包含三種導出方式,三種方式都能導出表結構以及數據,如下:
Oracle Export
Sql Insert
pl/sql developer
第一種是導出為.dmp的文件格式,.dmp文件是二進制的,可以跨平台,還能包含許可權,效率也很不錯,用得最廣 。
第二種是導出為.sql文件的,可用文本編輯器查看,通用性比較好,但效率不如第一種,適合小數據量導入導出。尤其注意的是表中不能有大欄位(blob,clob,long),如果有,會提示不能導出(提示如下: table contains one or more LONG columns cannot export in sql format,user Pl/sql developer format instead)。
第三種是導出為.pde格式的,.pde為Pl/sql developer自有的文件格式,只能用Pl/sql developer自己導入導出,不能用編輯器查看。
Ⅸ 我是一個初學者,如何向oracle資料庫表中插入數據
工具/材料:電腦,oracle資料庫表
1.例test表中有如下數據。