oracle ÐÞ¸Ä×Ö·û¼¯
3oracleÊý¾Ý¿âµÄ×Ö·û¼¯¸ü¸Ä
A¡¢oracle server ¶Ë ×Ö·û¼¯²éѯ
select userenv(‘language’) from dual
ÆäÖÐNLS_CHARACTERSET Ϊserver¶Ë×Ö·û¼¯
NLS_LANGUAGE Ϊ server¶Ë×Ö·ûÏÔʾÐÎʽ
B¡¢²éѯoracle client¶ËµÄ×Ö·û¼¯
$echo $NLS_LANG
Èç¹û·¢ÏÖÄãselect ³öÀ´µÄÊý¾ÝÊÇÂÒÂ룬Çë°Ñclient¶ËµÄ×Ö·û¼¯ÅäÖóÉÓëlinux²Ù×÷ϵͳÏàͬµÄ×Ö·û¼¯¡£Èç¹û»¹ÊÇÓÐÂÒÂ룬ÔòÓпÉÄÜÊÇÊý¾Ý¿âÖеÄÊý¾Ý´æÔÚÎÊÌ⣬»òÕßÊÇoracle·þÎñ¶ËµÄÅäÖôæÔÚÎÊÌâ¡£
C¡¢server¶Ë×Ö·û¼¯ÐÞ¸Ä
*****************************************************************
* ¸ü¸Ä×Ö·û¼¯²½Öè·½·¨(WE8ISO8859P1 --> ZHS16GBK) *
*****************************************************************
SQL>
½«Êý¾Ý¿âÆô¶¯µ½RESTRICTEDģʽÏÂ×ö×Ö·û¼¯¸ü¸Ä£º
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 bytes
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 be a superset of old character set
ÌáʾÎÒÃǵÄ×Ö·û¼¯£ºÐÂ×Ö·û¼¯±ØÐëΪ¾É×Ö·û¼¯µÄ³¬¼¯£¬ÕâʱÎÒÃÇ¿ÉÒÔÌø¹ý³¬¼¯µÄ¼ì²é×ö¸ü¸Ä£
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
ÔÚoracleÖе÷ÓÃjava³ÌÐò,×¢Òâ:java·½·¨±ØÐëÊÇstaticÀàÐ͵Ä,Èç¹ûÏëÔÚJAVAÖÐʹÓÃsystem.out/errÊä³ölog.
ÐèÒªÔÚoracle ÖÐÖ´ÐÐ"call dbms_java.set_output(5000);".
Ò»¡¢helloWord
1 ±àдJAVA³ÌÐò,Ò²ÊÇÔÚSQL/PLUSÖÐд,²¢Ö´ÐÐ.
create or replace and compile java source named hello as
public ......
Oracle¹ÜÀíÓëά»¤.ÊÖ¹¤´´½¨Êý¾Ý¿âÒÔ¼°½Å±¾
ת×Ô ²Ýľ¹Ï
Ò»¡¢Ç°ÑÔ
˵ʵ»°£¬ÔçÒÑÑá¾ëÁËʹÓÃdbcaµÄ´´½¨Êý¾Ý¿â£¬´ó¸Å±È½ÏÓеã×÷ÓõÄÊÇ¿ÉÒÔÉú³É´´½¨½Å±¾°Õ¡£
¡¶Oracle¹ÜÀíÓëά»¤.°²×°´´½¨Æô¶¯¹Ø±ÕÊý¾Ý¿âµÄ³£¼ûÎÊÌâ(Ò»)¡·(Èý¡¢´´½¨Êý¾Ý¿â)Ò»ÎÄÖÐÓÐËùÌá¼°¡£±¾ÎÄÖ÷Òª¾ÍÊÇÏêÊöÊÖ
¹¤Ê¹Óýű¾´´½¨Oracle 10gÊý¾Ý¿â¡£
......
SQL> show user
USER is "SYS"
SQL> create user t1 identified by t1;
create user t1 identified by t1
*
ERROR at line 1:
ORA-01920: user name 'T1' conflicts with another user or role name
SQL> drop user t1 cascade;
User dropped.
SQL> create user t1 identified by t1;
Us ......