修改ORACLE 字符集

来源:互联网 发布:网络模块怎么接线 编辑:程序博客网 时间:2024/04/30 00:37
[oracle@gisdb bin]$ ./sqlplus
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[oracle@gisdb bin]$ pro
bash: pro: command not found
[oracle@gisdb bin]$ 
[oracle@gisdb bin]$ export ORACLE_HOME=/oracle/product/10.2.0/db_1
[oracle@gisdb bin]$ ./sqlplus


SQL*Plus: Release 10.2.0.5.0 - Production on Wed Oct 31 15:31:36 2012


Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Enter user-name: system
Enter password: 
ERROR:
ORA-12162: TNS:net service name is incorrectly specified




Enter user-name: system   
Enter password: 
ERROR:
ORA-12162: TNS:net service name is incorrectly specified




Enter user-name: system/system123@gisdb   
ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode




SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@gisdb bin]$ ./sqlplus


SQL*Plus: Release 10.2.0.5.0 - Production on Wed Oct 31 15:32:58 2012


Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Enter user-name: system/system123
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

Enter user-name: 
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@gisdb bin]$ 
[oracle@gisdb bin]$ 
[oracle@gisdb bin]$ export ORACLE_SID=gisdb
[oracle@gisdb bin]$ ./sqlplus


SQL*Plus: Release 10.2.0.5.0 - Production on Wed Oct 31 15:33:43 2012


Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Enter user-name: system
Enter password: 
ERROR:
ORA-01017: invalid username/password; logon denied




Enter user-name: system/system123


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> shutdown immediate
ORA-01031: insufficient privileges
SQL> shutdwon
SP2-0042: unknown command "shutdwon" - rest of line ignored.
SQL> shutdown
ORA-01031: insufficient privileges
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORA-01031: insufficient privileges
SQL> shutdown immediate
ORA-01031: insufficient privileges
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.


Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             402653704 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14680064 bytes
Database mounted.
Database opened.
SQL> 
SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.


Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             402653704 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14680064 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 be a superset of old character set




SQL> alter database character set internal_use zhs16gbk;


Database altered.


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.


Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             402653704 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14680064 bytes
Database mounted.
Database opened.
SQL> shutdown immedaite
SP2-0717: illegal SHUTDOWN option
SQL> conn / as sysdba
Connected.
SQL> shutdwon immediate
SP2-0734: unknown command beginning "shutdwon i..." - rest of line ignored.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.


Total System Global Area 1610612736 bytes
Fixed Size                  2096632 bytes
Variable Size             402653704 bytes
Database Buffers         1191182336 bytes
Redo Buffers               14680064 bytes
Database mounted.
Database opened.
SQL> select * from v$version;


BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production


SQL> 



查看字符集:

SQL> select * from nls_database_parameters;
 
PARAMETER                      VALUE
------------------------------ --------------------------------------------------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               ZHS16GBK
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              10.2.0.5.0
 
20 rows selected

原创粉丝点击