1. Create database and tables2. Create stored procedure 3. Create BizTalk project 4. Create orchestration 5. Consume WCF-SQL 6. Write received data to file share
First create TESTWCFSQL database from you SQL Management studio Run the script to create table: USE TESTWCFSQLGO IF OBJECT_ID('dbo.MainData', 'U') IS NOT NULL DROP TABLE dbo.MainDataGO CREATE TABLE dbo.MainData(MainDataID int primary key identity(1,1),FirstName nvarchar(30),LastName nvarchar(30),Amount int)GO Run script in SQL management studio to create procedure IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'PollData' ) DROP PROCEDURE dbo.PollData GO CREATE PROCEDURE dbo.PollData AS select MainDataID, FirstName, LastName, Amount from dbo.MainData delete from dbo.MainData GO insert some sample lines executing use TESTWCFSQL insert into MainData (FirstName, LastName, Amount) values (N'Patrick', N'Cash', 1000), (N…
Recently faced very strange problem. Application which was working great during last two years just suddenly had timeout on one particular page. The page was always very fast and was showing just last 12 records from the table.
So I did what always was doing to check slow performing query, started SQL Profiler to trace the query. Query by itself is pretty complex and had a lot of parameters, Profiler is the best tool I think in that cases.
After I easily found long running query in Profiler I copy pasted it into SSMS and what a surprize query just run in 300ms. Meanwhile the query from UI (asp.net) was running almost 2 minutes.