dotConnect 64 bit?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

dotConnect 64 bit?

Post by hepek » Thu 14 Feb 2013 17:28

Hi,

I have installed dcoracle670pro on my Windows Server 2008 64 bit machine.
The server has oracle client 11g 32 bit installed, so I mark my IIS Application Pool as "Enable 32 bit apps".

We keep getting memory problems on a server, in 6-7 hours App Pool would reach 1.5 GB of memory and that's when we start having problems.

So, my question is:
Is possible we have memory issues because we use Oracle 32 bit client on 64 bit machine?
Does dotConnect for Oracle 6/7 support 64 bit Oracle client installation?

thank you
Nermin

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect 64 bit?

Post by Pinturiccio » Fri 15 Feb 2013 13:08

dotConnect for Oracle assemblies are built with the /platform:anycpu option. So, you can use the provider's assemblies on any platform (x86 or x64). For more information, please refer to http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx
hepek wrote:We keep getting memory problems on a server, in 6-7 hours App Pool would reach 1.5 GB of memory and that's when we start having problems.

So, my question is:
Is possible we have memory issues because we use Oracle 32 bit client on 64 bit machine?
No, Oracle 32 bit Client cannot be the reason of this problem. Perhaps you have a memory leek in your application.
hepek wrote:Does dotConnect for Oracle 6/7 support 64 bit Oracle client installation?
Yes, dotConnect for Oracle supports 64 bit Oracle Client.
When using OCI connection mode, the capacity of the Oracle Client and your application must be the same.

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: dotConnect 64 bit?

Post by hepek » Fri 15 Feb 2013 14:45

thank you for your answer.
would you recommend using direct mode to connect to oracle, or by using oracle client?
what is the difference as far as memory and performance is concerned?

I doubt we have a memory leak in app. I am monitoring IIS memory usage and as soon as I retrieve any datagrid even with only 20 rows in it the memory will raise for about 20 MB.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect 64 bit?

Post by Pinturiccio » Mon 18 Feb 2013 15:33

hepek wrote:would you recommend using direct mode to connect to oracle, or by using oracle client?
what is the difference as far as memory and performance is concerned?
The Direct mode has limited functionality as compared to the OCI connection mode. The main advantage of the Direct mode is that you don't need Oracle Client to establish a connection to the server.
As to performance and memory usage, the OCI and Direct modes are the same, but the OCI connection mode supports certain features that are not available in the Direct connection mode.
hepek wrote:I doubt we have a memory leak in app. I am monitoring IIS memory usage and as soon as I retrieve any datagrid even with only 20 rows in it the memory will raise for about 20 MB.
Try using the Direct Mode. Does this solve the issue?
For more information about the Direct mode, please refer to http://www.devart.com/dotconnect/oracle ... tMode.html

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: dotConnect 64 bit?

Post by hepek » Wed 20 Feb 2013 22:29

I will try direct mode and let you know.

In a meantime I have another question: do I need to dispose DataContext after using it?

Currently I dont do that. I have a base clacc BaseBO and in constructor I create DataContext like this:

Code: Select all

public class BaseBO {
   internal OnePlaceDataContext DB = null;

    public BaseBO() { // CONSTRUCTOR
         DB = new OnePlaceDataContext(DB_CONNECTION_STRING);
    }
}
All BO's are inherited from BaseBO, so I simply use DB in instantiated BO this:

Code: Select all

public List<JobContact> GetJobContacts(long jobNum) {
   return DB.JobContacts.Where( .....).ToList();
}
I do not dispose or use "using" keyword. Is this approach ok? Should I dispose or use "using" keyword?

When I do transactions I do it like this:

Code: Select all

DB.Connection.Open();

using (DbTransaction transaction = DB.Connection.BeginTransaction()) {
	try {
	//  perform some update

	   DB.SubmitChanges();
	   transaction.Commit();
	} catch (Exception ex) {
	   transaction.Rollback();
	   throw ex;
	} finally {
	   base.DisposeDB();
	}
}
Is this approach ok for transactions?

thank you

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: dotConnect 64 bit?

Post by MariiaI » Fri 22 Feb 2013 13:31

In fact, we recommend to call the Dispose() method of DataContext objects, as it closes all connections and transactions for this object. However, if you use the 'using' statement and explicitly open and close/commit connections and transactions, there is no need to manually dispose your DataContext objects.

For more information please refer here:
http://www.devart.com/dotconnect/oracle ... sLINQ.html

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: dotConnect 64 bit?

Post by hepek » Fri 22 Feb 2013 17:46

Pinturiccio wrote: Yes, dotConnect for Oracle supports 64 bit Oracle Client.
When using OCI connection mode, the capacity of the Oracle Client and your application must be the same.
Currently we use Oracle 11g 32 bit client, and planning to switch to 64 bit client.
Once I install 64 bit client on a server - do I need to redeploy the app on a web server?

What exactly do you mean by "the capacity of the Oracle Client and your application must be the same"?

thanks

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect 64 bit?

Post by Pinturiccio » Mon 25 Feb 2013 14:07

hepek wrote:What exactly do you mean by "the capacity of the Oracle Client and your application must be the same"?
This means, that if the process of your application is run as x64, then it needs the x64 Oracle client to establish a connection in the OCI mode. If the process of your application is run as x86 application (under WoW64 on a x64 machine), then you need the x86 Oracle client to establish a connection in the OCI mode.
hepek wrote:Once I install 64 bit client on a server - do I need to redeploy the app on a web server?
You should change the 'Platform target' project property value to x64. Then rebuild the project, and deploy it on a web server.

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: dotConnect 64 bit?

Post by hepek » Mon 25 Feb 2013 15:01

Where is this 'Platform target' project property?

Does that mean I have to have 64 bit Oracle client installed on both server and dev machine.
Correct?

thanks

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotConnect 64 bit?

Post by Pinturiccio » Mon 25 Feb 2013 15:56

hepek wrote:Where is this 'Platform target' project property?
You can change the platform for your project in the Configuration Manager. For more information, please refer to http://msdn.microsoft.com/en-us/library ... 10%29.aspx
hepek wrote:Does that mean I have to have 64 bit Oracle client installed on both server and dev machine.
Correct?
1. Development computer. If you want to test your application, then you need Oracle client to establish a connection in the OCI mode. For this, you can use Oracle client x86, as you did before. When the application is ready, you just change the platform from x86 to x64 in the Configuration Manager. Rebuild the application and it is ready for deployment.
You can also install Oracle client x64 on the development computer, set up your IIS Application Pool, in order the site could be run as a 64 bit application.

2. Server. As far as we understand, you want to install Oracle client x64 on it yourself.

Post Reply