Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18120 Posts in 4741 Topics- by 31743 Members - Latest Member: suuraj
 

Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: sysdba privilege in ADODB connection string    (Read 3254 times)
Rina Grom
User
*
Offline Offline

Posts: 12


WWW
« on: November 25, 2007, 02:23:50 AM »

Hi guys,
I'm using user with sysdba privilege in order to connect to Oracle. The connection string is:
Driver={Microsoft ODBC for Oracle};Server=xxxxxxxx;Uid="xxxx";Pwd="xxx"
What should be added to the connection string in order to connect with the sys/sys user? "conn sys/sys as sysdba" is command in SQL*PLUS. I tried to add "DBA Privilege=sysdba" and I got error message: "Driver's SQLSetConnectAttr".
Please advise.
Rina
« Last Edit: November 25, 2007, 05:13:25 AM by Rina Grom » Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #1 on: November 25, 2007, 02:51:55 AM »

Data Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSOPER;
Data Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSDBA;
« Last Edit: November 25, 2007, 02:53:45 AM by Dani Vainstein » Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Rina Grom
User
*
Offline Offline

Posts: 12


WWW
« Reply #2 on: November 25, 2007, 05:33:43 AM »

As you can see your version is a little bit differnt "User Id" instead of "Uid" and "Password" instead of "Pwd". Please correct my if I'm wrong but your version is .Net and I need VBS connection string.
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #3 on: November 25, 2007, 06:03:29 AM »

you right! sorry, is oracle .net
pls. follow this link
http://www.connectionstrings.com/
you may find the connection string u need.

a second suggestion is :
try to connect to your oracle using ODBC
Control Panel -> Administrative Tools -> Data Sources
after you seceed go to registry
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
try to locate your odbc one of the sub-keys contains the connection string.
what you've left is to copy the connection string to:
connection.ConnectionString ( ADODB.Connection )
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Rina Grom
User
*
Offline Offline

Posts: 12


WWW
« Reply #4 on: November 29, 2007, 03:58:16 AM »

Please see the attached snapshot where you can see that you can't create Database Source Names with sys\sys. Please advise.
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #5 on: November 29, 2007, 06:04:42 AM »

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Cause: connect SYS/<password> is no longer a valid syntax
Action: Try connect SYS/<password> as SYSDBA or connect SYS/<password> as SYSOPER

When you want to connect to the SYS or INTERNAL account, you'll have to connect using SYSDBA or SYSOPER.
« Last Edit: November 29, 2007, 06:09:34 AM by Dani Vainstein » Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Rina Grom
User
*
Offline Offline

Posts: 12


WWW
« Reply #6 on: November 29, 2007, 07:50:27 AM »

DSN Configuration failed with user ID:sys as sysdba \ password: sys or sys \ sys as sysdba.
Error message is:
[Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied
Unable to connect
SQLState=28000
[Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied

Same message is received by ADODB.Connection object in QTP.

Please correct if I'm wrong but ADODB.Connection object can't connect as sysdba in QTP.
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #7 on: November 29, 2007, 08:27:21 AM »

Hi

your problem seems for DBA. please contact the DBA in the company you work for
and ask him, how to connect.

about your question i think you're wrong, u can use ADODB.
ADODB depends on the ConnectionString property.

all the driver and database information should be suplyed via ConnectionString
ADODB.Connection only "manages" the connection.
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Pages: [1]   Go Up
Print
Jump to: