DataSource Controls :: Bad Sql Server Sessionstate Affect Other Databases?
Feb 4, 2010
We have a webfarm using a SQL Server 2000 database to store our session state.
On the same SQL server are our databases for the rest of the websites. The databases are separate but on the same server.
Recently I found that one of our developers is using the session very inefficiently. He is storing large datatables within the session for users when he could accomplish the same thing through other methods.
Can this inefficient use of the session state (when stored in SQL Server) affect the performance of our main database when they are on the same server?
The answer seems to be yes, to some degree. However, I cannot find any documentation to back me up.
I have a dataset that comprises of multiple tables (about 20) linked together with constraints to reflect the relational database. My question(s):
1) Will having multiple tables affect performance? I'm asking this as there are often times I would not need to get data for all the tables, but only for specific tables.
2) If it does affect performance, would breaking up the tables into their own datasets be the best solution. It seems to me that by doing that, you would lose the ability to apply constraints among tables and tables that might exist in multiple datasets will be subjected to replication.
I would like to have everything in one dataset as I get a view of the related tables and their relationships and also because the Fill method allow me to fill tables, maintaining the hierarchy of the data, but performance is still a key factor.
The functionality I want to achieve is that when isHomePageFeatured is checked then this record is set to 1 for that column and for all the other records in the table it is set to 0.
This is fine for update as I can use the property Id to compare against, but for the newly inserted record it doesn't yet have a propertyId so I wondered if using newID() to affect all other records would have the same affect.
i'm interested to do the following - i geuss, i have no option to do that:
we have our "mainapplication" on a DB; we are tracking user-login status by switching a bit in the DB in the users data row.
we hvae a second application, the backend, which is the administration tool.
(the applications are put in seperate diretories on HD)
sometimes, we need to block/ban users. in some cases the users are logged in, when we "see them in action".
i'd like to build a button in the backend-application, which logss-out the user from the mainapplication.
for sure: i can access the same DB and switch the bit to "know" he's offline, but this will not kill the session on the mainapplication.
because: if a user is on/offline is also indicated by the session in the IIS. and as the IIS-session is active, the user may be already banned - but he will not be logged out automatically (and showing something like "you have been logged out because of a ban) one option would be to call the DB by each page-load to find out, if the user is logged on.
Why am I not able to login using my login control if I set the sql server database option for Recursive Triggers Enabled to "True"? Whenever I attempt to do so, I receive an error message on attempting to login that states "Your attempt to log in was not successful..."?
in other words, what happens when I enable/disable FrontPage Server Extensions 2002? knowing that I have asp.net web apps using .NET framework 1.1 and 2.0
Would adding "X-UA-Compatible: IE=EmulateIE7" as an http header to trigger IE9 to render in compatibility mode negatively affect performance on the server? I made the change today, adding it, but now some areas of our site are behaving sluggishly, though we did have a large number of changes come in overnight. I know that we can't single out this as the problem, but my boss seems to think it is.
I have a web page with an UpdatePanel containing two GridViews and related controls. There is a Save button on the page outside the UpdatePanel. One of the event handlers for a control inside the UpdatePanel calls a method DisplaySaveButton, which is supposed to make the Save button visible or not depending on a parameter. Although DisplaySaveButton is called & executed correctly, it does not effect the visibility of the Save button.
If I remove the UpdatePanel from the form, leaving all its content behind, everything works perfectly.
how do I affect the state of a control outside the UpdatePanel?
Before I can upload my web site I need to merge my 6 small databases into one otherwise I am going to pay unreasonable hosting fees.Is there any easy way to do this?
I want to transfer data from an acces database to a sqldatabase. This is my code:
using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Data.OleDb; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class _Default : System.Web.UI.Page { #region page load protected void Page_Load(object sender, EventArgs e) { } #endregion protected void click_Transfer(object sender, EventArgs e) { OleDbConnection conn1 = null; OleDbDataAdapter da1 = null; DataSet ds1 = null; SqlConnection conn2 = null; SqlDataAdapter da2 = null; DataSet ds2 = null; // 1 Opzetten dataAdapter en dataset try { // Ophalen connectiestring en opzetten v/d connectie string connString1 = ConfigurationManager.ConnectionStrings["PrinterConnectionString"].ToString(); conn1 = new OleDbConnection(connString1); string connString2 = ConfigurationManager.ConnectionStrings["PrinterConnectionString2"].ToString(); conn2 = new SqlConnection(connString2); // Aanmaken van DataAdapters da1 = new OleDbDataAdapter(); da2 = new SqlDataAdapter(); // Opzetten SelectieCommand string sql1 = "SELECT * FROM tblPrinter"; OleDbCommand cmd1 = new OleDbCommand(sql1, conn1); SqlCommand cmd2 = new SqlCommand(sql1, conn2); da1.SelectCommand = cmd1; da2.SelectCommand = cmd2; string sql2 = @"INSERT INTO tblPrinter(PRINTER_ID, tblSoortApparaat, MERK, MODEL, LOKAAL_ID )" + @"VALUES (@id, @soort, @merk, @model, @lokaal)"; cmd2 = new SqlCommand(sql2, conn2); // InsertCommand dataAdapter cmd2.Parameters.Add("@id", SqlDbType.Int, 0, "PRINTER_ID"); cmd2.Parameters.Add("@soort", SqlDbType.NVarChar, 100, "tblSoortApparaat"); cmd2.Parameters.Add("@merk", SqlDbType.NVarChar, 100, "MERK"); cmd2.Parameters.Add("@model", SqlDbType.NVarChar, 100, "MODEL"); cmd2.Parameters.Add("@lokaal", SqlDbType.Int, 0, "LOKAAL_ID"); da2.InsertCommand = cmd2; ds1 = new DataSet(); da1.Fill(ds1, "PRINTERS"); ds2 = new DataSet(); da2.Fill(ds2, "PRINTERS2"); // Stap 2: Start bewerking!! DataTable table1 = ds1.Tables["PRINTERS"]; DataTable table2 = ds2.Tables["PRINTERS2"]; DataRow newrow = null; for (int i = 0; i < table1.Rows.Count; i++) { newrow = table2.NewRow(); newrow["PRINTER_ID"] = i + 1; newrow["tblSoortApparaat"] = table1.Columns[1].; newrow["MERK"] = table1.Columns[2].DefaultValue; newrow["MODEL"] = table1.Columns[3].DefaultValue; newrow["LOKAAL_ID"] = table1.Columns[4].DefaultValue; table2.Rows.Add(newrow); } da2.Update(ds2, "PRINTERS2"); lblMessage.Text = table1.Rows.Count.ToString() + " rijen zijn toegevoegd"; // bindgrid(); } catch (Exception ex) { lblError.Text = ex.Message; } } }
Here is my problem newrow["tblSoortApparaat"] = table1.Columns[1].; When i do that al the rows in my sql database are filt up with the columname. But i want the specik data. For example sql database:
I'm using SQL Server Management Studio Express 2005. I have a database that I'm trying to make an exact copy of under a new name. I generated a script, made a new database then ran the script on it. My problem is the new database is short two objects, it shoudl have 840, but has 838.
I need to find out which two objects are not there.
Maybe there is a way to copy the exact database under a new name? I tried to detach, copy to a new name and then attach, but that did not work.
I used the Database Publishing Wizard to create a copy of my live SQL Server database for testing purposes. Both the live and test databases are hosted by my ISP.
What is the easiest way to transfer design changes from one database to the other without altering the data (assuming that the design changes are compatible with the existing data in the target database)?
Any proposed solution would have to be available via Visual Web Developer 2008 Express or SQL Server 2008 Development Edition.
I need to query two table from different databases residing on two different servers.
Scenario:
1st Server : Abc
Database: DB1
Table: Accounts
2nd Server: Xyz
Database: DB2
Table: Clients
The common linking information between Clients and Accounts is "email_id". I'm sure a lot you are saying why am I not maintaining both tables on single server but there is a lot going on behind scenes and if I move tables, I'll have to modify many dependent web pages.
When I opened sql server configuration manager I am not able to see default databases like master etc. Does anybody know the reason? Did I miss any installation?
I have 2 databases one called DB1, and the other DB2. Both of them has exactly the same design (tables, procedures and etc..)
Now, I am using SQLMETAL to create the DataContext. problem is that there are two lines that direct to a certain database and so I cannot use the same code for both databases.
here is the code:
[Code]....
Now, What I am lookin for is a programmatically way to change this two lines (DataBaseAttribute and the connrection string) .
The easiest solution for me of course is to create the class twice, with the same code and just change manually what I need which is not what I am looking for.
There is a full discussion with microsoft stuff right here: [URL]
I would like to create a gridview where all of the items in one table are listed and a checkbox is checked if that item also shows up in another table. The difficulty comes in the fact that table are not only in different databases, but possibly on different servers.
Is there any way to do this via ASP.NET connection strings, so that it doesn't matter where the databases live? I'd rather use connection strings, because I don't want to hard-code credentials into the queries (OPENROWSET or whatnot).
I am developing a website with ASP.NET pages that uses an SQL Server database with LINQ to SQL. I am using Visual Studio's Web Developer along with SQL Server 2008 (Developer Edition) database tables on my personal PC to develop this software. When ready, I intend to transfer the compiled web pages to a web hosting service with an SQL server database that is identical to the database on my PC.
I now have a version of my website deployed on a web hosting service at: [URL] and all of my database tables duplicated at the remote SQL server. However, this version of my website does not work with the database yet. I realize that I can have the VS Server Explorer connect to both databases, but I do not know if the web pages on my PC can use both databases interactively.
I am asking how I can develop my website to use the local SQL Server database and then have the deployed pages use the remote SQL Server database with LINQ to SQL. Do I need to create one version that works with the local database and another deployable version that works with the remote database? What should I do?
I'm creating a site that will offer several different services (blogs, videos, images..), all under the same site.
Each service will use a separate database and all services must use the same membeship info. Users will only need one login to access all these services.
For the membership database i will use the default aspnetdb database.
There are two ways i can think of:
1) Use a join-query between two databases, each time i want to show some service records per user.
2) Create a custom membership-info table in each service's database, and keep it in sync with the master membership table in aspnetdb database.
I have attached two databases (from an ASP.NET application to SQL Express). They have attached fine and are working alright but what disturbs me is when I go and check it from SQL management studio, I could see those databases at attached in SQLExpress but I couldn't open it out them there. I need to update them with many records and I want to open them. Any clue what I am missing? I could have sent you the screen shot but I dont know how to attach an image in this thread.
I'm working with ASP.Net web services and am having a problem with a long-running process that takes about 5 minutes to complete, and it's timing out. To fix this, I was able to set the executionTimeout on the server's web.config to 10 minutes, and then set the .Timeout property on the Web Service object to approximately 9 minutes. Now, I'm worried that this may possibly cause some other web service calls to sit there for 10 minutes before they time out rather than the previous 90-100 seconds. I know the default on the client side is 100 seconds, but wasn't sure if updating the server's timeout setting would affect this.
Bottom line is - Is it safe to update the server's timeout setting to a long amount like 10 minutes, and rely on the default timeout on the client, or could this end up causing some problems?