SQL Server Performance

MS Sql Database is not responding in random manner

Discussion in 'ALL SQL SERVER QUESTIONS' started by Prashant Baranwal, Aug 11, 2012.

  1. Prashant Baranwal New Member

    I've created a database in MS-SQL and used it in my application.
    But sometimes it doesn't responds randomly and throws an exception System.Data.DataRowView' does not contain a property with the name 'service_name' while the column is in my table.
    Later on I've been dropped that DB and again created a new DB with new name but the problem remain persist.
    But this issue has not been occurred with the other existing DBs.

    I'm using this connection string:
    <add name="testCon" connectionString="Data Source=Comp1;Initial Catalog=TestDB;Persist Security Info=True;User ID=test;Password=test;" providerName="System.Data.SqlClient"/>

    and using this command on code behind
    "select t.id, t.service_name from dbo.[Table_Name] t"
    By using this command I'm filling a Drop Down-List and above prob raises.

    This works properly on SQL but occurred at front-end

    Please provide some proper solution ASAP.
    Thanks in advance.
  2. Shehap MVP, MCTS, MCITP SQL Server

    It sounds like some security issue for the credential "test" that it hasn'tread privileges on this table exists inside this DB ..Kindly check it and let me know your feedback
  3. Prashant Baranwal New Member

    their is no any credential issue because the problem raises in random manner.
    Means it works fine for 3-4 hours and suddenly stop working for 25-30 min.
    Here is sample code:

    SqlDataAdapter da = new SqlDataAdapter("select t.id, t.service_name from  dbo.[Table_Name] t", testCon);
    DataTable dtt = new DataTable();
    if (dtt.Rows.Count > 0)
      ddl1_sel.DataSource = dtt.DefaultView;
      ddl1_sel.DataTextField = "service_name";
      ddl1_sel.DataValueField = "id";
      ddl1_sel.Items.Insert(0, new ListItem("Select Service", "0"));
    I've rechecked the code several times, but found no syntax and logical error.

    you can see a discussion thread at
  4. Shehap MVP, MCTS, MCITP SQL Server

    If we have picked out all assumptions relevant to .net aspect, we can generally follow up a list of DB checks by these time slots having such incidents

    You can check my blog at http://www.sqlserver-performance-tuning.com/apps/blog/show/13109729-main-db-checks-for-dba to get the main list of DB checks you should have to once a DB incident is suspected there , I do think lots of clues can be found there that might help you identifying the root reason…

    If nothing found on DB regard, I can expect something else within either Network or APP Server itself (such as NIC ,Firewall access issue )

    Kindly let me if any furhter help is needed

Share This Page