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

SQL SERVERÒìµØ±¸·Ý·½·¨(1)

д³É´æ´¢¹ý³Ì£¬½¨Á¢×÷Òµ¶¨Ê±±¸·Ý~~~
--ÔÚsqlÖÐÓ³ÉäһϾͿÉÒÔÁË
exec master..xp_cmdshell 'net use z: \\yizhi\D$ "ÃÜÂë" /user:yizhi\administrator'
/*--˵Ã÷:
exec master..xp_cmdshell 'net use z: \\xz\c$ "ÃÜÂë" /user:xz\administrator'
z:ÊÇÓ³ÉäÍøÂç·¾¶¶ÔÓ¦±¾»úµÄÅÌ·û,ÓëÏÂÃæµÄ±¸·Ý¶ÔÓ¦
\\xz\c$ÊÇÒªÓ³ÉäµÄÍøÂç·¾¶
xz\administrator
xzÊÇÔ¶³ÌµÄ¼ÆËã»úÃû,
administratorÊǵǽµÄÓû§Ãû
ÃÜÂë ÃæÖ¸¶¨µÄadministratorÓû§µÄÃÜÂë
--*/
--±¸·Ý£»with init¸²¸Ç|noinitÌí¼Ó
backup database ¿âÃû to disk='E:\H_BACKUP.bak' with init
--COPY
exec master..xp_cmdshell 'copy E:\H_BACKUP.bak z:'
--ɾ³ý£¨Õâ¾ä¿ÉÒÔÈ¥µô£©
--exec master..xp_cmdshell 'del E:\H_BACKUP.bak'
--Íê³Éºóɾ³ýÓ³Éä
exec master..xp_cmdshell 'net use z: /delete'


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

OM裡±£Áô記錄備·ÝSQL

 First:
create table gobo.gobo_om_reservations_2008b as
select * from gobo_om_reservations
where to_char(CREATION_DATE,'yyyy')<'2008'
delete from gobo_om_reservations
where to_char(CREATION_DATE,'yyyy')<'2008'
commit
After 2009Year:
create table gobo.gobo_om_reservations_????b as ......

sql Óï¾ä exec Ö´ÐÐ×Ö·û´®

create PROCEDURE [dbo].[AllDnn_NewsPublish_DeleteArticleByArticle]
@ArticleID nvarchar(200)
AS

declare @sql nvarchar(1000)
set @sql='DELETE dbo.Site_News_Article where ArticleID in ('+@ArticleID+')'
exec (@sql)
--[AllDnn_NewsPublish_DeleteArticleByArticle] '50,51' ......

Éú³ÉÊ¡ÊеÄSQL½Å±¾

 --Ê¡¼¶   Provincial
--³ÇÊР  City
create table Provincial(pid int,Provincial varchar(50),primary key (pid))
insert into Provincial values(1,'±±¾©ÊÐ')
insert into Provincial values(2,'Ìì½òÊÐ')
insert into Provincial values(3,'ÉϺ£ÊÐ')
insert into Provincial values(4,'Ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ