Catch and recover from TNS packet writer exception.?

This happens intermittently when connecting to oracle from my WinXP/Visual Studio 2005 IDE/Webpages. It may occur other places but this is the only place I've tested. Anyway, Is there a way to trap this error and then maybe even resubmit. I can see keeping a session counter but I'm wondering if someone has better solution. I'm going against Oracle 10g on w2k3 64-bit.

user7728510 wrote:
Hi,
for what i know, MSDAORA provider doesn't support Oracle data types introduced since <font face="tahoma,verdana,sans-serif" size="1" color="#000">version</font> 8, as CLOB, BLOB and so on, so i think that it uses varchar2 up to the 4k limits and then causes this error.
Have you tried with the OraOLEDB.Oracle.1 provider instead?Nice writing, Thanks for your explanation!

Similar Messages

  • TNS Packet Writer Error

    (ENTRY) OpsSqlExecuteNonQuery()
    (ENTRY) OpsErrAllocCtx()
    (EXIT) OpsErrAllocCtx(): RetCode=0 Line=182
    (ENTRY) OpsSqlAllocCtx()
    (EXIT) OpsSqlAllocCtx(): RetCode=0 Line=67
    OpsSqlExecuteNonQuery(): SQL: SET ROLE <> IDENTIFIED BY <>
    (ENTRY) OpsSqlFreeCtx()
    (EXIT) OpsSqlFreeCtx(): RetCode=0 Line=92
    (EXIT) OpsSqlExecuteNonQuery(): RetCode=-1 Line=413
    =====================================================
    Can anyone shed any light on why this piece of SQL should sometimes fail and give a TNS packet writer error?
    The sql can be resubmitted straight away and all is fine.
    This is driving me nuts as I just can make any sense of it.
    TIA!
    Mark

    -1 from OpsSqlExecuteNonQuery() means an Oracle error which in your case is "TNS Packet Writer Error". This error can happen for a number of reasons. You need to provide a complete test case along with environment information to reproduce this issue.

  • TNS Packet writer failure and end-of-file on communication channel

    Hello Sir/Mam,
    I m working on oracle server 9i. when i insert data into Blob,Nclob,Clob field which is larger than 4KB, this message occur everytimes.(TNS Packet writer failure or end-of-file on communication channel).
    Can u tell me why this happen when i insert large data from 4KB.
    I m using oledb to insert data into a table.if datasize is less than 4 KB ,its easily insert.
    My Code Module is this
    BOOL CconnectivityDlg::OpenOracleFile()
         BOOL bResult=FALSE;
         bFile = FALSE;
         dwFileSize = 0;
         CString csVirtualPath;      
         CFileDialog dlg(TRUE);
         if(dlg.DoModal()==IDOK)
              StrName = dlg.GetPathName();
         hFile1=CreateFile(StrName,GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
                                       NULL,OPEN_EXISTING, NULL,NULL);
         unsigned int count =0;
              if(hFile1==INVALID_HANDLE_VALUE)
                   if(count<5)
                        count++;
                        Sleep(1000);
                   else
                        return bResult;
         DWORD dwHighPart,dwLowPart;
         dwLowPart = GetFileSize(hFile1,&dwHighPart);
         LARGE_INTEGER NewFilePointer;
         NewFilePointer.LowPart = dwLowPart;
         NewFilePointer.HighPart = dwHighPart;
         dwFileSize = NewFilePointer.QuadPart;     
         bFile     = TRUE;
         bResult = TRUE;     
         if(hFile1)
              CloseHandle(hFile1);
              hFile1 =NULL;
         return bResult;
    BOOL CconnectivityDlg::CreateConnection()
         BOOL bResult = FALSE;     
         CString Count,strFileSaveName;
         Count.Empty();
         strFileSaveName.Empty();
         unsigned int nCounter = 0;     
    repeat:     
         if(!AfxOleInit())
              return FALSE;
         m_pConn.CreateInstance (__uuidof(Connection));
         CString strConn ;
         strConn.Empty();
         m_pConn->CursorLocation = adUseClient;
         strConn     =_T("Provider=MSDAORA;OSAuthent=1;Data Source =LOVE;Connect as =SYSDBA;");
         try
              m_pConn->Open(_bstr_t(strConn),_bstr_t("system"),_bstr_t("system"),adConnectUnspecified);
              bResult = TRUE;
         catch(_com_error& e)
              CString sBuff = GetErrorDescription(e);
              AfxMessageBox(sBuff);
              return 0;          
         catch(...)
              AfxMessageBox(_T("UnknownError"));
              return 0;
         m_pCom.CreateInstance(__uuidof(Command));
         try
              m_pCom->ActiveConnection = m_pConn;
         catch(_com_error& e)
              CString sBuff = GetErrorDescription(e);
              AfxMessageBox((sBuff));          
         catch(...)
              AfxMessageBox(_T("UnknownError"));
         return bResult;
    CString CconnectivityDlg::insertimage()
         CString Query,ColmnName;
         Query.Empty();
         ColmnName = _T("FIRST");//Coloumn Name
         Query = _T("insert into SINGLE(FIRST) values (?)"); //Table in which i want to insert data of Nclob type.
         hFile1 = CreateFile(StrName,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);//File from i read the data to insert into nclob field
         DWORD dwHighPart,dwLowPart;
         dwLowPart = GetFileSize(hFile1,&dwHighPart);
         LARGE_INTEGER NewFilePointer;
         NewFilePointer.LowPart = dwLowPart;
         NewFilePointer.HighPart = dwHighPart;
         dwFileSize = NewFilePointer.QuadPart;     
         BYTE *ImageData = new BYTE[dwFileSize+2];
         memset(ImageData,0,dwFileSize+2);
         BOOL bRead = ReadFile(hFile1,ImageData,dwFileSize,&dw,NULL);
         VARIANT varChunk;
         long lngOffset=0;
         UCHAR chData;
         SAFEARRAY FAR *psa = NULL;
         SAFEARRAYBOUND rgsabound[1];
         rgsabound[0].lLbound=0;
         rgsabound[0].cElements=dwFileSize;
         psa = SafeArrayCreate(VT_UI1,1,rgsabound);
         HRESULT hr;
         while(lngOffset < (long)dwFileSize)
              chData = ((UCHAR*)ImageData)[lngOffset];
              hr = SafeArrayPutElement(psa,&lngOffset,&chData);
              lngOffset++;                                        
         lngOffset     = 0;
         varChunk.vt=VT_ARRAY|VT_UI1;
         varChunk.parray=psa;
              try
              m_pCom->Parameters->Append(m_pCom->CreateParameter(_bstr_t(ColmnName),adLongVarWChar,adParamInput,(ADO_LONGPTR)dwFileSize,varChunk));
              VariantClear(&varChunk);
         catch(_com_error& e)
              CString sBuff = GetErrorDescription(e);
              AfxMessageBox(sBuff);
         if(ImageData)
              delete[] ImageData;
              ImageData = NULL;
         try
              m_pCom->CommandText=_bstr_t(Query);
              m_pConn->CursorLocation = adUseClient;
              m_pCom->CommandTimeout=0;
              m_pCom->Execute(NULL,NULL,adCmdText);
         catch(_com_error& e)
              CString sBuff = GetErrorDescription(e);
              AfxMessageBox(sBuff);
         return 0;
    CString CconnectivityDlg::GetErrorDescription(_com_error& e)
    bstrt bstrSource(e.Source());
    bstrt bstrDescription(e.Description());
    _TCHAR szTemp[1024];
    CString strInfo ;
    wsprintf(szTemp, _T("Message : %s\n"), e.ErrorMessage());
    strInfo = szTemp;
    wsprintf(szTemp, _T("Code : 0x%08lx\n"), e.Error());
    strInfo += szTemp;
    wsprintf(szTemp, T("Source : %s\n"), bstrSource.length() ? (LPCTSTR)bstrSource : T("null"));
    strInfo += szTemp;
    wsprintf(szTemp, T("Description : %s\n"), bstrDescription.length() ? (LPCTSTR)bstrDescription : T("null"));
    strInfo += szTemp;
         CString str     =     strInfo;
         if(str.Find(_T("not a valid password"),0) > 0)
              strInfo     =     _T("File is password protected") ;
    return strInfo;
    }

    user7728510 wrote:
    Hi,
    for what i know, MSDAORA provider doesn't support Oracle data types introduced since <font face="tahoma,verdana,sans-serif" size="1" color="#000">version</font> 8, as CLOB, BLOB and so on, so i think that it uses varchar2 up to the 4k limits and then causes this error.
    Have you tried with the OraOLEDB.Oracle.1 provider instead?Nice writing, Thanks for your explanation!

  • 'ORA-12571: TNS:packet writer failure' error while calling procedure from VC++

    hi all,
    i am writing stored procedures and calling these from vc++. I have one stored procedure in that all
    in and out perameters are numeric. When i am calling these procedure i am able to get the values properly. But in another procedure one in perameter is varchar and one out perameter is varchar. When i am calling these procedure from vc++ the error i am getting is "ORA-12571: TNS:packet writer failure". I test my vc++ code on different computers but its giving the same errors. I think ora-12571 error is when i can't communicate with oracle. But other stored procedures(in and out perameters are numbers) and sql statements are running properly. Only these stored procedure which has in and out perameters as varchar is giving me the above said problem. My out perameter in this procedure strtax is of type varchar and the length 100. Is it the problem. Please suggest me how to over come this problem.
    thanks in advance,
    with regards
    vali.

    Hi
    We recently changed our load balancer to a new load balancer. we get this error only after the load balancer change.
    When the error occurs, I could see ORA-12571 error message only in the application error log. The listener.log has only the following message about TNS 12502. It does not have any message about ORA -12571.
    TNS-12502: TNS:listener received no CONNECT_DATA from client
    12-MAR-2010 12:23:26 * (CONNECT_DATA=(SERVICE_NAME=AppName)(CID=(PROGRAM=c:\wind ows\system32\inetsrv\w3wp.exe)(HOST=WEB02)(USER=NETWORK?SERVICE))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.x.x.x.x)(PORT=2202)) * establish * AppName * 0
    12-MAR-2010 12:23:26 * (CONNECT_DATA=(SERVICE_NAME=AppName)(CID=(PROGRAM=c:\wind ows\system32\inetsrv\w3wp.exe)(HOST=WEB02)(USER=NETWORK?SERVICE))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.x.x.x.x)(PORT=2203)) * establish * AppName * 0
    12-MAR-2010 12:23:26 * (CONNECT_DATA=(SERVICE_NAME=AppName)(CID=(PROGRAM=c:\wind ows\system32\inetsrv\w3wp.exe)(HOST=WEB02)(USER=NETWORK?SERVICE))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.x.x.x.x)(PORT=2204)) * establish * AppName * 0
    12-MAR-2010 12:24:09 * 12502
    TNS-12502: TNS:listener received no CONNECT_DATA from client
    Thanks
    Ashok

  • ORA-12571: TNS:packet writer failure while calling procedure from VC++

    hi all,
    i am writing stored procedures and calling these from vc++. I have one stored procedure in that all
    in and out perameters are numeric. When i am calling these procedure i am able to get the values properly. But in another procedure one in perameter is varchar and one out perameter is varchar. When i am calling these procedure from vc++ the error i am getting is "ORA-12571: TNS:packet writer failure". I test my vc++ code on different computers but its giving the same errors. I think ora-12571 error is when i can't communicate with oracle. But other stored procedures(in and out perameters are numbers) and sql statements are running properly. Only these stored procedure which has in and out perameters as varchar is giving me the above said problem. My out perameter in this procedure strtax is of type varchar and the length 100. Is it the problem. Please suggest me how to over come this problem.
    thanks in advance,
    with regards
    vali.

    hi,
    thanks for reply,
    I wanna let u know that this is my personal lappy & i have installed apps dump on it in Linux & connect it through VM player in Window environment. I have recently purchased a new Antivirus K7 & installed it on my Lappy. i wanna know does this impact your application or Dbase Bcoz the application is running fine after starting the services in linux.
    The only thing is that i am not able access the database through TOAD or SQL*Plus. the same error i am facing in both.
    So
    shud i uninstall the antivirus on this And this is the only solution to it ?
    If yes, then how do i fix it again when i'll reinstall it Bcoz i need Antivirus as well.
    kindly suggest.
    thanks
    D

  • TNS-12571:TNS PACKET WRITER FAILURE

    Hello Oracle Gurus,
    Our Oracle 9i database is hosted somewhere else and is behind the firewall. When accessing this database through TOAD, even after 2 minutes of inactivity, we get the "TNS-12571: TNS Packet writer failure" and we have to reconnect to the database again. This occurs in all of the client machines. The Oracle 9i database's firewall is open for the ip address from which we are using TOAD/SQL*Plus.
    Is there any configuration that needs to be changed on the Oracle Client or server side to solve this issue? I appreciate your help.
    Thanks,
    Saku

    Hi,
    you can set sqlnet_expire_time option in sqlnet.ora file on the database server and set the time less than 2 mins. This to identify if the problem is because of some firewall configuration or other network related issue which causes the onnection to die.
    this parameter should keep all the client connection alive but results in extra trafic.

  • ORA 012571 TNS Packet Writer Failure ... ???

    I have installed the Designer 6i and when I attempt to login to the designer application, I am stopped by the error ORA 012571 TNS Packet Writer Failure.
    I have no idea what is causing this error, and therefore can't use the product.
    Looking for any/all help
    Darrell K.

    This is from documentation:
    TNS-12571 TNS:packet writer failure
    Cause: An error occurred during a data send. This message is not normally visible to the user.
    Action: For further details, turn on tracing and re-execute the operation. If the error persists, contact Oracle Customer Support
    Maybe this will be a little help for you.
    Helena

  • Help - Newbie - getting "ORA-12571: TNS: packet writer failure" ERROR

    Hi all,
    Not sure where to post this, so trying for the general forum to start...
    I have also searched and read all the forums for help on this already as well the Oracle documentation and anything I could find from several on-line searches, etc.
    I have Oracle 8i Enterprise Edition and Oracle Forms 6i installed on Win2K. Everything worked fine when it was just Oracle 8i running, ie: connecting to the database in SQLPlus Worksheet, but when I try and connect to the database in the datablock wizard in forms I get the ORA-12571: TNS: packet writer failure error!
    Don't tell me to re-install, I've done that like 6 times already. I've check the tnsnames.ora files and tried that fix already. I don't know what else to try short of fdisk and redoing everything from scratch again, but I don't have time for that as this machine is used daily for other tasks.
    Any help or suggestions are appreciated!!!
    Thx in advance!
    Michelle.
    PS: Note to Oracle support staff if you are listening (pardon the pun). Your one line of help for ORA-12571 in the existing support files is rather similar to the Hitchhikers Guide to the Galaxy's info for Earth... After seeing how many people have posted about this problem and how few resources or real answers there are out there, you might want to consider updating the info on this error, because is deserves something more than "mostly harmless"!

    This question probably best belongs on the General database forum.

  • ORA-12571-TNS: PACKET WRITER FAILURE

    Hi All,
    am using oracle 6i and facing this problem when am connecting Forms to Database..
    Error Encounterd:ORA-12571-TNS: PACKET WRITER FAILURE.
    Plz help.
    Regards,
    Neha

    this error usually network problem..... i googled it found some solutions try
    his is usually due to an improper sqlnet.ora setting. Here are some possible causes and remedies:
    ** Loose network cables. This error has been observed when there was a loose cable connection to the SCSI disk array (on an Oracle Parallel Server system). Related errors were also subsequently noted in the NT event log.*
    ** IP address conflict (Oracle 9.0.1).*
    ** Authentication services. One solution is to edit the sqlnet.ora file and change the line:*
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    to
    SQLNET.AUTHENTICATION_SERVICES= (NONE)
    After saving the updated file, he was able to hit the retry button on the install and the creation of the database succeeded.

  • 12571 - ORA-12571: TNS:packet writer failure Failed SQL stmt

    hi, sir,
       My script work successfully and when i am try to script mover software every thing done fine but at the end i face this(12571 - ORA-12571: TNS:packet writer failure Failed SQL stmt) error. so I read few article they told about this is antivirus issue, so please tell me, can i re-run the script mover or not.
    Samiullah

    Hi Neeraj,
    This is My Listerner file
    # listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    HRCS9 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.204)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_HRCS9 =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
          (PROGRAM = extproc)
    This is my tns file
    # tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    HRCS9 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.204)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = HRCS9)
    both file working good and ping
    Samiullah

  • ORA-12571 TNS PACKET WRITER FAILURE --urgent help required

    I'm facing ORA-12571 TNS PACKET WRITER FAILURE error
    Platform is windows 2000/ tomcat / appache server / oracle 8.1.7
    This is not frequently happening. When the load increases, I'm facing this error? What type of parameters should I concentrate.
    DB is running on MTS.
    It is urgent.
    Could anyone throw some light on it?

    This question probably best belongs on the General database forum.

  • ORA-12571 TNS: packet Writer Filure

    Hi Yogi,
    tHANK YOU FOR YOUR REPLY.
    I have reinstalled Oracle 8i again..
    Starting Oracle DBA studio I am getting folowing error:
    ORA 12571 tns: PACKET WRITER FALIURE
    PLEASE ADVISE..
    THANK YOU in advance..
    Rajiv

    This question probably best belongs on the General database forum.

  • Problems switching users and recovering from long sleep sessions

    I upgraded my 2008 MacBook Pro to Mavericks and am now having issues with switching users and recovering from sleep. I can sometimes go to the login window but the system hangs when switching from one user to another. It often hangs after long sleep sessions.
    Often I am finding that switching off and back on i sth easiest solution but I am getting a bit sick of it. Anyone have any suggestions?

    funkyblue:
    I usually leave my Pismo on and allow it to sleep. I find that waking from sleep and general functioning of the computer works a lot better if from time to time (I do it at least weekly) I shut down the computer, start up in Safe Mode, log in, empty Trash and reboot normally. The emptying Trash part clears the font caches.
    You should consider doing other maintenance procedures, if you don't already. Gulliver's Mac OS X System Maintenance has good ideas with linked resources.
    Please do not hesitate to post back with further questions or comments.
    Good luck.
    cornelius

  • Urgent solution to this problem "Attempt to reset display driver and recover from timeout failed"

    Hi wonderful people at HP,
           I would be glad if you can solve this problem in my system. I want this to be urgent enough because I am graduating by March 1st 2011 and I want many things to be completed on my system.
           I have previously purchased warranty with hp for three times for tune out service, software and hardware help but nothing has been materialized, I am sorry to say but I just lost my money.
           My system, from the time of purchase, had the same persistent problem of overheating and also heavy noise, I told this to several people of HP but they never seem to respond properly. In fact my friend had a similiar problem in DELL and they responded promptly and sent him a new computer system. I don't know what to do. It will be ok if my system can function for one more month. I WOULD BE GRATEFUL TO YOU IF YOU CAN SOLVE THIS PROBLEM.
        Regards,
        KBPN

    Re your 116 BSOD...
    "It's not a true crash, in the sense that the Blue Screen was initiated only because the combination of video driver and video hardware was being unresponsive, and not because of any synchronous processing exception".
    Since Vista, the "Timeout Detection and Recovery" (TDR) components of the OS video subsystem have been capable of doing some truly impressive things to try to recover from issues which would have caused earlier OS's like XP to crash.
    As a last resort, the TDR subsystem sends the video driver a "please restart yourself now!" command and waits a few seconds.
    If there's no response, the OS concludes that the video driver/hardware combo has truly collapsed in a heap, and it fires off that stop 0x116 BSOD.
    If playing with video driver versions hasn't helped, make sure the box is not overheating.
     Try removing a side panel and aiming a big mains fan straight at the motherboard and GPU.
     Run it like that for a few hours or days - long enough to ascertain whether cooler temperatures make a difference.
    If so, it might be as simple as dust buildup and subsequently inadequate cooling.
    I would download cpu-z and gpu-z (both free) and keep an eye on the video temps
    For more information please read this blog 
    http://captaindbg.com/bug-check-0x116-video_tdr_error-troubleshooting-tips/
    http://msdn.microsoft.com/en-us/library/windows/hardware/ff557263%28v=vs.85%29.aspx
    Advice offered in good faith. It is your decision to implement same.

  • Can't find the set up ipad    Need to reboot the system and recover from icloud but not sure how to do this

    Not certain how to reboot the ipad.   Had some instructions but alas stumped on set up.   I have backed up in ICloud but need to get to a "set up"process

    You restore from an iCloud  backup on the iPad itself. You have to reset the iPad in the settings app. Settings>General>Reset>Erase All Content and Settings. You will then be starting from the beginning - you will be setting the iPad up all over again.
    This article explains how to do it.
    http://gigaom.com/apple/ios-101-set-up-and-restore-from-icloud-backup/

Maybe you are looking for

  • Navigating from one movie to a particular frame in another

    Is it possible to navigate to a particular frame in a different movie... the reason being, I am trying to minimise the size (mb) of the movie so it doesnt get to a stage where the machine it is on bogs down. For example, I am cutting the movie down i

  • Open a PDF file using PDF reader

    Hi All, How to open a dynamique adresse of pdf files with adobe reader and not with the browser using URLLoader Thanks, Amine

  • PO Line column displaying same data

    Hello, I have created a custom .rtf for the Standard PO. When previewing the pdf in iSupplier one of the columns (attribute1 from PO_LINES) is displays the same data when a PO has multiple lines. I currently have the following in the BI Properties fo

  • Reg: STARTSAP.EXE

    Hi all, When i am going to start my SAP system( windows+oracle) from MMC, that is showing like sap service is not available as installed service....even though SAPSID_00 service is not there in our sevices.......and at os level log file is showing ll

  • Responsive design question

    I know how to center my edge on the browser. But what I wanted is to have an animation of door closing/opening like, for each page. So you click on the navigation menu and the door closes and opens and behind is your page. I want that door opening be