Oracle bat scripts on windows log file generation

I want to generate logfile/recording of this .bat file, msglog file is not generating any thing , any idea or any other suggestion how i can generate logfile ? like we can do in crotab scropt>> script.log etc
set ORACLE_HOME=c:\oracle\10
set ORACLE_SID=clin
sqlplus ops/***** @ C:\u06\users\db\oracle\scripts\ops\datastore\scripts\main\main2xwk.sql msglog=opsshell3.log

DBA2011 wrote:
i am hoping to log all the action main2xwk.sql do, in one single logfileAnd exactly how do you anticpate that passing sqlplus the string 'msglog=opsshell3.log' will accomplish that? What do you expect sqlplus to do with that?
Let's deconstruct your .bat file
set ORACLE_HOME=c:\oracle\10
set ORACLE_SID=clinThe above two lines simply set a couple of environment variables, to be used by some process running in the same enviornment in whatever manner said process chooses. Since your next step executes sqlplus, we know it may choose to use them, and in fact it does.
sqlplus ops/***** @ C:\u06\users\db\oracle\scripts\ops\datastore\scripts\main\main2xwk.sql msglog=opsshell3.log The above line tells the OS to locate an executable file named 'sqlplus'
and make available to it the character string 'ops/***** @ C:\u06\users\db\oracle\scripts\ops\datastore\scripts\main\main2xwk.sql msglog=opsshell3.log
to use as it (sqlplus) sees fit. We know from the SQLPLus docs that sqlplus will parse that out as follows, with a 'space' as the delimiter.
"ops/*****"
will be broken down into username 'ops' and password '*****' and used to issue a connection request to a local database instance identified by the value of the environment variable ORACLE_SID.
"@ C:\u06\users\db\oracle\scripts\ops\datastore\scripts\main\main2xwk.sql "
Well, if you had closed the space between '@' and 'C:', sqlplus would have attempted to locate the file 'C:\u06\users\db\oracle\scripts\ops\datastore\scripts\main\main2xwk.sql' and process it. However, since you seem to have a space there (all I did was copy and paste the code you posted) it probably just gave up and did nothing because it found nothing appended directly to the '@' and the strings that follow the space after '@' have no special meaning at all to sqlplus.
"msglog=opsshell3.log"
If you had closed the space after the @, and sqlplus was able to locate and process 'main2xwk.sql', it would simply have used the string 'msglog=opsshell3.log' as the first command-line substitution parameter to be used by main2xwk.sql, however it was written to use it. Was main2xwk.sql written to accept a command-line parm? See http://docs.oracle.com/cd/B19306_01/server.102/b14357/ch5.htm#sthref1080

Similar Messages

  • FTP log file generation failed in shell script

    Hi ALL,
    I am doing FTP file transfer in shell script and able to FTP the files in to corresponding directory , But when i am trying to check the FTP status through the log files then its giving problem . please check the below code.
    for file in $FILENAME1
    do
    echo "FTP File......$file"
    echo 'FTP the file to AR1 down stream system'
    ret_val=`ftp -n> $file.log <<E
    #ret_val=`ftp -n << !
    open $ar1_server
    user $ar1_uname $ar1_pwd
    hash
    verbose
    cd /var/tmp
    put $file
    bye
    E`
    if [ -f $DATA_OUT/$file.log ]
    then
    grep -i "Transfer complete." $DATA_OUT/$file.log
    if [ $? -eq 0 ]; then
    #mv ${file.log} ${DATA_OUT}/../archive/$file.log.log_`date +"%m%d%y%H%M%S"`
    echo 'Log file archived to archive directory'
    #mv $file ${DATA_OUT}/../archive/$FILENAME1.log_`date +"%m%d%y%H%M%S"`
    echo 'Data file archived to archived directory'
    else
    echo 'FTP process is not successful'
    fi
    else
    echo 'log file generation failed'
    fi
    its giving syntax error end of file not giving the exact line number , please help me on thsi
    Regards
    Deb

    Thanks for ur reply
    Actually i did a mistake in the code i wrote the following piece of code below
    ret_val=`ftp -n> $file.log <<E
    #ret_val=`ftp -n << !
    so after the tilde symbol it as again taking the '# ' as a special character so it was giving error, so i removed the second line now its working fine.

  • Exchange 2010 SP3, RU5 - Massive Transaction Log File Generation

    Hey All,
    I am trying to figure out why 1 of our databases is generating 30k Log Files a day! The other one is generating 20K log files a day. The database does not grow in size as the log files are generated, the problem is log file generation.
    I've tried running through some of the various solutions out there, reviewed message tracking logs, rpc client access logs, IIS Logs - all of which show important info, but none of which actually provide the answers.
    I Stopped the following services to see if that would affect the log file generation in any way, and it has not!
    MS Exchange Transport
    Mail Submission
    IIS (Site Stopped in IIS)
    Mailbox Assistants
    Content Indexing Service
    With the above services stopped, I still see dozens (or more) log files generated in under 10 minutes, I also checked mailbox size reports (top 10) and found that several users mailboxes were generating item count increases for one user of
    about 300, size increases for one user of about 150Mb (over the whole day).
    I am not sure what else to check here? Any ideas?
    Thanks,
    Robert
    Robert

    Hmm - this sounds like an device is chewing up the logs.
    If you use log parser studio, are there any stand out devices in terms of the # of hits?
    And for the ExMon was that logged over a period of time?  The default 60 second window normally misses a lof of stuff.  Just curious!
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
    Rhoerick, 
    Thanks for the response. When checking the logs the highest number of hits were the (Source) Load Balancers, Port 25 VIP. The problem i was experience was the following: 
    1) I kept expecting the log file generation to drop to an acceptable rate of 10~20 MB Per Minute (Max). We have a large environment and use the exchange sevrers as the mail relays for the hated Nagios monitoring environment
    2) We didn't have our enterprise monitoring system watching SMTP traffic, this is  being resolved. 
    3) I needed to look closer at the SMTP transport database counters, logs, log files and focus less on the database log generation, i did do some of that but not enough of that. 
    4) My troubleshooting kept getting thrown off due to the monitoring notifications seeming to be sent out in batches (or something similar) stopping the transport service for 10 ~ 15 minutes several times seemed to finally "stop the transactions logs
    from growing at a psychotic rate". 
    5) I am re-running my data captures now that i have told the "Nagios Team" to quit killing the exchange servers, with their notifications, sometimes as much as 100+ of the same notifications for the same servers, issues. so far at a quick glance
    the log file generation seems to have dropped by about 30%. 
    Question: What would be the best counters to review in order to "Put it all together"? Also note: our Server roles are split, MBX and CAS/HT. 
    Robert 
    Robert

  • Exchange 2010 personal archive database massive log file generation

    Exchange Server 2010 SP3 + Update Rollup 4
    Windows Server 2008 R2, all updates
    VMware ESXi 5.5
    Server config: 2 x Xeon Quad Core 2.20GHz, 16GB RAM
    We recently started using personal archives. I created a database for this purpose ("Archive Mailboxes") on the same datastore as our live mailbox database ("Live Mailboxes"). It works great except that the mailbox maintenance generates
    massive amounts of log files, over 220GB per day on average. I need to know why. The Live Mailbox database generates around 70GB of log files every day. The database sizes are: Live = 159.9GB, Archive = 196.8GB. Everything appears to be working fine, there
    are no Error events related to archiving. There are 10025 MSExchangeMailboxAssistant warning events logged every day. I have moved those mailboxes back-and-forth to temp databases (both Live and Archive mailboxes) and the 10025 events have not stopped so I'm
    reasonably certain there is no corruption. Even if there were it still doesn't make sense to me that over 100 log files are generated every single minute of the day for the Archive store. And it's not that the database isn't being fully backed up; it is, every
    day.
    Do I need to disable the 24x7 option for mailbox maintenance to stop this massive log file generation? Should I disable mailbox maintenance altogether for the Archive store? Should I enable circular logging for the Archive store (would prefer to NOT do this,
    though I am 100% certain we have great backups)? It appears to me that mailbox maintenance on the Live store takes around 12 hours to run so I'm not sure it needs the 24x7 option.
    This is perplexing. Need to find a solution. Backup storage space is being rapidly consumed.

    I'm sure it will be fine for maintenance to run only on weekends so I'll do that.
    We use Veeam B&R Enterprise 7.0.0.833. We do not run incremental backups during the day but probably could if necessary. All this is fine and dandy but it still doesn't explain why this process generates so many logs. There are a lot of posts around
    the internet from people with the same issue so it would be nice to hear something from Microsoft, even if this is expected behavior.
    Thank you for the suggestions!

  • Oracle 10g R2 Database Redo Log Files

    I had 3 redo log files, each of size 50 MB. i added 3 more redo log files, each of size 250 MB.
    Database is running in archive mode, files are generating with different sizes like 44 MB and 240 MB, i need to know is this harm for database or not?
    to make all archive redo log files generation of equal size what should i do?
    Please guide

    Waheed,
    When the redo log switch willbe happening,oracle would be asking archiver to log that into the archive file.So in case you have any parameters set to make the switch happen at certain time,depending on the activity of teh database,the archive file size may vary.There is no harm wit the different sizes of the files.What matters is the transaction informaiton contained in them not their size.
    to make all archive redo log files generation of equal size what should i do?
    As mentioned by Syed, you can make the switch happen at a defined interval which will not ensure but still will be a step to make the archive files of the same size.But I shall say you should bother more about making sure that the files are available rather than their size.
    Aman....

  • Oracle Express Edition And Windows Encrypted File System (EFS)

    Hello,
    I want to use oracle express edition with windows encrypted file system. I tried some possibilities like encrypting xe folder. But connection can not be established when efs is used. Is there a compatibility problem between oracle xe and windows efs? On Oracle's page, it is declared that oracle database is compatible with Windows EFS.
    Thank you for help.

    Pl identify which version of Win 7 - 32-bit or 64-bit ? Home version or something else ?
    The 11g XE install is only available for 32-bit version of Win 7 Professional or higher - http://docs.oracle.com/cd/E17781_01/install.112/e18803/toc.htm#BABHICJH. If you are installing on 64-bit version or Home version of Windows, then you are on your own. What is the reason for enabling EFS on this database ?
    HTH
    Srini

  • How to check Oracle DB Status from Windows batch file

    Hi,
    I need a script which can be used to check the Oracle Database Status from windows command batch file.
    Thanks,
    Kishore

    Hi Virendra,
    I have followed the steps mentioned in ur reply, But couldn't get the output.
    I am getting the below error
    C:\>db_utility.bat PLPDEV
    ERROR:
    ORA-12560: TNS:protocol adapter error
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    C:\>
    Below is my bat file
    @echo off
    set ORACLE_SID=%1
    echo sys/ltd1_plp as sysdba
    echo set cmdsep on
    echo set cmdsep '"'; --"
    echo set term on
    echo "select status from v$instance;"
    ) | sqlplus -s
    Thanks

  • How to configure Log file generation

    Hi,
    I am in a migration project. Currently the OS is Unix. After migration it is going to be Windows.
    So we want to change the log files being created in Unix to Windows.
    Can anyone suggest any settings in SAP for the log file.
    Regards,
    Gijoy

    Hi Gijoy,
    can you please reformulate your question for better understanding?
    The log location and tracing severity setup mechanism is platform independent.
    After migration there's no necessary step(s) to be taken, the logs will be created in the same way on windows as on  unix under your current sap installation folder (e.g. defaultTrace is on unix under /usr/sap/.../j2ee/cluster/server<n>/log , on windows this will be <DRIVE:>\usr\sap\...\j2ee\cluster\server<n>\log)
    I hope this answers your question.
    Best Regards,
    Ervin

  • How to Monitor oracle Application in unix through log files?

    Hello Every Body,
    I Would Like To Know The Log Files locations to monitor the start-up and stop error entries in the logs , like web server where its log files located,...forms server ...etc
    is it in $COMMON_TOP ..if yes where..?
    one last Q: what should i do to be a pro-active apps dba?
    using unix -AIX commands
    Thanks and Regards,

    Startup/Shutdown logs
    $COMMON_TOP/admin/log/<SID_hostname>
    Apache logs
    $APACHE_TOP/Apache/Jserv/logs
    $APACHE_TOP/Apache/Jserv/logs/jvm
    Concurrent Manager Log Files
    $APPLCSF/$APPLLOG
    $APPLCSF/$APPLOUT
    Database Log Files
    $ORACLE_HOME/admin/<SID_hostname>/bdump
    You can also use Oracle Applcations Manager (OAM), with OAM you can view information on general system activity including the statuses of the database, concurrent managers and other services, concurrent requests, and Oracle Workflow processes. You can also start or stop services, and submit concurrent requests. You can also view configuration information, such as initialization parameters and profile options .. etc.

  • JDBC driver log file generation on v8i

    I want to know if there is a means to generate the log files for JDBC driver transactions similar to sqlnet.log file which gets created when the OCI connection is used between the client and server.
    Where should this be done - on the client/server side? Is there a means to enable it without touching any of native Java code by enabling it through Server/Client side setting?
    thanks

    You should ask your question in the JDBC forum found at:
    http://forums.oracle.com/forums/forum.jsp?forum=99

  • Itunes ipodservice windows log file location?

    I'm having an issue with one of my ipod touches. it's stuck in recovery mode and when I plug it into my computer (windows 8.1 64 bit with iTunes 12.1 64 bit). iTunes will not open. If I unplug the ipod touch 2nd gen, and kill all iTunes processes, iTunes will open. If I plug in my iPhone 5s, it will read it usually without many issues.(sometimes I do have an issue with it where iTunes opens but is frozen for a few minutes doing whatever it is doing.. but that's another issue for another day.)
    What I'd like is to see some log files. I believe the ipodservice is what's hanging up my iTunes when I plug in the ipod touch 2nd gen that's stuck in recovery mode.
    I've even tried jail break tools which attempt to fix recovery loops and or attempt to put the device into DFU mode which then I should be able to go into iTunes and restore my ipod touch 2nd gen. (note I only use the tools for their recovery options rather than for jailbreaking since I have no intent to jail break it.)
    Nothing appears to work. I cannot get iTunes to open up and see this device. If I open iTunes without it plugged in first, then plug it in once iTunes is opened, iTunes doesn't recognize it at all.
    I've yet to find any documentation that explains how you can turn on logging of iTunes services and or where they would be located. I'm sure the answer to my problem may lie within the logs..
    Anyone know where they could be?

    *bump* anyone out there?

  • Window Log file

    Hi guys, Im a newbie in Swing, and I have to show the content of a log file on real time, in a swing window while it is updated...
    How can I do that?
    Thanks

    No problem - here you are. There are also examples shipped with LV.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Writer.vi ‏21 KB
    Reader.vi ‏21 KB

  • Huge log file generation

    Hi,
    I have a report server.when i start the report server the size of log file located at
    $ORACLE_HOME/opmn/logsOC4J~Webfile2~default~island~1 > 2GB in 24 Hrs
    Please tell me what may be the root cause for this and what will be the possible solution for this.
    Please its urgent.

    Hi Jaap,
    First of all Thanks.
    how to set debuging off on the container?
    some lines of the messages in line are as follows:95178969 [AJPRequestHandler-ApplicationServerThread-90] ERROR com.allianz.weo.struts.StoredProcAction - SQLException while calling proc CUSTOMER.AZBJ_WEO_SECURITY.LOAD_MODULE_MENUS: ORA-01013: user requested cancel of current operation
    ORA-06512: at "CUSTOMER.AZBJ_WEO_SECURITY", line 107
    ORA-06512: at line 1
    95178969 [AJPRequestHandler-ApplicationServerThread-90] ERROR com.allianz.weo.struts.StoredProcAction - SQLException while calling proc CUSTOMER.AZBJ_WEO_SECURITY.LOAD_MODULE_MENUS: ORA-01013: user requested cancel of current operation
    ORA-06512: at "CUSTOMER.AZBJ_WEO_SECURITY", line 107
    ORA-06512: at line 1
    95178969 [AJPRequestHandler-ApplicationServerThread-90] ERROR com.allianz.weo.struts.StoredProcAction - SQLException while calling proc CUSTOMER.AZBJ_WEO_SECURITY.LOAD_MODULE_MENUS: ORA-01013: user requested cancel of current operation
    ORA-06512: at "CUSTOMER.AZBJ_WEO_SECURITY", line 107
    ORA-06512: at line 1
    95178969 [AJPRequestHandler-ApplicationServerThread-90] ERROR com.allianz.weo.struts.StoredProcAction - SQLException while calling proc CUSTOMER.AZBJ_WEO_SECURITY.LOAD_MODULE_MENUS: ORA-01013: user requested cancel of current operation
    ORA-06512: at "CUSTOMER.AZBJ_WEO_SECURITY", line 107
    ORA-06512: at line 1
    07/07/12 12:18:32 DriverManagerConnectionPoolConnection not closed, check your code!
    07/07/12 12:18:32 (Use -Djdbc.connection.debug=true to find out where the leaked connection was created)
    Regards,
    Sushama.

  • Deployment failing when running .bat script or command line file package

    HI Guys,
    I am trying to run a .bat file on a client using a program. My data source point to the script's folder.
    I keeps failing with error 1. 
    I have trying making run in 64-bit using this without luck: http://madluka.wordpress.com/2012/09/24/configmgr-2012-64bit-file-system-redirection-bites-again/
    Here is the content of my .bat file:
    @ECHO OFF
    IF NOT "%PROCESSOR_ARCHITEW6432%"=="AMD64" GOTO native
      ECHO "Re-launching Script in Native Command Processor..."
      %SystemRoot%\Sysnative\cmd.exe /c %0 %*
      EXIT
    :native
    ECHO "Running Script in Native Command Processor..."
    c:\
    cd c:\windows\System32
    start cmd.exe /c shutdown -l
    stop
    I will get the same error when running a simply command line as well. Instead of a .bat file.
    any ideas?

    Maybe this will help you:
    http://blog.coretech.dk/kea/configuration-manager-shutdown-utility
    This instead of using "shutdown.exe -l" command. This tool can be used for logoff also. Hope it helps!
    My blogs: Henk's blog and
    Virtuall | Follow Me on:
    Twitter | View My Profile on:
    LinkedIn

  • Check oracle db status from windows batch file?

    Hi
    any body have a batch to do that
    i want to check connecting , not just the service
    thanks very much

    I have a process in batch files (dos programming )which prepare some files then call oracle store procedures, i need to have a way to check >if the database is up(open) before i start my processingHow can I tell if the light will light without turning on the switch?
    While it can be done, the simplest & easiest way is to try to connect for real & trap any error which may result from it not working.

Maybe you are looking for

  • How do I enable Flash files to be viewable in a PDF?

    My organization publishes our magazine in electronic form as a PDF. Our designer uses InDesign to layout everything and then exports it as a PDF. We have encouraged our authors to use Flash files within their articles to help demonstrate scientific c

  • Microsoft Office 2004 for Mac - missing options

    Hello! I've got some trouble with Microsoft Office 2004 for Mac: I realized that there are some options missing in the menu bars, such as "Insert > Cross-reference", etc. Today I reinstalled the whole thing including all updates (11.3.7). No success.

  • Connection to MS Access 2002 with password setting

    Hello together, i have a MS Access 2002 file with password protection. Now i want to connect with SQL Developer 1.1 (Win) to these "Database" File. The Connection to a unprotected File is running well. I it possible to connect to a protected Access D

  • Rebate Activation for Customer

    Hi Gurus, For Rebate functionality as per standard it is required to activate the payer master record of the Customer for Rebate functionality. In our case Customer X has a payer as Y. Is it sufficient if i activate Y for rebate functionality Or it i

  • No PXA Memory dump

    Hi all, program: added 25 lines of coding, while saving i am getting the Dump error. the Description:   No PXA storage space available at the moment. The current ABAP/4 program had to be terminated because there was no space available to load it. Eac