ZZʹÓÃSQL Server´æ´¢ASP.NET Session±äÁ¿
´´½¨ºÍÅäÖÃASP.NET Session״̬Êý¾Ý¿â
ÔÚ»ùÓÚNLB£¨ÍøÂ縺ÔØƽºâ£©»·¾³ÏµÄASP.NET WebÓ¦ÓóÌÐò¿ª·¢£¬ÎÒÃÇÐèÒª½«Session´æ´¢ÔÚÊý¾Ý¿âÖ驶à¸öWebÓ¦ÓóÌÐòµ÷Óã¬ÒÔÏÂΪÅäÖ÷½·¨¼°×¢ÒâÊÂÏî¡£
1.´´½¨ÓÃÓÚ´æ´¢ASP.NET SessionµÄÊý¾Ý¿â£¨Ô¶³Ì¡¢±¾µØ½Ô¿É£¬Ê¹ÓÃÊý¾Ý¿âÓû§Éí·ÝÈÏÖ¤£©
ÔÚWindows\Microsoft.NET\Framework/V2.0.50727Ŀ¼ÏÂʹÓÃÈçÏÂÃüÁ
aspnet_regsql.exe -S <SQL Server IP> -U <User Name> -P <Password> -E -ssadd -sstype c -d <Database Name>
ÃüÁîÖ´Ðкó¾Í»á³É¹¦½¨Á¢ÆðÓÃÓÚ´æ´¢ASP.NET Session±äÁ¿µÄÊý¾Ý¿âÁË¡£
2.Web.ConfigÎļþÅäÖÃÏî
ÎÒÃÇÐèÒªÔÚASP.NET WebÓ¦ÓóÌÐòÖеÄWeb.ConfigÎļþÐÞ¸ÄsessionStateÅäÖÃÏîÒÔʹSession״̬Êý¾Ý¿âÉúЧ¡£
ÅäÖýڵãÈçÏ£º
<sessionState mode="SQLServer"
sqlConnectionString="server=<Server IP>;database=<Database Name>;uid=<User Name>;pwd=<Password>;"
allowCustomSqlDatabase="True"
cookieless="false"
timeout="20" />
3.×¢ÒâÔÚ½øÐÐϵͳ²âÊÔ£¨Ö÷ÒªÊǸºÔزâÊÔ£©µÄʱºò£¬ÒòΪÊý¾Ý¿â·ÃÎʸºÔصÄÔö¼Ó£¬ÐèÒªµ÷ÕûSQL ServerÏàÓ¦³¬Ê±µÄÅäÖÃÏîÒÔÊÊÓ¦¸ºÔØ¡££¨Ä¬ÈÏֵΪ10£¬ÇëÊʶȽøÐе÷Õû¡££©
ASP.NET Session״̬Êý¾Ý¿âÊý¾ÝÄ£ÐÍ
1.ASPStateTempSessions±í¶¨Òå
ÁÐÃûÀàÐÍÃèÊö
SessionId
nvarchar(88)
Session ID + application ID
Created
datetime
Date and time session was created (UTC)
Expires
datetime
Date and time session expires (UTC)
LockDate
datetime
UTC date and time session was locked
LockDateLocal
datetime
Local date and time session was locked
LockCookie
int
Lock ID
Timeout
int
Session timeout in minutes
Locked
bit
1=Session locked, 0=Session not locked
SessionItemShort
varbinary(7000)
Serialized session state (if <= 7,000 bytes)
SessionItemLong
image
Serialized session state (if > 7,000 bytes)
Flags
int
Session state flags (1=Uninitialized session)
2.ASPStateTempApplications±í¶¨Òå
ÁÐÃûÀàÐ
Ïà¹ØÎĵµ£º
SqlÓï¾ä×÷Ϊ¹ú¼Ê±ê×¼µÄÊý¾Ý¿â²éѯÓï¾ä£¬±±¾©°á¼Ò¹«Ë¾ ±±¾©Êèͨ¹«Ë¾ÔÚ¸÷ÖÖ±à³Ì»·¾³Öеõ½Á˹㷺µÄÓ¦Óá£×÷Ϊһ¸ö³ÉÊì¡¢Îȶ¨µÄϵͳ£¬Óû§µÇ½ºÍÃÜÂëÑéÖ¤ÊDZز»¿ÉÉٵġ£ÔÚƽʱµÄ±à³Ì¹¤×÷ÖÐÐí¶à³ÌÐòÔ±ÔÚÓÃsqlÓï¾ä½øÐÐÓû§ÃÜÂëÑé֤ʱÊÇͨ¹ýÒ»¸öÀàËÆÕâÑùµÄÓï¾äÀ´ÊµÏֵģº
strSel = " Select * from Óû§±í where ÐÕÃû= '" ......
¡¾»ã×Ü¡¿SQL CODE --- ¾µä·¾«²Ê
Êý¾Ý²Ù×÷Àà SQLHelper.cs
ÎÞÏÞ¼¶·ÖÀà ´æ´¢¹ý³Ì
°ÙÍò¼¶·ÖÒ³´æ´¢
SQL¾µä¶ÌС´úÂëÊÕ¼¯
ѧÉú±í ¿Î³Ì±í ³É¼¨±í ½Ìʦ±í 50¸ö³£ÓÃsqlÓï¾ä
SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»»
Óαê
¸ù¾Ý²»Í¬µÄÌõ¼þ²éѯ²»Í¬µÄ±í
INNER JOIN Óï·¨
master.dbo.spt_val ......
(Ò»)ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¡¡¡¡Êµ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)¡£ÏÂÃ棬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄÇø±ð£º
¡¡¡¡Æäʵ£¬ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı ......
ÖÕÓڸ㶨JSPÁ¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌâÁË
2008Äê01ÔÂ29ÈÕ ÐÇÆÚ¶þ 15:54
Ç°¼¸Ì죬ƽƽͬѧһֱÔÚ¸ãJSP Á¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌ⣬һֱÁ¬²»ÉÏ£¬È»ºó½ÐÎÒÈ¥°ïËû¿´¿´£¬Æ¾×ÅÒÔÇ°µÄ¾Ñ飬¸ãÁËÒ»¸öÏÂÎ磬ºÙºÙ£¡ÖÕÓÚ°ïËûÁ¬½ÓÉÏÁË£¬Ö÷Òª²½ÖèÈçÏ£º
1¡¢ÐèÒªµÄ¶«Î÷´ó¼Ò¿ÉÒÔµ½Î ......