oracle的导入导出

2011年12月17日

oracle11G导出的时候,如果是空表会默认不导出
解决方法:

执行
select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0 or num_rows is null

查询出来好多sql语句,这些sql的作用就是把所有的空表设置为可导出。
如果提示表或视图不存在可以尝试在表名上加上双引号再执行。

-------------

导出的时候直接写exp

导入的时候直接写imp

----------------------
远程连接其它的电脑执行sqlplus的时候注意:

开始运行  cmd

然后

C:\>sqlplus sys/orcl@192.168.1.253:1521/orcl as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 12月 17 15:02:11 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>

---------------------------------
或者
C:\>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 12月 17 15:03:58 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

请输入用户名:  sys/orcl@192.168.1.253:1521/orcl as sysdba

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>

----
端口号不是必须填写的
--------------------

如果是sqlplusw登录
用户名:sys
口令:orcl
主机字符串:192.168.1.253/orcl as sysdba






 

数据库

  1. 暂时没有评论.