PDA

View Full Version : Error 27502. Could not connect to Oracle



balajika
12-14-2016, 10:54 AM
Hello,

I am new to installshield. I am creating a "InstallScript MSI" project and I am trying to execute a SQL script for ORACLE database. I just have a simple statement to create a table in the script. It seems the database connection cannot be established. I am providing the following details.

Database server: //machinename: port/service_name
SQLserver authentication: logid id/password

I am getting the following error: Error 27502. Could not connect to Oracle '//machinename: port/service_name'. [Microsoft][ODBC driver for Oracle] (0)

Can someone help me to figure what is needed to establish the connection? I can provide more details if needed.

Thanks.

hidenori
12-15-2016, 02:31 PM
I recommend that you configure InstallShield to use the Oracle ODBC Instant Client instead of Microsoft ODBC for Oracle. See Running SQL Scripts with Unicode Characters on an Oracle Database Server (http://helpnet.flexerasoftware.com/installshield23helplib/installshield23helplib.htm#helplibrary/Oracle-Unicode.htm) for more information.

balajika
12-15-2016, 04:43 PM
Hello hidenori,

Thanks for your reply. I did made the changes to use Oracle ODBC Instant Client per the link that you provided. Now I am getting the following error:
Error 27502. Could not connect to Oracle '//machinename: port/service_name'. [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)

Do I still miss any configuration to make it work? Thanks.

hidenori
12-15-2016, 04:50 PM
Did you update your InstallShield project to install the Oracle ODBC Instant Client onto your target machine? See Downloading the Oracle Basic Instant Client and the Oracle ODBC Instant Client and Creating an .msi Package and InstallShield Prerequisite for Both (http://helpnet.flexerasoftware.com/installshield23helplib/installshield23helplib.htm#helplibrary/OracleICODBC-CreateInstall.htm) for more details.

balajika
12-15-2016, 05:04 PM
Hello hidenori,

Thanks for your quick reply. I have an oraclient installed in my target machine already. I assumed the installshied will pick that up. Do I still need to update my InstallShield project to install the Oracle ODBC Instant Client even if I have an oraclient in the target machine already? Thanks.

hidenori
12-15-2016, 05:12 PM
Which version of Oracle Instant Client do you have on your target machine? If you are building a 32-bit installation, you need Instant Client for Microsoft Windows (32-bit). If you are building a 64-bit installation, you need Instant Client for Microsoft Windows (x64).

balajika
12-16-2016, 04:39 PM
Hello hidenori,

I followed the document link "Downloading the Oracle Basic Instant Client and the Oracle ODBC Instant Client and Creating an .msi Package and InstallShield Prerequisite for Both" that you provided and crated the .msi package and prerequisite for 32 bit. Now my setup is first installing the ODBC Instant client and then it gives the following error first. "Error Cannot Load Resource File sqresus.dll"

When I hit OK on this then I am getting the following error: "Error 27551. ODBC driver for Oracle not found. This is required to connect to Oracle database servers."

Any help on these errors? Thanks.

As for as your earlier question, I am new to Installshield and I am not sure which bit I am building. Where can I check this in Installshield? However my target machine is 64 bit.

hidenori
12-19-2016, 05:14 PM
Regarding "Error Cannot Load Resource File sqresus.dll", it sounds like that there are missing dependencies. Did you verify that the Basic Instant Client and the ODBC Instant Client are installed to the same target location? Sqresus.dll is a content of the Oracle Instant Client ODBC package, and it statically links to mfc71.dll and msvcr71.dll which are included in the Basic Instant Client package.

In order to build a pure 64-bit installation using InstallShield, you need to configure the Template Summary property to specify x64 and build your project with the Strict architecture validation. See Selecting the Appropriate Type of Architecture Validation for Build (http://helpnet.flexerasoftware.com/installshield23helplib/installshield23helplib.htm#helplibrary/ArchValidation.htm) for more information.