Thursday, November 11, 2010

Windows7 - Excel VBA - "ORA-01019 unable to allocate memory in the user side"

Operating System: Windows 7
Office 2007/2010

We have an Excel utility that connects to Oracle Database (hosted on a different machine) using ODBC. The code is written in Excel VBA and is always shipped as a macro along with excel file.

The utility was working perfectly fine in Windows XP client machines. But, when we tried to use the utility in Windows 7 machine, it is throwing an error - "ORA-01019 unable to allocate memory in the user side".

We tried lot of options and finally able to resolve the error by performing below steps:

1) Change User Settings
  • Navigate to : Control Panel > User Accounts > User Accounts > "Change User Account Control settings"
  • Set the value as "Never Notify".
  • Click on Ok button.

2) Grant "Create global objects"
  • Navigate to : Start > Run > gpedit.msc
  • In Local Group Policy window, Navigate to : Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment"
  • Select "Create global objects", right click and navigate to properties windows
  • Click on "Add User or Group" button and add users to this group
3) Delete existing XSD files

    In Windows XP:
  • CD \Document And Settings
  • DEL /S /A:H /A:-H *.EXD
    In Windows 7 or Vista:
  • CD \Users
  • DEL /S /A:H /A:-H *.EXD
4) Reboot machine

After performing above steps, I am now able to connect from my Excel VBA to oracle database using ODBC without any errors.