2012-01-27 6 views
0

私はnohupコマンドを初めて使っていますが、私はそれをよく理解していません。 私は私が今nohupがSQLとログを開始しています

login as: **username** 
[email protected]'s password:**xx** 

[email protected]:~> cd /fs01/app/rms04/external/scripts 
[email protected]:/fs01/app/rms04/external/scripts> sqlplus $UP 

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jan 27 16:16:50 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved. 

Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 
- 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 

[email protected]> 

ので、次のコマンドが

[email protected]>nohup update_item_loc.sql > /fs01/app/rms04/external/logs/update_item_loc.log & 

だろうまで、次のコマンドを実行したパテ

でそれを呼んでいるupdate_item_loc.sqlと呼ばれるSQLスクリプトを持っていますこれは正しいです?

答えて

5

Um、no。

nohupはsqlplusコマンドではありません。シェルプロンプトでnohupを使用して、バイナリまたはシェルスクリプトを実行することができます。だから、

、あなたはこのようになりますtest.sql内持っている場合:

select * from dual; 
exit 

を、あなたはシェルスクリプトから実行し、次のようになりrun_test.sh:

export ORACLE_SID=mysid 
export ORAENV_ASK=NO 
. oraenv 
sqlplus myuser/[email protected]$ORACLE_SID @test.sql 

あなたは

$ nohup run_test.sh & 

希望することができます。

+0

ありがとうございました – Eve

0

は、たぶん、あなたが何をしたいのか、接続が無いための活動の終了、あなたはパテの接続設定を変更することができないようにすることです:私はそれを設定0より大きい数にキープアライブ間

  • 秒360秒
  • 有効TCP Keep Alivesオプションを有効にする
関連する問題