HOME

Saturday, July 14, 2012

How to host WCF Service in IIS

The maximum array length quota (16384) has been exceeded while reading XML data.


    <bindings>
      <basicHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>        
        </binding>          
      </basicHttpBinding>    
    </bindings>

how find SQL SERVER 2005 statistics and perfomance


SELECT *
FROM sys.dm_exec_query_stats AS qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st ORDER BY total_logical_reads DESC;

The remote server returned an unexpected response: (400) Bad Request WCF

    <bindings>
      <basicHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>      
        </binding>          
      </basicHttpBinding>    
    </bindings>

Monday, July 2, 2012

How to List All Tables and Their Rowcount in SQL Server


SELECT '[' + SCHEMA_NAME(t.schema_id) + '].[' + t.name + ']' AS fulltable_name, SCHEMA_NAME(t.schema_id) AS schema_name, t.name AS table_name,
i.rows
FROM sys.tables AS t INNER JOIN
sys.sysindexes AS i ON t.object_id = i.id AND i.indid < 2

Monday, June 4, 2012

Reset to default Settings IN visual studio 2010


  1. On the Tools menu, click Import and Export Settings.
  2. On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.
  3. If you want to save your current settings combination, click Yes, save my current settings, specify a file name, and then click Next.
    —or—
    If you want to delete your current settings combination, choose No, just reset settings, overwriting my current settings, and then click Next. This option does not delete default settings, which will still be available the next time you use the wizard.
  4. In Which collection of settings do you want to reset to, select a settings collection from the list.
  5. Click Finish.
    The Reset Complete page alerts you to any problems encountered during the reset.

Friday, June 1, 2012

Update query with join(2 or more tables)


update b
set b.stock=a.openbal
from tbl_RMOpenBal a,tbl_Materialtypes b
where a.materialname=b.materialname and month(date)=month(getdate()) and year(date)=year(getdate())