FIX: ????? ???? ????? ??? "ORA 01012" ??? ??????? ?????? ?????? ?????? ???????? MSDAORA

?????? ????????? ?????? ?????????
???? ???????: 834905 - ??? ???????? ???? ????? ????? ??? ???????.
??????
??? ??????? ?????? ??????? ???? ?? ???? ????????? ??????? ?????????. ????? ????? ??? ??????? ?????? ?? ????? ??? ?????? Microsoft ???? ??? ??????? ?????? ???? ?? ???? ?? ???? ????????? ??????? 839801 ?? MDAC 2.8 ?? 836799 ?? MDAC 2.7 ?????? ????? ?????? SP1. ????? ?? ?????????? ???? ??????? ??????? ?? "????? ??????? ?? Microsoft:

MDAC 2.8
839801FIX: ????????? ??????? ????? MDAC 2.8
MDAC 2.7 SP1
836799FIX: ????????? ??????? ????? ???? ?????? Service Pack 1 ?????? ?? MDAC 2.7
????? ???? | ?? ????

?? ??? ??????

???????

??????? ?????? ?????? ?????? ???????? ???? Microsoft OLE DB ?? Oracle (MSDAORA) ?? ????? ??????? ??? ???? ??????. ??? ??? ????? ???? ??? ????? ?????? Oracle ?? ??????? ????? ?? ???? ????? ??? ??????? ???????:
System.Data.OleDb.OleDbException: ??? ??? ????
01012 ORA: ?? ??? ????? ??????

?????

??? ????? ??????? ?????? ?????? Oracle ??? ???? ?????? ????? ??????? MSDAORA ??? ????? ??? ??????? ??? ???? ??????? ". ?????? ??? ???? ??????? ???? ??? ???? ?? ??????? ResetConnection MSDAORA. ??? ??? ??????? ??? ?????? ?? ??? ?????? ? ???? ??? ???? ????? ????? ??????? ??? ??????? ???? ???? ???? ??? ????. ?? ???? ??????? ??? ??????? ???? ?? ??????? ??? ????? ??????? ??? ??? ??? ???? ????? ????. ?????? ???? ????? ????? ???????? ?? ??? "???????".

????

??????? ??????? ??????

????? ???? ????? ???? ????? ?? Microsoft. ???? ????? ??? ?? ?? ??????? ??????? ?? ??? ??????? ???. ???? ??? ???????? ??? ?? ??????? ???? ????? ??? ??????? ????????. ?? ??? ????? ???????? ?????? ??? ??? ??????? ??????. ?????? ??? ?? ??? ????? ??? ??????? ??????? ???? ????????? ??? ??????? ?????? ?? ???? ?????? ????? ????? ??? ??? ??????? ??????.

??? ??? ??????? ?????? ???? ?????? ??? ??????? ?? Microsoft "?????? ??? ??????? ??????. ?????? ??? ????? ????? ?????? ?????? ?????? ?????? ??? ??????? ?? Microsoft ???? ??????? ??? ?????? ?????? ?? ?????? ???? Microsoft ?????? ??? ?????:
http://support.microsoft.com/contactus/?ws=support
?????? ?? ??? ???????? ?? ??? ????? ????????? ???? ?????? ????? ??? ??????? ????? ??? ??? ?????? ????? ??? Microsoft ?? ??????? ?????? ??? ???? ??? ?? ???????. ???? ????? ?????? ????? ???????? ??? ????? ????? ???????? ????????? ???? ?? ???? ??? ???? ??? ???????.

??????? ?????

????? ????? ????? ?????????? ?? ??? ??????? ?????? ???? ????? (?? ???? ????) ??????? ?? ?????? ??????. ??? ??? ???????? ???????? ?????? ???? ??????? ?? "??? ??????? ???????" (UTC). ????? ???? ???? ??????? ?????? ??? ??????? ??? ??????? ??????. ?????? ????? ??? ??????? ??????? (UTC) ???????? ??????? ?????? ????? ??????? ??????? ??????? ?? ???? ??????? ?????? ?? "???? ??????".
Microsoft Data Access Components (MDAC) 2.8
   Date         Time   Version         Size     File name
   ---------------------------------------------------------
   10-Mar-2004  04:22  2.80.1036.0     225,280  Msdaora.dll
   10-Mar-2004  04:22  2000.85.1036.0   24,576  Odbcbcp.dll
   10-Mar-2004  04:21  2.80.1036.0     442,368  Oledb32.dll
   10-Mar-2004  04:21  2000.85.1036.0  401,408  Sqlsrv32.dll
MDAC 2.7 Service Pack 1
   Date         Time   Version         Size     File name
   ---------------------------------------------------------
   10-Mar-2004  02:19  2000.81.9046.0   61,440  Dbnetlib.dll
   10-Mar-2004  02:20  2.71.9046.0     221,184  Msdaora.dll
   10-Mar-2004  02:15  2.71.9046.0     126,976  Msdart.dll
   10-Mar-2004  02:15  3.520.9046.0    204,800  Odbc32.dll
   10-Mar-2004  02:20  2000.81.9046.0   24,576  Odbcbcp.dll
   10-Mar-2004  02:20  3.520.9046.0     98,304  Odbccp32.dll
   10-Mar-2004  02:16  2.71.9046.0     417,792  Oledb32.dll
   10-Mar-2004  02:19  2000.81.9046.0  471,040  Sqloledb.dll
   10-Mar-2004  02:19  2000.81.9046.0  385,024  Sqlsrv32.dll

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ??? "????? ???".

??????? ????

????? ????? ????? ??????

  1. ??? ????? Microsoft Visual Studio .NET.
  2. ?? ??????? ???? ??? ??? ???? ?? ???? ??? ???????. ???? ???? ?????? ????? ????.
  3. ??? ????? Project ? ???? ??? ?????? Visual Basic ?? ???? ??? ????? ???? ?????? ??? ?????.
  4. ?? ?????? ?????? ???? ??? ??????? ?? ???? ??? ?????. ?????????? ??? ????? ??? Module1.vb.

    ??? ??? ?????? Microsoft Visual C# .NET ? ??? ????? ??? Class1.cs.
  5. ?? ?????? ???????? ???????? ??????? ?? ????? ??????:

    ??? Microsoft Visual Basic .NET
    Imports System
    Imports System.Data.OleDb
    ????????? ???????? Visual C# .NET
    using System.Data.OleDb;
  6. ?? ?????? ????????? ???????? ??????? ??? ??????? ???????:

    ????????? ???????? Visual Basic .NET
    Dim cn As OleDbConnection
    Dim cmd As OleDbCommand
    Dim r As OleDbDataReader
    Dim sid As String
    Dim orlcmd As String
    Dim connString As String = "Provider=MSDAORA;DataSource=<data source>;User ID=<user name>;Password=<password>;"
    Try
        'Create a new connection to the Oracle database by using MSDAORA.
        cn = New OleDbConnection
        cn.ConnectionString = connString
        cn.Open()
        cmd = New OleDbCommand
        cmd.CommandText = "SELECT SID , SERIAL# FROM V$SESSION WHERE SID = (SELECT SID FROM V$MYSTAT WHERE ROWNUM=1)"
        cmd.Connection = cn
        r = cmd.ExecuteReader()
        sid = ""
        If (r.Read()) Then
            sid = r.GetValue(0).ToString() + "," + r.GetValue(1).ToString()
        End If
        orlcmd = "Alter System Kill Session '" + sid + "' Immediate;"
        Console.WriteLine("Open the SQL Plus window, run the following command, and then press ENTER:")
        Console.WriteLine(orlcmd)
        Console.ReadLine()
        r.Close()
        cmd.CommandText = "SELECT count(*) from TAB"
        Try
            'Expecting this command to fail because connection has been killed
            r = cmd.ExecuteReader()
        Catch orlex As OleDbException
            Console.WriteLine(orlex.Message)
            cmd.Dispose()
            'Close the bad connection.
            cn.Close()
            System.Threading.Thread.Sleep(1000)
            cn.ConnectionString = connString
            cn.Open()
            cmd = New OleDbCommand
            cmd.CommandText = "SELECT count(*) FROM TAB"
            cmd.Connection = cn
            'This command will fail, but it will work when a new connection is used.
            r = cmd.ExecuteReader()
            If (r.Read()) Then
                Console.WriteLine(r.GetValue(0))
            End If
       End Try
    Catch ex As OleDbException
       Console.WriteLine(ex.ToString())
    End Try
    Console.WriteLine("Press ENTER to exit...")
    Console.ReadLine()
    
    ????????? ???????? Visual C# .NET
    OleDbConnection cn;
    OleDbCommand cmd;
    OleDbDataReader r;
    String sid;
    String orlcmd;
    String connString="Provider=MSDAORA;DataSource=<data source>;User ID=<user name>;Password=<password>;";
    try
    {
        //Create a connection to the Oracle database by using MSDAORA.
        cn= new OleDbConnection();
        cn.ConnectionString=connString;
        cn.Open();
        cmd=new OleDbCommand();
        cmd.CommandText="SELECT SID , SERIAL# FROM V$SESSION WHERE SID = (SELECT SID FROM V$MYSTAT WHERE ROWNUM=1)";
        cmd.Connection=cn;
        r=cmd.ExecuteReader();
        sid="";
        if(r.Read())
        {
           sid=r.GetValue(0).ToString()+","+r.GetValue(1).ToString();
        }
        orlcmd="Alter System Kill Session '"+sid+"' Immediate;";
        Console.WriteLine("Open the SQL Plus window, run the following command, and then press ENTER:");
        Console.WriteLine(orlcmd);
        Console.ReadLine();
        r.Close();
        cmd.CommandText="SELECT count(*) from TAB";
        try
        {
            //Expecting this to fail because the connection is killed.
            r=cmd.ExecuteReader();
        }
        catch(OleDbException orlex)
        {
            Console.WriteLine(orlex.Message);
            cmd.Dispose();
            //Close the bad connection.
            cn.Close();
            System.Threading.Thread.Sleep(1000);
            cn.ConnectionString=connString;
            cn.Open();
            cmd=new OleDbCommand();
            cmd.CommandText="SELECT count(*) FROM TAB";
            cmd.Connection=cn;
            //This command will fail, but it will work when a new connection is used.
            r=cmd.ExecuteReader();
            if(r.Read())
            {
               Console.WriteLine(r.GetValue(0).ToString());
            }
        }
    }
    catch(OleDbException ex)
    {
        Console.WriteLine(ex.ToString());
    }
    Console.WriteLine("Press ENTER to exit...");
    Console.ReadLine();
    
    ????? ?????? ????? ??????? ????? ?????? ?????? ??.
  7. ?? ??????? ????? ? ???? ??? ???? ????.
  8. ?? ??????? ????? ? ???? ??? ????. ???? ??? ??? ?? ???? ???? ??????.
  9. ?? SQL Oracle * ???????? ??? ? ?? ?????? ????? ???? ??? ???? ?? ???? ???? ??????.
  10. ???? ENTER. ?? ???? ???? ?????? ???? ????????? ???????? ?? ??? "???????".

?????

?????? ??? ???? ?? ????????? ??? ???? Microsoft OLE DB Oracle ?? ?????? ???? ???? ????? Microsoft (MSDN) ?????? ??? ?????:
http://msdn2.microsoft.com/en-us/library/ms810685.aspx
?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
824684??? ????????? ???????? ????????? ?? ??? ??????? ????? Microsoft
?????? ?????? ?????? ???????? ?? ??? ??????? ???? ????? ?????? ?????? ?? Microsoft. ?? ???? Microsoft ?? ???? ? ?????? ?? ??????? ????? ???? ?? ???? ?????? "?? ??? ????????.

???????

???? ???????: 834905 - ????? ??? ??????: 05/?? ??????/1428 - ??????: 3.6
????? ???
  • Microsoft Data Access Components 2.8
  • Microsoft Data Access Components 2.7 Service Pack 1
????? ??????: 
kbmt kbhotfixserver kbqfe kbbug kbprovider kbconnectivity kbdatabase kboracle kbfix kbqfe KB834905 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????834905

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com