1. Kumaran Subramanian
  2. PowerBuilder
  3. Thursday, 20 December 2018 18:16 PM UTC

Hello PB developer friends,

I have Appeon PB 2017 installed on my Windows 10 laptop. I am trying to connect Oracle DB (12c). So created DB profile in both under 'O10  Oracle 10g' and 'ORA Oracle'. But I am getting 'ORA-12541: TNS: no listener' error, in both these cases. Not sure how to resolve this. Any help will be greatly appreciated.

FYI - I have both Oracle 11g 32 bit client and Oracle 12c 64 bit client installed on this laptop. I can connect to the DB instance from both these clients thru SQLPLUS, correctly. 

Any idea or suggestions ?

Thanks

Alok

Luiz Ribeiro Accepted Answer Pending Moderation
  1. Thursday, 27 December 2018 15:27 PM UTC
  2. PowerBuilder
  3. # 1

Hi Alok.

Try to put the full path in the "Server" profile variable, e.g. localhost/xe (Oracle server name or IP + instance name), instead of just the service name (xe).

Regards,

Luiz R.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 24 December 2018 18:57 PM UTC
  2. PowerBuilder
  3. # 2

You can add the [path to the TNSNAMES.ORA file] into the system PATH variable.
You can create a new system variable called ORA_HOME and place the [path to the TNSNAMES.ORA file] in it.

And yes, PowerBuilder ONLY uses the 32 bit version of the Oracle client.

 

Olan

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Sunday, 23 December 2018 16:20 PM UTC
  2. PowerBuilder
  3. # 3

If you have a correct TNSNAMES.ORA file and you can connect  to the database using SQL+, then

1) Ensure that you have the appropriate native Oracle connection DLL in your PB folder or in your PATH, and

2) Create a profile in the DatabasePainter for your database.
    I always use the TNSNAMES Service Name as the name of my connection, and my Profiles are the database names + the user:
            Profile #1 = DEVTEST (oknight)
            Profile #2 = DEVTEST (chadba)
            Profile #3 = QA (oknight)


The 32 bit Oracle DLLs:
https://wiki.scn.sap.com/wiki/display/SYBPB/Support+for+Using+PowerBuilder+and+Oracle

Note that I use the PBO10120.DLL to connect to an Oracle 12c database from PBv12.1.


Good Luck,

Olan

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Saturday, 22 December 2018 22:29 PM UTC
  2. PowerBuilder
  3. # 4

I hate that error.

Open up SQL+ (or any other non-PowerBuilder database connection tool) and attempt to logon to the database.
If you can logon then the issues is with your TNSNAMES.ORA file OR your database Painter Profile.

If you CANNOT logon to the database then verify that the database is actually up and running.

If the database IS actually running then ensure that your TNSNAMES.ORA entry is correct AND that your Database Painter Profile is correct.

 

Good Luck,

Olan

Comment
  1. Kumaran Subramanian
  2. Monday, 24 December 2018 17:38 PM UTC
Thanks Olan for the information. Yeah, this error is quite frustrating.



As mentioned earlier, I am able to connect to the database from SQLPLUS (using both Oracle 11g 32 bit client as well as Oracle 12c 64 bit client). So, this means both my TNSNAMES.ORA files are correctly configured.



The reason why I have 2 Oracle client is because, PowerBuilder only seems to use 32 bit Oracle client.



I tried creating a new System Variable called, TNS_ADMIN, and point that to the folder where TNSNAME.ORA file is present. But, it still didn't work. So, not sure where to go from here ...
  1. Helpful
There are no comments made yet.
Manos Miliaras Accepted Answer Pending Moderation
  1. Friday, 21 December 2018 09:46 AM UTC
  2. PowerBuilder
  3. # 5

Hello there.

Have you tried connecting with the powerbuilder's database manager? Does it work? Have you set up your tnsnames.ora profile for your database? Any code or more info might help us help you.

Comment
  1. Kumaran Subramanian
  2. Friday, 21 December 2018 17:22 PM UTC
Thanks for the response.



I am not sure, where to find PowerBuilder's database manager ? Is it different from 'Database Profiles' ?



Yes, I have setup tnanames.ora file and am able to connect to the database thru sqlplus.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.