¹ØÓÚsqlÁ¬½ÓÓï¾äÖеÄIntegrated Security=SSPI
¹ØÓÚsqlÁ¬½ÓÓï¾äÖеÄIntegrated Security=SSPI
½â¾ö·½·¨£º
¼´£ºSecurity Support Provider Interface
ÉèÖÃIntegrated SecurityΪ True µÄʱºò£¬Á¬½ÓÓï¾äÇ°ÃæµÄ UserID, PW ÊDz»Æð×÷Óõģ¬¼´²ÉÓÃwindowsÉí·ÝÑé֤ģʽ¡£
Ö»ÓÐÉèÖÃΪ False »òÊ¡ÂÔ¸ÃÏîµÄʱºò£¬²Å°´ÕÕ UserID, PW À´Á¬½Ó¡£
Integrated Security ¿ÉÒÔÉèÖÃΪ: True, false, yes, no £¬ÕâËĸöµÄÒâ˼ºÜÃ÷°×ÁË£¬»¹¿ÉÒÔÉèÖÃΪ£ºsspi £¬Ï൱ÓÚ True£¬½¨ÒéÓÃÕâ¸ö´úÌæ True¡£
initial catalogÓëdatabaseµÄÇø±ðÊÇʲô
Initial Catalog:
DataBase:
Á½ÕßûÓÐÈκÎÇø±ðÖ»ÊÇÃû³Æ²»Ò»Ñù£¬¾ÍºÃÏñÊÇÈËÀàµÄÕæʵÐÕÃûÓëÔøÓÃÃûÒ»Ñù¡£¡£¶¼¿ÉÒÔ½ÐÄã¡£
********************************************
Integrated Security=SSPI Õâ¸ö±íʾÒÔµ±Ç°WINDOWSϵͳÓû§ÉíÈ¥µÇ¼SQL SERVER·þÎñÆ÷£¬Èç¹ûSQL SERVER·þÎñÆ÷²»Ö§³ÖÕâÖÖ·½Ê½µÇ¼ʱ£¬¾Í»á³ö´í¡£
Äã¿ÉÒÔʹÓÃSQL SERVERµÄÓû§ÃûºÍÃÜÂë½øÐеǼ£¬È磺
"Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=Êý¾Ý¿âÃû;Data Source=192.168.0.1;User ID=sa;Password=ÃÜÂë"
***************************************************
Integrated Security - »ò - Trusted_Connection 'false' µ±Îª false ʱ£¬½«ÔÚÁ¬½ÓÖÐÖ¸¶¨Óû§ ID ºÍÃÜÂë¡£µ±Îª true ʱ£¬½«Ê¹Óõ±Ç°µÄ Windows ÕÊ»§Æ¾¾Ý½øÐÐÉí·ÝÑéÖ¤¡£ ¿Éʶ±ðµÄֵΪ true¡¢false¡¢yes¡¢no ÒÔ¼°Óë true µÈЧµÄ sspi£¨Ç¿ÁÒÍƼö£©¡£
*************************************************
ADO.net ÖÐÊý¾Ý¿âÁ¬½Ó·½Ê½
System.Data.SqlClient.SqlConnection
³£ÓõÄһЩÁ¬½Ó×Ö·û´®(C#´úÂë)£º
SqlConnection conn = new SqlConnection( “Server=(local);Integrated Security=SSPI;database=Pubs“);
SqlConnection conn = new SqlConnection(“server=(local)\NetSDK;database=pubs;Integrated
Ïà¹ØÎĵµ£º
USE StudentInfo
--=====================================================
--Author £ºyangjuncheng
--Create Date:2010.5.26
--Decription :¸ø±íÌí¼ÓÔ¼Êø£¨¿ÉÒÔÔÚ´´½¨±íʾֱ½ÓÌí¼Ó
-- Ò²¿ÉÒÔʹÓÃalter¹Ø¼ ......
sql server 2005 ¼òµ¥ÔËÓú¯Êý
1.null º¯Êý
Ó÷¨ÓëoracleÖÐnvl()ÀàËÆ£¬´¦Àíº¯ÊýΪisnull()£¬
ÀýÈ磺
select ename,sal+isnull(comm,0)
from emp
go
isnull(comm,0)µÄÓ÷¨ÊÇ£º commΪnull Ôò·µ»Ø0 ·ñÔòΪ commµÄÖµ¡£
2.V ......
sql»Ö¸´xp_regread
ɾ³ýµôxp_regreadºó£¬·¢ÏÖÒÔÇ°µÄ×÷Òµ²»Äܲ鿴£¬Ö»ÄÜÈ¥»Ö¸´ÁË¡£
exec sp_addextendedproc 'Xp_dirtree','xpstar.dll' »Ö¸´ºó·¢ÏÖ²»ÄÜʹÓÃ
ÕÒµ½dbcc addextendedproc ("Xp_regread","xpstar.dll") »¹ÊDz»ÄÜʹÓÃ
ºóÀ´²Å·¢ÏÖ»Ö¸´µÄʱºòÒªÓÃСдdbcc addextended ......
ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ
CHAR
CHAR
¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ
VARCHAR2
VARCHAR
OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
NCHAR
NCHAR
Ç°Õß×î´ó³¤¶È2kbºóÕß×î´ó³¤¶È4 ......