First, you need to export a batch file. Here we use export. bat. With it, You can directly export data as a client; as long as you have a client, you can use SQL
Statement to generate the content of the batch processing file. The SQL statement is as follows:
Select 'exp userid = bnmscfg/bnmscfg @ tjgd_bnms file = '| table_name | '. DMP tables = '| table_name | 'rows = n query =/"where rownum <= 500/" buffer = 40960000 log =' | table_name | '. log'
From all_tables where table_name like 'his %'
Here, userid represents your database username and user password, and file represents the name of the output file. Generally, the table name is used as the name, the table name is used as the table name, and rows specifies whether you want
It is very important to export the row. If you decide to export the row, it will not export data. query refers to the restriction on export conditions. This regular expression is used to mark the first 500 of the exported database.
Row; buffer refers to the data buffer size; log refers to the log file output when data is exported; all_table refers to exporting all tables, where is a condition, that is, the data exported
Some tables start with his, which reduces the scope ~
After executing this statement, copy the execution result to the export. BAT file, and then double-click it.
If you are prompted that the command is not an internal command when you double-click the command, you can directly start --> Run --> cmd --> enter exp --> press enter, and the prompt is 'No
Is an internal command '; because your Oracle bin is not in the environment variable, the system cannot find the entry to provide this command, so we need to manually add it, put the oracl bin in
In the path, it will be OK. The following is the restart of A cmd window and the test will be successful (Note: Oracle cannot be a simple client );
Using the same method, we can generate the import batch processing File Import. bat. The SQL statement is:
Select 'Imp userid = bnmscfg/bnmscfg @ tjgd_bnms file = '| table_name | '. DMP tables = '| table_name | 'rows = n query =/"where rownum <= 500/" buffer = 40960000 log =' | table_name | '. log'
From all_tables where table_name like 'his %'
Execute the SQL statement directly and put the result in the import. BAT file for direct execution;
All the export and import operations are complete;
If you want to import the database, it seems that the data is in the same directory as the batch file.