Hi, I'm trying to setup a Oracle query from the PRTG Core server. I have successfully ran some queries via Oracle DB but there's a couple of commands that I need to run using the sysdba account. However when I use the username "sys as sysdba" with password to the same database, I get the following message:-

ORA-01017:invalid username/password; logon denied

So what is the supported way to run commands as sysdba?

Thanks.


Article Comments

Hello hugoti,

Thank you very much for your contact.
Do I understand you correctly, that the username within the device's "Settings" tab that has the affected sensor is "sys as sysdba"? Or is it just "sysdba"?
Please note that the username must be a string, spaces are obviously not possible inside the username.

Does it work then?

Sebastian


Nov, 2017 - Permalink

I've tried both with and without quotes and both got same result - ORA-01017

I've tried it using the SQLv2.exe tool.


Nov, 2017 - Permalink

The username has to be entered without quotes, but the question is if the username is "sysdba" or "sys as sysdba"?


Nov, 2017 - Permalink

I tried both. If I use a local account is works fine, but some queries require sysdba privileges hence will need to log in as sysdba. If I run SQLPLUS using sysdba on the said Oracle server it works fine (see below) :-

C:\Documents and Settings\Administrator>sqlplus sys as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Nov 17 16:11:43 2017

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Enter password:

Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production


Nov, 2017 - Permalink

Hi hugoti,

Please test the connection using the ADO SQL v2 sensor.

While the sensor creation, you can define a Connection String. Please use the following which I found here: Data Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSDBA; User (SYS) and Password (SYS) can be replaced with the PRTG placeholders %dbusername and %dbpassword. The placeholders will refer to the username and password that you defined within the device settings under CREDENTIALS FOR DATABASE MANAGEMENT SYSTEMS.

Does it work then?

Sebastian


Nov, 2017 - Permalink

I get the following error:

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'

I'm not sure what this means?


Nov, 2017 - Permalink

Hello hugoti,

I'm not very familiar with Oracle but this (redirects to Stackoverflow.com) link might help to understand the error message shown.

What's the result?

Sebastian


Nov, 2017 - Permalink

Unfortunately I still couldn't get this to work even with using the above link. Guess it's a limitation with PRTG as it cannot use sysdba login credentials?


Nov, 2017 - Permalink

Dear hugoti,

According to our developers which I just asked about that issue, it appears as there is also an option which has to be changed within the connection driver and it can't be achieved by editing the connection string only, so your assumption is - sorry to say - somewhat correct. PRTG does not support this.

Best regards,
Sebastian


Nov, 2017 - Permalink