Sqlplus system/[email protected]; View Oracle Character set: SELECT * from nls_database_parameters where parameter = ' Nls_ CHARACTERSET '; C, server-side character Set Modify ***************************************************************** * Change Character Set step method (We8iso8859p1 ZHS16GBK) * ***************************************************************** sql> Launch database into restricted mode to do character set more Change: sql> conn/as sysdba Connected. sql> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. Sql> Startup Mount ORACLE instance started. Total System Global area 236000356 bytes Fixed size 451684 bytes Variable Size 201326592 by TEs database buffers 33554432 bytes Redo buffers 667648 bytes Database mounted. sql> ALTER SYSTEM ENABLE RESTRICTED SESSION; System altered. sql> ALTER SYSTEM SET job_queue_processes=0; System altered. sql> ALTER SYSTEM SET aq_tm_processes=0; System altered. sql> ALTER DATABASE open; Database altered. sql> ALTER DATABASE CHARACTER SET ZHS16GBK; ALTER DATABASE CHARACTER Set ZHS16GBK * ERROR at line 1:ora-12712:new CHARACTER set must bes a superset of old CHARACTER Set prompt our character set: The new character set must be a superset of the old character set, at which point we can skip the check of the superset to make changes: sql> ALTER DATABASE Character set Internal_use ZHS16GBK; Database altered. Sql> select * from V$nls_parameters; Slightly more rows selected. Restart check for changes completed: sql> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. Sql> Startup ORACLE instance started. Total System Global area 236000356 bytes Fixed size 451684 bytes Variable Size 201326592 by TEs database buffers 33554432 bytes Redo buffers 667648 bytes Database mounted. Database opened. Sql> select * from V$nls_parameters; Slightly more rows selected. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ D, client side character set modified in/home/oracle and/root user directory. Bash_ Add or modify Export nls_lang= "American_america in profile. UTF8 "statement to close the current SSH window. Drop TablespAce Ts_data including contents and datafiles;create tablespace ts_data logging datafile ' D:\tablespace\TS_DATA.dbf ' size 5 0m autoextend on next 50m maxsize 20480m extent management local; Drop user User1 cascade;create user user1 identified by 123456 default Tablespace ts_data;grant connect,resource to User1; Grant DBA to User1;spool off;create directory Dpdir as ' d:\dump '; grant Read,write in directory Dpdir to User1;dos direct execution: EXPD P user1/123456 directory=dpdir dumpfile=user120170505.dmp logfile=user120170505.log PARALLEL=4; Copy database files and log files to this directory: D : \app\thinkpad\admin\orcl\dpdump executes the following command after: IMPDP user1/[email protected] file=user120170505. DMP Log=user120170505.log
Oracle 11g Common Commands