How to add timestamp to log file in SQL * more?

Version: 11.2.0.3
Platform: RHEL 5.8 (but I'm looking for a solution that is independent of the platform)


I want to add the timestamp file name of the log queued in SQL * more.
The name of the queued log file should look like
WMS_APP_23-March-2013.log
I tried the 3 following methods found in the google. But none of them worked!


I tried this
col sysdt noprint new_value sysdt_var
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt_var.Log
as suggested in
http://power2build.WordPress.com/2011/03/11/sqlplus-spool-name-with-embedded-timestamp/

and this
spool filename with timestamp
col sysdt noprint new_value sysdt
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt..Log
as suggested in

http://powerbuildev.WordPress.com/2011/03/11/sqlplus-spool-name-with-embedded-timestamp/


and this
column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
prompt &file_time
spool logfile_id&file_time..log
as suggested in
Creating a queue with date/time added file name



None of these worked in RHEL or MS DOS. No work around?

You are explicitly turned off the replacement of the variables of substitution with the statement "all set."
http://docs.Oracle.com/CD/E11882_01/server.112/e16604/ch_eight.htm
"SET DEFINE OFF disables the analysis of orders to replace variables with their values substitution."

Tags: Database

Similar Questions

  • Cannot add the new log file for the 11g database.

    Salvation of DBA

    I'm not able to add the log file, I receive the error message when the database is added.

    SQL > alter database add logfile group 3 ('/ oracle/DEV/db/apps_st/data/log03a.dbf','/oracle/DEV/db/apps_st/data/log03a.dbf') Re-use of size of 50 m;
    alter database add logfile group 3 ('/ oracle/DEV/db/apps_st/data/log03a.dbf','/oracle/DEV/db/apps_st/data/log03a.dbf') Re-use of 50 m of size
    *
    ERROR on line 1:
    ORA-01505: Error adding log files
    ORA-01577: cannot add the log file ' / oracle/DEV/db/apps_st/data/log03a.dbf'-fichier
    already a part of the database

    SQL > select a.group #, a.status, a member of the journal of v$ a, v$ logfile b where a.group # order of b.group = # 1;

    GROUP # MEMBER STATUS
    ---------- ---------------------------------------- ----------
    1 ACTIVE /oracle/DEV/db/apps_st/data/log01a.dbf
    1 ACTIVE /oracle/DEV/db/apps_st/data/log01b.dbf
    /Oracle/DEV/db/apps_st/data/log02a.dbf CURRENT 2
    /Oracle/DEV/db/apps_st/data/log02b.dbf CURRENT 2

    Kindly help me to add the new log file to my database.

    Thank you
    SG

    PGO

    Please see (how can redo log group be dropped when it ever becomes inactive?) [ID] 730827.1).

    Thank you
    Hussein

  • How to add records to a file via the file adapter.

    Hi all
    How to add records to a file via the file adapter.

    I must read data from the database and need to add all the records in a file.

    Thanks in advance.

    Hello

    I think you have a while loop to hit the DB in your process (as you said you need to extract data from DB 10 times if 1000 rec is here)
    First sopy your DB O/P to a var
    and second time add to previous data. (Otherwise you can directly use Add to start instead of copy and add)
    When the loop ends, you can turn to the file adapter Var.

    Otherwise, you can configure yourFileadapter as it will be aapend current recordings for previous records.

    You can use 'Append = true' in your adapter wsdl file.
    It will add the previous records to existing records in the same file.

    Concerning
    PavanKumar.M

  • How to generate Trace files in SQL * more

    Hi friends,

    How to generate Trace files in SQL * more?

    I have no idea



    Thank you

    REDA

    http://www.orafaq.com/wiki/SQL_Trace

  • try to find how to add timestamp to the notes I put in the section notes to contacts

    try to find how to add a timestamp to the notes I put in the section notes to a contact

    Hello jlaneco,

    Thank you for visiting the Microsoft answers community. The question you have posted is related to Office Outlook and would be better suited to the Community Office Outlook. Please visit the link below to find a community that will provide the support you want.

    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Office.misc&lang=en&CR=us

    I myself have sought a solution to this problem and have not found one solution viable, other than having to click Date & time whenever you want to place a stamp in your notes.

    Hope this helps

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I check the log files

    I want to find my syslogs in windows 7. I faced a problem with ip address conflict. I need to know what is happening in my system/network. How can I check this problem?

    On the Start Menu, right-click on computer, and in the menu, click on manage.

    In the left pane, under System Tools, you will find event viewer, click on the arrow symbol.

    Which will display 4 submenus, some newspapers of Windows. Which displays a set of available log files than two sector those troubleshooting application logs and system. When you click in the left pane events will populate the middle pane with the most recent on top.

    The right pane has various tools that are active when a newspaper is opened.

  • How to add text to the file selected?

    I have already updated title but I don't know how to add it to the selected real file (the one in the middle)... I read on some other forums but its still confuse me.  Also, is there anyway to add the effect of movement, as drag in or dissolve almost?

    Screen Shot 2016-02-19 at 10.27.40 PM.png

    I mean this in the nicest way possible, but it's very wacky workspace you put in place there. Create titles is muuuuch easier in the standard workspace Edition. When you create / open a title in the editing workspace, he creates a floating large window with the title of all the members of panels. It is about the only time I am ok with windows in the first floating. You will create the title in the window title, and then close the window title entirely. The video for the title will then be in your project Panel (which you can not common to see in your current workspace configuration, but will be very apparent in the workspace standard edition in the lower left). So the best thing to do is to simply drag the title element of the project to sequence Panel (another Panel today, you don't see in your current workspace arrangement.

  • How can I access the log files of the application of a ThinApp on the virtual drive?

    I thinstalled an application using the v4.6 and I am able to launch and run the captured application.

    But the application creates log files to:

    c:\Program files\ensembleProAgent\LOGS\

    So I can access them on of ThinApp virtual drive?

    If so, any help is appreciated, I don't know where is the virtual drive or how I can access / read it.

    Thank you

    Joel

    Hello

    A virtual drive in the world of ThinApp means a disk that you have virtualized so he will be present for the virtualized application. If you mean by the word virtual drive where we keep the changes not applied to the physical environment are you talking about what we call the sandbox. Default location would be users with roaming profiles in a folder called Thinstall (ThinApp used to be called Thinstall until VMware has acquired the product)... Method of pomp for the sandbox would be to hit start - run on your client and enter %APPDATA%\microsoft\windows\sendto and click OK...

  • PL/SQL to add archived redo log files to logminer

    Hello
    I'm doing a program to automatically add files of newspapers to logminer utility, all archived redo as below,

    -logmnr.sql
    Set serveroutput on

    declare

    v_redo_dictionary_file VARCHAR2 (100);
    v_arihived_log_file VARCHAR2 (100);

    CURSOR logfile_cur IS
    SELECT name from v$ archived_log WHERE the to_char (COMPLETION_TIME, 'dd_MM_yyyy') > '18_01_2010' and not in sequence # (select sequence # v$ archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES');


    Start

    -Create the DICTIONARY file on the files of the SOURCE database redo
    sys. DBMS_LOGMNR_D.build (OPTIONS = > sys.) DBMS_LOGMNR_D.store_in_redo_logs);

    Select name from v_redo_dictionary_file from v$ archived_log where DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES', and sequence # = (select MAX(sequence#) from v$ archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES');

    -Add newspapers of dictionary files

    sys.dbms_logmnr.add_logfile (nom_fichier_journal = > v_redo_dictionary_file,)
    Options = > sys.dbms_logmnr.new);
    -Add the log files

    Open logfile_cur;

    LOOP

    SEEK logfile_cur INTO v_arihived_log_file;

    sys.dbms_logmnr.add_logfile (nom_fichier_journal = > v_arihived_log_file);

    EXIT WHEN logfile_cur % NOTFOUND;

    END LOOP;

    CLOSE Logfile_cur;

    -Start LogMiner, also enable the ddl

    sys.dbms_logmnr.START_LOGMNR (options = > sys.dbms_logmnr.dict_from_redo_logs + sys.dbms_logmnr.ddl_dict_tracking);


    EXCEPTION
    WHILE OTHERS
    THEN
    DBMS_OUTPUT. PUT_LINE (SQLERRM);

    END;
    /


    ##
    SQL > @logmnr.sql
    ORA-01013: user has requested the cancellation of the current operation
    ORA-01289: cannot add logfile in double /usr/tmp/arch/1_4026_573231463.dbf

    ##
    SQL > select name from v$ archived_log WHERE the to_char (COMPLETION_TIME, 'dd_MM_yyyy') > '18_01_2010' and not in sequence # (select sequence # v$ archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES');

    NAME
    --------------------------------------------------------------------------------
    /usr/tmp/arch/1_3973_573231463.dbf
    /usr/tmp/arch/1_3974_573231463.dbf
    /usr/tmp/arch/1_3975_573231463.dbf
    /usr/tmp/arch/1_3977_573231463.dbf
    /usr/tmp/arch/1_3978_573231463.dbf
    /usr/tmp/arch/1_3979_573231463.dbf
    /usr/tmp/arch/1_3981_573231463.dbf
    /usr/tmp/arch/1_3982_573231463.dbf
    /usr/tmp/arch/1_3983_573231463.dbf
    /usr/tmp/arch/1_3984_573231463.dbf
    /usr/tmp/arch/1_3986_573231463.dbf

    NAME
    --------------------------------------------------------------------------------
    /usr/tmp/arch/1_3987_573231463.dbf
    /usr/tmp/arch/1_3988_573231463.dbf
    /usr/tmp/arch/1_3989_573231463.dbf
    /usr/tmp/arch/1_3990_573231463.dbf
    /usr/tmp/arch/1_3991_573231463.dbf
    /usr/tmp/arch/1_3992_573231463.dbf
    /usr/tmp/arch/1_3994_573231463.dbf
    /usr/tmp/arch/1_3995_573231463.dbf
    /usr/tmp/arch/1_3996_573231463.dbf
    /usr/tmp/arch/1_3997_573231463.dbf
    /usr/tmp/arch/1_3999_573231463.dbf

    NAME
    --------------------------------------------------------------------------------
    /usr/tmp/arch/1_4001_573231463.dbf
    /usr/tmp/arch/1_4003_573231463.dbf
    /usr/tmp/arch/1_4004_573231463.dbf
    /usr/tmp/arch/1_4005_573231463.dbf
    /usr/tmp/arch/1_4006_573231463.dbf
    /usr/tmp/arch/1_4007_573231463.dbf
    /usr/tmp/arch/1_4009_573231463.dbf
    /usr/tmp/arch/1_4010_573231463.dbf
    /usr/tmp/arch/1_4011_573231463.dbf
    /usr/tmp/arch/1_4012_573231463.dbf
    /usr/tmp/arch/1_4013_573231463.dbf

    NAME
    --------------------------------------------------------------------------------
    /usr/tmp/arch/1_4015_573231463.dbf
    /usr/tmp/arch/1_4017_573231463.dbf
    /usr/tmp/arch/1_4018_573231463.dbf
    /usr/tmp/arch/1_4019_573231463.dbf
    /usr/tmp/arch/1_4020_573231463.dbf
    /usr/tmp/arch/1_4022_573231463.dbf
    /usr/tmp/arch/1_4023_573231463.dbf
    /usr/tmp/arch/1_4025_573231463.dbf
    /usr/tmp/arch/1_4026_573231463.dbf


    Why do I get error ' ORA-01289: cannot add duplicates logfile usr/tmp/arch/1_4026_573231463.dbf'

    Please suggest,

    Thank you
    Roy

    sys.dbms_logmnr.add_logfile (nom_fichier_journal-online v_arihived_log_file);
    EXIT WHEN logfile_cur % NOTFOUND;

    not above but below
    EXIT WHEN logfile_cur % NOTFOUND;
    sys.dbms_logmnr.add_logfile (nom_fichier_journal-online v_arihived_log_file);

    reverse the order of the 2 lines

  • How to add comments to several files in the finder using automator?

    I need to add comments to multiple files in the finder. Can I do this using Automator application, without going file-by-file and press command + i to add a comment one by one?

    Hello

    Open the Automator application:

    Select the Service icon

    Create the workflow, as this image

    Save the workflow.

    -----------

    After that, to add comments:

    Selectionner select files in the Finder, right-click on the selected files and select your service in the menu 'Services' in the context menu.

  • How to: add comments to a file.

    In XP with the help of the "Details" display files, right-click in the topic area columns would provide a list of possible columns, then selecting the comments field he would place this column on the screen. "» It is also possible with Win7, well.

    In XP, we could add a comment to a folder (for almost any type of file in any folder) by double-clicking on the file and selecting the properties option and then selecting the Summary tab you could type a comment, and it was posted in the comments on the file screen. He has worked for almost all types of files and has been VERY useful when filenames were the better undescriptive, (most of the time).
    In Win7 it seems that it is NOT possible for almost all files types, very disappointing!
    Is this feasible?

    Hello

    What type of files you are unable to add comments to?

    You can add comments and change the properties of most of the files in Windows 7. But you cannot add comments to some files that have been
    blocked by the author. You will not be able to add comments to the .exe files.

    See the mentioned link below for more information:

    Change the properties of a file:

    http://Windows.Microsoft.com/en-us/Windows7/change-the-properties-for-a-file

    Kind regards
    Amal-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to add the external css file to the _edge.js file

    I tried to add in the html page, but when I save the edge project it deletes.

    I'm able to add the external js file in scripts: [] in the _edge.js file

    We can add inside resources: []?

    And is it possible to add an external css in files of edge except in page html and javascript?

    CSS:

    Please put this in scene/creationComplete (file name change to your file name and path)

    $(" ",{"rel":"stylesheet","type":"text/css","href":"css/finename.css"}).append ("#Sta ge»);"})

    Add! important in CSS file properties.

    js files should be loaded with the upload script Panel on the right side of your user interface.

  • How can I purge transaction logs files?

    I have a transactional database (i.e., created by using the db. DB_CREATE | DB. DB_INIT_TXN | DB. DB_INIT_LOCK | DB. DB_INIT_LOG | DB. DB_INIT_MPOOL flags) which also generates a file log.0000000001 as part of its operation.

    The log file exceeds the limit of 10 MB by default recently, and I saw this error: ' Region of logging out of memory»

    While it was easy enough to fix (temporarily) by setting the variable configuration set_lg_regionmax for a larger number, is it possible to purge just the file log.0000000001 to something significantly less than 10 MB?

    In my PB, I don't have a history longer than the previous transaction, so no logging more is superfluous.

    Hello

    Yes, by using the DB_LOG_AUTO_REMOVE flag with the log_set_config of the environment
    method automatically deletes log files that are no longer needed. Another suggestion is to take a look at the method of log_archive environment with the DB_ARCH_REMOVE flag, which also removes log files that are no longer needed. It is documented at:

    http://www.Oracle.com/technology/documentation/Berkeley-DB/DB/api_reference/C/logArchive.html

    Thank you
    Sandra

  • How to add the archivelog ASM file in the package logmnr

    Hello...
    I use logminner to study the archivelog transaction, but transactions do not come... Please can any one give me how can I add archivelog to logmnr ASM file.
    ex:
    Start
    dbms_logmnr.add_logfile('+Flash/prod/arc00001_0731430024.001');
    end;
    /

    When I am adding above successful procedure...
    But when I tried under query his not giving any selected lines.
    ex:
    Select SQLl_UNDO from v$ logmnr_contents;
    .. .no lines selected...

    But when I tried on different machine.its work for tesing purposes...

    Start
    dbms_logmnr.add_logfile('c:/Flash/prod/arc00001_0731430024.dbf');
    end;

    Select sql_undo from v$ logmnr_contents;
    200 selected lines...


    Please y at - it another method for ASM logmnr.

    Hello
    my fault... lie additional logging:
    To the query if it is enabled:
    SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$ DATABASE;
    To enable:
    ALTER DATABASE ADD LOG ADDITIONAL DATA;
    Sebastian

  • How to add the JSON.jar file in bb OS 4.5?

    Hi all

    I have a problem in the analysis of a json file in BlackBerry os 4.5 and 5.0. I added the JSON.jar file in my project. I am trying to execute that project throws "Eception Exception: java.lnag.NoClassDefFound Error". I think that the jar file does not work correctly. How to solve this problem?

    Thank you

    Yes, add org folder to the source of your application.

Maybe you are looking for

  • Photoshop CC15 OS Sierra problem

    Given that I've updated my MBP mid-2014 the ALT KEY does not work in Photoshop. It is almost impossible using the tool clone with the ALT key. I have tried both (left and right alt key) they have acted similarly. I configured a button on my wacom wit

  • Time Machine does not work with Time Capsule, after update of Yosemite to iMac 2011

    My Time Capsule features all work except when trying to access files with Time Machine. It is new and can be linked to an update in Yosemite. Tried rebooting both without success.

  • Win 2000 license

    If I install Windows 2000 on a number of machines Windows NT how can I license these machines? I have a license of NT for each PC, but 1 single license of Windows 2000

  • Unable to connect to my wireless printer after changing my internet router

    I recently had an upgrade of the router and the printer now appears offline. The new router has a different password but I don't know how to change the settings of the printer so that the printer to access the new network. Please notify

  • My Windows is not activated.

    I recently had to wipe my laptop and have a friend help reinstall. Now, I get the error that my Windows is not activated. I don't know what it is hence why I get this error. Can someone help me with this?