Link to home
Start Free TrialLog in
Avatar of hydev
hydevFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal Reports work fine on laptop but not on deployment to server.

Hi,
I am writing a web application that will display a Crytal Report on my ASP.NET 2.0 website.  The setup is as follows:  My web application is written in ASP.NET 2.0 using Visual Studio 2005 Pro. The crystal report retrieves data from an Oracle database running on a Unix server.  I am developing on my laptop and I am deploying to a Windows 2003 Web server.   I have installed the Oracle Client on the server and my laptop.  I have installed the Crystal Runtime on the server. All of this is on the same domain. My problem is:

I run the solution on my laptop and the website loads, I enter my logon credentials to the oracle server and the report displays.  I therefore deploy to the server and when I run it I get the following error:

"Failed to open the connection. Details: [Database Vendor Code: 12154 ] Failed to open the connection. C:\WINDOWS\TEMP\1300_sp_Rep_Stock {0CFEDA9D-B567-4F31-9980-944C394C8BA9}.rpt Details: [Database Vendor Code: 12154 ] "

I have put the same TNSnames.ora file on both machines, I have checked the TNS Admin path.  I am now at a loss - what have I missed?

Any help greatly appreciated.

Mike

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

It's almost defiantly a tnsnames problem.  The vendor code equates to ORA-12154.

Does the server maybe have multiple Oracle_homes?
From the server see if you can tnsping the instance.  From a command prompt:  tnsping ORCL

Where ORCL is the database from the tnsnames file.
Avatar of hydev

ASKER

Yes that pings fine
Avatar of hydev

ASKER

By using Process Monitor I have found the following thing in c:\windows\system32\inetsrv\sqlnet.log:

"Fatal NI connect error 12560, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=c:\windows\system32\inetsrv\w3wp.exe)(HOST=LIGHTSHIP)(USER=NETWORK?SERVICE))))

  VERSION INFORMATION:
      TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
      Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
  Time: 29-MAR-2007 15:14:42
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 126
    nt OS err code: 0"

Interesting bit is this part "CONNECT_DATA=(SID=ORCL)" This should be surley my SID as defined in TNSnames.ora, in this case its "CIMSG".  where is it getting that SID from?  My TNSNAMES.ORA is in c:\oracle\product\10.2.0\client_2\ is this the correct place?

My TNSNAMEs.ORA reads as:

CIMSX =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.19)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = x)
    )
  )

CIMSG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.19)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = g)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )


What Crystal runtime and dlls did you install?

Did you install the Crystal database driver?

mlmcc
If you have installed Oracle client try to ping the Listener:

C:\>tnsping CIMSX

It will show the directory of tnsnames.ora file and if it can reach
the listener.

Is the server  10g?
If yes try to post LISTENER.ORA here.
Avatar of hydev

ASKER

Ah... now you might be onto something.  I installed the Crystal Reports XI Release 2 server install. (crXI2_net_server_install.zip)

Whats that about a Crystal Database Driver? I have the Oracle client installed on the web server aswell.  Thought Crystal talked to that..
How did you connect the report to the database?  Most reports use a Crystal database driver.

mlmcc
Avatar of hydev

ASKER

In Crystal I used the OLE DB (ADO) connection and then selected the "Microsoft OLE DB Provider for Oracle"
Did you install the MS OLE DB Provider for Oracle?  That is not the Oracle client that you installed.

mlmcc

I am not sure which file(s) you need.  Here are the 2 from CR8
P2SORA7.DLL  - Oracle
P2SMON.DLL - ADO

mlmcc
Avatar of hydev

ASKER

mlmmc - So could be a school boy error here - Even though I have installed the Oracle Client on the server, I also need to install the MS OLE DB Provider for Oracle on it aswell?  That would make sense then, because the report on the server would be looking for that.  Where can I donwload that from and is it straight forward to install?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad i could help

mlmcc