½«Excelµ¼ÈëSQL SERVER2005Êý¾Ý¿â
/*
±¾ÎÄרעÓÚ½«Excelµ¼ÈëSQL SERVER2005Êý¾Ý¿â
´Ë·¾¶ÏµÄÕâ¸ö¹¤¾ß£¬ÊÇSQL SERVER2005 ÓÃÀ´µ¼Èëµ¼³öÊý¾ÝµÄ¹¤¾ß¡£
C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe
Ò»°ãÔÚÊý¾Ý¿âÃûÉÏ--ÓÒ¼ü-->Tasks-->Import Data -->½çÃæ¾Í³öÀ´ÁË£¬ºÍµã»÷ÉÏÃæµÄ¹¤¾ßÊÇÒ»¸ö¶«Î÷¡£
Ê×´ÎʹÓÃÕâ¸öDTS¹¤¾ß¿ÉÄܻᱨ´í£¬ÒòΪÓж«Î÷ûÓÐÆô¶¯£¬°´ÕÕÎÒÏÂÃæµÄÁ½²½À´£¬¼´¿É½â¾öµô£¬È»ºó¾ÍÄÜÈÃÉÏÃæµÄ¹¤×÷ÁË¡£
*/
--<Ò»>ÏÔʾ¸ß¼¶Ñ¡Ï
sp_configure 'show advanced options',1
RECONFIGURE WITH override
go
sp_configure 'Ad Hoc Distributed Queries',1
RECONFIGURE WITH override
go
--<¶þ>ÓÃsp_configure½«'Ad Hoc Distributed Queries' ´ò¿ª²¢ÉèÖÃ
USE master
go
EXEC sp_configure 'Ad Hoc Distributed Queries',1
RECONFIGURE;
EXEC sp_configure;
----------------------------------------------------------------------------------
--´ÓÁíÒ»¸ösql serverµ¼Èësql serverµÄ´úÂëÊÇ£º
SELECT *
from OPENDATASOURCE(
'SQLOLEDB',
'server=YKTCPC-105\\JERRYSQL2000;user id=sa;password=123456;database=Ys2008'
).ys2008.dbo.yy_user
--Ö±½Ó°ÑExcelµÄÊý¾Ýµ¼Èëµ½Sql serverÖÐ(»úÆ÷ÄÚÐèÒª°²×°ÁË'Microsoft.Jet.OLEDB.4.0'Çý¶¯£¬ËùÒÔÕâ·½·¨ºÜ¶àʱ¼ä·´¶ø²»¿ÉÐС£):
SELECT * into sheet$
from OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=C:\a.xls;User ID=Admin;Password=;Extended properties="Excel 8.0;HDR=Yes;";Persist Security Info=False')...[Sheet$]
--»òÕß
select * into sheet3$
from OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=C:\a.xls',[Sheet$])
Ïà¹ØÎĵµ£º
1¡¢²éѯ±íÖÐÖظ´Êý¾Ý¡£select * from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ ......
1¡¢ ÓóÌÐòÖУ¬±£Ö¤ÔÚʵÏÖ¹¦ÄܵĻù´¡ÉÏ£¬¾¡Á¿¼õÉÙ¶ÔÊý¾Ý¿âµÄ·ÃÎÊ´ÎÊý£»Í¨¹ýËÑË÷²ÎÊý£¬¾¡Á¿¼õÉÙ¶Ô±íµÄ·ÃÎÊÐÐÊý,×îС»¯½á¹û¼¯£¬´Ó¶ø¼õÇáÍøÂ縺µ££»Äܹ»·Ö¿ªµÄ²Ù×÷¾¡Á¿·Ö¿ª´¦Àí£¬Ìá¸ßÿ´ÎµÄÏìÓ¦Ëٶȣ»ÔÚÊý¾Ý´°¿ÚʹÓÃSQLʱ£¬¾¡Á¿°ÑʹÓõÄË÷Òý·ÅÔÚÑ¡ÔñµÄÊ×ÁУ»Ëã·¨µÄ½á¹¹¾¡Á¿¼òµ¥£»ÔÚ²éѯʱ£¬²»Òª¹ý¶àµØʹÓà ......
¶ÔSQL Server 2008 ½øÐÐMirrorµÄ»ù±¾ÅäÖü°°²×°¡£
×¼±¸¹¤×÷
1. Principal ÓëMirror ÒÔ¼° Witness Èý̨ʵÀý¶¼°²×°ÎªÏàͬ°æ±¾£¬Ä¿Ç°Êǵ½SQL Server 2008 SP1¡£
2. ÐèÒªÓÐÒ»¸öÓòÕÊ»§·Ö±ðÌí¼Óµ½ Èý̨Êý¾Ý¿âʵÀýËùÔÚµÄServer µÄ Administrators×é¡¢ÒÔ¼°SQL Server Ïà¹ØµÄ×éÖУ» ÓÉÓÚ¾ßÌåµÄ×éµÄ¹¦Äܲ»Çå³þ£¬Òò´Ë½¨ÒéËùÓ ......
SQLλÔËËã
select 2|8 --10
select 2|8|1 --11
select 10&8 --8,°üº¬,10=8+2
select 10&2 --2,°üº¬,10=2+8
select 10&4 --0,²»°üº¬
select 19&16 --16,°üº¬,19=16+2+1
s ......
I'm continually trying to track down what service packs are installed on various SQL Servers I support. I can never find the right support page on Microsoft's site. So here's an article with all the SQL Server version information I can track down. If you know of any older versions or can help me fil ......