Restore database to database

Source: Internet
Author: User


Database restoration and warehouse receiving are at work, and you often need to export the database from the current network to the home for problem restoration testing. At this time, we will design the Database Export and warehouse receiving. Now I will first talk about how to warehouse receiving. Because the export and export operations are not required by our R & D personnel, the data on the current network cannot be exported directly by us. Www.2cto.com (1) first run the following command to enter the SQL Execution Environment sqlplus/as sysdba (2) Delete the original user and all objects drop user Username cascade; (3) create user Username default tablespace jf_data identified by password (4) grant user connection permission; grant connect to username; (5) grant user resource permission grant resource to username; (6) grant the user system management permission to grant dba to user name; alter profile DEFAULT limit failed_login_attempts unlimited password_life_time unlimited; www.2cto.com (7) import database imp username/password file = database file log = import execution log fromuser = source username touser = destination username grants = n Note: When you delete the original user and all objects, other people are still connected to the database. In this case, you can use the following command to forcibly Delete the select username, sid, serial # from v $ session; alter system kill 'sid, serial #'; drop user Username cascade author cancan8538

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.