Oracle Database Backup and restoration commands

Source: Internet
Author: User

Oracle Database Backup and restoration command data export: 1 completely Export Database TEST, User Name system Password manager Export to D: \ daochu. exp system/manager @ TEST file = d: \ daochu in dmp. dmp full = y 2 export the tables of system users and sys users in the database exp system/manager @ TEST file = d: \ daochu. dmp owner = (system, sys) 3 Export tables table1 and table2 in the database exp system/manager @ TEST file = d: \ daochu. dmp tables = (table1, table2) 4. Export the filed1 field in table 1 in the database with the data Header "00" exp system/manager @ TEST file = d: \ daochu. dmp tables = (table1) Query = \ "where filed1 like '000000' \" is commonly used for export. I don't care much about compression. I can use winzip to compress the dmp file. However, after the preceding command, compress = y can be used to import data. 1. Import the data in D: \ daochu. dmp to the TEST database. Imp system/manager @ TEST file = d: \ daochu. dmp may be faulty because some tables already exist, and an error is reported, so the table will not be imported. Add ignore = y to the end. 2. Importing table 1 in d: \ daochu. dmp to imp system/manager @ TEST file = d: \ daochu. dmp tables = (table1) is sufficient. In many cases, I completely delete the table and then import it. Note: if you have sufficient permissions, the system will prompt you. Databases can be connected. You can use tnsping TEST to obtain whether the database TEST can be connected to Appendix 1: add data import permissions to users first, start SQL * puls second, and log on to system/manager third, create user Username identified by password (this step can be omitted if you have already created a USER) 4. 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 username fifth, run-cmd-Enter the directory where the dmp file is located, imp userid = system/manager full = y file = *. dmp or imp userid = system/manager full = y File = filename. dmp: Install oracle9ISzportdb \ szportdb and log on with sysdba to create a user. You can set the szportdb tablespace or import Users to the database. Imp szportdb/szportdb @ szportdb full = y C: \ szportdb. dmp ignore =

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.