Data Import and Export and transaction in Oracle11g Database

Source: Internet
Author: User
In the use of oracle databases, Backup recovery is the most critical. When the database fails, it can be restored in a timely manner to reduce unnecessary losses. Next I will briefly introduce the number of imported and exported data.

In the use of oracle databases, Backup recovery is the most critical. When the database fails, it can be restored in a timely manner to reduce unnecessary losses. Next I will briefly introduce the number of imported and exported data.

In the use of Oracle databases, Backup recovery is the most critical. When the database fails, it can be restored in a timely manner to reduce unnecessary losses. Next I will briefly introduce the import and export of databases, solutions, tables, and the role of things in the Process of use.
1. Export data tables
[Oracle @ CentOS ~] $ Exp scott/system tables = t file = '/home/oracle/t. dump 'Log = '/home/oracle/t. log'; -- export t table data in scott (tables = can write multiple tables, full = y all export, ignore = y indicates ignore duplicate data)
Export: Release 11.2.0.1.0-Production on Mon Feb 17 16:28:04 2014
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
Server uses WE8MSWIN1252 character set (possible charset conversion)
About to export specified tables via Conventional Path...
.. Exporting table T 1 rows exported
Export terminated successfully without warnings.
[Oracle @ centos ~] $

2. Import Data Tables
[Oracle @ centos ~] $ Sqlplus
SQL * Plus: Release 11.2.0.1.0 Production on Mon Feb 17 16:29:13 2014
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> drop table t; -- delete the table I just exported
Table dropped.
SQL> commit;
Commit complete.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[Oracle @ centos ~] $ Imp scott/system tables = t file = '/home/oracle/t. dump'; -- import a data table
Import: Release 11.2.0.1.0-Production on Mon Feb 17 16:29:58 2014
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT: V11.02.00 via conventional path
Import done in US7ASCII character set and AL16UTF16 NCHAR character set
Import server uses WE8MSWIN1252 character set (possible charset conversion)
. Importing SCOTT's objects into SCOTT
. Importing SCOTT's objects into SCOTT
.. Importing table "T" 1 rows imported
Import terminated successfully without warnings.
[Oracle @ centos ~] $ Sqlplus
SQL * Plus: Release 11.2.0.1.0 Production on Mon Feb 17 16:30:03 2014
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from t; -- import successful
A
----------
1
SQL>

3. Export all tables under the user (scott)
[Oracle @ centos ~] $ Exp scott/system file = '/home/oracle/scott. dump '; -- import all the tables of scott (exp scott/system owner = user name file = 'path' -- export tables of other users)
Export: Release 11.2.0.1.0-Production on Mon Feb 17 16:34:07 2014
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
Server uses WE8MSWIN1252 character set (possible charset conversion)
. Exporting pre-schema procedural objects and actions
. Exporting foreign function library names for user SCOTT
. Exporting PUBLIC type synonyms
. Exporting private type synonyms
. Exporting object type definitions for user SCOTT
About to export SCOTT's objects...
. Exporting database links
. Exporting sequence numbers
. Exporting cluster definitions
. About to export SCOTT's tables via Conventional Path...
.. Exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
.. Exporting table EMP 12 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
.. Exporting table SALGRADE 5 rows exported
EXP-00091: Exporting questionable statistics.
.. Exporting table SYS_TEMP_FBT
.. Exporting table T 1 rows exported
.. Exporting table TONG1 14 rows exported
EXP-00091: Exporting questionable statistics.
. Exporting synonyms
. Exporting views
. Exporting stored procedures
. Exporting operators
. Exporting referential integrity constraints
. Exporting triggers
. Exporting indextypes
. Exporting bitmap, functional and extensible indexes
. Exporting posttables actions
. Exporting materialized views
. Exporting snapshot logs
. Exporting job queues
. Exporting refresh groups and children
. Exporting dimensions
. Exporting post-schema procedural objects and actions
. Exporting statistics
Export terminated successfully with warnings.
[Oracle @ centos ~] $

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.