The company used to use DMP Operation data import and export, recently from other places people to be SQL file database files, have to learn how to import large files of SQL, good response to various emergencies.
1, first you will use Sqlplus to connect to the remote database
Sqlplus username/password @ remote database IP: Port/Instance Name
2. Use command after successful connection
sql>@E:\areadata.sql;sql>@/opt/oracle/area.sql;
Sometimes the Chinese will appear garbled problem, or error. For example:
ERROR:ORA-01756: quoted string not properly terminated
At this point, you need to troubleshoot the database server's character set and the client's character set
1. Troubleshoot the database server character set:
sql>select userenv(‘language‘) from dual;---AMERICAN_AMERICA.ZHS16GBK【此处的字符集是这个】
2. Troubleshoot the client character set
Under the Windows platform, it is the Nls_lang of the corresponding oraclehome in the registry. You can also set it yourself in a DOS window, such as:
set nls_lang=AMERICAN_AMERICA.ZHS16GBK
Under Linux, modify the Bash_profile file
$ vi .bash_profileNLS_LANG=‘AMERICAN_AMERICA.ZHS16GBK‘; export NLS_LANG
This may also be related to SQL files, you can try to set the client character set, try two more should be.
In addition, some files may appear some characters such as spaces, into the sqlplus inside will become?, such as the following waiting for input, often affect the import time:
Sql>enter value for nbsp;
So you need to set the turn off substitution variable function when executing sql>@e:\areadata.sql
Sql>set difine off;
This way there will be no waiting on the import situation, greatly improving the efficiency of the import file.
Oracle Import SQL file