Importing and exporting Oracle Data

Source: Internet
Author: User
To do something about Java, you must be familiar with Oracle. You need to test an application yesterday, so you need a database.

To do something about Java, you must be familiar with Oracle. You need to test an application yesterday, so you need a database.

Now we are all-around. We have to be familiar with Oracle for Java. We need to test an application yesterday, so we need to have a database. We cannot test it in the production environment. So let us know over there, first, export the data of the user in the production environment, and then create the user in the test database and import the data.

Requirement: export all data of a user in the production database, create a user in the speed database, and import the data

Procedure:

1. Export data of a user (Lsxy) in the generated database:

Export the Lsxy User table in the database:
Command: exp username/password @ service name file = d: \ daochu. dmp owner = Lsxy

2. Create a user with the same name in the test database:

1. log on to the test database using the Administrator account:

Command: sqlplus Administrator account/password @ orcl as sysdba

2. Create a new user with the same name:

Command: create user username identified by password

3. Configure permissions for new users:

Command: grant create user, drop user, alter user, create any view, drop any view, EXP_FULL_DATABASE, IMP_FULL_DATABASE, DBA, CONNECT, RESOURCE, create session to user name

3. import data to a new user in the test database:

Command: imp user name/password @ service name full = y file = d: \ daochu. dmp ignore = y

OK .. For further study and skills, seeFor more information about Oracle, see the Oracle topic page? Tid = 12

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.