|
||
|
||
Á¶È¸ : 449 | À̸§ : °À屺 |
E-mail :
|
use tempdb
go --¿ì¼± Å×½ºÆ®¸¦ À§ÇÑ db¸¦ ¸¸µé°í create database t1 on primary ( name = 't1_dat', filename = 'c:\sql2k\mssql\data\t1_data.mdf', size=10, maxsize=20, filegrowth=10 ) log on ( name = 't1_log', filename = 'c:\sql2k\mssql\data\t1_log.ldf', size = 1mb, maxsize = 1mb ) go --µ¿ÀÏÇÑ »óȲÀçÇö... --drop table tbl use t1 go select * into tbl from northwind.dbo.[order details] go --·Î±×°¡ Ç®³¯¶§±îÁö ·Î±×¹ß»ý... update tbl set quantity=quantity*2 go update tbl set quantity=quantity/2 go ¼¹ö: ¸Þ½ÃÁö 9002, ¼öÁØ 17, »óÅ 6, ÁÙ 1 't1' µ¥ÀÌÅͺ£À̽ºÀÇ ·Î±× ÆÄÀÏÀÌ ²Ë á½À´Ï´Ù. µ¥ÀÌÅͺ£À̽ºÀÇ Æ®·£Àè¼Ç ·Î±×¸¦ ¹é¾÷ÇÏ¿© »ç¿ë °¡´ÉÇÑ ÀϺΠ·Î±× °ø°£À» È®º¸ÇϽʽÿÀ. ·Î±×°¡ Ç®ÀÌ ³µ´Ù. --sqlÀ» stop½ÃŲÈÄ ·Î±×À̸§À» º¯°æ. /* C:\>net stop mssqlserver MSSQLSERVER ¼ºñ½º¸¦ ¸ØÃä´Ï´Ù.... MSSQLSERVER ¼ºñ½º¸¦ Àß ¸ØÃß¾ú½À´Ï´Ù. C:\>cd sql2k\mssql\data C:\SQL2K\MSSQL\Data>ren t1_log.ldf t1_log.ldf.rename C:\SQL2K\MSSQL\Data>net start mssqlserver MSSQLSERVER ¼ºñ½º¸¦ ½ÃÀÛÇÕ´Ï´Ù..... MSSQLSERVER ¼ºñ½º°¡ Àß ½ÃÀ۵Ǿú½À´Ï´Ù. */ ÀÌ»óÅ¿¡¼ EM¿¡¼ ÇØ´çDB¸¦ È®ÀÎÇغ¸¸é [ÁÖÀÇ´ë»ó]À¸·Î Ç¥±âµÈ´Ù. ´Ù½Ã mssql ¼ºñ½º¸¦ ÁßÁöÇÑÈÄ ·Î±×À̸§À» ¿ø·¡´ë·Î Çسõ°í ´Ù½Ã È®ÀÎÇغ¸ÀÚ. /* C:\SQL2K\MSSQL\Data>net stop mssqlserver MSSQLSERVER ¼ºñ½º¸¦ ¸ØÃä´Ï´Ù.. MSSQLSERVER ¼ºñ½º¸¦ Àß ¸ØÃß¾ú½À´Ï´Ù. C:\SQL2K\MSSQL\Data>ren t1_log.ldf.rename t1_log.ldf C:\SQL2K\MSSQL\Data>net start mssqlserver MSSQLSERVER ¼ºñ½º¸¦ ½ÃÀÛÇÕ´Ï´Ù... MSSQLSERVER ¼ºñ½º°¡ Àß ½ÃÀ۵Ǿú½À´Ï´Ù. */ ´Ù½Ã EM¿¡¼ È®ÀÎÇغ¸ÀÚ. ¾ÆÁ÷µµ [ÁÖÀÇ´ë»ó]À¸·Î Ç¥±âµÇ¾ú´Ù. ÇÏÁö¸¸ »õ·Î°íħÀ» Çغ¸¸é Á¤»óÀûÀ¸·Î ÇØ´çDB°¡ º¹±¸µÇ¾î Àֳ׿ä. EMÀÇ °æ¿ì ÀÚµ¿À¸·Î refresh°¡ µÇÁö ¾Ê½À´Ï´Ù. Ç×»ó ÃÖ½ÅÁ¤º¸¸¦ º¸½Ç·Á¸é »õ·Î°íħÀ» ÇϽÅÈÄ ÇØ´ç³»¿ªÀ» È®ÀÎÇÏ¼Å¾ß ÇÕ´Ï´Ù. ¿ì¼± EM¿¡¼ »õ·Î°íħÀ» Çؼ ´Ù½ÃÇѹø È®ÀÎÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù. ±×¸®°í, Æ®·£Àè¼Ç ·Î±×¸¦ Áö¿ì½Ç·Á¸é Ç®¹é¾÷ÈÄ ·Î±×¹é¾÷À» ÇϽôøÁö ±»ÀÌ ·Î±×¸¦ ¹é¾÷¹Þ¾Æ¼ º¸°üÇÒ ÇÊ¿ä°¡ ¾ø´Ù¸é backup log t1 with truncate_only go À» ½ÇÇàÇÏ½Ã¸é ·Î±×°¡ ºñ¿öÁý´Ï´Ù. º¸´Ù ÀÚ¼¼ÇÑ ¼³¸íÀº ¿Â¶óÀμ³¸í¼¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù. > ¼Õ´Ô ´ÔÀÌ ¾²½Å ±Û > ---------------------------------------------------------- > OS : Microsoft Windows 2000 Server / Advanced Server > SQL : Microsoft SQL Server 2000 Standard / Enterprise Edition > > ¾È³çÇϼ¼¿©...¿ÕÃʺ¸Àä.... > > ²ÀÁ» µµ¿ÍÁÖ¼¼¿ä........Á¦¹ß~~~ > > > windows 2000 ¿¡ ms sql ¼¹ö°¡ ±ò·Á ÀÖ¾î¿ä > > ±Ùµ¥ Æ®·£Àè¼Ç ·Î±×°¡ Ç®Â÷¼ ¿¡·¯°¡ ¹ß»ýÇ߾ > > ±×·¡¼ Æ®·£Àè¼Ç ·Î±×¸¦ »èÁ¦¸¦ ÇÒ·Á°í Çϴµ¥ ¾ÈµÇ¼ > > sql service ¸¦ ³»¸°ÈÄ Å½»ö±â·Î ÇØ´ç °æ·ÎÀÇ X_log.LDF ÆÄÀÏÀ» »èÁ¦´Â ¾ÈÇÏ°í > > ÀÏ´Ü À̸§À» º¯°æ(X_log1.LDF) ÇÏ°í sql service ¿Ã¸°ÈÄ È®ÀÎÇغÁ¼ ÀÌ»óÀÌ ¾øÀ¸¸é > > »èÁ¦¸¦ ÇÒ·Á°í Ç߾ > > ±×·±µ¥...sql service ¸¦ ¿Ã¸°ÈÄ È®ÀÎÇغ¸´Ï±ñ ÇØ´ç DataBase °¡ ÀÌ»óÀÌ ¹ß»ý( ÁÖÀÇ´ë»óÀ̶ó°í ¶ä) > > ÇÏ¿´¾î¿ä....±×·¡¼ ´Ù½Ã sql service ³»¸°ÈÄ X_log1.LDF¸¦ X_log.LDF ¶ó°í ´Ù½Ã À̸§ º¹±Í½ÃÄѳõ°í > > sql service ¿Ã·Á¼ È®ÀÎÇغôõ´Ï ¾ÆÁ÷µµ ±×·¡·Î ÇØ´ç DataBase°¡ ÁÖÀÇ´ë»óÀ̶ó ¶ß³×¿ä > > ¾î¶»ÇÏ¸é µÇ³ª¿ä?.... > > > µµ¿ÍÁÖ¼¼¿ä~~~ |
||
÷ºÎ ÆÄÀÏ : selog.txt ÆÄÀÏ ±¸ºÐ : sql ÆÄÀÏ Å©±â : 53 ÀÛ¼º ³¯Â¥ : 2007-11-26 |
||