How to get history in sqlplus shell?

SQL> ^[[A
I don't want special characters to appear when I hit the up/down arrow but history of command. What settings should I use?

Any corresponding thing in windows?
UPDATE :
Found this out :
http://blog.enkitec.com/2010/04/using-sqlplus-with-rlwrap-on-ms-windows/
Edited by: user7959588 on Apr 27, 2012 7:10 PM

Similar Messages

  • How to get ddls from sqlplus like that of TOAD

    Hi,
    I have to work on a terminal machine for a client where the TOAD is not installed. For my regular DBA activities I need to take the DDL many times.
    I am very much used to the style of DDL scripts which TOAD 9.6.x.x gives for any object in a schema.
    Can someone suggest how I can I get exactly TOAD-like scripts (which provide not just the create statements)
    For e.g.
    *1.From sqlplus when I do*
    select dbms_metadata.get_ddl('TABLE','APE1_ACCUMULATORS') from dual;
    I get only the below
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    *2.But from TOAD 9.6.x.x when i click on "create scripts" I will get*
    DROP TABLE XLTDBO92.APE1_ACCUMULATORS CASCADE CONSTRAINTS;
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    DROP SYNONYM XLTDB92.APE1_ACCUMULATORS;
    CREATE SYNONYM XLTDB92.APE1_ACCUMULATORS FOR XLTDBO92.APE1_ACCUMULATORS;
    GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92.APE1_ACCUMULATORS TO XLTDBO92_ALL;
    So my question is:
    How to such scripts from sqlplus as well ,irrespective of the type of the object?_
    Note:I am posting a new thread because my previous question was answered even though i was not able to type in completely. My mistake as it was posted in before i could finish the question.
    Regds,
    Kunwar

    If the DDL returned by dbms_metadata is not to your liking then write your own scrips to generate DDL or cover scripts to generate all related items that you want.
    In the case of synonyms and grants this is very easy using rdbms dictionary views, but if you generate a table's DDL you may also want and need the PK, UK, FK, secondary indexes, comments, and policies on the table as well as synonyms and grants. Everything that if you drop the tables goes away.
    There is a dbms_metaddata procedure get_dependent_ddl to generate dependend objects on a table that may be of interest.
    HTH -- Mark D Powell --

  • How can get history and coockies back?

    I deleted my browser history and cookies I suppose.
    I was on a trip and added quite a bit of data.
    Back home I have the same hdd with all data intact.
    How can I copy just that data into my installed hdd now?
    If I use migrate, I think, it will overwrite my existing data....?
    Or is there a way, just to get all cookies and history only back?
    I can not access to some sites, because I don't remember the password. With the old hdd, it loges in automatically.
    Dorian

    dwctv wrote:
    Or is there a way, just to get all cookies and history only back?
    See SAFARI or FIREFOX in #28 of [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of the +Time Machine+ forum).
    It shows the file names & locations to copy.
    I can not access to some sites, because I don't remember the password. With the old hdd, it loges in automatically.
    You may need the KEYCHAIN listed there, as well.
    Message was edited by: Pondini

  • How to get adobe acrobat to shell menu

    I have acrobat 9.  when installed on a previous computer, I had several choices for using acrobat on the normal right click menu (create a pdf, join multiple files in  pdf, etc.).
    after installing on  a new computer I don't have these options.  How can I get those acrobat functions included as choices when I right click on a file?
    thanks
    Jim Sealy

    You might be able to purchase copies of this long-discontinued
    software from a special broker.
    Aandi Inston

  • Satellite L300D - How to get rid of Aston Shell software

    Hi
    I bought a new computer Satellite L300D last month and was very happy with it.
    Unfortunately yesterday, by accident, I ran a progrmme called Aston Shell.
    My entire screen computer changed.
    When it came up on MacAffee it asked if I wanted to change my registry. I pressed NO.
    Now, it won't shut down properly, I don't know where to find my files. It also tells me this is a thirty day trial, so I'm afraid at the end of the thirty days my computer won't be any good.
    Some one told me I should be able to change back to to Windows Explorer through my preferences and that my OS shouldn't be affected.
    I don't know what that means. It was also suggested not uninstall Aston until I do this.
    Although I am grateful to this person for there advice, I don't know what to do. I'm getting into a bit of a panic.
    Can anyone please help me. Thankyou.

    Hi
    I think you should simply set back the OS to the early time point.
    Vista and XP supports such feature called system restore tool.
    Check this tool and set the OS to the time point before the Aston Shell has been installed.
    I think this should function!

  • How to get history DML on a table

    Hi All,
    I want to find a history DML operation on a table, for example, for yesterday the DML operation on EMP.
    Can anyone give me help and provide me with the query?
    Thanks,
    David

    check archive log date & time
    strings -a 1_27995.arc | grep -i "VSNL_CORP_ACCNUMINV_SEQ"
    strings -a 1_28006.arc | grep -i "VSNL_CORP_ACCNUMINV_SEQ"
    BEGIN
    SYS.DBMS_LOGMNR.ADD_LOGFILE (LOGFILENAME => '/archive01/GENEVACP/1_29100.arc',OPTIONS => SYS.DBMS_LOGMNR.NEW);
    END;
    -- BEGIN
    -- SYS.DBMS_LOGMNR.ADD_LOGFILE (LOGFILENAME => '/data07_temp/logmnr/1_27996.arc',OPTIONS => SYS.DBMS_LOGMNR.ADDFILE);
    -- END;
    BEGIN
    SYS.DBMS_LOGMNR.START_LOGMNR(OPTIONS => SYS.DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);
    END;
    select distinct(operation) from V$LOGMNR_CONTENTS;
    select to_char(TIMESTAMP, 'DD-MON-RR:HH24:MI:SS'),COMMIT_TIMESTAMP,LOG_ID, SESSION# ,SERIAL# ,USERNAME,SESSION_INFO,OPERATION,SQL_REDO,SQL_UNDO
    from V$LOGMNR_CONTENTS
    where OPERATION in ('UPDATE','INSERT','DELETE')
    and SEG_NAME='VSNL_CORP_ACCNUMINV_SEQ';
    BEGIN
    SYS.DBMS_LOGMNR.END_LOGMNR();
    END;
    ====================================================================
    Best Regards,
    Shishir Tekade.
    My Blog: http://shishirtekade.blogspot.com

  • How to get ORA errors in alertlog file using shell script.

    Hi,
    Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script.
    Thanks

    Hi,
    You can define the alert log as an external table, and extract messages with SQL, very cool:
    http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
    If you want to write a shell script to scan the alert log, see here:
    http://www.rampant-books.com/book_2007_1_shell_scripting.htm
    #!/bin/ksh
    # log monitoring script
    # report all errors (and specific warnings) in the alert log
    # which have occurred since the date
    # and time in last_alerttime_$ORACLE_SID.txt
    # parameters:
    # 1) ORACLE_SID
    # 2) optional alert exclusion file [default = alert_logmon.excl]
    # exclude file format:
    # error_number error_number
    # error_number ...
    # i.e. a string of numbers with the ORA- and any leading zeroes that appear
    # e.g. (NB the examples are NOT normally excluded)
    # ORA-07552 ORA-08006 ORA-12819
    # ORA-01555 ORA-07553
    BASEDIR=$(dirname $0)
    if [ $# -lt 1 ]; then
    echo "usage: $(basename) ORACLE_SID [exclude file]"
    exit -1
    fi
    export ORACLE_SID=$1
    if [ ! -z "$2" ]; then
    EXCLFILE=$2
    else
    EXCLFILE=$BASEDIR/alert_logmon.excl
    fi
    LASTALERT=$BASEDIR/last_alerttime_$ORACLE_SID.txt
    if [ ! -f $EXCLFILE ]; then
    echo "alert exclusion ($EXCLFILE) file not found!"
    exit -1
    fi
    # establish alert file location
    export ORAENV_ASK=NO
    export PATH=$PATH:/usr/local/bin
    . oraenv
    DPATH=`sqlplus -s "/ as sysdba" <<!EOF
    set pages 0
    set lines 160
    set verify off
    set feedback off
    select replace(value,'?','$ORACLE_HOME')
    from v\\\$parameter
    where name = 'background_dump_dest';
    !EOF
    `
    if [ ! -d "$DPATH" ]; then
    echo "Script Error - bdump path found as $DPATH"
    exit -1
    fi
    ALOG=${DPATH}/alert_${ORACLE_SID}.log
    # now create awk file
    cat > $BASEDIR/awkfile.awk<<!EOF
    BEGIN {
    # first get excluded error list
    excldata="";
    while (getline < "$EXCLFILE" > 0)
    { excldata=excldata " " \$0; }
    print excldata
    # get time of last error
    if (getline < "$LASTALERT" < 1)
    { olddate = "00000000 00:00:00" }
    else
    { olddate=\$0; }
    errct = 0; errfound = 0;
    { if ( \$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (dtconv(\$3, \$2, \$5, \$4) <= olddate)
    { # get next record from file
    next; # get next record from file
    # here we are now processing errors
    OLDLINE=\$0; # store date, possibly of error, or else to be discarded
    while (getline > 0)
    { if (\$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    OLDLINE = \$0; # no error, clear and start again
    errfound = 0;
    # save the date for next run
    olddate = dtconv(\$3, \$2, \$5, \$4);
    continue;
    OLDLINE = sprintf("%s<BR>%s",OLDLINE,\$0);
    if ( \$0 ~ /ORA-/ || /[Ff]uzzy/ )
    { # extract the error
    errloc=index(\$0,"ORA-")
    if (errloc > 0)
    { oraerr=substr(\$0,errloc);
    if (index(oraerr,":") < 1)
    { oraloc2=index(oraerr," ") }
    else
    { oraloc2=index(oraerr,":") }
    oraloc2=oraloc2-1;
    oraerr=substr(oraerr,1,oraloc2);
    if (index(excldata,oraerr) < 1)
    { errfound = errfound +1; }
    else # treat fuzzy as errors
    { errfound = errfound +1; }
    END {
    if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    print olddate > "$LASTALERT";
    function dtconv (dd, mon, yyyy, tim, sortdate) {
    mth=index("JanFebMarAprMayJunJulAugSepOctNovDec",mon);
    if (mth < 1)
    { return "00000000 00:00:00" };
    # now get month number - make to complete multiple of three and divide
    mth=(mth+2)/3;
    sortdate=sprintf("%04d%02d%02d %s",yyyy,mth,dd,tim);
    return sortdate;
    !EOF
    ERRMESS=$(nawk -f $BASEDIR/awkfile.awk $ALOG)
    ERRCT=$(echo $ERRMESS|awk 'BEGIN {RS="<BR>"} END {print NR}')
    rm $LASTALERT
    if [ $ERRCT -gt 1 ]; then
    echo "$ERRCT Errors Found \n"
    echo "$ERRMESS"|nawk 'BEGIN {FS="<BR>"}{for (i=1;NF>=i;i++) {print $i}}'
    exit 2
    fi

  • How to get command history with timestamp ?

    how to get command history with timestamp ?

    If you are using bash:
    HISTTIMEFORMAT If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Aug/08 - 19:07:52 chmod a+rwx /root
        2  Aug/08 - 19:07:52 ll /
        3  Aug/08 - 19:07:52 tail -f /root/mylog.log
        4  Aug/08 - 19:07:52 vi /usr/dt/bin/Xsession
        5  Aug/08 - 19:07:52 cat /root/mylog.log
        6  Aug/08 - 19:07:52 ls /export/home/p661210/.dt
        7  Aug/08 - 19:07:52 ls -la  /export/home/p661210/.dt
        8  Aug/08 - 19:07:52 cat  /export/home/p661210/.dt/errorlog
        9  Aug/08 - 19:07:52 vi /usr/dt/config/C/sys.dtwmrc
       10  Aug/08 - 19:07:52 ls
       11  Aug/08 - 19:07:52 cat Xresources.jds
       12  Aug/08 - 19:07:52 vi /usr/dt
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    [SunOS 5.8/bash] root@wgls03:/root
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Jul/07 - 09:02:21 vi /etc/vfstab
        2  Jul/07 - 09:02:21 mount /store
        3  Jul/07 - 09:02:21 cd /store/bnz
        4  Jul/07 - 09:02:21 ls
        5  Jul/07 - 09:02:21 ./BNZ_installBaseSoftware
        6  Jul/07 - 09:02:21 find /usr -name gunzipCheers,
    Andreas

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Urgent: How To Get Vendor History Report

    Hi Sap Techies,
    Please can Any one help me how To Get Vendor History Report and Which Transaction Code I have To use or Do i Need to write any Programs For that
    Moderator: Please, search before posting

    Dear,
    What type of history you want for Vendor, you want list of Vendor or you want transaction data for Vendor
    For Vendor transaction use FBL1N and for Vendor List you can use S_ALR_87012086
    Hope it helps!!
    Br,Vivek

  • I have no "File - Edit - History - Bookmarks tool bar at the top of my screen and can't figure out how to get it!

    new desktop, new user of Windows 7. Made Firefox my browser as always, with Yahoo as my home page. There is no tool bar at the top of my screen that says "File - Edit -- History __ etc the way I have always had! I can't figure out how to get this, and I need it! Help!!

    Press the alt key next to the spacebar. Do you see it now? If so, click View -> Toolbars" and check the Menu bar. See [[Menu bar is missing]] for more information.

  • How to get my purchase history back?

    Hi,
    I suspect the merge between Nokia Dev and Ovi accounts to have deleted all my purchase history. The last 9th of september, I purchased Billboard for my N9. So, it was less than a year before, it should be still valid and I should still be able to download the app.
    How to get this purchase information back? Of course I kept the email this the purchase order.
    Thanks.

    @Farby: You're right. I marked it as solved because it seems a valid answer. But then I checked my purchase order and saw it is less than 12 months old. Of course, I should have checked before asking.
    @yasfer21: completely forgot the differences between the accounts, and the previous logins.
    So, my question still remains. Is there an email address I can contact to get my purchase back? Another way? Thanks.

  • How to get tables the size should be based on 3 months history.

    Hi,
    I am junior DBA, Actually, I want to get the details of columns D,E,F and G. For employee and dept tables the size should be based on 3 months history.
    How to get pls suggest me.
    Regards,
    Venkat.
    Junior DBA

    Venkat wrote:
    Hi,
    I am junior DBA, Actually, I want to get the details of columns D,E,F and G. For employee and dept tables the size should be based on 3 months history.
    How to get pls suggest me.
    Regards,
    Venkat.
    Junior DBAWhat are columns D,E,F, and G? Size of what is based on three months history of what?? How does this size of an unknown entity relate to columns D,E,F and G?

  • How to get my writening history/log more than thre...

    How to get my writening history/log more than three months behind

    download SkypeLogView
    nirsoft.net/utils/skype_log_view.html
    and open the main.db file with it
    C:\Users\Tamim\AppData\Roaming\Skype\tamim\main.db
    can you see the history?
    Regards,
    Tamim
    Location - Dhaka | Bangladesh - Standard Time Zone: GMT/UTC + 06:00 hour
    If one of my replies has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.

  • How can get a database like ****.SQL file for test in sqlplus in oracle8i

    How can get a database like ****.SQL file for test in sqlplus in oracle8i,I am a beginner,thanks

    I'll give it a guess as to what it is you want but I'm afraid you'll have to give some more information to go on. I appreciate it's difficult for people who are beginners or who don't have English as their first language.
    Are you trying to run a SQL file? From SQL*plus you can do either of these:
    SQL> start my_file
    or
    SQL> @my_file
    N.B.: if th efile has a .sql extension you don't need to include it, but you do for any other file extension e.g.
    SQL> @myfile.run
    Here is the page Vijay referred to:
    Re: Physical storage Checks & adding disk on server. I hope you find it useful.
    You will more helpful links (including links to the Oracle on-line manuals at this page:
    Re: How to attach a java bean in forms6i
    good luck, APC

Maybe you are looking for