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

SQL ServerµÄÁùÖÖÊý¾ÝÒƶ¯·½·¨

1.ͨ¹ý¹¤¾ßDTSµÄÉè¼ÆÆ÷½øÐе¼Èë»òµ¼³ö

¡¡¡¡DTSµÄÉè¼ÆÆ÷¹¦ÄÜÇ¿´ó£¬Ö§³Ö¶àÈÎÎñ£¬Ò²ÊÇ¿ÉÊÓ»¯½çÃ棬ÈÝÒײÙ×÷£¬µ«ÖªµÀµÄÈËÒ»°ã²»¶à£¬Èç¹ûÖ»ÊǽøÐÐSQL ServerÊý¾Ý¿âÖв¿·Ö±íµÄÒƶ¯£¬ÓÃÕâÖÖ·½·¨×îºÃ£¬µ±È»£¬Ò²¿ÉÒÔ½øÐÐÈ«²¿±íµÄÒƶ¯¡£ÔÚSQL Server Enterprise ManagerÖУ¬Õ¹¿ª·þÎñÆ÷×ó±ßµÄ+£¬Ñ¡ÔñÊý¾Ý¿â£¬ÓÒ»÷£¬Ñ¡ÔñAll tasks/Import Data...(»òAll tasks/Export Data...)£¬½øÈëÏòµ¼Ä£Ê½£¬°´Ìáʾһ²½Ò»²½×ß¾ÍÐÐÁË£¬ÀïÃæ·ÖµÃºÜϸ£¬¿ÉÒÔÁé»îµÄÔÚ²»Í¬Êý¾ÝÔ´Ö®¼ä¸´ÖÆÊý¾Ý£¬ºÜ·½±ãµÄ¡£¶øÇÒ¿ÉÒÔÁí´æ³ÉDTS°ü£¬Èç¹ûÒÔºó»¹ÓÐÏàͬµÄ¸´ÖÆÈÎÎñ£¬Ö±½ÓÔËÐÐDTS°ü¾ÍÐУ¬Ê¡Ê±Ê¡Á¦¡£Ò²¿ÉÒÔÖ±½Ó´ò¿ªDTSÉè¼ÆÆ÷£¬·½·¨ÊÇÕ¹¿ª·þÎñÆ÷Ãû³ÆÏÂÃæµÄData Transformation Services£¬Ñ¡Local Packages£¬ÔÚÓұߵĴ°¿ÚÖÐÓÒ»÷£¬Ñ¡New Package£¬¾Í´ò¿ªÁËDTSÉè¼ÆÆ÷¡£ÖµµÃ×¢ÒâµÄÊÇ£ºÈç¹ûÔ´Êý¾Ý¿âÒª¿½±´µÄ±íÓÐÍâ¼ü£¬×¢ÒâÒƶ¯µÄ˳Ðò£¬ÓÐʱҪ·ÖÅúÒƶ¯£¬·ñÔòÍâ¼üÖ÷¼ü£¬Ë÷Òý¿ÉÄܶªÊ§£¬Òƶ¯µÄʱºòÑ¡ÏîÅԱߵÄÌáʾ˵µÄºÜÃ÷°×£¬»òÕßÒ»´ÎÐԵĸ´ÖƵ½Ä¿±êÊý¾Ý¿âÖУ¬ÔÙÖØн¨Á¢Íâ¼ü£¬Ö÷¼ü£¬Ë÷Òý¡£
¡¡¡¡Æäʵ½¨Á¢Êý¾Ý¿âʱ£¬½¨Á¢Íâ¼ü£¬Ö÷¼ü£¬Ë÷ÒýµÄÎļþÓ¦¸ÃºÍ½¨±íÎļþ·Ö¿ª£¬¶øÇÒÓõÄÊý¾ÝÎļþÒ²·Ö¿ª£¬²¢·Ö±ð·ÅÔÚ²»Í¬µÄÇý¶¯Æ÷ÉÏ£¬ÓÐÀûÓÚÊý¾Ý¿âµÄÓÅ»¯¡£
2. ÀûÓÃBcp¹¤¾ß
¡¡¡¡ÕâÖÖ¹¤¾ßËäÈ»ÔÚSQL Server7µÄ°æ±¾Öв»ÍƼöʹÓ㬵«Ðí¶àÊý¾Ý¿â¹ÜÀíÔ±ÈÔºÜϲ»¶ÓÃËü£¬ÓÈÆäÊÇÓùýSQL ServerÔçÆÚ°æ±¾µÄÈË¡£BcpÓоÖÏÞÐÔ£¬Ê×ÏÈËüµÄ½çÃæ²»ÊÇͼÐλ¯µÄ£¬Æä´ÎËüÖ»ÊÇÔÚSQL ServerµÄ±í£¨ÊÓͼ£©ÓëÎı¾ÎļþÖ®¼ä½øÐи´ÖÆ£¬µ«ËüµÄÓŵãÊÇÐÔÄܺ㬿ªÏúС£¬Õ¼ÓÃÄÚ´æÉÙ£¬Ëٶȿ졣ÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ²é²Î¿¼Êֲᡣ
3. ÀûÓñ¸·ÝºÍ»Ö¸´
¡¡¡¡ÏȶÔÔ´Êý¾Ý¿â½øÐÐÍêÈ«±¸·Ý£¬±¸·Ýµ½Ò»¸öÉ豸£¨device£©ÉÏ£¬È»ºó°Ñ±¸·ÝÎļþ¸´ÖƵ½Ä¿µÄ·þÎñÆ÷ÉÏ£¨»Ö¸´µÄËٶȿ죩£¬½øÐÐÊý¾Ý¿âµÄ»Ö¸´²Ù×÷£¬ÔÚ»Ö¸´µÄÊý¾Ý¿âÃûÖÐÌîÉÏÔ´Êý¾Ý¿âµÄÃû×Ö£¨Ãû×Ö±ØÐëÏàͬ£©£¬Ñ¡ÔñÇ¿ÖÆÐͻָ´£¨¿ÉÒÔ¸²¸ÇÒÔÇ°Êý¾Ý¿âµÄÑ¡Ï£¬ÔÚÑ¡Ôñ´ÓÉ豸ÖнøÐлָ´£¬ä¯ÀÀʱѡÖб¸·ÝµÄÎļþ¾ÍÐÐÁË¡£ÕâÖÖ·½·¨¿ÉÒÔÍêÈ«»Ö¸´Êý¾Ý¿â£¬°üÀ¨Íâ¼ü£¬Ö÷¼ü£¬Ë÷Òý¡£
4. Ö±½Ó¿½±´Êý¾ÝÎļþ
¡¡¡¡°ÑÊý¾Ý¿âµÄÊý¾ÝÎļþ£¨*.mdf£©ºÍÈÕÖ¾Îļþ£¨*.ldf£©¶¼¿½±´µ½Ä¿µÄ·þÎñÆ÷£¬ÔÚSQL Server Query AnalyzerÖÐÓÃÓï¾ä½øÐлָ´£º
EXEC sp_attach_db @dbname = ’test’,
@filename1 = ’d:mssql7data est_data.mdf’,
@filename2 = ’d:mssql7data est_log.ldf’
¡¡¡¡ÕâÑù¾Í°ÑtestÊý¾Ý¿â¸½¼Óµ


Ïà¹ØÎĵµ£º

Asp.netÓëSQLÒ»Æð´ò°ü²¿Êð°²×°


Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......

SQL³£¼û²éѯÎÊÌâ(±à³Ì)


ÓÐЩ³£¼ûµÄÎÊÌâÔÚÂÛ̳Öв»¶Ï³öÏÖ£¬²»·ÁÕûÀíһϡ£
ÒÔÏÂÓï¾äÊÇÔÚSQLServer2005ÉÏʵÏֵģ¬Ò»Ð©Óï¾äÎÞ·¨ÔÚSS2000ÉÏÖ´ÐС£
ÓÐÓÃÖ¸ÊýÊÇÎÒ¸ù¾ÝÕâ¸öÎÊÌâµÄ³£¼û³Ì¶È´òµÄ·Ö£¬½ö¹©²Î¿¼¡£Êµ¼ÊÉÏ£¬µ±ÄãÓöµ½ÁËÕâ¸öÎÊÌ⣬Õâ¸öÎÊÌâÄÄÅÂÔÙÉÙ¼û£¬½â¾ö·½°¸Ò²ÊǷdz£ÓÐÓõġ£
1. Éú³ÉÈô¸ÉÐмǼ
ÓÐÓÃÖ¸Êý£º¡ï¡ï¡ï¡ï¡ï
³£¼ûµÄÎÊÌâÀàÐÍ£º¸ù ......

SQL Serverº¯Êý´óÈ«

--¾ÛºÏº¯Êý
use pubs
go
select avg(distinct price)  --Ëãƽ¾ùÊý
from titles
where type='business'
go 
use pubs
go
select max(ytd_sales)  --×î´óÊý
from titles
go 
use pubs
go
select min(ytd_sales) --×îÐ¡Ê ......

SQL²åÈëÀýÌâ

--´´½¨±íTongXunLu
CREATE TABLE TongXunLu
 (
 [tName] nvarchar(30),
 [tAddress] nvarchar(50),
 [tEmail] varchar(50)
 )
--´´½¨±í students
CREATE TABLE students
 (
 [sId] int IDENTITY (1, 1) primary key NOT NULL ,
 [sName] varchar (50)   NOT ......

[¼Ç¼]ÔÚÃüÁîÐÐÖÐÆô¶¯ SQL SERVER

Æô¶¯ MS SQL SERVER £¨2000 £­2008¶¼ÊÊÓã©£º
cmd>net start mssqlserver
Æô¶¯ ·ÇȱʡʵÀý£º
cmd>net start mssql$[instance name]
×¢£ºÃüÁîÐÐÐèÒªÓÐAdministratorȨÏÞ¡£
Í£Ö¹SQLSERVER ·þÎñÆ÷:
cmd>net stop mssqlserver
cmd>net stop mssql$[instance name] ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ