在Oracle数据迁徙的时候需要使源和目标数据库的字符集、版本等信息统一……
这里是对一个数据库的设置,需要在两边进行同样的操作。
SYS@PROD1> select userenv('language') from dual;
USERENV('LANGUAGE') ---------------------------------------------------- AMERICAN_AMERICA.ZHS16GBK
SYS@PROD1> startup mount ORACLE instance started. Total System Global Area 638853120 bytes Fixed Size 2255952 bytes Variable Size 255853488 bytes Database Buffers 373293056 bytes Redo Buffers 7450624 bytes Database mounted.
SYS@PROD1> ALTER SESSION SET SQL_TRACE=TRUE; Session altered. SYS@PROD1> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; System altered. SYS@PROD1> ALTER SYSTEM SET AQ_TM_PROCESSES=0; System altered. SYS@PROD1> SYS@PROD1> SYS@PROD1> ALTER SYSTEM ENABLE RESTRICTED SESSION; System altered.
SYS@PROD1> alter database open; Database altered. SYS@PROD1> alter database character set internal_use WE8MSWIN1252; Database altered. SYS@PROD1> alter system disable restricted session; System altered. SYS@PROD1> execute sys.dbms_metadata_util.load_stylesheets; PL/SQL procedure successfully completed.
SYS@PROD1> select userenv('language') from dual; USERENV('LANGUAGE') -------------------------------------------------------------------------------- AMERICAN_AMERICA.WE8MSWIN1252
查看已经更改,这里需要把之前修改的参数改回去:
SYS@PROD1> alter system set job_queue_processes=30 ; System altered. SYS@PROD1> alter system set AQ_TM_PROCESSES=1;
重启(实验环境下强制重启) SYS@PROD1> startup force ; ORACLE instance started. Total System Global Area 638853120 bytes Fixed Size 2255952 bytes Variable Size 255853488 bytes Database Buffers 373293056 bytes Redo Buffers 7450624 bytes Database mounted. Database opened.
完成~