Home > Database > Mysql Tutorial > body text

Oracle的导入导出的问题

WBOY
Release: 2016-06-07 16:53:50
Original
1099 people have browsed it

Oracle数据库导入导出的注意事项1、Oracle中exp导出dmp文件时,默认导出了表结构定义的storage子句,并且compress参数默认是Y的,

Oracle数据库导入导出的注意事项
1、Oracle中exp导出dmp文件时,默认导出了表结构定义的storage子句,并且compress参数默认是Y的,这样一个数据库在经过几次反复的exp和imp后,storage的initial参数就会越来越大,对于大表来说compress=Y并不是一个很好的选择;

2、由于initial参数越来越大,所以即使exp导出时ROWS=N,带导入到新库后表空间占用磁盘的空间还是很大;

3、如果仅仅需要导出表结构定义而不需要表数据,并且不需要带storage子句的情况下,可以用PL/SQL里面的功能:Tools-Export User Objects来实现

4、郁闷,居然没导出同义词:
1:synonym.cmd:
  
  sqlplus USER/PASSWORD@SID @synonym.sql
  
  2.synonym.sql:
  
  create table tmp_user_synonym as select 'create or replace public synonym '||synonym_name||chr(13)||'for'||chr(13)||TABLE_OWNER||'.'||TABLE_NAME||chr(13)||'/' text from all_synonyms where table_owner='User';
  set heading off feedback off termout off
  set pagesize 0
  set linesize 100
  set long 100000
  col tt format a
  spool d:\bat\synonym.log;
  select text tt from tmp_user_synonym;
  spool off;
  drop table tmp_user_synonym;
  exit;

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!