2006년 9월 27일 수요일

MSSQL 로그파일 지우는 방법

backup log testDB with no_log

-> 로그를 백업하되 로그 없애는 옵션

 

dbcc shrinkfile(testdb_log, 100)
-> dbcc 명령으로 로그파일 점유 사이즈를 100까지 줄임

 

<기본은 이것>

USE Master
GO
BACKUP LOG "DB 이름" WITH TRUNCATE_ONLY

USE 디비명
DBCC SHRINKFILE("log 파일이름",100)

트렁캣? 로그를 먼저 정리한 후 점유 사이즈를 줄인다. 이게 기본인 듯 하다.

 

no_log는 싹 지우는 모양이고.


출처 : http://blog.naver.com/abg1026/8560842

2006년 9월 7일 목요일

BindingContext


좀 더 유연한 DataBinding 을 위해 꼭(!) 알아두어야할 클래스.

 

- BindingContext

 

- BindingManagerBase

 

  - BindingManagerBase this[object] : 복합바인딩

 

  - BindingManagerBase this[object, string] : 단순바인딩

 

  - CurrencyManager

 

  - PropertyManager

 

 

- 2개의 DataGrid에서 DataSource를 공유하며 현재 Postion은 개별적으로 가져갈 수 있다.

   BindingContext는 기본적으로 Form의 BindingContext를 사용하며 각 컨트롤들은 이를

   가리키고 있다.

 

   dataGrid1.DataSource = ds.Tables[0];

   dataGrid2.DataSource = ds.Tables[0];

   dataGrid2.BindingContext = new BindingContext();


출처 : http://blog.naver.com/ansysda/8962374