locked
Error connection oracle database :ORA-1017: invalid username/password; logon denied RRS feed

  • Question

  • User910710390 posted

    when I run my project to connect oracle database(sqlplus) show me this error :

    ORA-1017: invalid username/password; logon denied at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) at Oracle.DataAccess.Client.OracleConnection.Open() at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at CATS.JoinPartner.jp.SelctComdName(Int32 comditid) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\JoinPartner\JoinPartner\jp.vb:line 532 at CATS.JoinPartner.joinpartner.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\JoinPartner\JoinPartner\joinpartner.aspx.vb:line 12
     
     
    data

    I sure from my database , user name and password ,and I connected in sqlplus

    This my code

    Imports System.Data
    Imports Oracle.DataAccess.Client
    Imports Oracle.DataAccess.Types
    Public Class jp
    
        Dim OraConn As New OracleConnection("Data Source=CRM;User Id=sa;Password=adminsafe;")-> the error catched here
    
        Public Sub Opncon()
            If OraConn.State = ConnectionState.Closed Then
                OraConn.Open()
            End If
        End Sub
    
        Public Sub Clsecon()
            OraConn.Close()
        End Sub
    
    

    how can I do ?

    please help me

    Tuesday, April 21, 2015 4:36 AM

Answers

  • User910710390 posted

    I solved my problem so  write this command in sqlplus :

    ALTER system set  sec_case_sensitive_logon=false ;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 29, 2015 1:19 AM

All replies

  • User269602965 posted

    as test try

        Public Sub Opncon()
                OraConn.Open()
        End Sub

    and show the code calling this open

    Tuesday, April 21, 2015 10:27 PM
  • User910710390 posted

    Lannie

    as test try
        Public Sub Opncon()
    
                OraConn.Open()
    
        End
    Sub
    
    
    and show the code calling this open

    I tried that it is not correct

    in my function  Select when fill dataset it catch the  error

     Public Function SelctComdName(ByVal comditid As Integer)
            Dim oracom As New OracleCommand
            Dim oraadapter As New OracleDataAdapter
            Dim ds As New DataSet
    
            Dim OraString As String = "Select comd_name from comdetail where comd_comdetailid = " & comditid
    
            With oracom
                .CommandType = CommandType.Text
                .CommandText = OraString
                .Connection = OraConn
            End With
    
            oraadapter.SelectCommand = oracom
            oraadapter.Fill(ds) -> catch error here 
    
            Return ds
        End Function
    
    
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not Page.IsPostBack Then
    
                LblComdID.Text = Request.QueryString("idvar") '  3049
    
                Try
                    Dim c As New jp
                    LblComDetID.Text = c.SelctComdName(LblComdID.Text).tables(0).rows(0)(0).ToString()
                    LblCompId.Text = c.SelctCompanyID(LblComdID.Text).tables(0).rows(0)(0).ToString()
    
                    Lblchech.Text = c.CheckInsrtJionPartner(LblComdID.Text)
    
    
                    If Lblchech.Text > 0 Then
                        ImgBtnSave.Visible = False
                        Panel1.Visible = True
                        LblJionPartnerID.Text = c.SelctJionPartnerID(LblComdID.Text).tables(0).rows(0)(0).ToString()
                        GetJionPartnerDet()
                    Else
                        ImgBtnSave.Visible = True
                        Panel1.Visible = False
                        LblJionPartnerID.Text = c.SelctNextJionPartnerID().tables(0).rows(0)(0).ToString()
                    End If
    
                Catch ex As Exception -> catch error
                    Response.Write(ex.Message)
                End Try
            End If
    
        End Sub

    Sqlplus version 10.2  ,Oracle.DataAccess.dll version 10.1.0.200

    invalid username and password  but ,I sure from my password and username

    Wednesday, April 22, 2015 1:57 AM
  • User269602965 posted

    In your WHERE condition you should use Oracle Parameters to pass BIND variable values

    For example:

    Example
    
    Imports System.Xml.Linq.XElement
    
    Dim DateTimeStamp As Date = DateTime.Now
    Dim TicketSeq As Decimal = 1
    
    Dim connectionString As String = ConfigurationManager.ConnectionStrings("{YourOraConnStringName").ConnectionString
    ' Insert help ticket into database '
    Try
      Dim SQL = <SQL>
                  UPDATE {YourSchemaName}.HELP_TICKET
                  SET TICKET_TIMESTAMP = :TICKET_TIMESTAMP
                  WHERE TICKET_SEQ = :TICKET_SEQ
                </SQL>
      Using conn As New OracleConnection(connectionString)
        Using cmd As New OracleCommand(SQL.Value, conn)
          cmd.Parameters.Clear()
          cmd.Parameters.Add("TICKET_TIMESTAMP", OracleDbType.Date, DateTimeStamp, ParameterDirection.Input)
          cmd.Parameters.Add("TICKET_SEQ", OracleDbType.Decimal, decTicketSeq, ParameterDirection.Input)
          conn.Open()
          cmd.ExecuteNonQuery()
        End Using
      End Using
    Catch ex As Exception
    End Try
    

    Wednesday, April 22, 2015 2:55 PM
  • User910710390 posted

    my de is correct So, I tried my project in other  server and worked it

    but in my server can not work .what the configuration server for connect oracle in Microsoft visual studio 2008 .Net 

    I have oracle 10g 10.2.0.1 and  .NET 2008

    Sunday, April 26, 2015 1:36 AM
  • User269602965 posted

    The login user must have permission to run the PL/SQL procedure.

    Software and hardware firewalls must allow traffic on the Oracle listener port (default is port 1521 but can be changed to other ports)

    Sunday, April 26, 2015 7:38 PM
  • User910710390 posted

    I solved my problem so  write this command in sqlplus :

    ALTER system set  sec_case_sensitive_logon=false ;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 29, 2015 1:19 AM