LINQ To SQL Slow on Windows Server 2008 R2 - linq

We just moved one of our .Net applications from a Windows 2003 Server to a virtual Windows Server 2008 R2 (64Bit, VMWare).
This application is a simple console application running on .Net Framework 4.0, 32Bit, that runs different jobs to select, modify and save business data to a database. For the database we use SQL 2008 R2.
Since we run the application on the Windows Server 2008 R2 we recognized, that the execution of Select-Statements with LINQ to SQL are slower than on the Windows Server 2003 we used before. We checked it with a simple LINQ Query, and that tooks about 500 milliseconds longer on Win 2008.
We use the System.Data.Linq.DataContext and get Objects from the Database with the Method GetTable<>().
To compare the duration we took the time from creating the datacontext until the mapping from the DB-Objects back to the .Net-Objects in the application.
See the code:
System.Data.IDbConnection testConnection;
System.Data.Linq.Mapping.MappingSource testMappingSource;
...
...
using (System.Data.Linq.DataContext dc = new System.Data.Linq.DataContext(testConnection, testMappingSource))
{
dc.DeferredLoadingEnabled = false;
return = (from dbObject in dc.GetTable<TestTable>()
select dbObject).FirstOrDefault();
}
On the Windows 2008 R2 Server, the .Net Framework 4.0 is installed, and in the server features the .Net Framework 3.5.1 Features are enabled.
The application was installed on three different stages (Dev, Test, Production) on three Windows 2003 Server. Now it runs on three virtual Windows 2008 R2 Server. We have the same Problem on all three Windows 2008 R2 Server. And we even tested it on a physical Windows 2008 R2 Server; same Problem there.
Has anyone an idea what causes this difference? And what may be a solution to resolve this problem?
Thanks a lot in advance!
Greets
Tom

Related

Windows API BackupRead failing with error 50 on Windows Storage Server 2008 R2

We have a backup application that uses the Windows API BackupRead. It works correctly on Windows Server 2003, 2008, 2008 R2. It does not work on Storage Server 2008 R2. It always fails with error 50 - The request is not supported. The documentation for BackupRead gives no indication that it will not work with Storage Server 2008 R2.
Anyone else have any experience using this API on Storage Server 2008 R2? Did you need to make any changes to your use of the API in order for it to work?
Known problem between Windows 2008 and non-2008 volumes. Hot fix resolves it.

Getting BIDS 2008 R2 to connect to Oracle using MSDAORA on Windows 8

I have a new dev machine, and I need to support legacy SSIS packages. The new machine is Windows 8 64 bit with a SSD primary drive (C:) and a regular HDD for data (D:). On it, I have installed BIDS 2008 R2 (and all the tricks to get it to work with TFS2010), as well as VS2010, ODAC 32 bit and 64 bit (I think??), Oracle Client (SQLDeveloper).
I can get the following to connect just fine to an Oracle database:
VS2010 with MSDAORA
VS2010 with ODAC
VS2010 with ADO.NET
Test connection using .udl file with Oracle OLE DB Provider (MS provider does not show up as an option here)
SQLDeveloper (Oracle's Client Tool)
What I CAN'T seem to do is get BIDS 2008 R2 to connect to Oracle using ANY method (MSDAORA, ADO.NET, ODAC).
The problem seems isolated to my machine, I can otherwise open, view, validate, connect and run these packages on other machines with no issues.
I have tried the following:
Ensured any/all TNSNAMES files are correct and identical (taking working copies from other machines, and let's not forget, this works fine in VS2010)
Created ORACLE_HOME and TNS_ADMIN Environment Variables and pointed them to various directories within D:\app\username\product\11.2.0
Checked registry manually to make sure no other references to ORACLE except for the entries in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
Unistalled/Reinstalled SQL Server 2008 R2 components
Every "solution" offered in every thread in every search I have tried
Thrown chicken bones and offered sacrifices to pagan deities
After each attempt at a fix, I still get the following error when trying to Preview a SQL Command in the Data Flow:
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Error while trying to retrieve text for error ORA-01019"
Yes, I know I need to drop MSDAORA in favor of ODAC, and if ODAC worked in BIDS 2008 R2 I would certainly do it. However, I can't get anything to connect to Oracle there (even though, as mentioned above, it connects fine in various other tools)
I have two "client_n" directories in D:\app\username\product\11.2.0. As mentioned, I have tried pointing my environment variables to various paths inside. It seems like the correct path for ORACLE_HOME should be just D:\app\username\product\11.2.0, correct?
Has anyone had any luck getting BIDS 2008 R2 to connect to Oracle while on WINDOWS 8 with VS2010 also installed? It seems to me like it's a simple Oracle connection issue, I just don't know enough about Oracle to troubleshoot.
Any other ideas to try?
BIDS is x32 (even on an x64 machine), so you will need to install the Oracle Client x32 edition, Full Install.
We were able to get it to work, though I believe that we installed too much software. (I have not been able to test it with only the ODAC drivers.)
Install the Oracle Client 32 & 64-bit drivers.
Install the Oracle ODAC 32 & 64-bit drivers.
In BIDS use the native Oracle connection, and not the Microsoft driver.

Deployment error in WIndows XP [ERROR: SQL Server Database is not installed or not running]

I have developed a POS System Recently and workin on its deployment.
Application Specifications:
The application is basically a POS system.
Back end = SQL Server 2008 Express R2.
Front End = C#
I also used SMO libraries.
Deployment Method = Click-once.
Target Framework = 4.0.
Development Tool = Visual Studio 2012 RC.
OS = Windows 7 Home Premium.
Used some SQL feature packs like Shared management Objects, CLR types. and others.
The prerequisites are selected and i packaged them also.
In brand new windows 7 the installation was fine. and application is running upto date.
In win XP the installation is fine. but when i start the app. it colses with this error.
SQL Server database is not installed and or not running.
and application quits.
IMPORTNAT NOTE:
THE 'WINDOWS XP SP3 PROFESSIONAL'
ON WHICH I AM TESTING IS INSTALLED ON VIRTUAL MACHINE
In the code i am running some SMO library functions in order to install *.sql script for the application's first time use.
SQL Server 2008 R2 is installed with all of its dependencies. and other feature packs. All the prerequisites are installed on XP.
Can you run SQLServer Management Studio on the XP VM and see SQLServer? If you run the SQLServer Configuration Manager on the VM, and click on SQL Server Services, does it show the service is running?
How do you have the connections configured? Do you have named pipes and TCP/IP enabled for the SQLServer Network configuration? What about the SQL Native Client configuration?
Do you have SQLServer Express ticked as a prerequisite in the ClickOnce deployment? What happens if you run setup.exe? Does it recognize that it's installed?
The SQLServer Express that's installed -- is it a named instance, or did you leave it as ".\SQLExpress" ? Id the connection string being used by the ClickOnce application right?

Visual FoxPro (9.0) issue on Microsoft Windows Server 2003 R2

We have been running a Visual FoxPro (version 9) application on a Server under Microsoft Windows Server 2003 Operating system for a number of years now. We are now trying to migrate it to a different Server running under Microsoft Windows Server 2003 R2 and the application crashes. The problem occurs when it is trying to create HTML files from the FoxPro reports it has just created. To do this is uses the system variable _ReportOutput and aborts with the message “ox is not an object”. The application resides on the Network in a directory accessible to both Servers. Since hitting this problem I have changed the program to use the Htmllistener class within _ReportListener and get the same problem (works on one not on the other (R2)). Wait windows have been inserted to gain additional information but they only show that the object has not been created returning a data type of .Logical. It appears to me the problem is with the R2 version of the operating system, has anybody any ideas.
Have you installed ReportOutput.APP in the same folder as the application?

Sql 2008 exceptionally slow in Vista 64

Our database server is a SQL 2008 server.
My colleagues all have XP service 2 installed with Sql 2008 Management studio and they have absolutely no performance issues.
I however am running Vista x64 (Ultimate) and when I open the 2008 Management studio it's impossibly slow. It takes almost 25 seconds to just connect to the database, so when I run certain portions of our code against the database I more often than not get timeouts.
Everything else on this machine is running like a dream! Is there an issue with SQL2008 on Vista x64 communicating with SQL2008 on a Windows 2003 Server?
Thanks
Nevermind, I have my problem while asking the questions.
Vista has a TCP/IP auto tuning feature. By following this tutorial: http://www.vistax64.com/tutorials/72308-auto-tuning-tcp-ip-receive-level.html I disabled it and now everything runs like a dream!

Resources