¹ØÓÚ SQL Server ûÓÐ dbo ȨÏÞµÄÎÊÌâ

·¢²¼Ê±¼ä:2008-11-26 10:25:09   ä¯ÀÀÈËÊý: 397770 ´Î  

¹ØÓÚ sql server Êý¾Ý¿â²éѯÊý¾Ý»òÖ´Ðд洢¹ý³Ìʱ£¬³öÏÖÀàËÆ "ûÓÐdboȨÏÞ"¡¢"ÕÒ²»µ½ dbo.XXX ¶ÔÏó"µÈµÄ½â¾ö·½·¨

1. ³öÏÖÕâ¸öÎÊÌâµÄÔ­ÒòÊÇÒòΪµ±Ç°Á¬½ÓÊý¾Ý¿âµÄµÇ¼Óû§²»ÊÇ dbo ȨÏÞ£¬ËùÒÔ´ËÓû§²»ÄܲÙ×÷ËùÓÐÕßΪ dbo µÄ¶ÔÏó¡£ÎªÊ²Ã´²»¿ª·Å dbo ȨÏÞ£ºÒòΪÈç¹û¿Í»§µÄ³ÌÐòÓÐÎÊÌ⣨±ÈÈçÓÐ×¢È멶´£©¡¢»òÊý¾Ý¿âÃÜÂëй©µÈ£¬Èç¹ûµ±Ç°Óû§ÓÐ dbo ȨÏ޵Ļ°£¬»á¸øÊý¾Ý¿â·þÎñÆ÷´øÀ´°²È«Òþ»¼£¬ËùÒÔÎÒ˾µÄÊý¾Ý¿â¶¼²»¿ª·Å dbo ȨÏÞ£¬¶øÎÒÃǸøÓû§¿ª·ÅÁËdatareader¡¢datawriter¡¢ddladmin µÈȨÏÞ£¬ÕâЩȨÏÞÒ»°ãÇé¿öÏÂÊÇ×ã¹»µÄ¡£

2.¡¡Óû§ÔÚ³õʼ»¯Êý¾ÝµÄʱºò£¬±ÈÈçͨ¹ýÆóÒµ¹ÜÀíÆ÷Ö´Ðе¼ÈëÊý¾ÝµÄ SQL £¬»òͨ¹ýijЩÍøÕ¾°²×°³ÌÐò³õʼ»¯µÄʱºò£¬ÕâЩԭʼµÄ³õʼ»¯Êý¾ÝÖеĶÔÏóËùÓÐÕß¿ÉÄÜÊÇ dbo £¬Õ⽫»áµ¼ÖÂÔÚ³õʼ»¯Êý¾Ýºó£¬Êý¾Ý¿âµÄµ±Ç°µÇ¼Óû§Ã»ÓÐȨÏÞ²Ù×÷ÕâЩ¶ÔÏó¡£

3. ¶ÔÓÚÒÔÉÏÎÊÌ⣬½â¾ö·½·¨ÈçÏ£º
¡¡¡¡1. ÔÚÄú¶ÔÊý¾Ý¿âµÄ½á¹¹½øÐÐÁ˸ü¸Äºó£¬Òª×¢ÒâÊý¾Ý¿â¶ÔÏó(ÈçÊý¾Ý±í¡¢´æ´¢¹ý³ÌµÈ)µÄËùÓÐÕßÓ¦¸ÃÊÇÄúµÄÊý¾Ý¿âÓû§Ãû£¬¶ø²»ÊÇ dbo £¬Èç¹ûÄú·¢ÏÖÓÐijЩ¶ÔÏóµÄËùÓÐÕßÊÇ dbo £¬ÕâʱÄúÓ¦¸ÃµÇ¼ÎÒ˾µÄÊý¾Ý¿â¿ØÖÆÃæ°å£¬È»ºóÕÒµ½¡°ÐÞ¸´¶ÔÏóËùÓÐÕß¡±µÄ°´Å¥£¬µã»÷һϾͿÉÒÔ½«ËùÓжÔÏóµÄËùÓÐÕßÉèÖÃΪÄúµÄµ±Ç°µÇ¼Óû§¡£
¡¡¡¡£¨×¢Ò⣺ϵͳ±í¡¢ÏµÍ³´æ´¢¹ý³Ì µÈ²»Óô¦Àí£¬Ö»ÓÐ×Ô¼º½¨Á¢µÄ±í¡¢´æ´¢¹ý³Ì¡¢ÊÓͼµÈ²ÅÒª´¦Àí£©
4. ÔÚÄúµÄ³ÌÐòÖУ¬Òª×¢ÒâÒÔÏ·½Ãæ
¡¡¡¡ÔÚ²éѯ¡¢¸üС¢É¾³ýÊý¾Ý£¬Ö´Ðд洢¹ý³ÌµÈÒ»ÇвÙ×÷ÖУ¬²»ÒªÊ¹Óà "dbo.±íÃû"¡¢"dbo.´æ´¢¹ý³ÌÃû" µÈ½øÐвÙ×÷£¬
¡¡¡¡¶ø¸ÄΪֱ½ÓÓà "±íÃû"¡¢"´æ´¢¹ý³Ì"ÃûµÈ½øÐвÙ×÷£¬¾ÍÊDz»Òª´øÓжÔÏóËùÓÐÕߵIJ¿·Ö£¬È磺
¡¡¡¡select * from dbo.table1 Ó¦¸Ã¸ÄΪ select * from table1
¡¡¡¡¸ü¶àÇë×öÀàËÆÐÞ¸Ä~



ÉÏһƪ£ºÃÀ¹úÐéÄâÖ÷»úµ¼¹º£¡£¡
ÏÂһƪ£ºÀÄÓÃon error resume nextÔì³ÉµÄ¿Õ¼ä±»Í£ÓÃ
Copyright © 2007-2024 ÖÚÍøÌìÏÂ, All right reserved     ½¨Õ¾×ÉѯÈÈÏß:  13366995422   ¾©ICP±¸×Ö£º¾©ICP±¸12008396ºÅ

ÆóÒµÓÊÏ䣺2008znk@163.com  QQ:284601883  ¹«Ë¾µØÖ·£º±±¾©ÊдóÐËÇø¾­¼Ã¿ª·¢Çø½ðԷ·3ºÅ½ðÈÚ´óÏÃD27/D32ÊÒ  Óʱࣺ102600  ±±¾©ÍøÒ³Éè¼Æ£ºÖÚÍø
ÖÚÍøÌìÏ£¨±±¾©£©ÐÅÏ¢¼¼ÊõÓÐÏÞ¹«Ë¾-ÆìÏÂÍøÕ¾

ÒÔÏÂjsΪ²âÊÔÐÅÏ¢