Get the App
SLTechnology News&Howtos  ›  Database  › 

Tragedy caused by a semicolon when oracle imports the export table

Shulou Source: shulou.com Published: 2022-06-01 03:47:22 10月02日 Update

How oracle imports and exports tables

The import after exporting the table in the database is a complete operation, and the oracle 11g in the content is installed on the windows.

The imp/exp of oracle is equivalent to the restore and backup of oracle data. With this function, we can build two identical databases, one for formal testing and the other for user testing. In general, we often export the data from the server and test them locally in order to find problems and correct them.

1. How to export tables and databases:

1. Open cmd and go to the directory where exp.exe is located

two。 Syntax: exp userid= username / password @ which database tables= (table name) file= local storage path

Example: exp userid=scott/test@orcl tables= (test) file=d:\ test.dmp

1. Export the table structure:

Exp userid=scott/test@orcl tables= (test) file=d:\ test.dmp rows=n

two。 Export scheme:

Exp userid=scott/test@orcl owner= scheme name file=d:\ * * .dmp

3. Export database

Just get rid of tables. Exp userid=scott/test@orcl full=y inctype=complete file=d:\ test.dmp

Introduction to common options for exp:

Userid: specify the user name, password, link string at the time of export

Tables: specify the exported table

Owner: specify the exported scheme

Fully=y: import all content

Inctype: used to specify the type of increment to perform the export operation

Rows: used to specify whether the data in the table is everywhere

File: used to specify the export file name

two。 Import:

1. Import Table:

two。 Import the database:

Imp userid=scott/test@orcl full=y file=d:\ test.dmp

3. The tragedy caused by the semicolon:

When exporting a table in cmd, it is customary to add a semicolon (;) to the end of the command [but the export did not report an error]

The file that causes the backup is not the extension of dmp, but becomes dmp;, so there will always be errors when importing tables.

Let's take a look at the file extension after export.

Let's take a look at the error report during import:

Perhaps the notes I write now are relatively naive, but I think it is very shallow and untechnical after a period of time.

This is the witness of your own growth.

Summary

The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support.

Tags: Data database content file scheme user semicolon backup commonly used extension user name guide test tragedy same childish nothing two habitual value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn macOS Shulou Tech Info Huawei Linux