Sql Server 2005/2008±¸·Ý/ɾ³ý¹ýÆÚ±¸·ÝT
USE [master]
GO
/****** ¶ÔÏó: StoredProcedure [dbo].[sp_backupdatabase] ½Å±¾ÈÕÆÚ: 07/15/2009 16:23:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[sp_backupdatabase]
@bak_path nvarchar(4000)='', --±¸·Ý·¾¶;
@baktype int = null, --±¸·ÝÀàÐÍ0Ϊȫ±¸,1Ϊ²îÒ챸,2ΪÈÕÖ¾±¸·Ý
@type int = null, --ÉèÖÃÐèÒª±¸·ÝµÄ¿â,0Ϊȫ²¿¿â,1Ϊϵͳ¿â,2Ϊȫ²¿Óû§¿â,3Ϊָ¶¨¿â,4ΪÅųýÖ¸¶¨¿â;
@dbnames nvarchar(4000)='', --ÐèÒª±¸·Ý»òÅųýµÄÊý¾Ý¿â£¬ÓÃ,¸ô¿ª£¬µ±@type=3»ò4ʱÉúЧ
@overdueDay int = null, --ÉèÖùýÆÚÌìÊý£¬Ä¬ÈÏÌì;
@compression int =0 --ÊÇ·ñ²ÉÓÃsql2008µÄѹËõ±¸·Ý,0Ϊ·ñ,1Ϊ²ÉÓÃѹËõ
as
--sql server 2005/2008±¸·Ý/ɾ³ý¹ýÆÚ±¸·ÝT-sql °æ±¾v1.0
/*
author:perfectaction
date :2009.04
desc :ÊÊÓÃÓÚsql2005/2008±¸·Ý£¬×Ô¶¯Éú³É¿âÎļþ¼Ð£¬¿ÉÒÔ×Ô¶¨Ò屸·ÝÀàÐͺͱ¸·Ý¿âÃûµÈ
¿ÉÒÔ×Ô¶¨Ò屸·Ý¹ýÆÚµÄÌìÊý
ɾ³ý¹ýÆÚ±¸·Ý¹¦Äܲ»»áɾ³ý×îºóÒ»´Î±¸·Ý£¬ÄÄÅÂÒѾ¹ýÆÚ
Èç¹ûij¿â²»ÔÙ±¸·Ý£¬ÄÇôҲ²»»áÔÙɾ³ý֮ǰ¹ýÆÚµÄ±¸·Ý
ÈçÓдíÎóÇëÖ¸Õý£¬Ð»Ð».
*/
set nocount on
--¿ªÆôxp_cmdshellÖ§³Ö
exec sp_configure 'show advanced options', 1
reconfigure with override
exec sp_configure 'xp_cmdshell', 1
reconfigure with override
exec sp_configure 'show advanced options', 0
reconfigure with override
print char(13)+'------------------------'
--ÅжÏÊÇ·ñÌîд·¾¶
if isnull(@bak_path,'')=''
begin
 
Ïà¹ØÎĵµ£º
½â¾ö·½·¨...
¹ØÓÚSQL°²×°±»¹ÒÆðµÄÐÞ¸´´ó¼Ò¿ÉÄܶ¼Óöµ½¹ýµ±SQL±»É¾³ýºóÐèÒªÖØÐ°²×°Ê±£¬½øÈë°²×°½çÃæ¾Í»á³öÏÖSQL´íÎóÌáʾ£º
´ÓǰµÄ°²×°³ÌÐò²Ù×÷ʹ°²×°³ÌÐò²Ù×÷¹ÒÆð£¬ÐèÒªÖØÐÂÆô¶¯¼ÆËã»ú
È»¶øÕâЩ¶¼Êǰ׷Ѿ¢£¬²»¹ÜÄãÖØÐÂÆô¶¯¶àÉÙ´ÎÒ²¶¼ÎÞ¼ÃÓÚÊ£¬ÏÂÃæÎҾͽ²½²ÔõÑùÄܹ»½â³ý°²×°»òÉý¼¶Ê±Îļþ±»¹ÒÆðµÄ²Ù×÷¡£
µã»÷ ¿ ......
¡¾ÏÈ˼¿¼Ò»¸öÎÊÌ⣺Áû×ÓºÍϹ×ÓÔÚÒ»Æð»áÓÐʲô½á¹û£¿¡¿
×òÌìд³ÌÐò£¬ÓиöСģ¿éÊÇͨ¹ý·ÖÎöÊýÊ®ÍòÌõ¼Ç¼£¬ÓëÒì¹¹µÄÊý¾Ý±í½øÐбȶԣ¬ÕÒ³ö·ûºÏÌõ¼þµÄÐÅÏ¢¡£
ÔÚµÚÒ»Ìõ²éѯÖУ¬ÐèÒª²éѯËùÓмǼµÄÒ»¸ö×ֶΣ¬²¢ÌáÈ¡¸Ã×Ö¶ÎÖеĵÚ5ÖÁµÚ10¸ö×Ö·û´®£¬ÒªÓëÒì¹¹Êý¾Ý±í±È½ÏµÄ¾ÍÊÇÕâ¸ö×Ö´®¡£ÔÚ×î³õµÄ°æ±¾ÖУ¬¶ÔÓÚÐÔÄܲ¢Ã»ÓÐ×ö¸ü¶àµÄ¿¼Â ......
ORACLE sql µÄ´¦Àí¹ý³Ì´óÖÂÈçÏ£º
1.ÔËÓÃHASHËã·¨£¬µÃµ½Ò»¸öHASHÖµ£¬Õâ¸öÖµ¿ÉÒÔͨ¹ýV$SQLAREA.HASH_VALUE ²é¿´
2.µ½shared pool ÖÐµÄ library cache ÖвéÕÒÊÇ·ñÓÐÏàͬµÄHASHÖµ£¬Èç¹û´æÔÚ£¬ÔòÎÞÐèÓ²½âÎö£¬½øÐÐÈí½âÎö
3.Èç¹ûshared pool²»´æÔÚ´ËHASHÖµ£¬Ôò½øÐÐÓï·¨¼ì²é£¬²é¿´ÊÇ·ñÓÐÓï·¨´íÎó
&nbs ......
½«b±íÖÐcallerÁеÄÖµ²åÈëa±íÖÐcallÁÐÖС£
create table a
(
fid int,
call varchar(20),
age int
)
create table b
(
fid int,
caller varchar(20),
parentId int
)
select * from a
select * from b
insert into a values(1,null,19)
insert into a values(2,n ......
asc °´ÉýÐòÅÅÁÐ
desc °´½µÐòÅÅÁÐ
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(Create£¬Alter£¬Drop£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(Select£¬Delete£¬Update£¬Insert)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´ ......