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

SQL Server 2005ÖеÄÎļþºÍÎļþ×é(¶þ)

--> Title  : SQL Server 2005ÖеÄÎļþºÍÎļþ×é(¶þ)
--> Author : wufeng4552
--> Date   : 2010-1-13
SQL Server 2005ÖеÄÎļþºÍÎļþ×é(¨ç) Ö÷Òª講½âÁËÀí論²¿·Ö
http://blog.csdn.net/wufeng4552/archive/2009/10/23/4716053.aspx
SQL Server 2005ÖеÄÎļþºÍÎļþ×é(¶þ) Ö÷Òª將幾種³£ÓõIJÙ×÷ÕûÀíÈçÏÂ:
1: 將 5MB µÄ資ÁÏ檔¼ÓÈë AdventureWorks 資ÁÏ庫ÖÐ
ALTER DATABASE AdventureWorks
ADD FILE
(
    NAME = Test1dat2,
    FILENAME = 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\t1dat2.ndf',
    SIZE = 5MB,
    MAXSIZE = 100MB,
    FILEGROWTH = 5MB
)
2:ÔÚ AdventureWorks 資ÁÏ庫Öн¨Á¢ Test1FG1 檔°¸Èº組£¬ÇÒ會將兩個 5MB µÄ檔°¸¼ÓÈë檔°¸Èº組ÖС£
USE master
GO
ALTER DATABASE AdventureWorks
ADD FILEGROUP Test1FG1;
GO
ALTER DATABASE AdventureWorks
ADD FILE
(
    NAME = test1dat3,
    FILENAME = 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\t1dat3.ndf',
    SIZE = 5MB,
    MAXSIZE = 100MB,
    FILEGROWTH = 5MB
),
(
    NAME = test1dat4,
    FILENAME = 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\t1dat4.ndf',
    SIZE = 5MB,
    MAXSIZE = 100MB,
    FILEGROWTH = 5MB
)
TO FILEGROUP Test1FG1
3:將兩個 5MB µÄ記錄檔¼ÓÈë AdventureWorks 資ÁÏ庫ÖС£
ALTER DATABASE AdventureWorks
ADD LOG FILE
(
    NAME = test1log2,
    FILENAME = 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\test2log.ldf',
    SIZE = 5MB,
    MAXSIZE = 100MB,
    FILEGROWTH = 5MB
),
(
    NAME = test1log3,
    FILENAME = 'D:\Prog


Ïà¹ØÎĵµ£º

SQL²Ù×÷È«¼¯

SQL²Ù×÷È«¼¯
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE ......

²éѯSQL·þÎñÆ÷ËùÓÐÊý¾Ý¿âÃû

String strServerName = "·þÎñÆ÷Ãû»òIP";
String strUserID = "Êý¾Ý¿âÓû§Ãû";
String strPSW= "Êý¾Ý¿âÃÜÂë";
DataTable DBNameTable = new DataTable();
OleDbConnection Connection = new OleDbConnection(String.Format("Provider=SQLOLEDB;Data Source={0};User ID={1};PWD={2}", strServerName, strUserID, strPS ......

SQLÓï¾ä´óÈ«(3)

--Óï ¾ä¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT¡¡¡¡¡¡--ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE¡¡¡¡¡¡--¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE¡¡¡¡--´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE¡¡¡¡ --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER ......

ʲôÊÇSQL×¢Èë

¿ÉÄÜ´ó¼Ò»¹²»ÊǶÔSQL×¢ÈëÕâ¸ö¸ÅÄî²»ÊǺÜÇå³þ£¬¼òµ¥µØ˵,SQL×¢Èë¾ÍÊǹ¥»÷Õßͨ¹ýÕý³£µÄWEBÒ³Ãæ,°Ñ×Ô¼ºSQL´úÂë´«Èëµ½Ó¦ÓóÌÐòÖÐ,´Ó¶øͨ¹ýÖ´ÐзdzÌÐòÔ±Ô¤ÆÚµÄSQL´úÂë,´ïµ½ÇÔÈ¡Êý¾Ý»òÆÆ»µµÄÄ¿µÄ¡£
¡¡¡¡µ±Ó¦ÓóÌÐòʹÓÃÊäÈëÄÚÈÝÀ´¹¹Ô춯̬SQLÓï¾äÒÔ·ÃÎÊÊý¾Ý¿âʱ£¬»á·¢ÉúSQL×¢Èë¹¥»÷¡£Èç¹û´úÂëʹÓô洢¹ý³Ì£¬¶øÕâЩ´æ´¢¹ý³Ì×÷Ϊ°üº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ