Oracle数据库导出整个Oracle数据库和导入整个oracle数据库命令
=====================================================================================
tnsnames.ora
# tnsnames.ora Network Configuration File: D:\05-sxylz_hmkj_yxgs\01-software\10-oracle\01-oracleSetup\oracle\product\product\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
gsk =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.80)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ylzybkfk)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
bdk =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
===========================================================================================================================================================================================================================================================================================================================
导入到新库命令:
在dos下直接执行命令:
imp ydjy/ydjy@bdk file = D:\20200713.dmp log = D:\20200713.log full = y
ydjy/ydjy-------为新用户和密码
bdk--------为tnsnames.ora文件中配置的
file--------为之前导出库的文件所在位置
log--------为之前导出库的文件.log所在位置
full=y--------为全部导入