ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â
ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â
1¡¢ÔÚÄ¿µÄSQL ServerÊý¾Ý¿â·þÎñÆ÷ÉÏ°²×°ORACLE ClientÈí¼þ»òÕßORACLE ODBC Driver.
ÔÚ$ORACLE_HOME\network\admin\tnsnames.oraÀïÅäÖÃORACLEÊý¾Ý¿âµÄ±ðÃû(service name)¡£
2¡¢ÔÚWIN2000»òÕßwin2003·þÎñÆ÷->¹ÜÀí¹¤¾ß->Êý¾ÝÔ´(ODBC)->
ϵͳDSN£¨±¾»úÆ÷ÉÏNTÓòÓû§¶¼¿ÉÒÔÓã©->Ìí¼Ó->ORACLE ODBC Driver->Íê³É->
data source name ¿ÉÒÔ×Ô¶¨Ò壬ÎÒÒ»°ãÌîORACLEÊý¾Ý¿âµÄsid±êÖ¾£¬
descriptionÀï¿ÉÒÔÌîORACLEÊý¾Ý¿âÏêϸÃèÊö£¬Ò²¿ÉÒÔ²»Ìî->
data source service name ÌîµÚ1²½¶¨ÒåµÄORACLEÊý¾Ý¿â±ðÃû->OK¡£
£¨Óû§DSNºÍÎļþDSNÒ²¿ÉÒÔÀàËÆÅäÖ㬵«Ê¹ÓõÄʱºòÓÐһЩÏÞÖÆ£©
3¡¢SQL ServerµÄµ¼ÈëºÍµ¼³öÊý¾Ý¹¤¾ßÀï->Ñ¡Êý¾ÝÔ´-> Êý¾ÝÔ´£¨ÆäËü£¨ODBCÊý¾ÝÔ´£©£©->
Ñ¡µÚ2²½ÔÚODBCÀﶨÒåµÄϵͳDSN source name£¬Óû§ÃûÃÜÂë´¦ÌîдORACLEϵͳµÄÓû§ÃûºÍÃÜÂë->
ÏÂÒ»²½->Ñ¡ÔñÄ¿µÄ£¬Ñ¡SQL ServerÊý¾Ý¿â£¨¸úÉÏÃæµÚ¶þµã½²µÄÒ»Ö£¬¾Í²»Öظ´ÁË£©¡£
×¢Ò⣺ÔÚORACLE±íºÍSQL Server±íÖ®¼ä'ת»»'ÄDz½ºÜÖØÒª£¬
¿ÉÒԸıäĬÈϵÄ×Ö¶ÎÊý¾ÝÀàÐÍ£¬Èçimage->text,decimal->int
Ïà¹ØÎĵµ£º
1¡¢¶à¹¤Áª»úÖØ×÷ÈÕÖ¾Îļþ
¡¡¡¡Ã¿¸öÊý¾Ý¿âʵÀý¶¼ÓÐÆä×Ô¼ºµÄÁª»úÖØ×÷ÈÕÖ¾×飬ÔÚ²Ù×÷Êý¾Ý¿âʱ£¬OracleÊ×ÏȽ«Êý¾Ý¿âµÄÈ«²¿¸Ä±ä±£´æÔÚÖØ×÷ÈÕÖ¾»º³åÇøÖУ¬ËæºóÈÕÖ¾¼Ç¼Æ÷½ø³Ì£¨LGWR£©½«Êý¾Ý´Óϵͳ¹²ÓÃÇøSGA£¨System Global Area£©µÄÖØ×÷ÈÕÖ¾»º³åÇøдÈëÁª»úÖØ×÷ÈÕÖ¾Îļþ£¬ÔÚ´ÅÅ̱ÀÀ£»òʵÀýʧ°Üʱ£¬¿ÉÒÔͨ¹ýÓëÖ®Ïà¹ØµÄÁª»úÖØ×÷ÈÕÖ¾ ......
C:\Documents and Settings\Administrator>sqlplus/nolog
SQL> CONNECT/AS SYSDBA
SQL> SHUTDOWN NORMAL/IMMEDIATE
SQL> STARTUP MOUNT
SQL> ARCHIVE LOG LIST
SQL> ALTER DATA ......
1.create alter insert update selectµÈ
ÈçºÎ½¨±í
ѧÉú±ístudent
create table student( --ѧÉú±í
xh number(4), --ѧºÅ
  ......
½¨Á¢±íÈçÏÂ:
ѧÉú»ù±¾ÐÅÏ¢±í
CREATE Student(
[Studentid][Int]IDENTITY(1,1)NOT NULL primary key,--Ö÷¼ü
[StudentName][char]NOT NULL
)
¿Î³ÌÐÅÏ¢±í
CREATE Subject(
[SubjectID][char]NOT NULL primary key, --Ö÷¼ü
[SubjectName][char]NOT NULL
)
³ ......
Êý¾Ý¿â¶ÔÏó
<1>±í(Ô¼Êø)
<2>ÈçºÎ×Ô¶¯±àºÅ
SQLserver
--IDENTITYÊôÐÔ
create table test(
xh int identity(1,2) primary key,
name varchar(20)
);
insert into test(name) values ('mike');
ORACLE
Ò»¸ö¶ÔÏó(ÐòÁÐsequenc ......