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

SQL SERVER 2005 Ö»ÓÐmdfÎļþµÄÊý¾Ý»Ö¸´·½·¨


Ò»´ÎProjectÏîĿƽ̨(PWA)ÒâÍâÍ£»úÇÒÅäÖÃÊý¾Ý¿âSharePoint_Config µÄLDF±»ÒâÍâɾ³ý,Èç¹ûÖ±½Ó¸½¼ÓMDFÎļþÔòÎÞ·¨¸½¼Ó.
Ïȳ¢ÊÔsp_attach_single_file_db»Ö¸´,Ö´ÐÐÈçÏÂ:
sp_attach_single_file_db 'SharePoint_Config','D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\SharePoint_Config.mdf'
³öÏÖ´íÎóÌáʾ:
Îļþ¼¤»îʧ°Ü¡£ÎïÀíÎļþÃû³Æ'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\SharePoint_Config_log.LDF'¿ÉÄܲ»ÕýÈ·¡£
ÓÉÓÚÊý¾Ý¿âûÓÐÍêÈ«¹Ø±Õ£¬ÎÞ·¨ÖØÐÂÉú³ÉÈÕÖ¾¡£
ÏûÏ¢ 1813£¬¼¶±ð 16£¬×´Ì¬ 2£¬µÚ 1 ÐÐ
ÎÞ·¨´ò¿ªÐÂÊý¾Ý¿â 'SharePoint_Config'¡£CREATE DATABASE ÖÐÖ¹¡£
È»ºó³¢ÊÔÈçϲ½Öè:
1¡¢Ð½¨SharePoint_Config Êý¾Ý¿â
2¡¢Í£Ö¹SQL SERVER 2005£¬½«Ô­À´µÄSharePoint_Config .mdfÊý¾Ý¿âÎļþ¸²¸Ç¸Õн¨µÄSharePoint_Config .mdfÊý¾Ý¿âÎļþ£¬ÖØÐÂÆô¶¯Êý¾Ý¿â,
´ËʱÊý¾Ý¿âÖÐµÄ±í²»ÄÜÕý³£¶ÁÈ¡¡£
3¡¢½«Êý¾Ý¿âÉèÖÃΪ½ô¼±×´Ì¬£º
alter database SharePoint_Config set emergency 
´ËʱÊý¾Ý´¦ÓÚ½ô¼±×´Ì¬,¿âÖеıí¿ÉÒÔ¶ÁÈ¡
4¡¢Ö´ÐÐÈçÏ´úÂ룺
use master 
declare @databasename varchar(255) 
set @databasename='SharePoint_Config'         --ÉèÖñäÁ¿ÎªÊý¾ÝÃû
exec sp_dboption @databasename, N'single', N'true' --½«Êý¾Ý¿âÖÃΪµ¥Óû§×´Ì¬ 
dbcc checkdb(@databasename,REPAIR_ALLOW_DATA_LOSS) 
dbcc checkdb(@databasename,REPAIR_REBUILD) 
exec sp_dboption @databasename, N'single', N'false'--½«Ä¿±êÊý¾Ý¿âÖÃΪ¶àÓû§×´Ì¬
Êý¾Ý¿âÕý³£¡£


Ïà¹ØÎĵµ£º

Êý¾ÝÅúÁ¿µ¼ÈëÔ¶³ÌSQL·þÎñÆ÷µÄÇ×Éíʵ¼ù

¡¡¡¡Ä¿µÄ£º½«Êý¾ÝÅúÁ¿µ¼ÈëÔ¶³Ì·þÎñÆ÷
¡¡¡¡»·¾³£ºSQLÈí¼þ£¬EXCELÈí¼þ£¬VS2005Èí¼þ£¬±¾µØÁ½¸ö»úÆ÷É϶¼ÓÐSQLÊý¾Ý¿â£¬¶øÇÒÊý¾Ý´æ·ÅÔÚÆäÖÐÒ»¸ö±í¡£
¡¡¡¡²Ù×÷ʵ¼ù
¡¡¡¡1¡¢ÓÃÔ¶³ÌÊý¾Ý¿âµÄip¡¢Óû§Ãû¡¢ÃÜÂëÔÚ±¾µØµÇ¼£»
¡¡¡¡2¡¢½á¹û£¬ÆäÖÐÒ»¸ö»úÆ÷ÄܵǼ£¬Ò»¸ö²»ÄܵǼ£¨ÒÔϲÙ×÷ÔڿɵǼµÄ»úÆ÷ÉÏÍê³É£©£»
¡¡¡¡3¡¢µÚÒ»´ÎÎÒÏëͨ ......

×¥SQLÖ´ÐÐÓï¾äʱ¼äµÄ½Å±¾

select sql_text, spid, v$session.program, process
  from v$sqltext, v$session, v$process
  where v$sqltext.address = v$session.sql_address
  and v$sqltext.hash_value = v$session.sql_hash_value
  and v$session.paddr = v$process.addr
  and v$process.spid in (4335);
×¢Ò ......

SQL SERVER¶¨Ê±×÷ÒµµÄÉèÖ÷½·¨

 Èç¹ûÔÚSQL Server ÀïÐèÒª¶¨Ê±»òÕßÿ¸ôÒ»¶Îʱ¼äÖ´ÐÐij¸ö´æ´¢¹ý³Ì»ò3200×Ö·ûÒÔÄÚµÄSQLÓï¾äʱ, ¿ÉÒÔÓùÜÀí->SQL Server´úÀí->×÷ÒµÀ´ÊµÏÖ¡£
¡¡¡¡1¡¢¹ÜÀí->SQL Server´úÀí->×÷Òµ(°´Êó±êÓÒ¼ü)->н¨×÷Òµ
¡¡¡¡2¡¢Ð½¨×÷ÒµÊôÐÔ(³£¹æ)->Ãû³Æ[×Ô¶¨Òå±¾´Î×÷ÒµµÄÃû³Æ]->ÆôÓõķ½¿òÄÚÊǹ´ºÅ->
·ÖÀà´¦¿ ......

SQL Server ´æ´¢¹ý³ÌÈëÃÅѧϰ

´´½¨´æ´¢¹ý³Ì֮ǰҪÏÈÓÃuseÓï¾äÉùÃ÷Òª½«´æ´¢¹ý³Ì´æ´¢ÔÚÄĸöÊý¾Ý¿âÖÐ. e.g use company; Ö´ÐÐÖ®.Ö®ºó¾Í¿ÉÒÔÉùÃ÷´æ´¢¹ý³ÌÁË. e.g create procedure *** @id varchar(50) , @name int output as select @name=name from table where id=@id È»ºó¿ÉÒÔÓÃalter¶Ô´æ´¢¹ý³Ì½øÐÐÐÞ¸Ä. declare¿ÉÒÔÉùÃ÷Ò»¸ö±äÁ¿ ÓÃset¶Ô±ä ......

Ôõô´Óoracleͨ¹ýodbc ºÍsqlµÃµ½mysql

 oracleµÄodbcÍø¹Ø£¨gateway£©¼¸ºõÌṩһ¸öÎÞÏßµÄÊý¾ÝÕûºÏƽ̨£¬ÔÚoracleºÍÆäËüRDBMSÖ®¼ä£¬ÎÒÔÚÕâ²»Ïë˵ËüµÄ£¬²Ù×÷£¬ÏÞÖÆÒÔ¼°Ïà¹ØÐÔ£¬Ëü½â¾öÁËÒ»¸öСÎÊÌ⣬°ÑËü½¨Á¢ÆðÀ´ÄãÄÜ£¬ÀýÈ磬´´½¨Ò»¸ö database link ÔÚoracle ºÍoracleÖ®¼ä£¬±Ï¾¹£¬ÕâÑù²»ÊǺܺÃô£¬ÀýÈçÄãÄÜÔËÐÐÏÂÃæµÄsqlÓï¾ä£¬
select o.col1, m.col1 from or ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ