We need to export data from production, export is spool,
We execute the export statement on a Linux server, probably operating steps,
1. The Telnet server database
2. The export nls_lang=american_americ. Al32utf8
3. Connect to the database
4, execute the script
- the script is as follows:
The set sqlblanklines on
The set verify off
The set space 0
The set newp none
The set term on
The set pages 0
Set the line 4096
Set the echo off
The set feedback off
Set the heading off
The set trims on
Whenever sqlerror exit SQL. Sqlcode rollback;
Whenever oserror exit SQL. Sqlcoe rollback;
Spool/path/file 1. Bin
Select * from table 1;
Spool off
Spool/path/file 2. Bin
Select * from table 2
Spool off
Set the heading on
Set the echo on
The set showmode on
The set feedback on
The set verify on
exit;
After the export file, we use the file - I command to view the file 1 and file 2 encoding format;
The result is file 1 charset=utf-8 and file 2 charset=Windows image
Why is this? Clearly is in a session with the same command performs two bin file?
CodePudding user response:
No format images stored in a database, it is varchar2