1

How can I check the previous command line history in sybase command line?

2

Unless you have enabled history in isql, then you are out of luck.

Moving forward, you can enable it by following these directions:

Check http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1570100/doc/html/san1367605044069.html for details of --history parameter:

--history [p]history_length [--history_file history_filename] – Loads the contents of the command history log file, if it exists, when isql starts. By default, the command history feature is off. Use the --history command line option to activate it.

  • p – indicates command history persistence; in-memory command history is saved to disk when isql shuts down. If you do not use the p option, the command history log is deleted after its contents are loaded into memory.

  • history_length – this parameter, which is required if you use --history, is the number of commands that isql can store in the command history log. The maximum value of history_length is 1024; if a larger value is specified, isql silently truncates it to 1024.

  • history_file history_filename – indicates that isql must retrieve the command history log from history_filename. If p is specified, isql also uses history_filename to store the current session’s command history. history_filename can include an absolute or a relative path to the log file. A relative path is based on the current directory. If you do not indicate a path, the history log is saved in the current directory. When --history_file is not specified, isql uses the default log file in $HOME/.sybase/isql/isqlCmdHistory.log.

0

The other option could be to use SQSH which is a sort of enhanced ISQL. http://sourceforge.net/projects/sqsh/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.