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

Sql Server2005ʵÏÖÔ¶³Ì±¸·ÝÊý¾Ý¿â

 
ÏàÐÅ´ó¼Ò¶¼ÔÚµ±ÐÄÊý¾Ý¿âµÄ¶ªÊ§£¬ÕâÒ²ÊÇÿ¸ö¿ª·¢ÕßÍ·Í´µÄÒ»¼þʼþ£¬ÒòΪÕýÔÚÔËÐеķþÎñÆ÷¼°Êý¾Ý¿âÒ²ÔÚÕą̂·þÎñÆ÷ÉÏ¡£Èç¹û·þÎñÆ÷±ÀÀ££¬ÄÇôËùÓеÄÊý¾Ý
¶¼²»´æÔÚÁË£¬¾ÍËãÊÇÄãÔÚÄãµÄ»ú×ÓÉÏ×öÁ˱¸·Ý£¬ÄÇÒ²ÊÇûÓÐÓõģ¬ÎªÊ²Ã´»áÕâÑù˵Ö÷ÒªÊÇÒòΪ±¾»úÊÇÏò»¥ÁªÍø¹«¿ªµÄ£¬ËùÒÔ³öʹʵĸÅÂʾͱȽϸߡ£×îÖÕÎÒÃÇ¿ÉÒÔÀû
ÓþÖÓòÍø½â¾öÕâÑùµÄÎÊÌâ¡£¾ÍÄÃÁ½Ì¨»ú×Ó×öÀý×Ó£¬A»úÊÇ·þÎñÆ÷£¬B»úÊÇÒª°ÑA·þÎñÆ÷ÉϵÄÊý¾Ý¿â±¸·Ýµ½B»úÉÏ£¬Ç°ÌáÊÇB»ú±ØÐëÒªÓÐÊý¾Ý¿â£¬ÒÔSql
Server2005ΪÀý¡£
Ê×ÏÈA»ú±ØÐë¾ß±¸Êý¾Ý¿â£¬³ÌÐò£¬IIS£¬B»ú±ØÐë¾ß±¸Êý¾Ý¿â£¬·þÎñ³ÌÐò¡£Ç°ÌáÊÇB»ú±ØÐëÖªµÀA»úµÄ»úÆ÷ÃÜÂë¡£
Æä´Î´úÂë²Ù×÷ÈçÏ ÕâÖ»ÊÇ´æ´¢¹ý³Ì
  1
IF
 
NOT
 
EXISTS
 (
SELECT
 
*
 
from
 sys.objects 
WHERE
 
object_id
 
=
 
OBJECT_ID
(N
'
[dbo].[BackSqlorFile]
'

AND
 type 
in
 (N
'
P
'
, N
'
PC
'
))
  2
BEGIN
  3
EXEC
 dbo.sp_executesql 
@statement
 
=
 N
'
  4
  5
  6
CREATE proc [dbo].[BackSqlorFile]
  7
@ServerIp varchar(50),--Êý¾Ý¿â·þÎñÆ÷IP
  8
@ServerName varchar(50),--Êý¾Ý¿â¼ÆËã»úÓû§
  9
@ServerPwd   varchar(50),--Êý¾Ý¿â¼ÆËã»úÓû§ÃÜÂë
 10
@ServerIISIp varchar(50),--IIs·þÎñÆ÷Ip
 11
@ServerIIsName varchar(50),--IIs·þÎñÆ÷Ãû³Æ
 12
@ServerIIsPwd  varchar(50),--IIs·þÎñÆ÷ÃÜÂë
 13
@SqlShareFile    varchar(50),--Ô¶³Ìsql¹²ÏíÎļþ
 14
@IIsShareFile   varchar(50),--Ô¶³ÌIIS¹²ÏíÎļþ
 15
@MoveIIsPath   varchar(50),--d:\back
 16
@MoveSqlPath   varchar(50),--d:\sql
 17
@DataName      varchar(50),--Êý¾Ý¿âÃû³Æ
 18
@SqlloginName varchar(50),--Ô¶³ÌÊý¾Ý¿âµÇ½Ãû³Æ
 19
@SqlLoginPwd  varchar(50)--Ô¶³ÌÊý¾Ý¿âµÇ½ÃÜÂë
 20
as
 21
begin
 22
/*==========================================


Ïà¹ØÎĵµ£º

SQL SERVER ²é¿´CPUÀûÓÃÂÊ

 --²é¿´CPUÀûÓÃÂÊ
-- CREATE PROCEDURE sp_GetTop10_CPU () AS
BEGIN
  SET NOCOUNT ON
  DECLARE @cinterval char(8)
  DECLARE @interval int
  SET @cinterval = '00:00:10'
  CREATE TABLE #thread
  (
    RUN INT NOT NULL,
    SPI ......

×ÔÔö×ֶεÄSQLÓï¾ä½â¾ö·½°¸

2009Äê06ÔÂ24ÈÕ 09:47
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
É ......

¼¸¸öɾ³ýÖØ¸´¼Ç¼µÄSQLÓï¾ä

¼¸¸öɾ³ýÖØ¸´¼Ç¼µÄSQLÓï¾ä
2009-03-02 10:08
±ÈÈçÏÖÔÚÓÐÒ»ÈËÔ±±í £¨±íÃû£ºpeosons£©
ÈôÏ뽫ÐÕÃû¡¢Éí·ÝÖ¤ºÅ¡¢×¡Ö·ÕâÈý¸ö×Ö¶ÎÍêÈ«ÏàͬµÄ¼Ç¼²éѯ³öÀ´
select   p1.*   from   persons   p1,persons   p2   where   p1.id<>p2.id &nb ......

pl/sqlÀûÓÃrownumÈ¡µÃÅÅÐòºóµÄ²¿·ÖÐÐÐòÁÐ

ÎÒÃÇʹÓÃoracleµÄÈ˶¼ÖªµÀ¿ÉÒÔͨ¹ýrownumαÁеõ½²éѯ½á¹ûÐòÁÐÇ°ÃæµÄÖ¸¶¨µÄÐУ¬ÎªÁËÏÂÃæ¸üºÃµÄ½øÐÐ˵Ã÷ÎÊÌ⣬ÎÒÃÇÏÈÀ´´´½¨Ò»¸öÊý¾Ý±ítable1£º
create table table1
(AAA integer primary key,
BBB varchar(30));
È»ºóÔÚtable1ÖвåÈë9ÌõÊý¾Ý£º
insert into table1 values (8, 'good');
insert into table1 values (7 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ