• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > 使用可传输表空间将Oracle 9i升级到10g

使用可传输表空间将Oracle 9i升级到10g

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了使用,传输,空间,Oracle,升级,10g,Oracle,等相关知识,希望本文的分享对您有所帮助

1. 在Oracle 9i所在服务器上安装oracle 10g,并建库,创建用户scott,不创建用户表空间: SQL select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1

1. 在Oracle 9i所在服务器上安装oracle 10g,并建库,创建用户scott,不创建用户表空间:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod


PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_data_files;
TABLESPACE_NAME FILE_NAME BYTES/1024/1024
------------------------------ -------------------------------------------------- ---------------
SYSTEM /home/db/Oracle/oradata/mbs/MBS/datafile/o1_mf_sys 410
tem_80bnvf2j_.dbf
UNDOTBS1 /home/db/Oracle/oradata/mbs/MBS/datafile/o1_mf_und 305
otbs1_80bnvm5g_.dbf
SYSAUX /home/db/Oracle/oradata/mbs/MBS/datafile/o1_mf_sys 130
aux_80bnvnr8_.dbf
SQL> create user scott identified by tiger;
User created.
SQL> grant dba to scott;
Grant succeeded.
2. 检查9i环境,确认需要传输的表空间是自包含的
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Linux: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_data_files;
TABLESPACE_NAME FILE_NAME BYTES/1024/1024
------------------------------ -------------------------------------------------- ---------------
SYSTEM /home/db/Oracle/oradata/mbs/system01.dbf 325
UNDOTBS1 /home/db/Oracle/oradata/mbs/undotbs01.dbf 200
USERS /home/db/Oracle/oradata/mbs/users01.dbf 100
SQL> select owner,table_name,tablespace_name from dba_tables where table_name='TEST';
OWNER TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------ ------------------------------
SYS TEST USERS
SCOTT TEST USERS
SQL> EXECUTE SYS.DBMS_TTS.TRANSPORT_SET_CHECK('users',TRUE,TRUE);
PL/SQL procedure successfully completed.
SQL> SELECT * FROM SYS.TRANSPORT_SET_VIOLATIONS;
VIOLATIONS
------------------------------------------------------------------------------------------------------------------------------------
Sys owned object TEST in tablespace USERS not allowed in pluggable set
提示在users表空间中存在sys用户的表test,这不能包含在需要传输的表空间中。
将其删除:
SQL> drop table sys.test;
Table dropped.
SQL> EXECUTE SYS.DBMS_TTS.TRANSPORT_SET_CHECK('users',TRUE,TRUE);
PL/SQL procedure successfully completed.
SQL> SELECT * FROM SYS.TRANSPORT_SET_VIOLATIONS;
no rows selected
没有返回,代表在表空间users与其他表空间不存在依赖关系
3.导出表空间中的元数据
--首先将表空间users设为read only
SQL> alter tablespace users read only;
Tablespace altered.
--导出表空间users中表的元数据
[Oracle@rhel ~]$ exp \'/ as sysdba\' TRANSPORT_TABLESPACE=y TABLESPACES=(users) TTS_FULL_CHECK=y
Export: Release 9.2.0.4.0 - Production on Wed Jul 18 02:15:28 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
For tablespace USERS ...
. exporting cluster definitions
. exporting table definitions
. . exporting table TEST
. exporting referential integrity constraints
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.
4. 导出数据库中其它对象,以full=y rows=n方式导出
[Oracle@rhel ~]$ exp SYSTEM/oracle FULL=y FILE=full.dmp ROWS=n statistics=none
Export: Release 9.2.0.4.0 - Production on Wed Jul 18 02:16:22 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
Note: table data (rows) will not be exported
About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
. exporting roles
. exporting resource costs
. exporting rollback segment definitions
. exporting database links
. exporting sequence numbers
. exporting directory aliases
. exporting context namespaces
. exporting foreign function library names
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions
. exporting system procedural objects and actions
. exporting pre-schema procedural objects and actions
. exporting cluster definitions
. about to export SYSTEM's tables via Conventional Path ...
. . exporting table AQ$_INTERNET_AGENTS
. . exporting table AQ$_INTERNET_AGENT_PRIVS
. . exporting table DEF$_AQCALL
. . exporting table DEF$_AQERROR
. . exporting table DEF$_CALLDEST
. . exporting table DEF$_DEFAULTDEST
. . exporting table DEF$_DESTINATION
. . exporting table DEF$_ERROR
. . exporting table DEF$_LOB
. . exporting table DEF$_ORIGIN
. . exporting table DEF$_PROPAGATOR
. . exporting table DEF$_PUSHED_TRANSACTIONS
. . exporting table DEF$_TEMP$LOB
. . exporting table LOGSTDBY$APPLY_MILESTONE
. . exporting table LOGSTDBY$APPLY_PROGRESS
. . exporting table LOGSTDBY$EVENTS
. . exporting table LOGSTDBY$PARAMETERS
. . exporting table LOGSTDBY$PLSQL
. . exporting table LOGSTDBY$SCN
. . exporting table LOGSTDBY$SKIP
. . exporting table LOGSTDBY$SKIP_TRANSACTION
. . exporting table REPCAT$_AUDIT_ATTRIBUTE
. . exporting table REPCAT$_AUDIT_COLUMN
. . exporting table REPCAT$_COLUMN_GROUP
. .
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 基于MySQL游标的具体使用详解
  • 如何使用索引提高查询速度
  • MYSQL索引无效和索引有效的详细介绍
  • 解析SQLite中的常见问题与总结详解
  • 基于MYSQL中优化的一些方法
  • mysql 将列值转变为列的方法
  • MySQL笔记之索引的使用
  • JDBC数据库的使用操作总结
  • linux下mysql提示"mysql deamon failed to start"错误的解决方法
  • linux Xtrabackup安装及使用方法

相关文章

  • 2017-05-11mysql自定义排序顺序语句
  • 2018-12-05Oracle数据库安全策略
  • 2018-12-05MySQL学习笔记4:完整性约束限制字段
  • 2018-12-05Win10安装MySQL启动服务器失败且无错误提示
  • 2018-12-05批处理 动态sql
  • 2018-12-05Keepalive之MySQL故障自动切换脚本
  • 2017-05-11MySql数据引擎简介与选择方法
  • 2018-12-05ORACLE数据库事务隔离级别介绍
  • 2018-12-05ef框架-vs2015连接数据库,实体数据模型向导在选择完后点击下一步就闪退
  • 2018-12-05Oracle存储过程入门学习基本语法_Oracle应用_脚本之家

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • 高性能MySQL-详解事务与隔离级别
    • MySQL开启记录执行过的SQL语句方法
    • oracle学习笔记(二)
    • Oracle数据库安全策略
    • ORACLE PL/SQL 触发器编程篇介绍
    • mysql Out of memory (Needed 16777224 bytes)的错误解决
    • MySQL 数据类型 大全
    • 只有mdf文件的数据库附加失败的修复方法分享(置疑、只读)
    • MySQL 创建索引(Create Index)的方法和语法结构及例子
    • MySQL几点重要的性能指标计算和优化的方法代码总结

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有