1
Answer

How Manage 2 Crores of data in MS-SQL

Pandiyan T

Pandiyan T

8y
234
1
Dear All,
 
I need solution for manage 2 Crores of data in MS-SQL 2008(standard edition).
 
1.Every day average of 20,000 rows inserted into specified table.
2.I need to check 2 years of data  to avoid duplicate data.
3.Get report based on selected date range.
 
How can i split SQL table and manage 2 years data
Please let me know i'm in critical condition.
 
 
 
Answers (1)
0
Mihai si atat

Mihai si atat

NA 21 0 19y
  Here are some useful links:

http://samples.gotdotnet.com/quickstart/aspplus/doc/webdataaccess.aspx.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/adon_wtaccessdb.asp.


/*for accesing a MS ACCESS Database*/
string strParameters = @Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\db\elearning.mdb;User Id=admin;Password=;
OleDbConnection oleConn = new OleDbConnection(strParameters);
OleDbCommand comGet = new OleDbCommand("SELECT * FROM Questions WHERE CourseID='" + CourseID + "'", oleConn);

oleConn.Open();
try
{
    OleDbDataReader dr = comGet.ExecuteReader(); //for reading the database
        while(dr.Read()) // returneaza false daca nu mai sunt inregistrari de citit
    {
          Response.Write(dr[0].ToString()); 
          int varsta = (int)dr["Varsta"]; 
    }
}
finally
{
    oleConn.Close();
}

/*for inserting data into a database*/
OleDbCommand com = new OleDbCommand("INSERT INTO Marks (SignInID, LessonID, PostedHomework) Values('" + SignInID + "','" + ID + "','1')", oleDbConn);

try
{
      oleDbConn.Open();
      com.ExecuteNonQuery();
}
catch(OleDbException)
{
           return "Could not mark the homework!!!";
}
finally
{
            oleDbConn.Close();
}



/* for accessing a Sql Server database */
string strParameters = @Data Source=Alex;Initial Catalog=elearning;User Id=sa;Password=parolasa;
SqlConnection sqlConn = new SqlConnection(strParameters);