Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using System.Data.OracleCilent, I'm trying to connect to Oracle 10g Express Edition. My connection string is as follows.

C#
"Data Source=xe;User Id=SYS AS SYSDBA;Password=MYPASS;Integrated Security=no;"


But every time I'm getting the following error:

ora-01017: invalid username/password; logon denied

I have tried with upper case & lower case credentials, also with putting double quotes around the credentials and every possible combinations. Please help me to get rid of the problem.

NB: I can login to sqlplus with this credentials & I'm using VS - 2010 with .NET Framework 4.0
Posted
Comments
ZurdoDev 12-Sep-14 11:50am    
Your userid has spaced in it?
PIEBALDconsult 12-Sep-14 12:01pm    
I would try apostrophes, but this http://www.connectionstrings.com/net-framework-data-provider-for-oracle/ shows another option.

Also be aware that System.Data.OracleCilent is not recommended. "This types in System.Data.OracleClient are deprecated and will be removed in a future version of the .NET Framework"
Try Oracle's provider -- http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
DEVART's provider -- http://www.devart.com/dotconnect/

1 solution

In order to log in as SYSDBA use the following syntax:
Data Source=xe;User Id=SYS;DBA Privilege=SYSDBA;Password=MYPASS

Typically SYSDBA privileges and SYS user shouldn't be used, but I take it you use these privileges on purpose.
 
Share this answer
 
Comments
JakirBB 12-Sep-14 13:08pm    
Used that too earlier. Error is "Keyword not supported: 'dba privilege'"
Wendelius 12-Sep-14 14:07pm    
Just noticed that you use MS client. Since that is obsolete these days, as PIEBALDconsult pointed out you should use ODP.NET. Download it from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900