Introduction to Oracle database Administrator, import data and export data

Source: Internet
Author: User

Database administrator:
Different permissions for SYS and system:
SYS: the base tables and views of all Oracle data dictionaries are stored in the SYS user, which is critical to the runtime of Oracle and is determined by the database
own maintenance, no user can manually change, sys user has DBA, SYSDBA, Sysoper role or permissions, is the highest Oracle permissions users.

System: For storing secondary-level internal data, such as management information for some features or tools of Oracle, the system user has DBA, SYSDBA role, or system rights
Limit.

SYS and system are logged in different ways:
SYS user must be logged in as SYSDBA or as Sysoper. The database cannot be logged in normal mode.
If the system is logged in normally, it is actually a normal DBA user, but if you log in as SYSDBA, the result is actually logged in as SYS user,
From the login information can be seen.

Database backup (operation is in the bin directory is lowered with the exp command, not in the Database Manipulation window operation):
A logical backup requires the database to be in a running state, and physical backups can be turned off or turned on.
Export:
The export is divided into: Export table, export the scheme, export the database three kinds of ways.

Export scenario: Export all data, including tables, views, and so on.
Export database: System users export scenarios for multiple users.

The export is done using the EXP command, which has the following common options:
UserID: Used to specify the user name, password, and connection string to perform the export operation.
Tables: Used to specify the table to perform the export operation.
Owner: Used to specify the scenario in which the export operation is performed.
Full=y: The database used to specify the export operation
Inctype: Used to specify the increment type to perform the export operation
Rows: Used to specify whether the export operation is to export data from the table
File: Used to specify the export file name


To export a table:
1) Export your own table
Exp userid= User name/password @ Database tables= (table name, table Name 2 ...) file=c:\s.dmp

2) export tables for other scenarios
If a user wants to export a table for another scenario, they need DBA authority or exp_full_database permissions, such as system to export Scott's table
Exp Userid=system/[email Protected] Database tables= (user name. Table 1,...) file=d:\s.dmp

3) Structure of the exported table
Exp userid= User name/password @ Database tables= (table name) file= path rows=n

4) Direct export method (fast speed)
Exp userid= User name/password @ Database tables= (table name) file= path direct=y

Export Scenario:
1) Export your own solution
Exp userid= User name/password @ Database owner= username file= path

2) Export other scenarios: Requires DBA authority or exp_full_database permissions, such as using system to export any scheme
Exp Userid=system/[email Protected] Database owner= (username 1, user name 2) file= path

Export Database
1) Exporting a database refers to exporting all the objects and data in the database using EXP, requiring the user to have DBA or exp_full_database permissions
Exp Userid=system/[email protected] Database full=y Inctype=complete file=d:\xxx.dmp
Incremental backup Inctype by adding commands

Import, import is also divided into import tables, scenarios, databases.
Import is to import the object and data of the file into the database using import, but the file to be used by the import must be a file exported by export, similar to the export
, import is also divided into import tables, scenarios, databases.
The options commonly used by IMP are:
UserID: Used to specify the user name, password, and connection string to perform the export operation.
Tables: Used to specify the table to perform the export operation.
Fromuser: Used to specify the source user
Touser: Used to specify the target user
Full=y: The database used to specify the export operation
Inctype: Used to specify the increment type to perform the export operation
Rows: Used to specify whether the export operation is to export data from the table
File: Used to specify the export file name
Ignore: If the table exists, only the data is imported

Introduction to Oracle database Administrator, import data and export data

Related Article

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.