Rotate Listener log on Windows

Can someone please tell me how to rotate the listener.log without bouncing the listener on a Windows machine.
We have unix kit installed on our servers and I did:
D:\oracle\product\10.1.0\Db_1\NETWORK\log>pwd
d:/oracle/product/10.1.0/db_1/network/log
D:\oracle\product\10.1.0\Db_1\NETWORK\log>ls -lart
total 577743
drwxrwxrwx 0 Jun 24 2005 ../
-rw-rw-rw- 0 Jul 16 16:53:02 sqlnet.log
-rw-rw-rw- 288,468,458 Aug 09 18:38:13 Copy of listener.log
-rw-rw-rw- 0 Aug 09 18:44:11 a.txt
drwxrwxrwx 0 Aug 09 18:44:11 ./
-rw-rw-rw- 0 Aug 10 11:21:33 listener.log
D:\oracle\product\10.1.0\Db_1\NETWORK\log>cat a.txt > listener.log
The process cannot access the file because it is being used by another process.
D:\oracle\product\10.1.0\Db_1\NETWORK\log>
It works well in linux environment but here in windows its not working. Can someone please tell me how to rotate it in Windows environment.
Regards

Hi
I tried the following and it worked on another server.
C:\> cd \oracle\ora92\network\log
C:\oracle\ora92\network\log> lsnrctl set log_status off
C:\oracle\ora92\network\log> rename listener.log listener.old
C:\oracle\ora92\network\log> lsnrctl set log_status on
But name of my listener is LISTENER_1. So these commands are not working here.
Regards
Message was edited by:
Singh

Similar Messages

  • Example] Shell Script for rotate listener log (V0.2)

    create file /home/oracle/sbin/rtlstenlog.txt
    #configure for rtlstenlog.sh, OHOME=ORACLE_HOME, LISTEN=LISTENER NAME,NFILE=listener log
    OHOME=/oracle/product/10.1.0/db
    LISTEN=LISTENER_CTPPDB01
    NFILE=listener_ctppdb01.log
    and create script file
    #!/bin/sh
    #V0.2 for every listener name
    # refer http://surachart.blogspot.com
    source /home/oracle/sbin/rtlstenlog.txt
    export ORACLE_HOME=${OHOME}
    DATE=`/bin/date +'%Y%m%d'`
    DIR==${OHOME}/network/log
    ODIR=${OHOME}/network/log/old
    FILE=${OHOME}/network/admin/listener.ora
    if [ -f ${FILE} ]
    then
    LOGFILE=${OHOME}/network/log/${NFILE}
    if [ ! -d ${ODIR} ]
    then
    /bin/mkdir ${ODIR}
    fi
    if [ -f ${LOGFILE} ]
    then
    /bin/mv ${LOGFILE} ${ODIR}/${NFILE}.${DATE}
    ${OHOME}/bin/lsnrctl << EOF
    set current_listener ${LISTEN}
    set log_status off
    set log_status on
    exit
    EOF
    /bin/gzip ${ODIR}/${NFILE}.${DATE}
    fi
    fi
    test
    [oracle@CTPPDB01 sbin]$ ./rtlstenlog.sh
    LSNRCTL for Linux: Version 10.1.0.4.0 - Production on 05-APR-2006 16:13:17
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    Welcome to LSNRCTL, type "help" for information.
    LSNRCTL> Current Listener is LISTENER_CTPPDB01
    LSNRCTL> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DB01_VIP)(PORT=1521)))
    LISTENER_CTPPDB01 parameter "log_status" set to OFF
    The command completed successfully
    LSNRCTL> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DB01_VIP)(PORT=1521)))
    LISTENER_CTPPDB01 parameter "log_status" set to ON
    The command completed successfully
    ls -la /oracle/product/10.1.0/db/network/log/old/
    total 64
    drwxr-xr-x 2 oracle dba 4096 Apr 5 16:13 .
    drwxr-xr-x 3 oracle dba 4096 Apr 5 16:13 ..
    -rw-r----- 1 oracle dba 52564 Apr 5 16:13 listener_ctppdb01.log.20060405.gz
    Message was edited by:
    HunterX (Surachart Opun)

    Hi again,
    so far I've constructed this:
    cd /input
    for file in `ls *log`
    do
    echo "Copying " $file
    cp $file /output/log.$file.`date +%d%m%y`
    done
    Quite there. I'm cding to directory, i'll focus later how to set some environmental parameters.
    Problem with zipping is that I don't know exact logfiles names. Each day there's a new name. So zip -q filename.zip filename.log isn't quite enough and it's impossible to use wildcards. The switch -q and checksums were welcome suggestions.
    Thanks again,
    Juha
    Message was edited by: J.Otava

  • Is it safe to compress Listener logs while system is running ???

    Hi there,
    I am new to RAC and am working on 24*7 databases in a RAC CLuster.
    There is a very large listener_scan2.log in the /u01/11.2.0/grid/log/diag/tnslsnr/<server name>/listener_scan2/trace folder, the file is about 2.8 G.
    I have done some research and have seen that compress -f has been recommended via crontab, this has the advantage of being something that can be automated and run monthly
    e.g.
    ## listener log aging
    17 0 * * 0 /usr/bin/compress -f /u01/app/grid/diag/tnslsnr/node1/listener/trace/listener.log
    17 0 * * 0 /usr/bin/compress -f /u01/app/11.2.0/grid/log/diag/tnslsnr/node1/listener_scan1/trace/*log
    17 0 * * 0 /usr/bin/compress -f /u01/app/11.2.0/grid/log/diag/tnslsnr/node1/listener_scan2/trace/*log
    17 0 * * 0 /usr/bin/compress -f /u01/app/11.2.0/grid/log/diag/tnslsnr/node1/listener_scan3/trace/*log
    Is this safe to run these while the system and listener are up and running, will the listener create a new listener.log file if the old one is compressed even if listener is not restarted.
    Other blogs suggest using lsnrctl and changing the listener log location and then renaming/compress/delete the old log file and then set the listener log location back again ...
    Has anyone used this in a Production system ?
    I welcome your feedback.
    many thanks,
    Rob

    http://danthedba.blogspot.in/2009/11/manage-listener-log-files-in-11g.html
    http://msutic.blogspot.in/2009/06/truncating-rotating-flushing.html
    https://kkempf.wordpress.com/2011/06/10/rotating-listener-logs-without-bouncing-the-listener/

  • Windows bactch job to trim the Listener log

    Hi All ,
    Can you help me to write a Windows batch job to trim the listener.log on periodically.
    I have the below steps, which i do manually but i won't which needs to be put in batch.
    copy listener.log listener_<today>.log
    lsnrctl set log_file listener_new.log
    del listener.log
    lsnrctl set log_file listener.log
    lsnrctl reload
    del listener_new.log
    Appriciate the Help.
    Thanks in Advance.

    Have a look here:
    http://www.wikihow.com/Write-a-Batch-File
    You have the commands, so you only need the batch file around it
    HTH
    FJFranken

  • RMI listener stops whenever the user logs off Windows

    Hi guys...
    I have a problem whereby the RMI listener stops whenever the user logs off Windows.
    I've gone through the net and the only solution was to add "-Xrs" to the end of the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IBM Tivoli Identity Manager Adapter" service for the ImagePath statement.
    Unfortunately for me, that did not work.
    Anybody knows how I can go around fixing this.
    Much appreciated.

    What's the RMI listener?
    Do you mean the RMI Registry?
    In which case the solution is to add that same flag when you run the registry.

  • TNS-12505 in listener.log when opening SqlDeveloper 2.1 (maybe a bug?)

    Hi I've a strange problem:
    1 download sqldevloper
    2 create a connection using Connection type= TNS. Is select an entry in my tnsnames.ora to connect to an istance X (service_name is specified) on server Y. The first strange thing is that every entry in the tnsnames is displayed two times.
    3 If I test the connection it works..
    4 Close sqldeveloper
    5 When I open sqldeveloper (just open the program without connect to anything) i receive no errors but i see in my listener.log (of the server Y) :
    04-DIC-2009 11:39:31 * (CONNECT_DATA=(SID=null)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=null))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.105)(PORT=2285)) * establish * null * 12505
    TNS-12505: TNS: il listener non ha risolto SID indicato nel descrittore di connessione
    192.168.8.105 is my ip address
    I don't understand why it uses SID= instead of SERVICE_NAME=
    If i place the mouse cursor over the connection icon (without click) i see an error TNS-1252 with the connection desripter: Y, 1521,NULL (i think that this null is causing all this problems) .
    Why? When sqldeveloper opens it tries to test the connection?
    Even if it is like this the connection should work: if I try to connect whit that connection everything works fine.
    I do something worng? It is a bug?
    With SqlDeveloper 1.5 everything works fine. Everything is the same so I guess that is a problem of the new version (2.1).
    Oracle client oracle 10.2, SqlDeveloper Version 2.1.0.63, Windows XP Professional Service Pack 3
    Hope someone can help me, if something isn't clear I can post more details (just tell me what you need).
    Thanks, best regards.
    Adriano Aristarco

    Hi Adriano,
    "network alias"
    A network alias that has been found by SQLDeveloper java (as opposed to the jdbc driver) in tnsnames.*.
    "connect identifier"
    Uses oci 'thick' driver i.e. oracle C code find the tnsnames entry for you - requires additional Oracle client side software such as instant client. Without the additional software you get 'no ocijdbc11 in java.library.path'
    Do you have multiple entries due to multiple tnsname.* files (move the inappropriate tnsname.* to a different backup directory). If you picked the 'wrong one' i.e. one with the right name but from an old tnsnames.* file, it might not be able to connect so you get error messages.
    You cannot use "connect identifier" unless you have the additional Oracle client side software (I can test the latest instant client to confirm that works if you want to try this option, I do not have the version numbers for this in easy reach).
    -Turloch

  • Errors in alert log and listener log and "alter database mount exclusive"

    Hello!
    I need a help.
    Database 11R2 works under MS Windows Server.
    Whwn I start it using Services, according alert log it is started by command "alter database mount exclusive".
    Next - alter database open.
    After this, it seams that program, which should put data into database, can not work with it, because I see errors in alert log: ora-12537, 12560, 12535, 12570, 12547.
    What does itmean and what to do?
    This is extract from alert_log
    ORACLE_BASE from environment = C:\Oracle
    Mon Feb 04 14:54:53 2013
    alter database mount exclusive
    Successful mount of redo thread 1, with mount id 1458539517
    Database mounted in Exclusive Mode
    Lost write protection disabled
    Completed: alter database mount exclusive
    alter database open
    Thread 1 opened at log sequence 3105
    Current log# 3 seq# 3105 mem# 0: C:\ORACLE\ORADATA\xxx\REDO03.LOG
    Successful open of redo thread 1
    MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
    SMON: enabling cache recovery
    Successfully onlined Undo Tablespace 2.
    Verifying file header compatibility for 11g tablespace encryption..
    Verifying 11g file header compatibility for tablespace encryption completed
    SMON: enabling tx recovery
    Database Characterset is AL32UTF8
    No Resource Manager plan active
    Mon Feb 04 14:55:04 2013
    replication_dependency_tracking turned off (no async multimaster replication found)
    Starting background process QMNC
    Mon Feb 04 14:55:06 2013
    QMNC started with pid=20, OS id=2860
    Completed: alter database open
    Mon Feb 04 14:55:11 2013
    Starting background process CJQ0
    Mon Feb 04 14:55:11 2013
    CJQ0 started with pid=25, OS id=2000
    Mon Feb 04 14:55:11 2013
    db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Mon Feb 04 15:00:29 2013
    Starting background process SMCO
    Mon Feb 04 15:00:29 2013
    SMCO started with pid=32, OS id=3212
    Edited by: kogotok1 on Feb 4, 2013 4:54 PM

    Thank you.
    But in the same time - when I see in alert log those error messages ora -12560, 12537,12535,12570 and so on - clients programs, whiie try to connect, hang up.
    For sql plus takes 20 minutes to connect.
    lsnrctl status gives the following
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 04-FEB-2013 16:01
    :46
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx-BD.mosxxx
    .elektra.net)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date 01-FEB-2013 10:22:48
    Uptime 3 days 5 hr. 39 min. 54 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\Oracle\listener.ora
    Listener Log File c:\oracle\diag\tnslsnr\xxx-BD\listener\alert\l
    og.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxx-BD.mosxxx.elektra.net)
    (PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XXX" has 2 instance(s).
    Instance "XXX", status UNKNOWN, has 1 handler(s) for this service...
    Instance "xxx", status READY, has 1 handler(s) for this service...
    Service "XXXDB" has 1 instance(s).
    Instance "xxx", status READY, has 1 handler(s) for this service...
    The command completed successfully
    To tell the truth I am confuse - I thought I have only 1 service "XXXDB" and 1 instance - "xxx".
    May be I have wrong entries in tnslsnr.ora?

  • ORA-12535 error but TNSPing Works and listener logs connection

    We recently migrated our firewall and then started seeing this problem for users outside of our own subnet. However, although the user gets this error when launching the application, the workstation is able to TNSPing the server successfully and listener.log does log the connection.
    I was hoping someone might have some ideas or suggestions as to what might be causing the error despite the apparent connectivity to the database.
    Thanks in advance.

    Thanks so much for the suggestions.
    1. telnet <host> 1521 connects
    2. sqlplus <username>/<pwd>@<instance> returns the ORA-12535 error
    Finally, the sqlnet.log on the client side doesn't log anything when launching the application so I have no information as to what exactly is occurring at that point. However, the sqlplus command above logged the following:
    VERSION INFORMATION:
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
    Time: 26-JAN-2007 08:43:41
    Tracing not turned on.
    Tns error struct:
    nr err code: 0
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 60
    nt OS err code: 0
    I've been doing more research on this -- please note that I'm not an Oracle dba so I am just getting familiar with lots of things -- and have learned that user connect requests come in through 1521 but are then randomly redirected to other ports. Given the new firewall, I'm wondering if it's an issue that the random ports being selected aren't open for the users outside of our subnet. Does this sound like a plausible explanation? If so, how do administrators generally handle this -- by opening the necessary ports on the firewall? Is there some other standard approach?
    Again, thanks so much for any assistance you can provide.

  • Regarding listener.log file

    Hi,
    The listener.log file is showing the following code snippet.But when I put this code to my source file (Automation Plugin), it is giving error as 'FullPathToAlias' unrecognised symbol.
    // Move this to the top of the routine!
    Handle aliasValue = NULL;
    FullPathToAlias("C:\Test.jpg", aliasValue);
    Do I have to include any header file? Does any one have any idea? I am just wanting to dispaly an image preview on dialog box(Automation plugin).
    Please give any idea how can I get the image referrence for the first time from the Hard Disk?
    Can anyone help me out.....................?
    Thanks and Regards

    Mmh, so you're trying to do something like a file-preview?
    I don't know if this is possible, mainly because at the moment
    I can see no way getting any image data before you've loaded
    the image in photosphop (with just using the sdk and not any
    mac/win api)
    If you're developing only for windows targets, you might want to
    try to develop a mfc type plugin like the "mfcplugin" from the filter-
    plugin examples. It does give a preview of the result of an filter
    applied to an image, so I'd guess you can change this with the help of the win-api to preview some picture file. For MFC there are also some
    nice solutions on codeproject you could easily integrate in your plugin:
    a thumbnail control:
    http://www.codeproject.com/miscctrl/thumbnailctrl.asp
    and a picture control:
    http://www.codeproject.com/cs/miscctrl/ScalablePictureBox.asp
    Otherwise the "dissolve"-plugin from the filters example is for mac and win os's and offers also a preview (of a filter application), maybe this will give you some more insight.

  • Turning off listener.log?

    I have a huge listener.log file (around 9GB) and it is causing storage issues. Is it safe to turn the logging off in the lstnctl? Another alternative is to turn it off, rename the listener.log file and then turn back on and archive the old listener file?
    Also, having a file this big on a Unix system, is it possible that turning the logging off will increase system performance?
    Thanks,

    You can 'rotate' the listener log file by using a script, like
    #!/usr/bin/sh
    #set -vx
    msg_exit()
    sts=$1
    shift
    echo "$@" >&2
    exit $sts
    TNS_ADMIN=${TNS_ADMIN:-${ORACLE_HOME}/network/admin}
    LISTENERORA=$TNS_ADMIN/listener.ora
    [[ ! -f "$LISTENERORA" ]] && msg_exit 1 "${LISTENERORA} not found. exiting"
    # bepaal de naam van de listener
    lsnr_name="`awk '/^LISTENER/{print $1}' $LISTENERORA | tr [A-Z] [a-z] `"
    echo $lsnr_name
    # bepaal de naam van de log file
    logfil="`awk '/LOG_FILE/ {print $NF}' $LISTENERORA`"
    logfil=${logfil:-listener.log} # defaults to listener.log when not set
    # bepaal de naam van de log directory
    logdir="`awk '/LOG_DIRECTORY/ {print $NF}' $LISTENERORA`"
    logdir=${logdir:-${ORACLE_HOME}/network/log} # defaults to $ORACLE_HOME/network/log when not set
    TIMEST="`date +%Y%m%d%H%M%S`"
    # bepaal of de listener draait
    if (ps -ef | grep "\"tnslsnr $lsnr_name\"" | grep -v $$ >/dev/null)
    then
    # listener draait
    echo "$lsnr_name $logdir/$logfil"
    echo "now stopping ${lsnr_name}"
    lsnrctl stop $lsnr_name
    echo "mv ${logdir}/$logfil} ${logdir}/${logfil}.${TIMEST}"
    mv $logdir/$logfil ${logdir}/${logfil}.${TIMEST}
    touch ${logdir}/${logfil}
    echo "Now starting listener $lsnr_name"
    lsnrctl start $lsnr_name
    fi
    Sybrand Bakker
    Senior Oracle DBA

  • Listener Log in 11gR2

    I have located my listener.log my using lsnrctl stat <listener name>
    my particular log is in $ORACLE_HOME/log/diag/tnslsnr/<host name>/<sid>/alert/log.xml
    Where is this log file and location actually specified ?
    For the same lsnrctl stat command from above, I can see my listener.ora config file. However the above listener log location is not specified in it. In fact LOG_DIRECTORY_<SID> actually points to $ORACLE_HOME/network/admin - however there are absolutely no log files there at all !
    The listener.ora does specifiy a listener_ifile.ora, however at 2 bytes in size, this file appears to be empty
    Anyone able to make sense of how 11gR2 is now doing this ?
    Jim

    Try in directory:
    $ORACLE_HOME/log/diag/tnslsnr/<host name>/<sid>/traceOr try to use SHOW TRC_DIRECTORY to get listener log directory:
    c:\>lsnrctl
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-JAN-2012 12:07:07
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Welcome to LSNRCTL, type "help" for information.
    LSNRCTL> set current_listener listener
    Current Listener is listener
    LSNRCTL> show trc_directory
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    listener parameter "trc_directory" set to c:\app\oracle\diag\tnslsnr\xxx\listener\trace
    The command completed successfullyEdited by: P. Forstmann on 11 janv. 2012 12:03

  • Need to Create a New Listener Log file 9i

    Hi, I have a issue with a oracle 9i database.
    First the listener.log file is 1.2G not good on a 25G server..
    How do you create and delete the listener file? Windows 2000 OS...
    Second I also have an issue with the archive log files... I have about 150 file 102M each...Again Not good...
    Need HELP drowning in a sea of oracle... Given the Shrink command....
    At least the Listener issue first then the archive log problem..
    Thank you...

    carlo_sc wrote:
    yes, we normally do a full daily backup and the archive logs are then deleted..But the Job didn't finish
    last night. Also we had big Network issue yesterday and I believe that caused the issue with this server
    causing an excessive amount of log files to be created...
    So with simply thing with lister is just too:
    1) stop listener service
    2) delete Log file.... (that won't mess anything up on restart ) I'm very skittish about manually deleting stuff from oracle..
    Got burned in Sept of last year big timeIt's just a log file. It's for your own use if needed. oracle doesn't use it or require it. You even have an option in the listener to not even write to it in the first place.
    3) restart listener service
    The archive logs : What if I move some of the files to another location then perform the a full daily backup will the that
    solve my archive log issues....
    Thanks for all the quick responses
    Edited by: carlo_sc on Jan 15, 2010 10:09 AMYou say you already have a backup job that gets the archivelogs and deletes them after backup? And the only real problem here is that it failed? Fix the failure and run it again. You can, in a pinch, manually move the archivelogs, but then YOU are responsible for keeping up with them.
    Edited by: EdStevens on Jan 15, 2010 9:32 AM

  • Does listener log file need to be purged in Oracle 11g DB

    We have the Oracle 11g database setup. I have a query as to if it is required to purge the listener log file in Oracle 11g database. I believe that the size of the listener log file is infinite and we need to manually purge the listener log file or is there an automatic log rotation of the listener log file?
    I hope my query is clear that if it is required to manually purge the listener log file or is there an automatic log rotation for this file.
    Please revert with the reply to my query.
    Regards

    972145 wrote:
    Thanks for your answer but does it mean that there is no automatic log rotation for the listener log file in Oracle 11g database?
    Regardshttp://uhesse.com/2011/06/01/adrci-a-survival-guide-for-the-dba/
    set the listener home inside adrci and do
    purge -age 2880 -type tracepurges all tracefiles older than 2 days I did not tried this but above link used same for alertlog trace file.

  • Listener log clarifications

    hi,
    we have bmc monitoring system where we got database down but actually we can see the database is up and listener is working fine...
    my question is i got some thing like this below in the listener log..it means there is any problem in network while pinging?
    162.53.93.115)(PORT=35133)) * establish * p070 * 0
    30-JUL-2009 12:51:21 * ping * 0
    30-JUL-2009 12:51:21 * ping * 0
    30-JUL-2009 12:51:21 * ping * 0
    30-JUL-2009 12:51:21 * ping * 0
    30-JUL-2009 12:51:21 * ping * 0
    30-JUL-2009 12:51:23 * ping * 0
    30-JUL-2009 12:51:23 * ping * 0
    30-JUL-2009 12:51:23 * ping * 0
    30-JUL-2009 12:51:23 * ping * 0
    30-JUL-2009 12:51:23 * ping * 0
    30-JUL-2009 12:51:24 * ping * 0
    30-JUL-2009 12:51:24 * ping * 0
    30-JUL-2009 12:51:24 * ping * 0
    30-JUL-2009 12:51:24 * ping * 0
    30-JUL-2009 12:51:24 * ping * 0
    30-JUL-2009 12:51:25 * ping * 0
    30-JUL-2009 12:51:25 * ping * 0
    30-JUL-2009 12:51:25 * ping * 0
    30-JUL-2009 12:51:30 * ping * 0
    30-JUL-2009 12:51:30 * ping * 0
    Thanks,
    Raman.

    It seems someone (something) is tnsping'ing that listener, like this:
    C:\>tnsping localhost 5
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 30-JUL-2009 20:04:17
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    C:\Oracle\XE\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used HOSTNAME adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
    OK (10 msec)
    OK (20 msec)
    OK (0 msec)
    OK (0 msec)
    OK (0 msec)
    C:\>tnsping localhost 3
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 30-JUL-2009 20:04:21
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    C:\Oracle\XE\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used HOSTNAME adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
    OK (20 msec)
    OK (10 msec)
    OK (0 msec)
    C:\> (print the tail of the ...\listener.log)
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 30-JUL-2009 20:04:11
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    30-JUL-2009 20:04:17 * ping * 0
    30-JUL-2009 20:04:17 * ping * 0
    30-JUL-2009 20:04:17 * ping * 0
    30-JUL-2009 20:04:17 * ping * 0
    30-JUL-2009 20:04:17 * ping * 0
    30-JUL-2009 20:04:21 * ping * 0
    30-JUL-2009 20:04:21 * ping * 0
    30-JUL-2009 20:04:21 * ping * 0Better find out how bmc (Patrol?) decides up/down status of the instance.

  • CryptAcquireContext failing with ERROR_FILE_NOT_FOUND (2L) when user not logged on Windows 8.1

    I am having a hard time migrating a C++ CryptoAPI-based application that currently runs on Windows Server 2008 to Windows 8.1. The scenario is:
    This application is eventually triggered by WatchDog.exe, which in its turn is triggered when the computer is started by Windows' Task Scheduler.
    Task Scheduler uses the following rules to start the WatchDog.exe:
    A Administrator User Account;
    Run Whether user is logged on or not;
    UNCHECKED: Do not store password. The task will only have access to local resources;
    Run with Highest Privileges;
    Configure for Win 8.1;
    Triggered at system startup.
    The server sits there, nobody logged, until in a given scenario WatchDog.exe starts the application. Application log confirms that the owner of the process (GetUserName)
    is the very same user Task Scheduler used to trigger WatchDog.exe.
    It turns out that this application works fine in Windows Server 2008, but in windows 8.1 a call to CryptAcquireContext fails
    with return code ERROR_FILE_NOT_FOUND (2L). The odd thing is that the application will NOT fail if, when started, the user is physically logged
    on the machine, although it was not the user who started the application manually.
    I took a look at the documentation and
    found:
    "The profile of the user is not loaded and cannot be found. This happens when the application impersonates a user, for example, the IUSR_ComputerName account."
    I had never heard of impersonification, so I made a research and found the APIs LogonUser,ImpersonateLoggedOnUser and RevertToSelf.
    I then updated the application in this way:
    HANDLE hToken;
    if (! LogonUser(L"admin", L".", L"XXXXXXXX", LOGON32_LOGON_BATCH, LOGON32_PROVIDER_DEFAULT, &hToken))
    logger->log (_T("Error logging on."));
    else
    logger->log (PMLOG_LEVEL_TRACE, _T("Logged on."));
    if (! ImpersonateLoggedOnUser(hToken))
    logger->log (_T("Error impersonating."));
    else
    logger->log (_T("Impersonated."));
    err = XXXXXXXXX(); // calls function which will execute CryptAcquireContext
    if (! RevertToSelf())
    logger->log (_T("Error reverting."));
    else
    logger->log (_T("Reverted."));
    Excerpt with the call to CryptAcquireContext:
    // Get the handle to the default provider.
    if(! CryptAcquireContext(&hCryptProv, cryptContainerName, MS_ENHANCED_PROV, PROV_RSA_FULL, 0))
    DWORD e = GetLastError();
    _stprintf_s (logMsg, 1000, _T("Error %ld acquiring cryptographic provider."), e);
    cRSALogger->log (logMsg);
    return ERR_CCRYPT_NO_KEY_CONTAINER;
    cRSALogger->log (_T("Cryptographic provider acquired."));
    As the result, I got the log:
    [2015/01/08 20:53:25-TRACE] Logged on.
    [2015/01/08 20:53:25-TRACE] Impersonated.
    [2015/01/08 20:53:26-ERROR] Error 2 acquiring cryptographic provider.
    [2015/01/08 20:53:26-TRACE] Reverted.
    That seems to show that impersonation is working properly, but still I get Error 2 (ERROR_FILE_NOT_FOUND) on CryptAcquireContext.
    Summary:
    On Windows Server 2008, the very same application runs properly even without the calls to LogonUser/Impersonate/Revert.
    On Windows 8.1, the application, with or without the calls to LogonUser/Impersonate/Revert, will only work properly if the user is logged on (which
    is not acceptable).
    Any thoughts where I can run to in order to get this working on windows 8.1?
    Thank in advance,
    Dan

    There are a couple of issues.
    Based on the parameters being used in CryptAcquireContext().  A profile needs to be loaded and your app has to be running as the same user who created the keyset. (which is why it works when a user is logged on Windows 8.1) Also, impersonation
    does not load your user profile, you need to call LoadUserProfile().  It seems like you should be using a machine keyset for your scenario if you want to do this when nobody is logged on.
    Take a look at the following KB article for more information.
    https://support.microsoft.com/kb/238187?wa=wsignin1.0
    thanks
    Frank K [MSFT]

Maybe you are looking for

  • Special character (  )  causes JFTRANS to stop processing

    Hello, we have an issue with some data from the main frame. In case the data stream contains the character "" JFTRANS stops at this mark. All the rest of the file is not processed. We tried to make a Character Mapping from to a space. As a result we

  • Creation of sales order with reference to Quotation using BAPI

    Hi All, I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating sales order. Can you please tell how can I create a sales order with reference to a Quotation.

  • Printing programmat​ically a window

    The User Interface of my VI has different looks depending on the position of one of the menus. For documentation I would like to print out all the menu items looks. I think it's no problem to to loop over the menu items, but how can I programmaticall

  • Security best practices?

    I'm not sure if this is the right group to post this questions but... Our current architecture consists of seperate web server (iPlanet) and java server (WLS 5.1). Each server is in a seperate DMZ with a secure network containing our DB. The webserve

  • NetNewsWire Script

    I'm having problems with an applescript. I would appreciate any help with getting it to work. The syntax is: tell application "NetNewsWire" set unreadheadlines to every headline of subscription "Engadget" whose isRead is false get title of unreadhead