oracleÐÒéÊÊÅäÆ÷´íÎóÊÇʲôÔÒò×ܽá
Ôì³ÉORA-12560: TNS: ÐÒéÊÊÅäÆ÷´íÎóµÄÎÊÌâµÄÔÒòÓÐÈý¸ö£º
1.¼àÌý·þÎñûÓÐÆðÆðÀ´¡£windowsƽ̨¸öÒ»ÈçϲÙ×÷£º¿ªÊ¼---³ÌÐò---¹ÜÀí¹¤¾ß---·þÎñ£¬´ò¿ª·þÎñÃæ°å,Æô¶¯oraclehome92TNSlistener·þÎñ¡£
2.database instanceûÓÐÆðÆðÀ´¡£windowsƽ̨ÈçϲÙ×÷£º¿ªÊ¼---³ÌÐò---¹ÜÀí¹¤¾ß---·þÎñ£¬´ò¿ª·þÎñÃæ°å£¬Æô¶¯oracleserviceXXXX,XXXX¾ÍÊÇÄãµÄdatabase SID.
3.×¢²á±íÎÊÌâ¡£
·¨£¨1£©ÔËÐд°¿ÚÖÐÊäÈëregedit£¬È»ºó½øÈëHKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0
ÕÒµ½ÓÒ±ßµÄ ORACLE_SIDÉèÖÃΪXXXX,XXXX¾ÍÊÇÄãµÄdatabase SID.Èç¹ûûÓÐÔòн¨Ò»¸ö×Ö·û´®Öµ¡£
ÊýÖµÃû³ÆΪ£ºORACLE_SID ÊýÖµÊý¾ÝΪ£ºXXX (¾ÍÊÇÄãµÄSIDºÅ,Èç¹û²»¶®¾Íµ±×÷Êý¾Ý¿âÃû°É)
»òÕß
·¨£¨2£©ÓÒ»÷ÎҵĵçÄÔ£¬ÊôÐÔ--¸ß¼¶--»·¾³±äÁ¿---ϵͳ±äÁ¿--н¨£¬±äÁ¿Ãû=oracle_sid,±äÁ¿Öµ=XXXX,XXXX¾ÍÊÇÄãµÄ database SID.»òÕß½øÈësqlplusÇ°£¬ÔÚcommand lineÏÂÊäset oracle_sid=XXXX,XXXX¾ÍÊÇÄãµÄdatabase SID.
¾¹ýÒÔÉϲ½Ö裬¾Í¿ÉÒÔ½â¾öÎÊÌâ¡£
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö
¸ÅÄî
ÀàÐÍ
Òì³£´¦Àí
Ò» ¸ÅÄî
ÓαêÊÇSQLµÄÒ»¸öÄڴ湤×÷Çø£¬ÓÉϵͳ»òÓû§ÒÔ±äÁ¿µÄÐÎʽ¶¨Òå¡£ÓαêµÄ×÷ÓþÍÊÇÓÃÓÚÁÙʱ´æ´¢´ÓÊý¾Ý¿âÖÐÌáÈ¡µÄÊý¾Ý¿é¡£ÔÚijЩÇé¿öÏ£¬ÐèÒª°ÑÊý¾Ý´Ó´æ·ÅÔÚ´ÅÅ̵ıíÖе÷µ½¼ÆËã»úÄÚ´æÖнøÐд¦Àí£¬×îºó½«´¦Àí½á¹ûÏÔʾ³öÀ´»ò×î ......
´´½¨±íµÄÓï·¨
-´´½¨±í¸ñÓï·¨:
create table ±íÃû(
×Ö¶ÎÃû1 ×Ö¶ÎÀàÐÍ(³¤¶È) ÊÇ·ñΪ¿Õ,
×Ö¶ÎÃû2 ×Ö¶ÎÀàÐÍ ÊÇ·ñΪ¿Õ
);
-Ôö¼ÓÖ÷¼ü
alter table ±íÃû add constraint Ö÷¼üÃû primary key (×Ö¶ÎÃû1);
-Ôö¼ÓÍâ¼ü:
alter table ±íÃû
  ......
1¡¢»Ö¸´½á¹¹Óë½ø³Ì
ÔÚ½éÖÊʧ°Üºó£¬¸ù¾ÝÊÜËðÎļþµÄÀàÐÍ£¬´æÔÚ²»Í¬µÄ»Ö¸´·½·¨¡£Êý¾Ý¿âÓÉ¿ØÖÆÎļþ¡¢Áª»úÖØ×öÈÕÖ¾ÎļþÒÔ¼°Êý¾ÝÎļþ×é³É¡£Èç¹û¸´ÓÃÁË¿ØÖÆÎļþ»òÁª»úÖØ×öÈÕÖ¾Îļþ£¬ÄÇô»Ö¸´ÊÜËðµÄÕâЩÎļþÊ®·ÖÈÝÒס£
¶ÔÓÚÊÜËðµÄ¿ØÖÆÎļþ£¬¿ÉÒÔ½«ÆäÌ滻Ϊij¸ö¸´Óø±±¾£¬Ò²¿ÉÒÔʹÓÃCREATE CONTROLFILEÃüÁîÖؽ¨¡£
ÊÜËðµÄÁª»úÖØ×öÈ ......
WIN7µÄϵͳ½çÃæºÜƯÁÁ£¬Ê¹ÓÃÆðÀ´È·ÊµºÜ²»´í£¬¿ÉÊÇÈ´Ò²¸øÎÒµÄѧϰ´øÀ´¹ý²»ÉÙÂé·³¡£ÓÈÆäÊÇÕâ´Î×°Oracle£¬±ðÈËÓõÄÊÇXPµÄϵͳºÜÈÝÒ×¾Í×°ÉÏÁ˵ģ¬¿ÉÊÇÎÒÈ´ÔõôҲװ²»ÉÏ¡£ÎªÁËÈÃͬÑùϲ°®WIN7µÄÅóÓÑÉÙ×ßЩÍä·£¬ÏÂÃæ¾Í½éÉÜÒ»ÏÂÔÚwin7ÉÏ°²×°Oracle10gµÄ·½·¨°É£¬ÄÇ¿ÉÊDZ¾ÈËÓÃÁË8Ììʱ¼ä£¬²»Í ......
Oracle´æ´¢¹ý³Ìת³ÉSqlserver´æ´¢¹ý³Ì
1.ÈÕÆÚת»»
Oracle£º TO_NUMBER(TO_CHAR(SYSDATE, 'YYYYMMDD'))
SqlServer£ºCAST(CONVERT(CHAR(8),GETDATE(), 112) AS INT)
×¢£ºÆäÖБYYYYMMDD’¸ñʽ ¶ÔÓ¦112
2.ROWIDת»»
Oracle£º ROWID
SqlServer: PRIMARY KEY(±íÖ÷¼ü)
3.ROWNUM ......