SQL Server 2005ÖÐÊý¾ÝÍÚ¾òËã·¨À©Õ¹·½·¨
ÕªÒª£º±¾ÎĽ«½éÉÜSQL Server 2005 Analysis ServicesÖÐÊý¾ÝÍÚ¾òËã·¨À©Õ¹·½·¨£¬ÔÚƽʱ¿ª·¢ÖÐÎÒÃÇÐèÒª¸ù¾ÝÒªÇóÀ´À©Õ¹SSASµÄÍÚ¾òËã·¨¡£
±êÇ©£ºSQL Server 2005 Êý¾ÝÍÚ¾ò Ëã·¨
SSASΪÎÒÃÇÌṩÁ˾ÅÖÖÊý¾ÝÍÚ¾òËã·¨£¬µ«ÊÇÔÚÓ¦ÓÃÖÐÎÒÃÇÐèÒª¸ù¾Ýʵ¼ÊÎÊÌâÉè¼ÆÊʵ±µÄËã·¨£¬Õâ¸öʱºò¾ÍÐèÒªÀ©Õ¹SSAS£¬Ê¹ËüÄÜÓ¦Óøü¶àµÄËã ·¨£¬SSASÓбȽϺõĿÉÀ©Õ¹ÐÔ£¬ËüÌṩÁËÒ»¸öÍêÕûµÄ»úÖÆÀ´½øÐÐÀ©Õ¹£¬Ö»Òª¼Ì³ÐһЩÀಢ°´Êʵ±µÄ·½·¨½øÐÐ×¢²á¾Í¿ÉÒÔÔÚSSASÖÐʹÓÃ×Ô¼ºµÄËã·¨ÁË¡£
ÏÂÃæÎÒ½«Í¨¹ýʵÀý·Ö±ðÓü¸ÆªÎÄÕÂÀ´½éÉÜÒ»ÏÂÈçºÎ¿ª·¢SSASËã·¨²å¼þ¡£±¾ÎĽéÉܵÄËã·¨²å¼þ¿ª·¢·½·¨ÊÇ»ùÓÚÍйܴúÂëµÄ£¬ÊÇÓÃC#¿ª·¢µÄ£¨Ëã·¨²å¼þÒ²¿ÉÒÔÓÃC++¿ª·¢£¬²¢ÇÒSQLSERVER2005µÄ°¸ÀýÖи½´øC++°æ±¾µÄ´úÂëstub£©¡£Õû¸ö¹ý³Ì´óÖÁΪÁù¸ö²½Öè¡£ÔÚ¿ªÊ¼¿ª·¢Ö®Ç°ÐèÒª×öһЩ׼±¸¹¤×÷£¬¾ÍÊÇҪȥÏÂÔØ Ò»¸öÓÃC++±àдµÄCOM×é¼þ£¬½ÐDMPluginWrapper£¨¿ÉÒÔͨ¹ýÏÂÔر¾Îĸ½´øµÄ¸½¼þ»ñµÃ£©£¬Ëü×÷ΪSSASÓëËã·¨²å¼þµÄÖмä²ã£¬ÓÃÓÚ´¦Àí SSASÓëËã·¨²å¼þÖ®¼äµÄ½»»¥ÒÔ¼°·â×°´ÓSSASµ½Ëã·¨²å¼þµÄ²ÎÊýºÍ´ÓËã·¨²å¼þµ½SSASµÄ´¦Àí½á¹û¡£DMPluginWrapper¡¢SSASºÍËã·¨²å ¼þÖ®¼äµÄ¹Øϵ¿ÉÒÔÓÉÏÂͼÀ´ÃèÊö¡£
ͼ±í 1: DMPluginWrapper¡¢SSASºÍËã·¨²å¼þÖ®¼äµÄ¹Øϵ
ÏÂÃ濪ʼ´´½¨Ëã·¨À©Õ¹µÄÏîÄ¿¡£
Ê×ÏÈн¨Ò»¸öÀà¿âÏîÄ¿£¨ÃûΪAlgorithmPlugin£©½«¸Õ²ÅµÄDMPluginWrapperÏîÄ¿ÒýÓõ½Ð½¨µÄÕâ¸ö AlgorithmPluginÀà¿âÏîÄ¿ÖС£Äã¿ÉÒÔÑ¡ÔñΪÕâ¸öÀà¿âÏîÄ¿½øÐгÌÐò¼¯Ç©Ãû£¬ÕâÑù¾Í¿ÉÒÔ½«Æä×¢²áµ½GACÖС£ÁíÍ⻹ҪΪ DMPluginWrapperÌí¼ÓºóÉú³É½Å±¾½«³ÌÐò¼¯×¢²áµ½GAC£¬²Î¿¼½Å±¾ÈçÏ£¨¸ù¾Ý»úÆ÷¾ßÌåÉèÖöø¶¨£©£º
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" $(TargetPath)
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u $(TargetName)
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /if $(TargetPath)
Èç¹ûµÚÒ»Ðнű¾²»ÄÜÕýÈ·ÔËÐеĻ°£¬Ëã·¨²å¼þÊDz»Äܱ»SQLSERVER·ÖÎö·þÎñÆ÷ʶ±ðµÄ¡£ÁíÍâÁ½Ðнű¾¾ÍÊǽ«Ëã·¨³ÌÐò¼¯×¢²áµ½GAC¡£
½ÓÏÂÀ´µÄ¼¸¸ö²½ÖèÖ÷ÒªÊǼ̳ÐһЩ»ùÀàµÄ¹¤×÷£¬°üÀ¨AlgorithmMetadataBaseÀà¡¢AlgorithmBaseÀàºÍ ICaseProcessor½Ó¿ÚºÍAlgorithmNavigationBaseÀà¡£Ê×ÏÈÔÚAlgorithmPluginÖÐн¨Ò»¸öÀàÎļþ²¢ÃüÃûΪ Metadata£¬ÎªÕâ¸öÀàÌí¼ÓComVisible¡¢MiningAlgorithmClass(typeof(Algorithm))ºÍGuidÊôÐÔ (AlgorithmÊÇ
Ïà¹ØÎĵµ£º
Ò»¡¢±í½á¹¹²éѯ
SELECT TOP (100) PERCENT a.name AS zdm,COLUMNPROPERTY(a.id, a.name, 'IsIdentity') AS bs ,
CASE WHEN EXISTS (SELECT 1 from dbo.sysindexes si INNER JOIN dbo.sysindexkeys sik ON si.id = sik.id
AND si.indid = sik.indid INNER JOIN dbo.syscolumns sc ON sc.id = sik.id AND sc. ......
BEGIN TRANSACTION--¿ªÊ¼ÊÂÎñ
DECLARE @errorSun INT --¶¨Òå´íÎó¼ÆÊýÆ÷
SET @errorSun=0 --û´íΪ0
UPDATE a SET id=232 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
UPDATE aa SET id=2 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
I ......
¡¾ÔÎĵØÖ·¡¿Tip/Trick: Guard Against SQL Injection Attacks
¡¾ÔÎÄ·¢±íÈÕÆÚ¡¿ Saturday, September 30, 2006 9:11 AM
SQL×¢Èë¹¥»÷ÊǷdz£ÁîÈËÌÖÑáµÄ°²È«Â©¶´£¬ÊÇËùÓеÄweb¿ª·¢ÈËÔ±£¬²»¹ÜÊÇʲôƽ̨£¬¼¼Êõ£¬»¹ÊÇÊý¾Ý²ã£¬ÐèҪȷÐÅËûÃÇÀí½âºÍ·ÀÖ¹µÄ¶«Î÷¡£²»ÐÒµÄÊÇ£¬¿ª·¢ÈËÔ±ÍùÍù²»¼¯Öл¨µãʱ¼äÔÚÕâÉÏÃ棬ÒÔÖÁËûÃǵÄÓ¦Ó㬠......
ÈçºÎÔÚSQLÖÐÆôÓÃÈ«ÎļìË÷¹¦ÄÜ£¿
¡¡¡¡--------------------------------------------------------------------------------
¡¡¡¡È«ÎÄË÷ÒýµÄÒ»¸öÀý×Ó£¬ÔÚ²éѯ·ÖÎöÆ÷ÖÐʹÓãº
¡¡¡¡use pubs
¡¡¡¡go
¡¡¡¡--´ò¿ªÊý¾Ý¿âÈ«ÎÄË÷ÒýµÄÖ§³Ö
¡¡¡¡execute sp_fulltext_database 'enable'
¡¡¡¡go
¡¡¡¡--½¨Á¢È«ÎÄĿ¼ft_titles
¡¡¡ ......
ÕªÒª£ºSQL Server 2008ÖÐÌṩÁË9ÖÖ³£ÓõÄÊý¾ÝÍÚ¾òËã·¨£¬ÕâЩËã·¨ÓÃÔÚ²»Í¬Êý¾ÝÍÚ¾òµÄÓ¦Óó¡¾°Ï£¬±¾Îľ͸÷¸öËã·¨Öð¸ö·ÖÎöÌÖÂÛ¡£
±êÇ©£ºÊý¾ÝÍÚ¾òËã·¨ SQL Server 2008
1.¾ö²ßÊ÷Ëã·¨
¾ö²ßÊ÷£¬ÓÖ³ÆÅж¨Ê÷£¬ÊÇÒ»ÖÖÀàËƶþ²æÊ÷»ò¶à²æÊ÷µÄÊ÷½á¹¹¡£¾ö²ßÊ÷ÊÇÓÃÑù±¾µÄÊôÐÔ×÷Ϊ½áµã£¬ÓÃÊôÐÔµÄÈ¡Öµ×÷Ϊ·ÖÖ§£¬Ò²¾ÍÊÇÀàËÆÁ ......