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

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

 
/*Á½ÖÖ·½·¨µÄÇ°Ì᣺1.±¾µØ·þÎñÆ÷µÄsqlserver agent·þÎñ±£Ö¤´¦ÓÚÆô¶¯×´Ì¬
   2.Ô¶³Ì¼ÆËã»ú£¨¼ÆËã»ú¹ÜÀíÀ½¨Á¢Ò»¸öÆÕͨȨÏÞÓû§£¬²¢ÎªÆä¼ÓÉÏÃÜÂ루ÀýÈçÓû§ÃûΪkyle£¬ÃÜÂëΪ1234£©£¬Í¬Ê±ÔÚÄÇ̨»úÆ÷µÄ·ÇϵͳÅÌÀィһ¸öÃûΪbackupµÄ¹²ÏíÎļþ¼Ð£¬ÎªÁË°²È«ÁíÍâÉèÖÃÕâ¸öÎļþ¼ÐÖ»ÓÐÕâ¸ökyleÓû§¿ÉÒÔ·ÃÎÊ£¨ÐèÒªntfs¸ñʽ²Å¿ÉÒÔÉèÖð²È«£©*/
-----------------------------------------------------------------------------------------------------------------------
--·½·¨1£ºÓÓjob£¨×÷Òµ£©”×ö
declare @sql varchar(500)
select @sql='\\10.2.0.12\backup\dbname'+'_db_'+convert(varchar(10),getdate(),112) +
substring(convert(varchar(10),getdate(),108),1,2) +'.bak'
exec master..xp_cmdshell 'net use \\10.2.0.12\backup 1234 /user:remotehost\kyle'
backup database dbname to disk=@sql --±¸·ÝÊý¾Ý¿â£¬ÕâÀïµÄ10.2.0.12ΪԶ³Ì¼ÆËã»úµÄip£¬backupΪ¹²ÏíÎļþ¼ÐÃû£¬dbnameΪ±¾µØsqlserver·þÎñÆ÷Òª±¸·ÝµÄÊý¾Ý¿â£¬remotehostΪԶ³Ì¼ÆËã»úµÄ¼ÆËã»úÃû£¬1234ΪÃÜÂë,kyleΪÓû§Ãû£¬ÇëÏàÓ¦Ìæ»»³Éʵ¼Ê»·¾³µÄÊý¾Ý
go
declare @sql varchar(500)
select @sql='del '+'\\10.2.0.12\backup\dbname'+'_db_'+convert(varchar(10),dateadd(day,-7,getdate()),112) +
substring(convert(varchar(10),dateadd(day,-7,getdate()),108),1,2) +'.bak'
exec master..xp_cmdshell @sql --ɾ³ý7ÌìÇ°µÄ±¸·Ý£¬Ò²¾ÍÊÇÖ»±£Áô7¸ö×îб¸·Ý
go
-----------------------------------------------------------------------------------------------------------------------
--·½·¨2£ºÓÓÊý¾Ý¿âά»¤¼Æ»®”×ö
1.±¾µØ·þÎñÆ÷£¨¼ÆËã»ú¹ÜÀíÀ½¨Á¢Ò»¸ö²Ù×÷ϵͳÓû§£¬ÀýÈçkyle£¨Óû§ÃûºÍÃÜÂëÐèÒª¸úÔ¶³Ì¼ÆËã»úËù½¨Á¢µÄÓû§Çé¿öÏàͬ£©£¬¸³Óè´ËÓû§administrators×éȨÏÞ£¬¼ÓÉÏÏàÓ¦µÄÃÜÂë¡£
2.ÔÚÆóÒµ¹ÜÀíÆ÷→ÓÒ¼üµã»÷(local)(windows nt)Ñ¡ÔñÊôÐÔ→ÔÚ“°²È«ÐԔѡÏîÀïµÄ“Æô¶¯·þÎñÕÊ»§”Ñ¡ÔñʹÓÓ±¾ÕʺŔ£¬ÔÚÀïÃæÌîÈëµÚÒ»²½½¨Á¢µÄÓû§ºÍÃÜÂ루kyle£©¡££¨ÕâÀïµÄ¹¦ÄÜÊÇ£ºÓÃÕâ¸ö¸úÔ¶³Ì¼ÆËã»úÓû§ÃûÃÜÂëÒ»ÑùµÄÓû§À´Æô¶¯±¾µØsqlserver£¬¾ÍÏñ×öÁËnet use£©
3.´ýkyleÓû§ÖØÆôÁËsqlserver·þÎñºó£¬ÔÚÊý¾Ý¿âά»¤¼Æ»®ÀïµÄ“Ö¸¶¨±¸·Ý´ÅÅÌĿ¼&rdqu


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Windows Mobile 6.0Á¬½ÓSQL Server 2005(PC°æ)


»·¾³´î½¨£º
   windows MobileµÄ¿ª·¢»·¾³µÄ´î½¨ÕâÀï¾Í²»ËµÁË£¬²»Ã÷°×µÄÅóÓÑÔÚÍøÉÏËÑϼ´¿É¡£
²½Öè¸ÅÊö:
1£ºPCÉϵÄSQL SERVER ÐèÒª¿ªÆôÔ¶³ÌÁ¬½Ó¡£
2£ºMoblieÄ£ÄâÆ÷ÐèҪͨ¹ýActiveSyncÁ¬½Ó£¬Ê¹ÆäÄܹ»Í¨¹ýPCÁ¬Íø¡£(Èç¹ûÊÇÊÖ»úµÄ»°£¬ÐèÒªÄܹ»Í¨¹ýÎÞÏßÍøÂçÁ¬È뻥ÁªÍø)
Ïêϸ˵Ã÷£º
1:SQL Server 2005¿ªÆôÔ¶³ÌÁ¬ ......

SqlDbType ö¾ÙÓë Microsoft SQL Server Êý¾ÝÀàÐÍ

 
 ³ÉÔ±Ãû³Æ˵Ã÷
BigInt
Int64¡£64 λµÄÓзûºÅÕûÊý¡£ 
Binary
Byte ÀàÐ굀 Array¡£¶þ½øÖÆÊý¾ÝµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 µ½ 8,000 ¸ö×Ö½ÚÖ®¼ä¡£ 
Bit
Boolean¡£ÎÞ·ûºÅÊýÖµ£¬¿ÉÒÔÊÇ 0¡¢1 »ò ¿ÕÒýÓã¨ÔÚ Visual Basic ÖÐΪ Nothing£©¡£ 
Char
String¡£·Ç Unicode ×Ö·ûµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 ......

Éú³ÉÊ¡ÊеÄ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ºÅ