Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚ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


Ïà¹ØÎĵµ£º

SQL ServerÈçºÎ±¸·ÝÔ¶³ÌÊý¾Ý¿âµ½±¾µØ

     Èç¹ûûÓÐÔ¶³ÌÊý¾Ý¿âËùÔÚ·þÎñÆ÷µÄwindowsÕ˺ÅÃÜÂ룬½öÓÐÔ¶³ÌSQL ServerÊý¾Ý¿âµÄÓû§ÃÜÂ룬¸ÃÈçºÎ±¸·ÝÔ¶³ÌÊý¾Ý¿âdb1µÄÊý¾Ýµ½±¾µØÄØ£¿
1£ºÔÚ±¾µØ°²×°Í¨°æ±¾µÄÊý¾Ý¿âÈí¼þ£¨±ÈÈ磺SQL Server2000£©
2£ºÔÚ±¾µØÊý¾Ý¿â·þÎñÆ÷ÉÏ´´½¨Êý¾Ý¿âdb2£»
3£ºÊ¹Óñ¾µØ“ÆóÒµ¹ÜÀíÆ÷”×¢²áÔ¶³ÌÊý¾Ý¿â£¬²¢½ ......

OracleÈçºÎÖ´ÐÐÅúÁ¿sqlÓï¾ä

Òª´´½¨Á½¸öÎļþ
1: runBatch.bat
2: sql.txt
runBatch.bat ÄÚÈÝÈçÏ£º
sqlplus username/password @sql.txt
pause
sql.txtÄÚÈÝÈçÏ£º
spool sql.log
create table t1(cname char(20));
insert into t1(cname) values('test');
select * from t1;
spool off
exit
Ë«»÷runBatch.bat¾Í¿ÉÒÔÅúÁ¿Ö´ÐÐsql.txtÖÐ ......

SQL Server Êý¾Ý¸ñʽÐÞ¸Äʱ£¬Ã»Óб£´æ°´Å¥µÄÇé¿ö½â¾ö

Èç¹ûÄãʹÓõÄÊÇ SQL Server 2008£¬ µ±ÄãÐÞ¸ÄÊý¾Ý½á¹¹ºó£¬±£´æʱ»á±¨ÏÂͼÇé¿ö£º Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving cha ......

´ÓSQLÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡Ò»Ìõ¼Ç¼



ÔõÑù´ÓÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡
Ò»Ìõ¼Ç¼£¬
SELECT TOP 1 * from dbo.Customers ORDER BY  NEWID()
ÕâÑù£¬Èç¹ûÊÇËæ»ú10
Ìõ£¬100Ìõ¡£¡£¡£¡£
SELECT TOP 10 * from dbo.Customers ORDER BY  NEWID()
ºÜ¼òµ¥°É¡£
²»¹ýtopºóÃæÊý×ÖÔ½´ó£¬ÔËÐÐËÙ¶ÈÔ½Âý¡£²»ÍƼöÊý¾Ý×ÖÌ«´ó¡£
ÒÔºó´úÂëÔÚSQL2000 ......

²é¿´SQL ServerÈÕÖ¾µÄ·½·¨

ת×Ôhttp://blog.csdn.net/ziren235/archive/2007/07/03/1676347.aspx
ÔÚSQL Server2000ÖУ¬Ò»¸öÊý¾Ý¿âµÄÈÕÖ¾ÊÇÒÔ*.ldf Îļþ´æ·Å,ÇëÎÊÎÒÏë²é¿´Ä³Ò»¸öÊý¾Ý¿âµÄÈÕÖ¾,¸ÃÈçºÎ²Ù×÷.
·½·¨1¡¢
DBCC LOG('DatabaseName',2)
·½·¨2:
select * from ::fn_dblog(default,default)
·½·¨3
ÓÃLog Explorer ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ