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

ÔõÑù²éѯ³öSQLSERVER±»ËøµÄ±í,ÒÔËø±íµÄSQLÓï¾ä

лл
SQL code:
exec sp_lock --¿´ objId

È»ºóÓÃ

select object_name(ObjID)


ÒýÓÃ
SQL codeexec sp_lock--¿´ objId
È»ºóÓÃselectobject_name(ObjID)



ÎÒÔÚ²éѯ·ÖÎöÆ÷ÀïÃæ,Ôõô²»ÄÜÖ´ÐÐÄØ?

"²»Ö§³Ö EXEC SQL ¹¹Ôì»òÓï¾ä¡£"

²»ÊÇ°É£¬Äãɶ²éѯ·ÖÎöÆ÷

ÎÒûÔËÐÐÈκÎÊý¾Ý¿âÈí¼þʱ£¬Ö´ÐÐexec sp_lock£¬½á¹ûÈçÏ£º

            ObjID
51  1 85575343 0 TAB                 IS GRANT

ÔÙÖ´ÐÐselect object_name(85575343)£¬½á¹ûÈçÏ£º

spt_values



ÏÖÔÚ¿ÉÒÔʹÓÃÕâ Á½¾äÁË,
µ«ÊǺÃÏñûÓÐÕÒµ½ÎÒÒªµÄ,ÏÖÔÚÊý¾ÝÓ¦¸ÃÊÇûÓÐËø±í,µ«ÊÇʹÓÃcodeexec sp_lock È´²éѯ³öÁË4Ìõ¼Ç¼,Ò²¿´²»µ½±íÃû.

ÒýÓÃ
¸ù¾Ýһ¥µÄ´ó¸çÌṩµÄ×ÊÔ´£¬²¹³äÏ¡£¡£
SQL code--ËÀËø¼ì²âuse masterSelect*from sysprocesseswhere blocked<>0--ÕÒµ½SPIDexec sp_lock--¸ù¾ÝSPIDÕÒµ½OBJIDselectobject_name(85575343)--¸ù¾ÝOBJIDÕÒµ½±íÃû


лл,Ô­À´ÕâôÂé·³...

ÎÒÏÖÔÚÓÃSQL SERVER2005,ÔõÑù²ÅÄÜÖÆÔìÒ»¸öËÀËø,ÓÃÓÚ²âÊÔÕâЩSQL Óï¾äÄØ?

дһ¸ö´øÓÀÕæwhileµÄÊÂÎñ£¬²»Ð´Ìá½»»ò»Ø¹ö¾ä¡£¡£¡£

лл.............


Ïà¹ØÎÊ´ð£º

Asp+sql serverÎÊÌâ - Web ¿ª·¢ / ASP

ÎÒÒ»¸öÏîÄ¿£¬Óиö²åÈë²Ù×÷£¬¾ßÌåÊÇÕâÑùµÄ£º
ÎÒÓнø»õÐÅÏ¢±í¡£ÔÚ³ö»õʱѡÔñÏàÓ¦µÄ½ø»õÐÅÏ¢£¬ÊäÈëÊýÁ¿£¬Ñ¡Ôñ²¿Ãź󣬵㱣´æ°´Å¥£¬ÓÉÓÚÍøÂçÑÓʱ£¬µãÒ»ÏÂûÓз´Ó³£¬ÓÚÊÇÓû§¾ÍÓÖµãһϣ¬µ¼ÖÂÒ»´Î²åÈëÁËÁ½Ìõ¼Ç¼:
Àý£º ......

ASPÁ´½ÓSQLµÄ¼òµ¥µÇ½½çÃæ - .NET¼¼Êõ / ASP.NET

protected void btnLogin_Click(object sender, EventArgs e)
  {
  SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......

pl/sql - Oracle / ¿ª·¢

СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿
µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿

3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ