Tuesday, August 4, 2015

How to solve log4net not writing into database problem

log4net not writing into database problem
Turn on debug, no problem found. At last, change bufferSize from 400 to 1
<bufferSize value="1" />
Everything is working fine.


References:
http://stackoverflow.com/questions/756125/how-to-track-down-log4net-problems

Thursday, July 30, 2015

How to compare two tables schema by SQL query in MS SQL?

How to compare two tables schema  by SQL query in MS SQL?
SELECT name,system_type_id,user_type_id,max_length,precision,scale,collation_name,is_nullable into #Tablescehma1
FROM sys.columns WHERE object_id = OBJECT_ID('TABLE1')

SELECT name,system_type_id,user_type_id,max_length,precision,scale,collation_name,is_nullable into #Tablescehma2
FROM sys.columns WHERE object_id = OBJECT_ID('TABLE2')

select * from #Tablescehma1
except
select * from #Tablescehma2