search
HomeDatabaseMysql TutorialOracle传输表空间功能测试(含详细过程)

最近做Oracle数据迁移,之前有一篇迁移思路思考的文章,这里继续做具体的测试,主题问表空间传输。 相关阅读: Oracle 传输表空间

最近做Oracle数据迁移,之前有一篇迁移思路思考的文章,,这里继续做具体的测试,主题问表空间传输。

相关阅读:

Oracle 传输表空间

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

Oracle 传输表空间迁移数据总结

exp/expdp传输表空间和rman convert实现大数据量快速迁移

一、源服务器上导出表空间
源服务器:  10.1.122.55
目标服务器:10.1.122.54

0.设置字符集
注意,这里不设置字符集在导入的时候会报错,详细情况见文章的最后。
SUSE11sp2:~ # export LANG=AMERICAN_AMERICA.AL32UTF8
suse11sp2:~> export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

suse11sp2:~> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 24 14:45:47 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

1.准备需要传输的表空间
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> create tablespace aaa datafile '/oracle/oradata/aa.dbf' size 100M ;


Tablespace created.


SQL> CREATE USER aaa  IDENTIFIED BY aaa
DEFAULT TABLESPACE aaa
TEMPORARY TABLESPACE  temp;  2    3


User created.


SQL> GRANT CONNECT,RESOURCE TO aaa;


Grant succeeded.


SQL> REVOKE UNLIMITED TABLESPACE FROM aaa;


Revoke succeeded.


SQL> ALTER USER aaa QUOTA UNLIMITED ON aaa;


User altered.


SQL> conn aaa/aaa;
Connected.
SQL> create table a1(id varchar2(10),name varchar2(20));


Table created.


SQL> insert into a1 values('01','lurou');


1 row created.


SQL> insert into a1 values('02','hello,DBA!');


1 row created.


SQL> COMMIT;


Commit complete.


SQL> select * from a1;


ID        NAME
---------- --------------------
01        lurou
02        hello,DBA!


SQL>
SQL>
SQL>

 

2.做传输前检查
SQL> conn / as sysdba
Connected.
SQL>
SQL> execute sys.dbms_tts.transport_set_check('aaa',true);


PL/SQL procedure successfully completed.


SQL>
SQL> select * from sys.transport_set_violations;


no rows selected


SQL>

3.设置表空间为只读
SQL>
SQL> alter tablespace aaa read only;


Tablespace altered.


SQL>
SQL> commit;


Commit complete.


SQL>

linux

Statement
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
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use