locked
Out of Memory Exception. RRS feed

  • Question

  • Hi,

    i am facing out of memory exception when i am dealing with heavy data (3 Lacs) . i am trying to fetching lacs of records from data base and all those data are put in session after that i am doing some operation.

    It works fine when i am getting thousands of records but when my data is above lacs then i am getting out of memory exception (my application is used frequently by users).

    Can any one suggest me any solution or any other best way to deal with heavy data load.

    My Server configuration is 16GB RAM, 1TB HDD, Hexa Core processor, windows server 2008 R2  standard.

    Thanks!

     


    • Edited by sank90 Friday, March 27, 2015 9:57 AM
    Friday, March 27, 2015 9:51 AM

Answers

  • Here is the complete code.  Copy old code with lots of changes.  Could not test because I don't have access to the database.  Did my best to get the new code correct based on the working old code.

    We archive old data whenever are database gets very large and remount then on the same SQL Server.  So the code below has the option to enumerate through archive databases or run just one query.  The code opens a file with the names of the databases when enumerating.  So I end up with multiple queries.  I had the option with SQLCMD.EXE to run these queries serially or in parallel.  I chose to run them in series.  So the code opens the standard output of the SQLCMD.EXE and waits for the output of SQLCMD.EXE before continuing to indicate when each query completes.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Threading;
    using System.Diagnostics;
    using System.Data.SqlClient;
    using System.IO;
    
    namespace SQLBackgroundWorker
    {
    
        public partial class Form1 : Form
        {
            const string DEFAULT_FOLDER = @"\\temp\";
            const string DEFAULT_DATABASE_NAME = "MyDatabase";
            public Form1()
            {
                InitializeComponent();
    
                comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
    
                MultiQuery.Checked = false;
    
                List<string> hosts = Server.servers.Select(x => x.name).ToList();
                comboBox1.Items.AddRange(hosts.ToArray());
                comboBox1.SelectedItem = hosts[0];
    
                errorMessages.Multiline = true;
                errorMessages.Text = "";
    
                FolderBox.Text = DEFAULT_FOLDER;
                folderBrowserDialog1.SelectedPath = DEFAULT_FOLDER;
            }
    
            Worker worker = null;
            public StreamReader stream = null;
            TextReader fileReader = null;
    
            private void StartBackgroudWorker_Click(object sender, EventArgs e)
            {
                string folder = FolderBox.Text;
                string server = comboBox1.Text;
        
                int timeOut = int.Parse(TimeoutBox.Text);
    
                errorMessages.Text = "Query Databases Started";
                if(MultiQuery.Checked == false)
                {
                    worker = new Worker(folder, server, timeOut);
                    worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
                    worker.databaseName = DEFAULT_DATABASE_NAME;
                    errorMessages.Text += string.Format("\r\nQuery Database {0}", worker.databaseName);
    
                    worker.RunWorkerAsync();
                }
                //file that contains multiple database names to query
                string filename = InputFilename.Text;
                FileInfo file = new FileInfo(filename);
                if (file.Exists)
                {
                    stream = new StreamReader(filename);
                    fileReader = stream;
    
                    State state = new State();
                    state.folder = folder;
                    state.server = server;
                    state.timeOut = timeOut;
                    this.StartWorker += new StartWorkerEventHandler(Form1_StartWorker);
                    Form1_StartWorker(this, new StartWorkerEventArgs() { state = state });
                }
                else
                {
                    //file doesn't exist
                }
    
            }
            //create event handler to prevent cross thread
            public class StartWorkerEventArgs : EventArgs
            {
                public State state { get; set; }
            }
    
            public event StartWorkerEventHandler StartWorker;
            public delegate void StartWorkerEventHandler(object sender, StartWorkerEventArgs e);
    
            //used only for multi query
            //reads database name each time a new query is started.
            public void Form1_StartWorker(object sender, StartWorkerEventArgs e)
            {
                string inputLine = "";
    
                if (!stream.EndOfStream)
                {
                    worker = new Worker(e.state.folder, e.state.server, e.state.timeOut);
                    inputLine = fileReader.ReadLine();
                    worker.databaseName = inputLine.Trim();
                    Report report = new Report();
                    report.type = ReportType.FILENAME;
                    report.message = string.Format("\r\nQuery Database {0}", worker.databaseName);
    
                    worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
                    worker.ReportProgress(3, report);
    
                    worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
                    worker.RunWorkerAsync();
                }
                else
                {
                    stream.Close();
                    stream.Dispose();
                }
            }
    
            public class State
            {
                public string folder { get; set; }
                public string server {get; set; }
                public int timeOut { get; set; }
            }
            private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
            {
                Worker oldworker = sender as Worker;
                State state = new State();
                state.folder = oldworker.folder;
                state.server = oldworker.server;
                state.timeOut = oldworker.timeOut;
    
                oldworker.ProgressChanged -= worker_ProgressChanged;
                oldworker.CancelAsync();
    
                if (!stream.EndOfStream)
                {
                    Form1_StartWorker(this, new StartWorkerEventArgs() { state = state });
                }
                else
                {
                    stream.Close();
                    stream.Dispose();
                }
            }
    
            public void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
            {
                Report report = e.UserState as Report;
                switch (report.type)
                {
                    case ReportType.QUERY_Number :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            QueryNumberLabel.Text = report.queryNumber.ToString();
                            TotalNumberQueriesLabel.Text = report.numberOfQueries.ToString();
                        });
                        break;
    
                    case ReportType.FILENAME :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            this.errorMessages.Text += report.message;
                        });
                        break;
                    case ReportType.COMPLETE :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            this.errorMessages.Text += "\r\nQuery Completed";
                        });
                        break;
                }
            }
    
            private void ChangeFolder_Click(object sender, EventArgs e)
            {
                folderBrowserDialog1.Description = "Select Folder";
                DialogResult result = folderBrowserDialog1.ShowDialog();
                string folder = folderBrowserDialog1.SelectedPath;
                folder += @"\";
                FolderBox.Text = folder;
            }
    
            private void ChangeFilename_Click(object sender, EventArgs e)
            {
                if (FolderBox.Text.Length > 0)
                {
                    if (Directory.Exists(FolderBox.Text))
                    {
                        openFileDialog1.InitialDirectory = FolderBox.Text;
                    }
                    DialogResult result = openFileDialog1.ShowDialog();
    
                    if (result == DialogResult.OK)
                    {
                        InputFilename.Text = openFileDialog1.FileName;
                        MultiQuery.Checked = true;
                    }
                }
            }
     
        }
    
        public enum ReportType
        {
            QUERY_Number,
            FILENAME,
            COMPLETE
        }
        public class Report
        {
            public ReportType type;
            public int queryNumber = 0;
            public int numberOfQueries = 0;
            public string message;
        }
        public class Worker : BackgroundWorker
        {
            const int BUFFER_SIZE = 100;
            public string folder { get; set; }
            public string filename { get; set; }
    
            static AutoResetEvent autoEvent = new AutoResetEvent(false);
    
            public string server { get; set; }
            public string instance { get; set; }
            public string databaseName { get; set; }
            public int timeOut { get; set; }
    
    
            public Worker(string folder, string server, int timeOut)
            {
                this.filename = databaseName + ".csv";
                this.WorkerReportsProgress = true;
                this.WorkerSupportsCancellation = true;
                this.folder = folder;
                this.server = server;
                string instance = Server.servers.Where(x => x.name == server).Select(yield => yield.instance).FirstOrDefault();
                this.instance = instance;
                this.timeOut = timeOut;
                this.DoWork += new DoWorkEventHandler(worker_DoWork);
            }
            public void worker_DoWork(object sendder, DoWorkEventArgs e)
            {
                Report report = null;
                int numberOfQueries = 0;
    
                string strSQL = string.Format(
                    "Use {0}" +
                    " Select * from table1",
                    databaseName);
    
                report = new Report();
                report.type = ReportType.QUERY_Number;
                report.numberOfQueries = numberOfQueries;
                this.ReportProgress(2, report);
    
                string commandArgs = string.Format("-S \"{0}\\{1}\" -E -d {2} -s\",\" -W -h-1 -q \"{3}\" -o \"{4}\"",
                    server,
                    instance,
                    databaseName,
                    strSQL,
                    folder + filename
                    );
    
                Process process = new Process();
                process.StartInfo.FileName = "sqlcmd.exe";
                process.StartInfo.Arguments = commandArgs;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.UseShellExecute = false;
                
                autoEvent.Reset();
    
                process.Start();
    
                StreamReader reader = process.StandardOutput;
    
                byte[] inbuffer = new byte[BUFFER_SIZE];
                reader.BaseStream.BeginRead(inbuffer, 0, BUFFER_SIZE, new AsyncCallback(Read_Callback),reader);
    
                autoEvent.WaitOne();
                reader.Close();
                reader.Dispose();
                process.Close();
                process.Dispose();
    
                report = new Report();
                report.type = ReportType.COMPLETE;
                this.ReportProgress(3, report);
            }
            private void Read_Callback(IAsyncResult ar)
            {
                StreamReader reader = ar.AsyncState as StreamReader;
                if(reader != null)
                {
                    int bytesAvail = reader.Read();
                }
                autoEvent.Set();
            }
    
        }
    
        public class Server
        {
            public static List<Server> servers = new List<Server>(){
                new Server {name = "Server1", instance = "SQLExpress"},
                new Server {name = "Server2", instance = "SQLExpress"},
                new Server {name = "Server3", instance = "SQLStandard"},
                new Server {name = "Server4", instance = "SQLStandard"},
                new Server {name = "Server5", instance = "SQLStandard"},
                new Server {name = "Server6", instance = "SQLStandard"}
            };
            public string name {get;set;}
            public string instance {get;set;}
        }
    
      
    }
    


    jdweng

    • Marked as answer by Kristin Xie Wednesday, April 8, 2015 2:48 AM
    Saturday, March 28, 2015 11:15 AM

All replies

  • If you are using SQL Server look into SQLCMD.EXE which comes with the database.  You can write a batch command that outputs the results of the query into a file.  SQLCMD.EXE is designed to achieve a very large database so you don't get a memory exception.

    From VS I have one application that I call SQLCMD.EXE from a shell command which creates a CSV file.  Then I read the CSV file into my VS application.  You can use a streamreader to read the CSV file which won't open the entire file at one time so you don't get an out of memory exception.


    jdweng

    Friday, March 27, 2015 10:03 AM
  • Hi Joel,

    Thanks for your reply, Let me check with your solution and i will let you know if i am getting any problem.

    Thanks

    Friday, March 27, 2015 10:10 AM
  • Try creating a .bat file with the command to verify that it works. You can create the .bat with notepad as a quick test. Then build it into your VS application.

    jdweng

    Friday, March 27, 2015 10:25 AM
  • If the problem is on your server, take care not to keep connections unnecessarily open.

    If the problem is on your client take a look if you did not create a kind of X86 (32bits) program.


    Success
    Cor

    Friday, March 27, 2015 10:27 AM
  • Hi Joel,

    I tried with your suggestion but i didn't find any way to write a csv file using sql cmd prompt. So can you please provide me any sample code so that it will help me to understand the SQLCMD.EXE implementation process.

    Thanks!!

      

    Friday, March 27, 2015 10:37 AM
  • SQLCMD.EXE will run much quicker than a query from VS since the Server doesn't have to Serialize the Data and VS doesn't have to Deserialize the Data.

    Try this

    SQLCMD.EXE -S "MyServer\SQLSTANDARD" -E 0d database)name -s"," -w -h-1 -q "Use database_name Select * from table1" -o "Filename.csv"


    jdweng

    Friday, March 27, 2015 11:16 AM
  • Hi Cor,

    There is no issue with unnecessarily connection open.

    i have two screen which deals with heavy data load and if 10 user access those page then out of memory exception will occurs.

    Please share your valuable suggestion.

    Thanks!!! 

    Friday, March 27, 2015 12:02 PM
  • Hi Joel,

    We are creating dynamic query at run time and also there is sql function which helps for creating dynamic query and selecting the sql data. so can you please let me know how can i implement this. 

    Friday, March 27, 2015 12:09 PM
  • SQL Server comes with SQL Server Management Studio that can be installed on any PC so you can remotely connect to the SQL Server. 

    Do you have an application on the server the is processing the Clients (users) queries?  Maybe you want to remotely run the queries on the client PCs.  You can setup a SQL Database using Windows Credentials so clients can use the database securely.


    jdweng

    Friday, March 27, 2015 12:10 PM
  • I have a form application where I do something similar.  The code is propriety so I have to make it generic before I can post.  Below is part of the code.  I found SQLCMD.EXE locks up the form so I had to run code below from a backgroundworker.  I will work on making my code generic over the weekend if I have time and post.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    
    namespace ConsoleApplication11
    {
        class Program
        {
            static void Main(string[] args)
            {
                string databaseName = "MydataBase";
                string strSQL = string.Format("Use [{0}" +
                    " Select *" +
                    " From Table1", databaseName);
    
                string server = "Server";
                string instance = "SQLStandard";
                string folder = @"c:\temp\";
                string filename = "filename.csv";
                string commandArgs = string.Format("-S \"{0}\\{1}\" -E -d {2} -s\",\" -W -h-1 -q \"{3}\" -o \"{4}\"",
                    server,
                    instance,
                    databaseName,
                    strSQL,
                    folder + filename);
                Process process = new Process();
                process.StartInfo.FileName = "sqlcmd.exe";
                process.StartInfo.Arguments = commandArgs;
                process.StartInfo.UseShellExecute = false;
                process.Start();
            }
        }
    }
    


    jdweng

    Friday, March 27, 2015 12:40 PM
  • Hi joel,

    Thanks for the script, this will work for me and this is new for me :).

    My question is i am fetching lacs of data from data base and saving those data in asp.net session and after that performing some calculation and logical operation. Also we have multiple record set in single stored procedure. We have big application in terms of data and source code. i thing we fetching heavy data and creating the object of those data set that's why our application performance is hampers and we are getting out of memory exception.  

    So can you please let me the whether my process of saving heavy data in asp.net session is correct or not if not then please let me know any best solution for this.

    Hope above will clear the scenario .

    Thanks!!

    Friday, March 27, 2015 1:58 PM
  • The SQL server is better designed to handle large amount of data and processing than an asp.net application. It is better to design your queries to extract small blocks of data from database than huge amount of data. Querying by time stamp will retrieve smaller amount of data. If you really need the huge amount of data I would recommend saving the data as an XML file or in a binary format to make it easier to retrieve the data locally. The is code that you can find on the Net to query huge XML files. But that is really what a database is designed to due.

    With databases it is important to design the database properly to handle the amount of data, size of data, and number of users.  Bad designs gives poor performance.

    Is the out of memory exception cause by the SQL Server software or the VS application?  Do you have memory leaks in the VS application?  Are you running SQL Standard or SQL Express?  What version of Windows are you running?


    jdweng

    Friday, March 27, 2015 2:14 PM
  • Here is the complete code.  Copy old code with lots of changes.  Could not test because I don't have access to the database.  Did my best to get the new code correct based on the working old code.

    We archive old data whenever are database gets very large and remount then on the same SQL Server.  So the code below has the option to enumerate through archive databases or run just one query.  The code opens a file with the names of the databases when enumerating.  So I end up with multiple queries.  I had the option with SQLCMD.EXE to run these queries serially or in parallel.  I chose to run them in series.  So the code opens the standard output of the SQLCMD.EXE and waits for the output of SQLCMD.EXE before continuing to indicate when each query completes.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Threading;
    using System.Diagnostics;
    using System.Data.SqlClient;
    using System.IO;
    
    namespace SQLBackgroundWorker
    {
    
        public partial class Form1 : Form
        {
            const string DEFAULT_FOLDER = @"\\temp\";
            const string DEFAULT_DATABASE_NAME = "MyDatabase";
            public Form1()
            {
                InitializeComponent();
    
                comboBox1.DropDownStyle = ComboBoxStyle.DropDown;
    
                MultiQuery.Checked = false;
    
                List<string> hosts = Server.servers.Select(x => x.name).ToList();
                comboBox1.Items.AddRange(hosts.ToArray());
                comboBox1.SelectedItem = hosts[0];
    
                errorMessages.Multiline = true;
                errorMessages.Text = "";
    
                FolderBox.Text = DEFAULT_FOLDER;
                folderBrowserDialog1.SelectedPath = DEFAULT_FOLDER;
            }
    
            Worker worker = null;
            public StreamReader stream = null;
            TextReader fileReader = null;
    
            private void StartBackgroudWorker_Click(object sender, EventArgs e)
            {
                string folder = FolderBox.Text;
                string server = comboBox1.Text;
        
                int timeOut = int.Parse(TimeoutBox.Text);
    
                errorMessages.Text = "Query Databases Started";
                if(MultiQuery.Checked == false)
                {
                    worker = new Worker(folder, server, timeOut);
                    worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
                    worker.databaseName = DEFAULT_DATABASE_NAME;
                    errorMessages.Text += string.Format("\r\nQuery Database {0}", worker.databaseName);
    
                    worker.RunWorkerAsync();
                }
                //file that contains multiple database names to query
                string filename = InputFilename.Text;
                FileInfo file = new FileInfo(filename);
                if (file.Exists)
                {
                    stream = new StreamReader(filename);
                    fileReader = stream;
    
                    State state = new State();
                    state.folder = folder;
                    state.server = server;
                    state.timeOut = timeOut;
                    this.StartWorker += new StartWorkerEventHandler(Form1_StartWorker);
                    Form1_StartWorker(this, new StartWorkerEventArgs() { state = state });
                }
                else
                {
                    //file doesn't exist
                }
    
            }
            //create event handler to prevent cross thread
            public class StartWorkerEventArgs : EventArgs
            {
                public State state { get; set; }
            }
    
            public event StartWorkerEventHandler StartWorker;
            public delegate void StartWorkerEventHandler(object sender, StartWorkerEventArgs e);
    
            //used only for multi query
            //reads database name each time a new query is started.
            public void Form1_StartWorker(object sender, StartWorkerEventArgs e)
            {
                string inputLine = "";
    
                if (!stream.EndOfStream)
                {
                    worker = new Worker(e.state.folder, e.state.server, e.state.timeOut);
                    inputLine = fileReader.ReadLine();
                    worker.databaseName = inputLine.Trim();
                    Report report = new Report();
                    report.type = ReportType.FILENAME;
                    report.message = string.Format("\r\nQuery Database {0}", worker.databaseName);
    
                    worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
                    worker.ReportProgress(3, report);
    
                    worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
                    worker.RunWorkerAsync();
                }
                else
                {
                    stream.Close();
                    stream.Dispose();
                }
            }
    
            public class State
            {
                public string folder { get; set; }
                public string server {get; set; }
                public int timeOut { get; set; }
            }
            private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
            {
                Worker oldworker = sender as Worker;
                State state = new State();
                state.folder = oldworker.folder;
                state.server = oldworker.server;
                state.timeOut = oldworker.timeOut;
    
                oldworker.ProgressChanged -= worker_ProgressChanged;
                oldworker.CancelAsync();
    
                if (!stream.EndOfStream)
                {
                    Form1_StartWorker(this, new StartWorkerEventArgs() { state = state });
                }
                else
                {
                    stream.Close();
                    stream.Dispose();
                }
            }
    
            public void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
            {
                Report report = e.UserState as Report;
                switch (report.type)
                {
                    case ReportType.QUERY_Number :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            QueryNumberLabel.Text = report.queryNumber.ToString();
                            TotalNumberQueriesLabel.Text = report.numberOfQueries.ToString();
                        });
                        break;
    
                    case ReportType.FILENAME :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            this.errorMessages.Text += report.message;
                        });
                        break;
                    case ReportType.COMPLETE :
                        BeginInvoke((MethodInvoker)delegate
                        {
                            this.errorMessages.Text += "\r\nQuery Completed";
                        });
                        break;
                }
            }
    
            private void ChangeFolder_Click(object sender, EventArgs e)
            {
                folderBrowserDialog1.Description = "Select Folder";
                DialogResult result = folderBrowserDialog1.ShowDialog();
                string folder = folderBrowserDialog1.SelectedPath;
                folder += @"\";
                FolderBox.Text = folder;
            }
    
            private void ChangeFilename_Click(object sender, EventArgs e)
            {
                if (FolderBox.Text.Length > 0)
                {
                    if (Directory.Exists(FolderBox.Text))
                    {
                        openFileDialog1.InitialDirectory = FolderBox.Text;
                    }
                    DialogResult result = openFileDialog1.ShowDialog();
    
                    if (result == DialogResult.OK)
                    {
                        InputFilename.Text = openFileDialog1.FileName;
                        MultiQuery.Checked = true;
                    }
                }
            }
     
        }
    
        public enum ReportType
        {
            QUERY_Number,
            FILENAME,
            COMPLETE
        }
        public class Report
        {
            public ReportType type;
            public int queryNumber = 0;
            public int numberOfQueries = 0;
            public string message;
        }
        public class Worker : BackgroundWorker
        {
            const int BUFFER_SIZE = 100;
            public string folder { get; set; }
            public string filename { get; set; }
    
            static AutoResetEvent autoEvent = new AutoResetEvent(false);
    
            public string server { get; set; }
            public string instance { get; set; }
            public string databaseName { get; set; }
            public int timeOut { get; set; }
    
    
            public Worker(string folder, string server, int timeOut)
            {
                this.filename = databaseName + ".csv";
                this.WorkerReportsProgress = true;
                this.WorkerSupportsCancellation = true;
                this.folder = folder;
                this.server = server;
                string instance = Server.servers.Where(x => x.name == server).Select(yield => yield.instance).FirstOrDefault();
                this.instance = instance;
                this.timeOut = timeOut;
                this.DoWork += new DoWorkEventHandler(worker_DoWork);
            }
            public void worker_DoWork(object sendder, DoWorkEventArgs e)
            {
                Report report = null;
                int numberOfQueries = 0;
    
                string strSQL = string.Format(
                    "Use {0}" +
                    " Select * from table1",
                    databaseName);
    
                report = new Report();
                report.type = ReportType.QUERY_Number;
                report.numberOfQueries = numberOfQueries;
                this.ReportProgress(2, report);
    
                string commandArgs = string.Format("-S \"{0}\\{1}\" -E -d {2} -s\",\" -W -h-1 -q \"{3}\" -o \"{4}\"",
                    server,
                    instance,
                    databaseName,
                    strSQL,
                    folder + filename
                    );
    
                Process process = new Process();
                process.StartInfo.FileName = "sqlcmd.exe";
                process.StartInfo.Arguments = commandArgs;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.UseShellExecute = false;
                
                autoEvent.Reset();
    
                process.Start();
    
                StreamReader reader = process.StandardOutput;
    
                byte[] inbuffer = new byte[BUFFER_SIZE];
                reader.BaseStream.BeginRead(inbuffer, 0, BUFFER_SIZE, new AsyncCallback(Read_Callback),reader);
    
                autoEvent.WaitOne();
                reader.Close();
                reader.Dispose();
                process.Close();
                process.Dispose();
    
                report = new Report();
                report.type = ReportType.COMPLETE;
                this.ReportProgress(3, report);
            }
            private void Read_Callback(IAsyncResult ar)
            {
                StreamReader reader = ar.AsyncState as StreamReader;
                if(reader != null)
                {
                    int bytesAvail = reader.Read();
                }
                autoEvent.Set();
            }
    
        }
    
        public class Server
        {
            public static List<Server> servers = new List<Server>(){
                new Server {name = "Server1", instance = "SQLExpress"},
                new Server {name = "Server2", instance = "SQLExpress"},
                new Server {name = "Server3", instance = "SQLStandard"},
                new Server {name = "Server4", instance = "SQLStandard"},
                new Server {name = "Server5", instance = "SQLStandard"},
                new Server {name = "Server6", instance = "SQLStandard"}
            };
            public string name {get;set;}
            public string instance {get;set;}
        }
    
      
    }
    


    jdweng

    • Marked as answer by Kristin Xie Wednesday, April 8, 2015 2:48 AM
    Saturday, March 28, 2015 11:15 AM
  • Hi Shashank,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of Joel's suggestions? 

    I temporarily mark Joel's last response as an answer. You can unmark it if they provide no help.


    Best regards&&Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Kristin Xie Wednesday, April 8, 2015 2:48 AM
    Tuesday, April 7, 2015 12:28 PM